Skip to content

Commit

Permalink
Remove ENABLE_DOWNLOAD_ATTRIBUTE directive
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=265351

As a side effect enable this feature on WPE (which is desired).

Reviewed by Michael Catanzaro.

* LayoutTests/platform/wpe/imported/w3c/web-platform-tests/html/dom/reflection-text-expected.txt: Removed.
* LayoutTests/platform/wpe/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-area-element/area-download-click-expected.txt: Removed.
* LayoutTests/platform/wpe/imported/w3c/web-platform-tests/html/semantics/text-level-semantics/the-a-element/a-download-click-expected.txt: Removed.
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WTF/wtf/PlatformEnable.h:
* Source/WebCore/html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::handleClick):
* Source/WebCore/html/HTMLAnchorElement.idl:
* Source/WebCore/html/HTMLAreaElement.idl:
* Source/WebKitLegacy/mac/DOM/DOMHTMLAnchorElement.mm:
(-[DOMHTMLAnchorElement setDownload:]):
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsWin.cmake:
* Source/cmake/WebKitFeatures.cmake:
* Tools/Scripts/webkitperl/FeatureList.pm:

Canonical link: https://commits.webkit.org/271131@main
  • Loading branch information
annevk committed Nov 27, 2023
1 parent bc0bc69 commit 06a4e2c
Show file tree
Hide file tree
Showing 13 changed files with 2 additions and 10,174 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2351,7 +2351,6 @@ DisallowSyncXHRDuringPageDismissalEnabled:
DownloadAttributeEnabled:
type: bool
status: embedder
condition: ENABLE(DOWNLOAD_ATTRIBUTE)
defaultValue:
WebKitLegacy:
default: false
Expand Down
4 changes: 0 additions & 4 deletions Source/WTF/wtf/PlatformEnable.h
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,6 @@
#define ENABLE_DESTINATION_COLOR_SPACE_LINEAR_SRGB 0
#endif

#if !defined(ENABLE_DOWNLOAD_ATTRIBUTE)
#define ENABLE_DOWNLOAD_ATTRIBUTE 1
#endif

#if !defined(ENABLE_DRAG_SUPPORT)
#define ENABLE_DRAG_SUPPORT 1
#endif
Expand Down
2 changes: 0 additions & 2 deletions Source/WebCore/html/HTMLAnchorElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,6 @@ void HTMLAnchorElement::handleClick(Event& event)
#endif

AtomString downloadAttribute;
#if ENABLE(DOWNLOAD_ATTRIBUTE)
if (document().settings().downloadAttributeEnabled()) {
// Ignore the download attribute completely if the href URL is cross origin.
bool isSameOrigin = completedURL.protocolIsData() || document().securityOrigin().canRequest(completedURL, OriginAccessPatternsForWebProcess::singleton());
Expand All @@ -611,7 +610,6 @@ void HTMLAnchorElement::handleClick(Event& event)
else if (hasAttributeWithoutSynchronization(downloadAttr))
document().addConsoleMessage(MessageSource::Security, MessageLevel::Warning, "The download attribute on anchor was ignored because its href URL has a different security origin."_s);
}
#endif

SystemPreviewInfo systemPreviewInfo;
#if USE(SYSTEM_PREVIEW)
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/html/HTMLAnchorElement.idl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
[CEReactions=NotNeeded, EnabledBySetting=PrivateClickMeasurementFraudPreventionEnabled, Reflect] attribute DOMString attributionSourceNonce;
[CEReactions=NotNeeded, Reflect] attribute DOMString charset;
[CEReactions=NotNeeded, Reflect] attribute DOMString coords;
[CEReactions=NotNeeded, Conditional=DOWNLOAD_ATTRIBUTE, EnabledBySetting=DownloadAttributeEnabled, Reflect] attribute DOMString download;
[CEReactions=NotNeeded, EnabledBySetting=DownloadAttributeEnabled, Reflect] attribute DOMString download;
[CEReactions=NotNeeded, Reflect] attribute DOMString hreflang;
[CEReactions=NotNeeded, Reflect] attribute DOMString name;
[CEReactions=NotNeeded, Reflect] attribute USVString ping;
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/html/HTMLAreaElement.idl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
[CEReactions=NotNeeded, Reflect] attribute DOMString shape;
[CEReactions=NotNeeded, Reflect] attribute DOMString target;

[CEReactions=NotNeeded, Conditional=DOWNLOAD_ATTRIBUTE, EnabledBySetting=DownloadAttributeEnabled, Reflect] attribute DOMString download;
[CEReactions=NotNeeded, EnabledBySetting=DownloadAttributeEnabled, Reflect] attribute DOMString download;
[CEReactions=NotNeeded, ImplementedAs=referrerPolicyForBindings] attribute [AtomString] DOMString referrerPolicy;

[PutForwards=value] readonly attribute DOMTokenList relList;
Expand Down
2 changes: 0 additions & 2 deletions Source/WebKitLegacy/mac/DOM/DOMHTMLAnchorElement.mm
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ - (void)setCoords:(NSString *)newCoords
IMPL->setAttributeWithoutSynchronization(WebCore::HTMLNames::coordsAttr, newCoords);
}

#if ENABLE(DOWNLOAD_ATTRIBUTE)
- (NSString *)download
{
WebCore::JSMainThreadNullState state;
Expand All @@ -78,7 +77,6 @@ - (void)setDownload:(NSString *)newDownload
WebCore::JSMainThreadNullState state;
IMPL->setAttributeWithoutSynchronization(WebCore::HTMLNames::downloadAttr, newDownload);
}
#endif

- (NSString *)hreflang
{
Expand Down
1 change: 0 additions & 1 deletion Source/cmake/OptionsGTK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CSS_PAINTING_API PRIVATE ${ENABLE_EXPERI
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CURSOR_VISIBILITY PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DARK_MODE_CSS PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DATALIST_ELEMENT PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DOWNLOAD_ATTRIBUTE PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ENCRYPTED_MEDIA PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FILTERS_LEVEL_2 PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FTPDIR PRIVATE OFF)
Expand Down
1 change: 0 additions & 1 deletion Source/cmake/OptionsWin.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(USE_SYSTEM_MALLOC PRIVATE ON)
# Enabled features
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CSS_CONIC_GRADIENTS PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DARK_MODE_CSS PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DOWNLOAD_ATTRIBUTE PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FILTERS_LEVEL_2 PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_LEGACY_ENCRYPTED_MEDIA PUBLIC OFF)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MODERN_MEDIA_CONTROLS PRIVATE ON)
Expand Down
1 change: 0 additions & 1 deletion Source/cmake/WebKitFeatures.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ macro(WEBKIT_OPTION_BEGIN)
WEBKIT_OPTION_DEFINE(ENABLE_DATALIST_ELEMENT "Toggle Datalist Element support" PRIVATE OFF)
WEBKIT_OPTION_DEFINE(ENABLE_DEVICE_ORIENTATION "Toggle Device Orientation support" PRIVATE OFF)
WEBKIT_OPTION_DEFINE(ENABLE_DFG_JIT "Toggle data flow graph JIT tier" PRIVATE ${ENABLE_JIT_DEFAULT})
WEBKIT_OPTION_DEFINE(ENABLE_DOWNLOAD_ATTRIBUTE "Toggle Download Attribute support" PRIVATE OFF)
WEBKIT_OPTION_DEFINE(ENABLE_DRAG_SUPPORT "Toggle support of drag actions (including selection of text with mouse)" PRIVATE OFF)
WEBKIT_OPTION_DEFINE(ENABLE_ENCRYPTED_MEDIA "Toggle EME V3 support" PRIVATE OFF)
WEBKIT_OPTION_DEFINE(ENABLE_EXPERIMENTAL_FEATURES "Enable experimental features" PRIVATE OFF)
Expand Down
4 changes: 0 additions & 4 deletions Tools/Scripts/webkitperl/FeatureList.pm
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ my (
$datalistElementSupport,
$deviceOrientationSupport,
$dfgJITSupport,
$downloadAttributeSupport,
$dragSupportSupport,
$encryptedMediaSupport,
$fatalWarnings,
Expand Down Expand Up @@ -271,9 +270,6 @@ my @features = (
{ option => "dfg-jit", desc => "Toggle data flow graph JIT tier",
define => "ENABLE_DFG_JIT", value => \$dfgJITSupport },

{ option => "download-attribute", desc => "Toggle Download Attribute support",
define => "ENABLE_DOWNLOAD_ATTRIBUTE", value => \$downloadAttributeSupport },

{ option => "drag-support", desc => "Toggle support of drag actions (including selection of text with mouse)",
define => "ENABLE_DRAG_SUPPORT", value => \$dragSupportSupport },

Expand Down

0 comments on commit 06a4e2c

Please sign in to comment.