Title: [272117] trunk
Revision
272117
Author
[email protected]
Date
2021-01-30 10:47:44 -0800 (Sat, 30 Jan 2021)

Log Message

[macOS] Remove support for image controls
https://bugs.webkit.org/show_bug.cgi?id=221156

Reviewed by Tim Horton.

LayoutTests/imported/w3c:

Rebaseline an imported layout test.

* web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt:

Source/WebCore:

Remove support for the macOS-only "image controls" codepath. This SPI was intended to be used by Mail years ago,
but was superseded by a custom implementation in Mail; this WebKit functionality has since been unused.

In a subsequent patch, a small subset of the infrastructure for laying out and rendering image controls will
return under a different name, in support of the image extraction accessibility feature.

* DerivedSources-input.xcfilelist:
* DerivedSources.make:
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
* css/CSSProperties.json:
* css/CSSValueKeywords.in:
* dom/Node.h:
(WebCore::Node::isPluginElement const):
(WebCore::Node::isImageControlsRootElement const): Deleted.
(WebCore::Node::isImageControlsButtonElement const): Deleted.
* html/HTMLAttributeNames.in:
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::HTMLImageElement):
(WebCore::HTMLImageElement::parseAttribute):

Additionally remove support for the `webkitimagemenu` DOM attribute, which was only respected if the (now-
removed) SPI preference was set.

(WebCore::HTMLImageElement::didAttachRenderers):
(WebCore::HTMLImageElement::updateImageControls): Deleted.
(WebCore::HTMLImageElement::tryCreateImageControls): Deleted.
(WebCore::HTMLImageElement::destroyImageControls): Deleted.
(WebCore::HTMLImageElement::hasImageControls const): Deleted.
(WebCore::HTMLImageElement::childShouldCreateRenderer const): Deleted.
* html/HTMLImageElement.h:

Additionally remove `m_experimentalImageMenuEnabled` and the associated helper method `hasShadowControls()` on
`HTMLImageElement`.

(WebCore::HTMLImageElement::hasShadowControls const): Deleted.
* html/shadow/ImageControlsRootElement.cpp: Removed.
* html/shadow/ImageControlsRootElement.h: Removed.
* html/shadow/mac/ImageControlsButtonElementMac.cpp: Removed.
* html/shadow/mac/ImageControlsButtonElementMac.h: Removed.
* html/shadow/mac/ImageControlsRootElementMac.cpp: Removed.
* html/shadow/mac/ImageControlsRootElementMac.h: Removed.
* html/shadow/mac/imageControlsMac.css: Removed.
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::maybeCreateContextMenu):
(WebCore::imageFromImageElementNode): Deleted.
(WebCore::ContextMenuController::showImageControlsMenu): Deleted.
* page/ContextMenuController.h:
* platform/ThemeTypes.cpp:
(WebCore::operator<<):
* platform/ThemeTypes.h:
* rendering/RenderImage.cpp:
(WebCore::RenderImage::RenderImage):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::adjustStyle):
(WebCore::RenderTheme::paint):
(WebCore::RenderTheme::paintBorderOnly):
(WebCore::RenderTheme::paintDecorations):
* rendering/RenderTheme.h:
(WebCore::RenderTheme::imageControlsStyleSheet const): Deleted.
(WebCore::RenderTheme::imageControlsButtonSize const): Deleted.
(WebCore::RenderTheme::imageControlsButtonPositionOffset const): Deleted.
(WebCore::RenderTheme::paintImageControlsButton): Deleted.
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::imageControlsStyleSheet const): Deleted.
(WebCore::RenderThemeMac::servicesRolloverButtonCell const): Deleted.
(WebCore::RenderThemeMac::paintImageControlsButton): Deleted.
(WebCore::RenderThemeMac::imageControlsButtonSize const): Deleted.
(WebCore::RenderThemeMac::imageControlsButtonPositionOffset const): Deleted.

Remove these two methods, which were only used to render the now-removed image controls button.

* style/UserAgentStyle.cpp:
(WebCore::Style::UserAgentStyle::ensureDefaultStyleSheetsForElement):
* style/UserAgentStyle.h:

Source/WebKit:

Leave the existing SPI implemented for binary compatability, but make them empty stubs and additionally mark
the property on WKWebViewConfiguration as deprecated.

* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetImageControlsEnabled):
(WKPreferencesGetImageControlsEnabled):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setupPageConfiguration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _imageControlsEnabled]):
(-[WKWebViewConfiguration _setImageControlsEnabled:]):
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:

Source/WebKitLegacy/mac:

Turn these legacy WebKit SPI methods into empty stubs.

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(-[WebPreferences imageControlsEnabled]):
(-[WebPreferences setImageControlsEnabled:]):

Source/WTF:

Remove this unused WebKit setting.

* Scripts/Preferences/WebPreferences.yaml:

LayoutTests:

Remove the only layout test for image controls, along with all associated test expectations.

* fast/images/image-controls-basic.html: Removed.
* platform/glib/fast/images/image-controls-basic-expected.txt: Removed.
* platform/gtk/fast/images/images/image-controls-basic-expected.txt: Removed.
* platform/ios/fast/images/image-controls-basic-expected.txt: Removed.
* platform/mac-mojave/fast/images/image-controls-basic-expected.txt: Removed.
* platform/mac/TestExpectations:
* platform/mac/fast/images/image-controls-basic-expected.txt: Removed.
* platform/win/TestExpectations:
* platform/wincairo/fast/images/image-controls-basic-expected.txt: Removed.

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (272116 => 272117)


--- trunk/LayoutTests/ChangeLog	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/LayoutTests/ChangeLog	2021-01-30 18:47:44 UTC (rev 272117)
@@ -1,3 +1,22 @@
+2021-01-30  Wenson Hsieh  <[email protected]>
+
+        [macOS] Remove support for image controls
+        https://bugs.webkit.org/show_bug.cgi?id=221156
+
+        Reviewed by Tim Horton.
+
+        Remove the only layout test for image controls, along with all associated test expectations.
+
+        * fast/images/image-controls-basic.html: Removed.
+        * platform/glib/fast/images/image-controls-basic-expected.txt: Removed.
+        * platform/gtk/fast/images/images/image-controls-basic-expected.txt: Removed.
+        * platform/ios/fast/images/image-controls-basic-expected.txt: Removed.
+        * platform/mac-mojave/fast/images/image-controls-basic-expected.txt: Removed.
+        * platform/mac/TestExpectations:
+        * platform/mac/fast/images/image-controls-basic-expected.txt: Removed.
+        * platform/win/TestExpectations:
+        * platform/wincairo/fast/images/image-controls-basic-expected.txt: Removed.
+
 2021-01-30  Ryosuke Niwa  <[email protected]>
 
         StaticRange should keep its start and end containers alive

Deleted: trunk/LayoutTests/fast/images/image-controls-basic.html (272116 => 272117)


--- trunk/LayoutTests/fast/images/image-controls-basic.html	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/LayoutTests/fast/images/image-controls-basic.html	2021-01-30 18:47:44 UTC (rev 272117)
@@ -1,8 +0,0 @@
-<script>
-if (window.internals)
-	internals.settings.setImageControlsEnabled(true);
-
-</script>
-<body>
-<img src="" x-webkit-imagemenu>
-</body>
\ No newline at end of file

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (272116 => 272117)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2021-01-30 18:47:44 UTC (rev 272117)
@@ -1,3 +1,14 @@
+2021-01-30  Wenson Hsieh  <[email protected]>
+
+        [macOS] Remove support for image controls
+        https://bugs.webkit.org/show_bug.cgi?id=221156
+
+        Reviewed by Tim Horton.
+
+        Rebaseline an imported layout test.
+
+        * web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt:
+
 2021-01-29  Yusuke Suzuki  <[email protected]>
 
         [JSC] Fix WebAssembly.Global's error message and support "funcref"

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt (272116 => 272117)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt	2021-01-30 18:47:44 UTC (rev 272117)
@@ -36,7 +36,7 @@
 FAIL -webkit-appearance: discrete-capacity-level-indicator (invalid) assert_equals: style.WebkitAppearance (uppercase W) expected "" but got "discrete-capacity-level-indicator"
 PASS -webkit-appearance: dualbutton (invalid)
 PASS -webkit-appearance: groupbox (invalid)
-FAIL -webkit-appearance: image-controls-button (invalid) assert_equals: style.WebkitAppearance (uppercase W) expected "" but got "image-controls-button"
+PASS -webkit-appearance: image-controls-button (invalid)
 FAIL -webkit-appearance: inner-spin-button (invalid) assert_equals: style.WebkitAppearance (uppercase W) expected "" but got "inner-spin-button"
 FAIL -webkit-appearance: list-button (invalid) assert_equals: style.WebkitAppearance (uppercase W) expected "" but got "list-button"
 FAIL -webkit-appearance: listitem (invalid) assert_equals: style.WebkitAppearance (uppercase W) expected "" but got "listitem"

Deleted: trunk/LayoutTests/platform/glib/fast/images/image-controls-basic-expected.txt (272116 => 272117)


--- trunk/LayoutTests/platform/glib/fast/images/image-controls-basic-expected.txt	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/LayoutTests/platform/glib/fast/images/image-controls-basic-expected.txt	2021-01-30 18:47:44 UTC (rev 272117)
@@ -1,7 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x584
-      RenderImage {IMG} at (0,0) size 256x256
-      RenderText {#text} at (0,0) size 0x0

Deleted: trunk/LayoutTests/platform/gtk/fast/images/images/image-controls-basic-expected.txt (272116 => 272117)


--- trunk/LayoutTests/platform/gtk/fast/images/images/image-controls-basic-expected.txt	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/LayoutTests/platform/gtk/fast/images/images/image-controls-basic-expected.txt	2021-01-30 18:47:44 UTC (rev 272117)
@@ -1,7 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x584
-      RenderImage {IMG} at (0,0) size 256x256
-      RenderText {#text} at (0,0) size 0x0

Deleted: trunk/LayoutTests/platform/ios/fast/images/image-controls-basic-expected.txt (272116 => 272117)


--- trunk/LayoutTests/platform/ios/fast/images/image-controls-basic-expected.txt	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/LayoutTests/platform/ios/fast/images/image-controls-basic-expected.txt	2021-01-30 18:47:44 UTC (rev 272117)
@@ -1,7 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x584
-      RenderImage {IMG} at (0,0) size 256x256
-      RenderText {#text} at (0,0) size 0x0

Modified: trunk/LayoutTests/platform/mac/TestExpectations (272116 => 272117)


--- trunk/LayoutTests/platform/mac/TestExpectations	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2021-01-30 18:47:44 UTC (rev 272117)
@@ -2163,9 +2163,6 @@
 
 webkit.org/b/219448 [ Debug ] webgl/2.0.0/conformance/rendering/multisample-corruption.html [ Skip ]
 
-# <rdar://64947666> [ BigSur+ ] fast/images/image-controls-basic.html 
-[ BigSur+ ] fast/images/image-controls-basic.html [ Failure ]
-
 # <rdar://problem/60780398> REGRESSION: (258729?) imported/w3c/web-platform-tests/websockets/opening-handshake/003.html is failing.
 [ BigSur+ ] imported/w3c/web-platform-tests/websockets/opening-handshake/003.html [ Failure ]
 

Deleted: trunk/LayoutTests/platform/mac/fast/images/image-controls-basic-expected.txt (272116 => 272117)


--- trunk/LayoutTests/platform/mac/fast/images/image-controls-basic-expected.txt	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/LayoutTests/platform/mac/fast/images/image-controls-basic-expected.txt	2021-01-30 18:47:44 UTC (rev 272117)
@@ -1,11 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x584
-      RenderImage {IMG} at (0,0) size 256x256
-      RenderText {#text} at (0,0) size 0x0
-layer at (8,8) size 256x256
-  RenderImageControls {DIV} at (0,0) size 256x256
-layer at (231,14) size 27x26
-  RenderImageControlsButton {DIV} at (223,6) size 27x26

Deleted: trunk/LayoutTests/platform/mac-mojave/fast/images/image-controls-basic-expected.txt (272116 => 272117)


--- trunk/LayoutTests/platform/mac-mojave/fast/images/image-controls-basic-expected.txt	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/LayoutTests/platform/mac-mojave/fast/images/image-controls-basic-expected.txt	2021-01-30 18:47:44 UTC (rev 272117)
@@ -1,11 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x584
-      RenderImage {IMG} at (0,0) size 256x256
-      RenderText {#text} at (0,0) size 0x0
-layer at (8,8) size 256x256
-  RenderImageControls {DIV} at (0,0) size 256x256
-layer at (229,14) size 29x26
-  RenderImageControlsButton {DIV} at (221,6) size 29x26

Modified: trunk/LayoutTests/platform/win/TestExpectations (272116 => 272117)


--- trunk/LayoutTests/platform/win/TestExpectations	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/LayoutTests/platform/win/TestExpectations	2021-01-30 18:47:44 UTC (rev 272117)
@@ -2809,7 +2809,6 @@
 fast/history/location-replace-hash.html [ Skip ]
 fast/history/saves-state-after-fragment-nav.html [ Skip ]
 
-fast/images/image-controls-basic.html [ Failure ]
 webkit.org/b/140516 [ Debug ] fast/images/large-size-image-crash.html [ Skip ]  # Crashing
 fast/images/pdf-as-image-with-annotations.html [ ImageOnlyFailure ]
 fast/images/support-broken-image-delegate.html [ Failure ]

Deleted: trunk/LayoutTests/platform/wincairo/fast/images/image-controls-basic-expected.txt (272116 => 272117)


--- trunk/LayoutTests/platform/wincairo/fast/images/image-controls-basic-expected.txt	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/LayoutTests/platform/wincairo/fast/images/image-controls-basic-expected.txt	2021-01-30 18:47:44 UTC (rev 272117)
@@ -1,7 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x584
-      RenderImage {IMG} at (0,0) size 256x256
-      RenderText {#text} at (0,0) size 0x0

Modified: trunk/Source/WTF/ChangeLog (272116 => 272117)


--- trunk/Source/WTF/ChangeLog	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/Source/WTF/ChangeLog	2021-01-30 18:47:44 UTC (rev 272117)
@@ -1,3 +1,14 @@
+2021-01-30  Wenson Hsieh  <[email protected]>
+
+        [macOS] Remove support for image controls
+        https://bugs.webkit.org/show_bug.cgi?id=221156
+
+        Reviewed by Tim Horton.
+
+        Remove this unused WebKit setting.
+
+        * Scripts/Preferences/WebPreferences.yaml:
+
 2021-01-29  Tadeu Zagallo  <[email protected]>
 
         Make check for full HashTables opt-in

Modified: trunk/Source/WTF/Scripts/Preferences/WebPreferences.yaml (272116 => 272117)


--- trunk/Source/WTF/Scripts/Preferences/WebPreferences.yaml	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/Source/WTF/Scripts/Preferences/WebPreferences.yaml	2021-01-30 18:47:44 UTC (rev 272117)
@@ -902,17 +902,6 @@
     WebCore:
       default: false
 
-ImageControlsEnabled:
-  type: bool
-  condition: ENABLE(SERVICE_CONTROLS)
-  defaultValue:
-    WebKitLegacy:
-      default: false
-    WebKit:
-      default: false
-    WebCore:
-      default: false
-
 InactiveMediaCaptureSteamRepromptIntervalInMinutes:
   type: double
   webcoreBinding: none

Modified: trunk/Source/WebCore/ChangeLog (272116 => 272117)


--- trunk/Source/WebCore/ChangeLog	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/Source/WebCore/ChangeLog	2021-01-30 18:47:44 UTC (rev 272117)
@@ -1,3 +1,89 @@
+2021-01-30  Wenson Hsieh  <[email protected]>
+
+        [macOS] Remove support for image controls
+        https://bugs.webkit.org/show_bug.cgi?id=221156
+
+        Reviewed by Tim Horton.
+
+        Remove support for the macOS-only "image controls" codepath. This SPI was intended to be used by Mail years ago,
+        but was superseded by a custom implementation in Mail; this WebKit functionality has since been unused.
+
+        In a subsequent patch, a small subset of the infrastructure for laying out and rendering image controls will
+        return under a different name, in support of the image extraction accessibility feature.
+
+        * DerivedSources-input.xcfilelist:
+        * DerivedSources.make:
+        * SourcesCocoa.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * css/CSSPrimitiveValueMappings.h:
+        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+        * css/CSSProperties.json:
+        * css/CSSValueKeywords.in:
+        * dom/Node.h:
+        (WebCore::Node::isPluginElement const):
+        (WebCore::Node::isImageControlsRootElement const): Deleted.
+        (WebCore::Node::isImageControlsButtonElement const): Deleted.
+        * html/HTMLAttributeNames.in:
+        * html/HTMLImageElement.cpp:
+        (WebCore::HTMLImageElement::HTMLImageElement):
+        (WebCore::HTMLImageElement::parseAttribute):
+
+        Additionally remove support for the `webkitimagemenu` DOM attribute, which was only respected if the (now-
+        removed) SPI preference was set.
+
+        (WebCore::HTMLImageElement::didAttachRenderers):
+        (WebCore::HTMLImageElement::updateImageControls): Deleted.
+        (WebCore::HTMLImageElement::tryCreateImageControls): Deleted.
+        (WebCore::HTMLImageElement::destroyImageControls): Deleted.
+        (WebCore::HTMLImageElement::hasImageControls const): Deleted.
+        (WebCore::HTMLImageElement::childShouldCreateRenderer const): Deleted.
+        * html/HTMLImageElement.h:
+
+        Additionally remove `m_experimentalImageMenuEnabled` and the associated helper method `hasShadowControls()` on
+        `HTMLImageElement`.
+
+        (WebCore::HTMLImageElement::hasShadowControls const): Deleted.
+        * html/shadow/ImageControlsRootElement.cpp: Removed.
+        * html/shadow/ImageControlsRootElement.h: Removed.
+        * html/shadow/mac/ImageControlsButtonElementMac.cpp: Removed.
+        * html/shadow/mac/ImageControlsButtonElementMac.h: Removed.
+        * html/shadow/mac/ImageControlsRootElementMac.cpp: Removed.
+        * html/shadow/mac/ImageControlsRootElementMac.h: Removed.
+        * html/shadow/mac/imageControlsMac.css: Removed.
+        * page/ContextMenuController.cpp:
+        (WebCore::ContextMenuController::maybeCreateContextMenu):
+        (WebCore::imageFromImageElementNode): Deleted.
+        (WebCore::ContextMenuController::showImageControlsMenu): Deleted.
+        * page/ContextMenuController.h:
+        * platform/ThemeTypes.cpp:
+        (WebCore::operator<<):
+        * platform/ThemeTypes.h:
+        * rendering/RenderImage.cpp:
+        (WebCore::RenderImage::RenderImage):
+        * rendering/RenderTheme.cpp:
+        (WebCore::RenderTheme::adjustStyle):
+        (WebCore::RenderTheme::paint):
+        (WebCore::RenderTheme::paintBorderOnly):
+        (WebCore::RenderTheme::paintDecorations):
+        * rendering/RenderTheme.h:
+        (WebCore::RenderTheme::imageControlsStyleSheet const): Deleted.
+        (WebCore::RenderTheme::imageControlsButtonSize const): Deleted.
+        (WebCore::RenderTheme::imageControlsButtonPositionOffset const): Deleted.
+        (WebCore::RenderTheme::paintImageControlsButton): Deleted.
+        * rendering/RenderThemeMac.h:
+        * rendering/RenderThemeMac.mm:
+        (WebCore::RenderThemeMac::imageControlsStyleSheet const): Deleted.
+        (WebCore::RenderThemeMac::servicesRolloverButtonCell const): Deleted.
+        (WebCore::RenderThemeMac::paintImageControlsButton): Deleted.
+        (WebCore::RenderThemeMac::imageControlsButtonSize const): Deleted.
+        (WebCore::RenderThemeMac::imageControlsButtonPositionOffset const): Deleted.
+
+        Remove these two methods, which were only used to render the now-removed image controls button.
+
+        * style/UserAgentStyle.cpp:
+        (WebCore::Style::UserAgentStyle::ensureDefaultStyleSheetsForElement):
+        * style/UserAgentStyle.h:
+
 2021-01-30  Zalan Bujtas  <[email protected]>
 
         [LFC][IFC] Adjust the line box stretching (quirky) <br> behavior

Modified: trunk/Source/WebCore/DerivedSources-input.xcfilelist (272116 => 272117)


--- trunk/Source/WebCore/DerivedSources-input.xcfilelist	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/Source/WebCore/DerivedSources-input.xcfilelist	2021-01-30 18:47:44 UTC (rev 272117)
@@ -1038,7 +1038,6 @@
 $(PROJECT_DIR)/html/canvas/WebGLVertexArrayObjectOES.idl
 $(PROJECT_DIR)/html/parser/HTMLEntityNames.in
 $(PROJECT_DIR)/html/parser/create-html-entity-table
-$(PROJECT_DIR)/html/shadow/mac/imageControlsMac.css
 $(PROJECT_DIR)/html/shadow/meterElementShadow.css
 $(PROJECT_DIR)/html/track/AudioTrack.idl
 $(PROJECT_DIR)/html/track/AudioTrackList.idl

Modified: trunk/Source/WebCore/DerivedSources.make (272116 => 272117)


--- trunk/Source/WebCore/DerivedSources.make	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/Source/WebCore/DerivedSources.make	2021-01-30 18:47:44 UTC (rev 272117)
@@ -1511,7 +1511,6 @@
     $(WebCore)/css/plugIns.css \
     $(WebCore)/css/quirks.css \
     $(WebCore)/css/svg.css \
-    $(WebCore)/html/shadow/mac/imageControlsMac.css \
     $(WebCore)/html/shadow/meterElementShadow.css \
     $(WebCore)/Modules/plugins/QuickTimePluginReplacement.css \
 #

Modified: trunk/Source/WebCore/SourcesCocoa.txt (272116 => 272117)


--- trunk/Source/WebCore/SourcesCocoa.txt	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/Source/WebCore/SourcesCocoa.txt	2021-01-30 18:47:44 UTC (rev 272117)
@@ -162,10 +162,7 @@
 editing/mac/TextUndoInsertionMarkupMac.mm
 fileapi/FileCocoa.mm
 history/mac/HistoryItemMac.mm
-html/shadow/ImageControlsRootElement.cpp
 html/shadow/YouTubeEmbedShadowElement.cpp
-html/shadow/mac/ImageControlsButtonElementMac.cpp
-html/shadow/mac/ImageControlsRootElementMac.cpp
 inspector/mac/PageDebuggerMac.mm
 loader/archive/cf/LegacyWebArchive.cpp
 loader/archive/cf/LegacyWebArchiveMac.mm

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (272116 => 272117)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2021-01-30 18:47:44 UTC (rev 272117)
@@ -729,7 +729,6 @@
 		2D0621521DA63AA200A7FB26 /* WebKitMediaKeyNeededEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D0621471DA63A7900A7FB26 /* WebKitMediaKeyNeededEvent.cpp */; };
 		2D0B4AAB18DA1CCD00434DE1 /* IOSurface.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D0B4AA918DA1CCD00434DE1 /* IOSurface.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		2D22830323A8470700364B7E /* CursorMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = F58784F002DE375901EA4122 /* CursorMac.mm */; };
-		2D25396318CE7F6200270222 /* ImageControlsButtonElementMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D25396118CE7F6200270222 /* ImageControlsButtonElementMac.h */; };
 		2D29386B235F6B6900C7F3B2 /* ExceptionDetails.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D293869235F6B6800C7F3B2 /* ExceptionDetails.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		2D29ECC6192ECC8300984B78 /* DisplayRefreshMonitorClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D29ECC2192ECC8300984B78 /* DisplayRefreshMonitorClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		2D29ECC8192ECC8300984B78 /* DisplayRefreshMonitorManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D29ECC4192ECC8300984B78 /* DisplayRefreshMonitorManager.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -1402,8 +1401,6 @@
 		5081E3E03CFF80C16EF8B48B /* CachedResourceRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 5081E3E13D0280C16EF8B48B /* CachedResourceRequest.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		508CCA4F13CF106B003151F3 /* RenderFragmentedFlow.h in Headers */ = {isa = PBXBuildFile; fileRef = 508CCA4D13CF106B003151F3 /* RenderFragmentedFlow.h */; };
 		510184690B08602A004A825F /* CachedPage.h in Headers */ = {isa = PBXBuildFile; fileRef = 510184670B08602A004A825F /* CachedPage.h */; settings = {ATTRIBUTES = (Private, ); }; };
-		510192D218B6B9AB007FC7A1 /* ImageControlsRootElementMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 510192D018B6B9AB007FC7A1 /* ImageControlsRootElementMac.h */; };
-		510192D618B6B9B7007FC7A1 /* ImageControlsRootElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 510192D418B6B9B7007FC7A1 /* ImageControlsRootElement.h */; };
 		51058ADB1D6792C1009A538C /* MockGamepad.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51058AD71D679257009A538C /* MockGamepad.cpp */; };
 		51058ADC1D6792C1009A538C /* MockGamepad.h in Headers */ = {isa = PBXBuildFile; fileRef = 51058AD81D679257009A538C /* MockGamepad.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		51058ADD1D6792C1009A538C /* MockGamepadProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51058AD91D679257009A538C /* MockGamepadProvider.cpp */; };
@@ -7089,8 +7086,6 @@
 		2D0B4AAA18DA1CCD00434DE1 /* IOSurface.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = IOSurface.mm; sourceTree = "<group>"; };
 		2D1932171DA64E1900A54A08 /* WebKitMediaKeyError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitMediaKeyError.h; sourceTree = "<group>"; };
 		2D1932181DA64E1900A54A08 /* WebKitMediaKeyError.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebKitMediaKeyError.idl; sourceTree = "<group>"; };
-		2D25396018CE7F6200270222 /* ImageControlsButtonElementMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ImageControlsButtonElementMac.cpp; sourceTree = "<group>"; };
-		2D25396118CE7F6200270222 /* ImageControlsButtonElementMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageControlsButtonElementMac.h; sourceTree = "<group>"; };
 		2D293869235F6B6800C7F3B2 /* ExceptionDetails.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExceptionDetails.h; sourceTree = "<group>"; };
 		2D29ECC1192ECC8300984B78 /* DisplayRefreshMonitorClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DisplayRefreshMonitorClient.cpp; sourceTree = "<group>"; };
 		2D29ECC2192ECC8300984B78 /* DisplayRefreshMonitorClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DisplayRefreshMonitorClient.h; sourceTree = "<group>"; };
@@ -8497,11 +8492,6 @@
 		508CCA4E13CF106B003151F3 /* RenderFragmentedFlow.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderFragmentedFlow.cpp; sourceTree = "<group>"; };
 		510184670B08602A004A825F /* CachedPage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedPage.h; sourceTree = "<group>"; };
 		510184680B08602A004A825F /* CachedPage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CachedPage.cpp; sourceTree = "<group>"; };
-		510192CF18B6B9AB007FC7A1 /* ImageControlsRootElementMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ImageControlsRootElementMac.cpp; sourceTree = "<group>"; };
-		510192D018B6B9AB007FC7A1 /* ImageControlsRootElementMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageControlsRootElementMac.h; sourceTree = "<group>"; };
-		510192D318B6B9B7007FC7A1 /* ImageControlsRootElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ImageControlsRootElement.cpp; sourceTree = "<group>"; };
-		510192D418B6B9B7007FC7A1 /* ImageControlsRootElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageControlsRootElement.h; sourceTree = "<group>"; };
-		510192D818B7D7AB007FC7A1 /* imageControlsMac.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = imageControlsMac.css; sourceTree = "<group>"; };
 		5103105E1BA8E090003329C0 /* IDBDatabaseIdentifier.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBDatabaseIdentifier.cpp; sourceTree = "<group>"; };
 		5103105F1BA8E090003329C0 /* IDBDatabaseIdentifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBDatabaseIdentifier.h; sourceTree = "<group>"; };
 		51058AD71D679257009A538C /* MockGamepad.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MockGamepad.cpp; sourceTree = "<group>"; };
@@ -19328,7 +19318,6 @@
 		4150F9ED12B6E0990008C860 /* shadow */ = {
 			isa = PBXGroup;
 			children = (
-				51C4AA5118B28357007BFE9B /* mac */,
 				7C1E97251A9F9834007BF0FB /* AutoFillButtonElement.cpp */,
 				7C1E97261A9F9834007BF0FB /* AutoFillButtonElement.h */,
 				E58B45B820AD07DD00991025 /* DataListButtonElement.h */,
@@ -19344,8 +19333,6 @@
 				E5F06AED24D4A63700BBC4F8 /* DateTimeSymbolicFieldElement.h */,
 				A7C9ABF61357A3BF00F5503F /* DetailsMarkerControl.cpp */,
 				A7C9ABF71357A3BF00F5503F /* DetailsMarkerControl.h */,
-				510192D318B6B9B7007FC7A1 /* ImageControlsRootElement.cpp */,
-				510192D418B6B9B7007FC7A1 /* ImageControlsRootElement.h */,
 				417253A81354BBBC00360F2A /* MediaControlTextTrackContainerElement.cpp */,
 				417253A91354BBBC00360F2A /* MediaControlTextTrackContainerElement.h */,
 				E4E243821DAB953E00C26E4B /* meterElementShadow.css */,
@@ -20665,18 +20652,6 @@
 			path = cocoa;
 			sourceTree = "<group>";
 		};
-		51C4AA5118B28357007BFE9B /* mac */ = {
-			isa = PBXGroup;
-			children = (
-				2D25396018CE7F6200270222 /* ImageControlsButtonElementMac.cpp */,
-				2D25396118CE7F6200270222 /* ImageControlsButtonElementMac.h */,
-				510192D818B7D7AB007FC7A1 /* imageControlsMac.css */,
-				510192CF18B6B9AB007FC7A1 /* ImageControlsRootElementMac.cpp */,
-				510192D018B6B9AB007FC7A1 /* ImageControlsRootElementMac.h */,
-			);
-			path = mac;
-			sourceTree = "<group>";
-		};
 		51ECC3E42005831F00483EAE /* messageports */ = {
 			isa = PBXGroup;
 			children = (
@@ -32543,9 +32518,6 @@
 				727A7F3A24078B84004D2931 /* ImageBufferIOSurfaceBackend.h in Headers */,
 				B2A10D910B3818BD00099AA4 /* ImageBufferPipe.h in Headers */,
 				CD3E21DD2183444A00E66F55 /* ImageBufferUtilitiesCG.h in Headers */,
-				2D25396318CE7F6200270222 /* ImageControlsButtonElementMac.h in Headers */,
-				510192D618B6B9B7007FC7A1 /* ImageControlsRootElement.h in Headers */,
-				510192D218B6B9AB007FC7A1 /* ImageControlsRootElementMac.h in Headers */,
 				A779791A0D6B9D0C003851B9 /* ImageData.h in Headers */,
 				CD19FEA81F573972000C42FB /* ImageDecoder.h in Headers */,
 				CD19FEAE1F574B6D000C42FB /* ImageDecoderAVFObjC.h in Headers */,

Modified: trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h (272116 => 272117)


--- trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h	2021-01-30 18:47:44 UTC (rev 272117)
@@ -605,11 +605,6 @@
         m_value.valueID = CSSValueBorderlessAttachment;
         break;
 #endif
-#if ENABLE(SERVICE_CONTROLS)
-    case ImageControlsButtonPart:
-        m_value.valueID = CSSValueImageControlsButton;
-        break;
-#endif
 #if ENABLE(APPLE_PAY)
     case ApplePayButtonPart:
         m_value.valueID = CSSValueApplePayButton;

Modified: trunk/Source/WebCore/css/CSSProperties.json (272116 => 272117)


--- trunk/Source/WebCore/css/CSSProperties.json	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/Source/WebCore/css/CSSProperties.json	2021-01-30 18:47:44 UTC (rev 272117)
@@ -4538,7 +4538,6 @@
                 "continuous-capacity-level-indicator",
                 "discrete-capacity-level-indicator",
                 "rating-level-indicator",
-                "image-controls-button",
                 "-apple-pay-button",
                 "textarea",
                 "attachment",

Modified: trunk/Source/WebCore/css/CSSValueKeywords.in (272116 => 272117)


--- trunk/Source/WebCore/css/CSSValueKeywords.in	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/Source/WebCore/css/CSSValueKeywords.in	2021-01-30 18:47:44 UTC (rev 272117)
@@ -858,9 +858,6 @@
 continuous-capacity-level-indicator
 discrete-capacity-level-indicator
 rating-level-indicator
-#if defined(ENABLE_SERVICE_CONTROLS) && ENABLE_SERVICE_CONTROLS
-image-controls-button
-#endif
 #if defined(ENABLE_APPLE_PAY) && ENABLE_APPLE_PAY
 -apple-pay-button
 #endif

Modified: trunk/Source/WebCore/dom/Node.h (272116 => 272117)


--- trunk/Source/WebCore/dom/Node.h	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/Source/WebCore/dom/Node.h	2021-01-30 18:47:44 UTC (rev 272117)
@@ -206,10 +206,6 @@
     bool isCharacterDataNode() const { return hasNodeFlag(NodeFlag::IsCharacterData); }
     virtual bool isFrameOwnerElement() const { return false; }
     virtual bool isPluginElement() const { return false; }
-#if ENABLE(SERVICE_CONTROLS)
-    virtual bool isImageControlsRootElement() const { return false; }
-    virtual bool isImageControlsButtonElement() const { return false; }
-#endif
 
     bool isDocumentNode() const { return hasNodeFlag(NodeFlag::IsDocumentNode); }
     bool isTreeScope() const { return hasNodeFlag(NodeFlag::IsDocumentNode) || hasNodeFlag(NodeFlag::IsShadowRoot); }

Modified: trunk/Source/WebCore/html/HTMLAttributeNames.in (272116 => 272117)


--- trunk/Source/WebCore/html/HTMLAttributeNames.in	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/Source/WebCore/html/HTMLAttributeNames.in	2021-01-30 18:47:44 UTC (rev 272117)
@@ -428,7 +428,6 @@
 onwebkitcurrentplaybacktargetiswirelesschanged
 onwebkitplaybacktargetavailabilitychanged
 onwebkitpresentationmodechanged
-x-webkit-imagemenu
 webkit-playsinline
 x-webkit-airplay
 x-webkit-wirelessvideoplaybackdisabled

Modified: trunk/Source/WebCore/html/HTMLImageElement.cpp (272116 => 272117)


--- trunk/Source/WebCore/html/HTMLImageElement.cpp	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/Source/WebCore/html/HTMLImageElement.cpp	2021-01-30 18:47:44 UTC (rev 272117)
@@ -60,10 +60,6 @@
 #include <wtf/IsoMallocInlines.h>
 #include <wtf/text/StringBuilder.h>
 
-#if ENABLE(SERVICE_CONTROLS)
-#include "ImageControlsRootElement.h"
-#endif
-
 namespace WebCore {
 
 WTF_MAKE_ISO_ALLOCATED_IMPL(HTMLImageElement);
@@ -77,7 +73,6 @@
     , m_formSetByParser(makeWeakPtr(form))
     , m_compositeOperator(CompositeOperator::SourceOver)
     , m_imageDevicePixelRatio(1.0f)
-    , m_experimentalImageMenuEnabled(false)
 {
     ASSERT(hasTagName(imgTag));
     setHasCustomStyleResolveCallbacks();
@@ -281,11 +276,6 @@
         BlendMode blendOp = BlendMode::Normal;
         if (!parseCompositeAndBlendOperator(value, m_compositeOperator, blendOp))
             m_compositeOperator = CompositeOperator::SourceOver;
-#if ENABLE(SERVICE_CONTROLS)
-    } else if (name == webkitimagemenuAttr) {
-        m_experimentalImageMenuEnabled = !value.isNull();
-        updateImageControls();
-#endif
     } else if (name == loadingAttr) {
         // No action needed for eager to lazy transition.
         if (!hasLazyLoadableAttributeValue(value))
@@ -354,10 +344,6 @@
     if (m_imageLoader->hasPendingBeforeLoadEvent())
         return;
 
-#if ENABLE(SERVICE_CONTROLS)
-    updateImageControls();
-#endif
-
     auto& renderImage = downcast<RenderImage>(*renderer());
     RenderImageResource& renderImageResource = renderImage.imageResource();
     if (renderImageResource.cachedImage())
@@ -723,76 +709,6 @@
 
 #endif // ENABLE(ATTACHMENT_ELEMENT)
 
-#if ENABLE(SERVICE_CONTROLS)
-void HTMLImageElement::updateImageControls()
-{
-    // If this image element is inside a shadow tree then it is part of an image control.
-    if (isInShadowTree())
-        return;
-
-    if (!document().settings().imageControlsEnabled())
-        return;
-
-    bool hasControls = hasImageControls();
-    if (!m_experimentalImageMenuEnabled && hasControls)
-        destroyImageControls();
-    else if (m_experimentalImageMenuEnabled && !hasControls)
-        tryCreateImageControls();
-}
-
-void HTMLImageElement::tryCreateImageControls()
-{
-    ASSERT(m_experimentalImageMenuEnabled);
-    ASSERT(!hasImageControls());
-
-    auto imageControls = ImageControlsRootElement::tryCreate(document());
-    if (!imageControls)
-        return;
-
-    ensureUserAgentShadowRoot().appendChild(*imageControls);
-
-    auto* renderObject = renderer();
-    if (!renderObject)
-        return;
-
-    downcast<RenderImage>(*renderObject).setHasShadowControls(true);
-}
-
-void HTMLImageElement::destroyImageControls()
-{
-    auto shadowRoot = userAgentShadowRoot();
-    if (!shadowRoot)
-        return;
-
-    if (RefPtr<Node> node = shadowRoot->firstChild()) {
-        ASSERT_WITH_SECURITY_IMPLICATION(node->isImageControlsRootElement());
-        shadowRoot->removeChild(*node);
-    }
-
-    auto* renderObject = renderer();
-    if (!renderObject)
-        return;
-
-    downcast<RenderImage>(*renderObject).setHasShadowControls(false);
-}
-
-bool HTMLImageElement::hasImageControls() const
-{
-    if (auto shadowRoot = userAgentShadowRoot()) {
-        RefPtr<Node> node = shadowRoot->firstChild();
-        ASSERT_WITH_SECURITY_IMPLICATION(!node || node->isImageControlsRootElement());
-        return node;
-    }
-
-    return false;
-}
-
-bool HTMLImageElement::childShouldCreateRenderer(const Node& child) const
-{
-    return hasShadowRootParent(child) && HTMLElement::childShouldCreateRenderer(child);
-}
-#endif // ENABLE(SERVICE_CONTROLS)
-
 #if PLATFORM(IOS_FAMILY)
 // FIXME: We should find a better place for the touch callout logic. See rdar://problem/48937767.
 bool HTMLImageElement::willRespondToMouseClickEvents()

Modified: trunk/Source/WebCore/html/HTMLImageElement.h (272116 => 272117)


--- trunk/Source/WebCore/html/HTMLImageElement.h	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/Source/WebCore/html/HTMLImageElement.h	2021-01-30 18:47:44 UTC (rev 272117)
@@ -111,8 +111,6 @@
     bool canContainRangeEndPoint() const override { return false; }
 
     const AtomString& imageSourceURL() const override;
-
-    bool hasShadowControls() const { return m_experimentalImageMenuEnabled; }
     
     HTMLPictureElement* pictureElement() const;
     void setPictureElement(HTMLPictureElement*);
@@ -185,14 +183,6 @@
 
     float effectiveImageDevicePixelRatio() const;
 
-#if ENABLE(SERVICE_CONTROLS)
-    void updateImageControls();
-    void tryCreateImageControls();
-    void destroyImageControls();
-    bool hasImageControls() const;
-    bool childShouldCreateRenderer(const Node&) const override;
-#endif
-
     std::unique_ptr<HTMLImageLoader> m_imageLoader;
     WeakPtr<HTMLFormElement> m_form;
     WeakPtr<HTMLFormElement> m_formSetByParser;
@@ -202,7 +192,6 @@
     AtomString m_currentSrc;
     AtomString m_parsedUsemap;
     float m_imageDevicePixelRatio;
-    bool m_experimentalImageMenuEnabled;
     bool m_hadNameBeforeAttributeChanged { false }; // FIXME: We only need this because parseAttribute() can't see the old value.
     bool m_isDroppedImagePlaceholder { false };
 

Deleted: trunk/Source/WebCore/html/shadow/ImageControlsRootElement.cpp (272116 => 272117)


--- trunk/Source/WebCore/html/shadow/ImageControlsRootElement.cpp	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/Source/WebCore/html/shadow/ImageControlsRootElement.cpp	2021-01-30 18:47:44 UTC (rev 272117)
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "ImageControlsRootElement.h"
-
-#if ENABLE(SERVICE_CONTROLS)
-
-#include <wtf/IsoMallocInlines.h>
-
-namespace WebCore {
-
-WTF_MAKE_ISO_ALLOCATED_IMPL(ImageControlsRootElement);
-
-#if !PLATFORM(MAC)
-Ref<ImageControlsRootElement> ImageControlsRootElement::maybeCreate(Document& document)
-{
-    return adoptRef(*new ImageControlsRootElement(document));
-}
-#endif
-
-ImageControlsRootElement::ImageControlsRootElement(Document& document)
-    : HTMLDivElement(HTMLNames::divTag, document)
-{
-}
-
-ImageControlsRootElement::~ImageControlsRootElement() = default;
-
-} // namespace WebCore
-
-#endif // ENABLE(SERVICE_CONTROLS)

Deleted: trunk/Source/WebCore/html/shadow/ImageControlsRootElement.h (272116 => 272117)


--- trunk/Source/WebCore/html/shadow/ImageControlsRootElement.h	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/Source/WebCore/html/shadow/ImageControlsRootElement.h	2021-01-30 18:47:44 UTC (rev 272117)
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#if ENABLE(SERVICE_CONTROLS)
-
-#include "HTMLDivElement.h"
-
-namespace WebCore {
-
-class Document;
-
-class ImageControlsRootElement : public HTMLDivElement {
-    WTF_MAKE_ISO_ALLOCATED(ImageControlsRootElement);
-public:
-    virtual ~ImageControlsRootElement();
-
-    static RefPtr<ImageControlsRootElement> tryCreate(Document&);
-
-protected:
-    explicit ImageControlsRootElement(Document&);
-
-private:
-    bool isImageControlsRootElement() const final { return true; }
-};
-
-} // namespace WebCore
-
-#endif // ENABLE(SERVICE_CONTROLS)

Modified: trunk/Source/WebCore/page/ContextMenuController.cpp (272116 => 272117)


--- trunk/Source/WebCore/page/ContextMenuController.cpp	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/Source/WebCore/page/ContextMenuController.cpp	2021-01-30 18:47:44 UTC (rev 272117)
@@ -135,21 +135,6 @@
     showContextMenu(event);
 }
 
-#if ENABLE(SERVICE_CONTROLS)
-
-static Image* imageFromImageElementNode(Node& node)
-{
-    auto* renderer = node.renderer();
-    if (!is<RenderImage>(renderer))
-        return nullptr;
-    auto* image = downcast<RenderImage>(*renderer).cachedImage();
-    if (!image || image->errorOccurred())
-        return nullptr;
-    return image->imageForRenderer(renderer);
-}
-
-#endif
-
 std::unique_ptr<ContextMenu> ContextMenuController::maybeCreateContextMenu(Event& event)
 {
     if (!is<MouseEvent>(event))
@@ -170,16 +155,6 @@
 
     m_context = ContextMenuContext(result);
 
-#if ENABLE(SERVICE_CONTROLS)
-    if (node.isImageControlsButtonElement()) {
-        if (auto* image = imageFromImageElementNode(*result.innerNonSharedNode()))
-            m_context.setControlledImage(image);
-
-        // FIXME: If we couldn't get the image then we shouldn't try to show the image controls menu for it.
-        return nullptr;
-    }
-#endif
-
     return makeUnique<ContextMenu>();
 }
 
@@ -1497,17 +1472,6 @@
 
 #endif
 
-#if ENABLE(SERVICE_CONTROLS)
-
-void ContextMenuController::showImageControlsMenu(Event& event)
-{
-    clearContextMenu();
-    handleContextMenuEvent(event);
-    m_client.showContextMenu();
-}
-
-#endif
-
 } // namespace WebCore
 
 #endif // ENABLE(CONTEXT_MENUS)

Modified: trunk/Source/WebCore/page/ContextMenuController.h (272116 => 272117)


--- trunk/Source/WebCore/page/ContextMenuController.h	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/Source/WebCore/page/ContextMenuController.h	2021-01-30 18:47:44 UTC (rev 272117)
@@ -66,10 +66,6 @@
     void showContextMenuAt(Frame&, const IntPoint& clickPoint);
 #endif
 
-#if ENABLE(SERVICE_CONTROLS)
-    void showImageControlsMenu(Event&);
-#endif
-
 private:
     std::unique_ptr<ContextMenu> maybeCreateContextMenu(Event&);
     void showContextMenu(Event&);

Modified: trunk/Source/WebCore/platform/ThemeTypes.cpp (272116 => 272117)


--- trunk/Source/WebCore/platform/ThemeTypes.cpp	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/Source/WebCore/platform/ThemeTypes.cpp	2021-01-30 18:47:44 UTC (rev 272117)
@@ -90,9 +90,6 @@
     case ContinuousCapacityLevelIndicatorPart: ts << "continuous-capacity-level-indicator-part"; break;
     case DiscreteCapacityLevelIndicatorPart: ts << "discrete-capacity-level-indicator-part"; break;
     case RatingLevelIndicatorPart: ts << "rating-level-indicator-part"; break;
-#if ENABLE(SERVICE_CONTROLS)
-    case ImageControlsButtonPart: ts << "image-controls-button-part"; break;
-#endif
 #if ENABLE(APPLE_PAY)
     case ApplePayButtonPart: ts << "apple-pay-button-part"; break;
 #endif

Modified: trunk/Source/WebCore/platform/ThemeTypes.h (272116 => 272117)


--- trunk/Source/WebCore/platform/ThemeTypes.h	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/Source/WebCore/platform/ThemeTypes.h	2021-01-30 18:47:44 UTC (rev 272117)
@@ -90,9 +90,6 @@
     ContinuousCapacityLevelIndicatorPart,
     DiscreteCapacityLevelIndicatorPart,
     RatingLevelIndicatorPart,
-#if ENABLE(SERVICE_CONTROLS)
-    ImageControlsButtonPart,
-#endif
 #if ENABLE(APPLE_PAY)
     ApplePayButtonPart,
 #endif

Modified: trunk/Source/WebCore/rendering/RenderImage.cpp (272116 => 272117)


--- trunk/Source/WebCore/rendering/RenderImage.cpp	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/Source/WebCore/rendering/RenderImage.cpp	2021-01-30 18:47:44 UTC (rev 272117)
@@ -141,8 +141,6 @@
     , m_imageDevicePixelRatio(imageDevicePixelRatio)
 {
     updateAltText();
-    if (is<HTMLImageElement>(element))
-        m_hasShadowControls = downcast<HTMLImageElement>(element).hasShadowControls();
 }
 
 RenderImage::RenderImage(Document& document, RenderStyle&& style, StyleImage* styleImage)

Modified: trunk/Source/WebCore/rendering/RenderTheme.cpp (272116 => 272117)


--- trunk/Source/WebCore/rendering/RenderTheme.cpp	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/Source/WebCore/rendering/RenderTheme.cpp	2021-01-30 18:47:44 UTC (rev 272117)
@@ -255,10 +255,6 @@
     case DiscreteCapacityLevelIndicatorPart:
     case RatingLevelIndicatorPart:
         return adjustMeterStyle(style, element);
-#if ENABLE(SERVICE_CONTROLS)
-    case ImageControlsButtonPart:
-        break;
-#endif
     case CapsLockIndicatorPart:
         return adjustCapsLockIndicatorStyle(style, element);
 #if ENABLE(APPLE_PAY)
@@ -415,10 +411,6 @@
         return paintSearchFieldResultsDecorationPart(box, paintInfo, integralSnappedRect);
     case SearchFieldResultsButtonPart:
         return paintSearchFieldResultsButton(box, paintInfo, integralSnappedRect);
-#if ENABLE(SERVICE_CONTROLS)
-    case ImageControlsButtonPart:
-        return paintImageControlsButton(box, paintInfo, integralSnappedRect);
-#endif
     case CapsLockIndicatorPart:
         return paintCapsLockIndicator(box, paintInfo, integralSnappedRect);
 #if ENABLE(APPLE_PAY)
@@ -481,9 +473,6 @@
     case SearchFieldDecorationPart:
     case SearchFieldResultsDecorationPart:
     case SearchFieldResultsButtonPart:
-#if ENABLE(SERVICE_CONTROLS)
-    case ImageControlsButtonPart:
-#endif
     default:
         break;
     }
@@ -555,9 +544,6 @@
     case SearchFieldDecorationPart:
     case SearchFieldResultsDecorationPart:
     case SearchFieldResultsButtonPart:
-#if ENABLE(SERVICE_CONTROLS)
-    case ImageControlsButtonPart:
-#endif
     default:
         break;
     }

Modified: trunk/Source/WebCore/rendering/RenderTheme.h (272116 => 272117)


--- trunk/Source/WebCore/rendering/RenderTheme.h	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/Source/WebCore/rendering/RenderTheme.h	2021-01-30 18:47:44 UTC (rev 272117)
@@ -94,9 +94,6 @@
 #if ENABLE(FULLSCREEN_API)
     virtual String extraFullScreenStyleSheet() { return String(); }
 #endif
-#if ENABLE(SERVICE_CONTROLS)
-    virtual String imageControlsStyleSheet() const { return String(); }
-#endif
 #if ENABLE(DATALIST_ELEMENT)
     String dataListStyleSheet() const;
 #endif
@@ -248,11 +245,6 @@
     enum FileUploadDecorations { SingleFile, MultipleFiles };
     virtual void paintFileUploadIconDecorations(const RenderObject& /*inputRenderer*/, const RenderObject& /*buttonRenderer*/, const PaintInfo&, const IntRect&, Icon*, FileUploadDecorations) { }
 
-#if ENABLE(SERVICE_CONTROLS)
-    virtual IntSize imageControlsButtonSize(const RenderObject&) const { return IntSize(); }
-    virtual IntSize imageControlsButtonPositionOffset() const { return IntSize(); }
-#endif
-
 #if ENABLE(ATTACHMENT_ELEMENT)
     virtual LayoutSize attachmentIntrinsicSize(const RenderAttachment&) const { return LayoutSize(); }
     virtual int attachmentBaseline(const RenderAttachment&) const { return -1; }
@@ -406,10 +398,6 @@
     virtual bool paintMediaFullScreenVolumeSliderTrack(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
     virtual bool paintMediaFullScreenVolumeSliderThumb(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
 
-#if ENABLE(SERVICE_CONTROLS)
-    virtual bool paintImageControlsButton(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
-#endif
-
 public:
     void updateControlStatesForRenderer(const RenderBox&, ControlStates&) const;
     ControlStates::States extractControlStatesForRenderer(const RenderObject&) const;

Modified: trunk/Source/WebCore/rendering/RenderThemeMac.h (272116 => 272117)


--- trunk/Source/WebCore/rendering/RenderThemeMac.h	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/Source/WebCore/rendering/RenderThemeMac.h	2021-01-30 18:47:44 UTC (rev 272117)
@@ -112,10 +112,6 @@
     String mediaControlsBase64StringForIconNameAndType(const String&, const String&) final;
 #endif
 
-#if ENABLE(SERVICE_CONTROLS)
-    String imageControlsStyleSheet() const final;
-#endif
-
     bool paintTextField(const RenderObject&, const PaintInfo&, const FloatRect&) final;
     void adjustTextFieldStyle(RenderStyle&, const Element*) const final;
 
@@ -222,14 +218,6 @@
     const IntSize* progressBarSizes() const;
     const int* progressBarMargins(NSControlSize) const;
 
-#if ENABLE(SERVICE_CONTROLS)
-    bool paintImageControlsButton(const RenderObject&, const PaintInfo&, const IntRect&) final;
-    IntSize imageControlsButtonSize(const RenderObject&) const final;
-    IntSize imageControlsButtonPositionOffset() const final;
-
-    NSServicesRolloverButtonCell *servicesRolloverButtonCell() const;
-#endif
-
     mutable RetainPtr<NSPopUpButtonCell> m_popupButton;
     mutable RetainPtr<NSSearchFieldCell> m_search;
     mutable RetainPtr<NSMenu> m_searchMenuTemplate;

Modified: trunk/Source/WebCore/rendering/RenderThemeMac.mm (272116 => 272117)


--- trunk/Source/WebCore/rendering/RenderThemeMac.mm	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/Source/WebCore/rendering/RenderThemeMac.mm	2021-01-30 18:47:44 UTC (rev 272117)
@@ -89,19 +89,10 @@
 // FIXME: This should go into an SPI.h file in the spi directory.
 #if USE(APPLE_INTERNAL_SDK)
 #import <AppKit/AppKitDefines_Private.h>
-#import <AppKit/NSServicesRolloverButtonCell.h>
 #else
 #define APPKIT_PRIVATE_CLASS
-@interface NSServicesRolloverButtonCell : NSButtonCell
-@end
 #endif
 
-// FIXME: This should go into an SPI.h file in the spi directory.
-@interface NSServicesRolloverButtonCell ()
-+ (NSServicesRolloverButtonCell *)serviceRolloverButtonCellForStyle:(NSSharingServicePickerStyle)style;
-- (NSRect)rectForBounds:(NSRect)bounds preferredEdge:(NSRectEdge)preferredEdge;
-@end
-
 #endif // ENABLE(SERVICE_CONTROLS)
 
 // FIXME: This should go into an SPI.h file in the spi directory.
@@ -360,15 +351,6 @@
     return [[NSData dataWithContentsOfFile:[bundle pathForResource:iconName ofType:iconType inDirectory:directory]] base64EncodedStringWithOptions:0];
 }
 
-#if ENABLE(SERVICE_CONTROLS)
-
-String RenderThemeMac::imageControlsStyleSheet() const
-{
-    return String(imageControlsMacUserAgentStyleSheet, sizeof(imageControlsMacUserAgentStyleSheet));
-}
-
-#endif
-
 Color RenderThemeMac::platformActiveSelectionBackgroundColor(OptionSet<StyleColor::Options> options) const
 {
     LocalDefaultSystemAppearance localAppearance(options.contains(StyleColor::Options::UseDarkAppearance));
@@ -2275,56 +2257,6 @@
     return StringTruncator::centerTruncate(strToTruncate, width, font);
 }
 
-#if ENABLE(SERVICE_CONTROLS)
-NSServicesRolloverButtonCell* RenderThemeMac::servicesRolloverButtonCell() const
-{
-    if (!m_servicesRolloverButton) {
-        m_servicesRolloverButton = [NSServicesRolloverButtonCell serviceRolloverButtonCellForStyle:NSSharingServicePickerStyleRollover];
-        [m_servicesRolloverButton setBezelStyle:NSBezelStyleRoundedDisclosure];
-        [m_servicesRolloverButton setButtonType:NSButtonTypePushOnPushOff];
-        [m_servicesRolloverButton setImagePosition:NSImageOnly];
-        [m_servicesRolloverButton setState:NO];
-    }
-
-    return m_servicesRolloverButton.get();
-}
-
-bool RenderThemeMac::paintImageControlsButton(const RenderObject& renderer, const PaintInfo& paintInfo, const IntRect& rect)
-{
-    if (paintInfo.phase != PaintPhase::BlockBackground)
-        return true;
-
-    NSServicesRolloverButtonCell *cell = servicesRolloverButtonCell();
-
-    LocalCurrentGraphicsContext localContext(paintInfo.context());
-    GraphicsContextStateSaver stateSaver(paintInfo.context());
-
-    paintInfo.context().translate(rect.location());
-
-    IntRect innerFrame(IntPoint(), rect.size());
-    [cell drawWithFrame:innerFrame inView:documentViewFor(renderer)];
-    [cell setControlView:nil];
-
-    return true;
-}
-
-IntSize RenderThemeMac::imageControlsButtonSize(const RenderObject&) const
-{
-    return IntSize(servicesRolloverButtonCell().cellSize);
-}
-
-IntSize RenderThemeMac::imageControlsButtonPositionOffset() const
-{
-    // FIXME: Currently the offsets will always be the same no matter what image rect you try with.
-    // This may not always be true in the future.
-    static const int dummyDimension = 100;
-    IntRect dummyImageRect(0, 0, dummyDimension, dummyDimension);
-    NSRect bounds = [servicesRolloverButtonCell() rectForBounds:dummyImageRect preferredEdge:NSMinYEdge];
-
-    return IntSize(dummyDimension - bounds.origin.x, bounds.origin.y);
-}
-#endif
-
 #if ENABLE(ATTACHMENT_ELEMENT)
 const CGFloat attachmentIconSize = 48;
 const CGFloat attachmentIconBackgroundPadding = 6;

Modified: trunk/Source/WebCore/style/UserAgentStyle.cpp (272116 => 272117)


--- trunk/Source/WebCore/style/UserAgentStyle.cpp	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/Source/WebCore/style/UserAgentStyle.cpp	2021-01-30 18:47:44 UTC (rev 272117)
@@ -75,7 +75,6 @@
 StyleSheetContents* UserAgentStyle::mediaControlsStyleSheet;
 StyleSheetContents* UserAgentStyle::fullscreenStyleSheet;
 StyleSheetContents* UserAgentStyle::plugInsStyleSheet;
-StyleSheetContents* UserAgentStyle::imageControlsStyleSheet;
 StyleSheetContents* UserAgentStyle::mediaQueryStyleSheet;
 #if ENABLE(DATALIST_ELEMENT)
 StyleSheetContents* UserAgentStyle::dataListStyleSheet;
@@ -186,15 +185,6 @@
             }
         }
 #endif // ENABLE(VIDEO)
-#if ENABLE(SERVICE_CONTROLS)
-        else if (is<HTMLDivElement>(element) && element.isImageControlsRootElement()) {
-            if (!imageControlsStyleSheet) {
-                String imageControlsRules = RenderTheme::singleton().imageControlsStyleSheet();
-                imageControlsStyleSheet = parseUASheet(imageControlsRules);
-                addToDefaultStyle(*imageControlsStyleSheet);
-            }
-        }
-#endif // ENABLE(SERVICE_CONTROLS)
 #if ENABLE(DATALIST_ELEMENT)
         else if (!dataListStyleSheet && is<HTMLDataListElement>(element)) {
             dataListStyleSheet = parseUASheet(RenderTheme::singleton().dataListStyleSheet());

Modified: trunk/Source/WebCore/style/UserAgentStyle.h (272116 => 272117)


--- trunk/Source/WebCore/style/UserAgentStyle.h	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/Source/WebCore/style/UserAgentStyle.h	2021-01-30 18:47:44 UTC (rev 272117)
@@ -46,7 +46,6 @@
     static StyleSheetContents* mediaControlsStyleSheet;
     static StyleSheetContents* fullscreenStyleSheet;
     static StyleSheetContents* plugInsStyleSheet;
-    static StyleSheetContents* imageControlsStyleSheet;
 #if ENABLE(DATALIST_ELEMENT)
     static StyleSheetContents* dataListStyleSheet;
 #endif

Modified: trunk/Source/WebInspectorUI/UserInterface/Models/CSSKeywordCompletions.js (272116 => 272117)


--- trunk/Source/WebInspectorUI/UserInterface/Models/CSSKeywordCompletions.js	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/CSSKeywordCompletions.js	2021-01-30 18:47:44 UTC (rev 272117)
@@ -845,7 +845,7 @@
         "ease", "linear", "ease-in", "ease-out", "ease-in-out", "step-start", "step-end", "steps()", "cubic-bezier()", "spring()",
     ],
     "-webkit-appearance": [
-        "none", "checkbox", "radio", "push-button", "square-button", "button", "button-bevel", "default-button", "inner-spin-button", "listbox", "listitem", "media-controls-background", "media-controls-dark-bar-background", "media-controls-fullscreen-background", "media-controls-light-bar-background", "media-current-time-display", "media-enter-fullscreen-button", "media-exit-fullscreen-button", "media-fullscreen-volume-slider", "media-fullscreen-volume-slider-thumb", "media-mute-button", "media-overlay-play-button", "media-play-button", "media-return-to-realtime-button", "media-rewind-button", "media-seek-back-button", "media-seek-forward-button", "media-slider", "media-sliderthumb", &q
 uot;media-time-remaining-display", "media-toggle-closed-captions-button", "media-volume-slider", "media-volume-slider-container", "media-volume-slider-mute-button", "media-volume-sliderthumb", "menulist", "menulist-button", "menulist-text", "menulist-textfield", "meter", "progress-bar", "progress-bar-value", "slider-horizontal", "slider-vertical", "sliderthumb-horizontal", "sliderthumb-vertical", "caret", "searchfield", "searchfield-decoration", "searchfield-results-decoration", "searchfield-results-button", "searchfield-cancel-button", "snapshotted-plugin-overlay", "textfield", "relevancy-level-indicator", "continuous-capacity-level-indicator", "discrete-capacity-level-indicator", "rating-level-indicator&qu
 ot;, "image-controls-button", "-apple-pay-button", "textarea", "attachment", "borderless-attachment", "caps-lock-indicator",
+        "none", "checkbox", "radio", "push-button", "square-button", "button", "button-bevel", "default-button", "inner-spin-button", "listbox", "listitem", "media-controls-background", "media-controls-dark-bar-background", "media-controls-fullscreen-background", "media-controls-light-bar-background", "media-current-time-display", "media-enter-fullscreen-button", "media-exit-fullscreen-button", "media-fullscreen-volume-slider", "media-fullscreen-volume-slider-thumb", "media-mute-button", "media-overlay-play-button", "media-play-button", "media-return-to-realtime-button", "media-rewind-button", "media-seek-back-button", "media-seek-forward-button", "media-slider", "media-sliderthumb", &qu
 ot;media-time-remaining-display", "media-toggle-closed-captions-button", "media-volume-slider", "media-volume-slider-container", "media-volume-slider-mute-button", "media-volume-sliderthumb", "menulist", "menulist-button", "menulist-text", "menulist-textfield", "meter", "progress-bar", "progress-bar-value", "slider-horizontal", "slider-vertical", "sliderthumb-horizontal", "sliderthumb-vertical", "caret", "searchfield", "searchfield-decoration", "searchfield-results-decoration", "searchfield-results-button", "searchfield-cancel-button", "snapshotted-plugin-overlay", "textfield", "relevancy-level-indicator", "continuous-capacity-level-indicator", "discrete-capacity-level-indicator", "rating-level-indicator&quo
 t;, "-apple-pay-button", "textarea", "attachment", "borderless-attachment", "caps-lock-indicator",
     ],
     "-webkit-backface-visibility": [
         "hidden", "visible",

Modified: trunk/Source/WebKit/ChangeLog (272116 => 272117)


--- trunk/Source/WebKit/ChangeLog	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/Source/WebKit/ChangeLog	2021-01-30 18:47:44 UTC (rev 272117)
@@ -1,3 +1,25 @@
+2021-01-30  Wenson Hsieh  <[email protected]>
+
+        [macOS] Remove support for image controls
+        https://bugs.webkit.org/show_bug.cgi?id=221156
+
+        Reviewed by Tim Horton.
+
+        Leave the existing SPI implemented for binary compatability, but make them empty stubs and additionally mark
+        the property on WKWebViewConfiguration as deprecated.
+
+        * UIProcess/API/C/WKPreferences.cpp:
+        (WKPreferencesSetImageControlsEnabled):
+        (WKPreferencesGetImageControlsEnabled):
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView _setupPageConfiguration:]):
+        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
+        (-[WKWebViewConfiguration init]):
+        (-[WKWebViewConfiguration copyWithZone:]):
+        (-[WKWebViewConfiguration _imageControlsEnabled]):
+        (-[WKWebViewConfiguration _setImageControlsEnabled:]):
+        * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
+
 2021-01-29  Megan Gardner  <[email protected]>
 
         Add plumbing to allow AppHighlights to be restored.

Modified: trunk/Source/WebKit/UIProcess/API/C/WKPreferences.cpp (272116 => 272117)


--- trunk/Source/WebKit/UIProcess/API/C/WKPreferences.cpp	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/Source/WebKit/UIProcess/API/C/WKPreferences.cpp	2021-01-30 18:47:44 UTC (rev 272117)
@@ -1435,14 +1435,15 @@
     return toImpl(preferencesRef)->serviceControlsEnabled();
 }
 
-void WKPreferencesSetImageControlsEnabled(WKPreferencesRef preferencesRef, bool enabled)
+void WKPreferencesSetImageControlsEnabled(WKPreferencesRef, bool)
 {
-    toImpl(preferencesRef)->setImageControlsEnabled(enabled);
+    // Image controls are no longer supported.
 }
 
-bool WKPreferencesGetImageControlsEnabled(WKPreferencesRef preferencesRef)
+bool WKPreferencesGetImageControlsEnabled(WKPreferencesRef)
 {
-    return toImpl(preferencesRef)->imageControlsEnabled();
+    // Image controls are no longer supported.
+    return false;
 }
 
 void WKPreferencesSetGamepadsEnabled(WKPreferencesRef preferencesRef, bool enabled)

Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (272116 => 272117)


--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2021-01-30 18:47:44 UTC (rev 272117)
@@ -468,7 +468,6 @@
 #if PLATFORM(MAC)
     pageConfiguration->preferences()->setShowsURLsInToolTipsEnabled(!![_configuration _showsURLsInToolTips]);
     pageConfiguration->preferences()->setServiceControlsEnabled(!![_configuration _serviceControlsEnabled]);
-    pageConfiguration->preferences()->setImageControlsEnabled(!![_configuration _imageControlsEnabled]);
 
     pageConfiguration->preferences()->setUserInterfaceDirectionPolicy(convertUserInterfaceDirectionPolicy([_configuration userInterfaceDirectionPolicy]));
     // We are in the View's initialization routine, so our client hasn't had time to set our user interface direction.

Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm (272116 => 272117)


--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm	2021-01-30 18:47:44 UTC (rev 272117)
@@ -158,7 +158,6 @@
     WKRetainPtr<WKPageGroupRef> _pageGroup;
     BOOL _showsURLsInToolTips;
     BOOL _serviceControlsEnabled;
-    BOOL _imageControlsEnabled;
     BOOL _requiresUserActionForEditingControlsManager;
 #endif
     BOOL _waitsForPaintAfterViewDidMoveToWindow;
@@ -226,7 +225,6 @@
     _respectsImageOrientation = NO;
     _showsURLsInToolTips = NO;
     _serviceControlsEnabled = NO;
-    _imageControlsEnabled = NO;
     _requiresUserActionForEditingControlsManager = NO;
 #endif
     _waitsForPaintAfterViewDidMoveToWindow = YES;
@@ -419,7 +417,6 @@
     configuration->_userInterfaceDirectionPolicy = self->_userInterfaceDirectionPolicy;
     configuration->_showsURLsInToolTips = self->_showsURLsInToolTips;
     configuration->_serviceControlsEnabled = self->_serviceControlsEnabled;
-    configuration->_imageControlsEnabled = self->_imageControlsEnabled;
     configuration->_requiresUserActionForEditingControlsManager = self->_requiresUserActionForEditingControlsManager;
     configuration->_pageGroup = self._pageGroup;
 #endif
@@ -1075,12 +1072,13 @@
 
 - (BOOL)_imageControlsEnabled
 {
-    return _imageControlsEnabled;
+    // Image controls are no longer supported.
+    return NO;
 }
 
 - (void)_setImageControlsEnabled:(BOOL)imageControlsEnabled
 {
-    _imageControlsEnabled = imageControlsEnabled;
+    // Image controls are no longer supported.
 }
 
 - (BOOL)_requiresUserActionForEditingControlsManager

Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h (272116 => 272117)


--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h	2021-01-30 18:47:44 UTC (rev 272117)
@@ -97,7 +97,7 @@
 #else
 @property (nonatomic, setter=_setShowsURLsInToolTips:) BOOL _showsURLsInToolTips WK_API_AVAILABLE(macos(10.12));
 @property (nonatomic, setter=_setServiceControlsEnabled:) BOOL _serviceControlsEnabled WK_API_AVAILABLE(macos(10.12));
-@property (nonatomic, setter=_setImageControlsEnabled:) BOOL _imageControlsEnabled WK_API_AVAILABLE(macos(10.12));
+@property (nonatomic, setter=_setImageControlsEnabled:) BOOL _imageControlsEnabled WK_API_DEPRECATED("Image controls are no longer supported", macos(10.12, WK_MAC_TBA));
 @property (nonatomic, readwrite, setter=_setRequiresUserActionForEditingControlsManager:) BOOL _requiresUserActionForEditingControlsManager WK_API_AVAILABLE(macos(10.12));
 @property (nonatomic, readwrite, setter=_setCPULimit:) double _cpuLimit WK_API_AVAILABLE(macos(10.13.4));
 @property (nonatomic, readwrite, setter=_setPageGroup:) WKPageGroupRef _pageGroup WK_API_AVAILABLE(macos(10.13.4));

Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (272116 => 272117)


--- trunk/Source/WebKitLegacy/mac/ChangeLog	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog	2021-01-30 18:47:44 UTC (rev 272117)
@@ -1,3 +1,17 @@
+2021-01-30  Wenson Hsieh  <[email protected]>
+
+        [macOS] Remove support for image controls
+        https://bugs.webkit.org/show_bug.cgi?id=221156
+
+        Reviewed by Tim Horton.
+
+        Turn these legacy WebKit SPI methods into empty stubs.
+
+        * WebView/WebPreferenceKeysPrivate.h:
+        * WebView/WebPreferences.mm:
+        (-[WebPreferences imageControlsEnabled]):
+        (-[WebPreferences setImageControlsEnabled:]):
+
 2021-01-26  BJ Burg  <[email protected]>
 
         REGRESSION(r267641): WebKitDeveloperExtras preference has no effect for WebKitLegacy clients

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h (272116 => 272117)


--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h	2021-01-30 18:47:44 UTC (rev 272117)
@@ -161,7 +161,6 @@
 #define WebKitMediaSourceEnabledPreferenceKey @"WebKitMediaSourceEnabled"
 #define WebKitSourceBufferChangeTypeEnabledPreferenceKey @"WebKitSourceBufferChangeTypeEnabled"
 #define WebKitShouldConvertPositionStyleOnCopyPreferenceKey @"WebKitShouldConvertPositionStyleOnCopy"
-#define WebKitImageControlsEnabledPreferenceKey @"WebKitImageControlsEnabled"
 #define WebKitGamepadsEnabledPreferenceKey @"WebKitGamepadsEnabled"
 #define WebKitServiceControlsEnabledPreferenceKey @"WebKitServiceControlsEnabled"
 #define WebKitMediaKeysStorageDirectoryKey @"WebKitMediaKeysStorageDirectory"

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm (272116 => 272117)


--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm	2021-01-30 12:57:47 UTC (rev 272116)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm	2021-01-30 18:47:44 UTC (rev 272117)
@@ -2440,12 +2440,14 @@
 
 - (BOOL)imageControlsEnabled
 {
-    return [self _boolValueForKey:WebKitImageControlsEnabledPreferenceKey];
+    // Image controls are no longer supported.
+    return NO;
 }
 
 - (void)setImageControlsEnabled:(BOOL)enabled
 {
-    [self _setBoolValue:enabled forKey:WebKitImageControlsEnabledPreferenceKey];
+    // Image controls are no longer supported.
+    UNUSED_PARAM(enabled);
 }
 
 - (BOOL)serviceControlsEnabled
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to