Title: [249512] trunk/Source/WebKit
- Revision
- 249512
- Author
- [email protected]
- Date
- 2019-09-04 19:11:22 -0700 (Wed, 04 Sep 2019)
Log Message
Replace defaultCustomPasteboardDataEnabled by an equivalent macro
https://bugs.webkit.org/show_bug.cgi?id=201477
Reviewed by Wenson Hsieh.
r227282 introduced defaultCustomPasteboardDataEnabled() to disable the custom pasteboard data on
apps linked against old SDKs. However, this had a bug that the check inside WebContent process
would always return true because WebContent process is always linked against the latest SDKs.
Because WebPreferences values aren't propagated from UI process to WebContent process unless
there is a value change, it meant that custom pasteboard data is always enabled.
This patch replaces this function with a simple macro which always enables the custom pasteboard
data on iOS family and macOS as it has always been the case before and after r227282.
* Shared/WebPreferences.yaml:
* Shared/WebPreferencesDefaultValues.cpp:
(WebKit::defaultCustomPasteboardDataEnabled): Deleted.
* Shared/WebPreferencesDefaultValues.h:
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (249511 => 249512)
--- trunk/Source/WebKit/ChangeLog 2019-09-05 01:39:59 UTC (rev 249511)
+++ trunk/Source/WebKit/ChangeLog 2019-09-05 02:11:22 UTC (rev 249512)
@@ -1,3 +1,24 @@
+2019-09-04 Ryosuke Niwa <[email protected]>
+
+ Replace defaultCustomPasteboardDataEnabled by an equivalent macro
+ https://bugs.webkit.org/show_bug.cgi?id=201477
+
+ Reviewed by Wenson Hsieh.
+
+ r227282 introduced defaultCustomPasteboardDataEnabled() to disable the custom pasteboard data on
+ apps linked against old SDKs. However, this had a bug that the check inside WebContent process
+ would always return true because WebContent process is always linked against the latest SDKs.
+ Because WebPreferences values aren't propagated from UI process to WebContent process unless
+ there is a value change, it meant that custom pasteboard data is always enabled.
+
+ This patch replaces this function with a simple macro which always enables the custom pasteboard
+ data on iOS family and macOS as it has always been the case before and after r227282.
+
+ * Shared/WebPreferences.yaml:
+ * Shared/WebPreferencesDefaultValues.cpp:
+ (WebKit::defaultCustomPasteboardDataEnabled): Deleted.
+ * Shared/WebPreferencesDefaultValues.h:
+
2019-09-04 Wenson Hsieh <[email protected]>
-[WKContentView selectedText] returns an empty string when selecting more than 200 characters
Modified: trunk/Source/WebKit/Shared/WebPreferences.yaml (249511 => 249512)
--- trunk/Source/WebKit/Shared/WebPreferences.yaml 2019-09-05 01:39:59 UTC (rev 249511)
+++ trunk/Source/WebKit/Shared/WebPreferences.yaml 2019-09-05 02:11:22 UTC (rev 249512)
@@ -846,7 +846,7 @@
CustomPasteboardDataEnabled:
type: bool
- defaultValue: defaultCustomPasteboardDataEnabled()
+ defaultValue: DEFAULT_CUSTOM_PASTEBOARD_DATA_ENABLED
humanReadableName: "Custom pasteboard data"
humanReadableDescription: "Enable custom clipboard types and better security model for clipboard API."
webcoreBinding: RuntimeEnabledFeatures
Modified: trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp (249511 => 249512)
--- trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp 2019-09-05 01:39:59 UTC (rev 249511)
+++ trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp 2019-09-05 02:11:22 UTC (rev 249512)
@@ -46,19 +46,6 @@
#endif
}
-bool defaultCustomPasteboardDataEnabled()
-{
-#if PLATFORM(MACCATALYST)
- return true;
-#elif PLATFORM(IOS_FAMILY)
- return WebCore::IOSApplication::isMobileSafari() || dyld_get_program_sdk_version() >= DYLD_IOS_VERSION_11_3;
-#elif PLATFORM(MAC)
- return WebCore::MacApplication::isSafari() || dyld_get_program_sdk_version() > DYLD_MACOSX_VERSION_10_13;
-#else
- return false;
-#endif
-}
-
bool defaultCSSOMViewScrollingAPIEnabled()
{
#if PLATFORM(IOS_FAMILY)
Modified: trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h (249511 => 249512)
--- trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h 2019-09-05 01:39:59 UTC (rev 249511)
+++ trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h 2019-09-05 02:11:22 UTC (rev 249512)
@@ -250,6 +250,12 @@
#define DEFAULT_DATALIST_ELEMENT_ENABLED true
#endif
+#if PLATFORM(COCOA)
+#define DEFAULT_CUSTOM_PASTEBOARD_DATA_ENABLED true
+#else
+#define DEFAULT_CUSTOM_PASTEBOARD_DATA_ENABLED false
+#endif
+
#if PLATFORM(IOS)
#define DEFAULT_DOM_PASTE_ACCESS_REQUESTS_ENABLED true
#else
@@ -273,7 +279,6 @@
namespace WebKit {
bool defaultPassiveTouchListenersAsDefaultOnDocument();
-bool defaultCustomPasteboardDataEnabled();
bool defaultCSSOMViewScrollingAPIEnabled();
#if ENABLE(TEXT_AUTOSIZING)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes