WebKit Bugzilla
Attachment 372081 Details for
Bug 198842
: Move Synthetic Editing Commands to behind an experimental feature flag
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198842-20190613162648.patch (text/plain), 14.59 KB, created by
Megan Gardner
on 2019-06-13 16:26:49 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Megan Gardner
Created:
2019-06-13 16:26:49 PDT
Size:
14.59 KB
patch
obsolete
>Subversion Revision: 246375 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 0a678a3271016c385ef98bc5dd738cac32ac2679..c8e29096f4d15ba05a838b9341d413cee0e4ac33 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,21 @@ >+2019-06-13 Megan Gardner <megan_gardner@apple.com> >+ >+ Move Synthetic Editing Commands to behind an experimental feature flag >+ https://bugs.webkit.org/show_bug.cgi?id=198842 >+ <rdar://problem/50594700> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Moving from a quirk to a feature flag. >+ >+ * page/Quirks.cpp: >+ (WebCore::shouldEmulateEditingButtonsAndGesturesInHiddenEditableAreasForHost): Deleted. >+ (WebCore::Quirks::shouldEmulateEditingButtonsAndGesturesInHiddenEditableAreas const): Deleted. >+ * page/Quirks.h: >+ * page/RuntimeEnabledFeatures.h: >+ (WebCore::RuntimeEnabledFeatures::setSyntheticEditingCommandsEnabled): >+ (WebCore::RuntimeEnabledFeatures::syntheticEditingCommandsEnabled const): >+ > 2019-06-12 Sam Weinig <weinig@apple.com> > > Remove dead code in user agent construction >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index baf2ae92aec8ddcb6db2e4315058df8d6104cf50..875a2b08ba9b740cb87a4862b1bd1ab03da9a4cc 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,17 @@ >+2019-06-13 Megan Gardner <megan_gardner@apple.com> >+ >+ Move Synthetic Editing Commands to behind an experimental feature flag >+ https://bugs.webkit.org/show_bug.cgi?id=198842 >+ <rdar://problem/50594700> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add a feature flag to gate synthetic editing commands. >+ >+ * Shared/WebPreferences.yaml: >+ * WebProcess/WebPage/ios/WebPageIOS.mm: >+ (WebKit::WebPage::getFocusedElementInformation): >+ > 2019-06-12 Ludovico de Nittis <ludovico.denittis@collabora.com> > > [GTK] GTK_STOCK_* types have been deprecated since GTK 3.10 >diff --git a/Source/WebKitLegacy/mac/ChangeLog b/Source/WebKitLegacy/mac/ChangeLog >index b95d7bb1be74a51602e9409f8c804a64fe29276b..8cc6943e2797b7503ca30bf90db578bddcdee394 100644 >--- a/Source/WebKitLegacy/mac/ChangeLog >+++ b/Source/WebKitLegacy/mac/ChangeLog >@@ -1,3 +1,22 @@ >+2019-06-13 Megan Gardner <megan_gardner@apple.com> >+ >+ Move Synthetic Editing Commands to behind an experimental feature flag >+ https://bugs.webkit.org/show_bug.cgi?id=198842 >+ <rdar://problem/50594700> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add plumbing for synthetic editing command feature flag. >+ >+ * WebView/WebPreferenceKeysPrivate.h: >+ * WebView/WebPreferences.mm: >+ (+[WebPreferences initialize]): >+ (-[WebPreferences syntheticEditingCommandsEnabled]): >+ (-[WebPreferences setSyntheticEditingCommandsEnabled:]): >+ * WebView/WebPreferencesPrivate.h: >+ * WebView/WebView.mm: >+ (-[WebView _preferencesChanged:]): >+ > 2019-06-10 Sam Weinig <weinig@apple.com> > > Remove Dashboard support >diff --git a/Source/WebCore/page/Quirks.cpp b/Source/WebCore/page/Quirks.cpp >index 2e99641d84b4da8e62521b8ec9ee5b5eeffdaafd..6543984a3afe6c5d3f5eb9ec6b2c17048cd0fe01 100644 >--- a/Source/WebCore/page/Quirks.cpp >+++ b/Source/WebCore/page/Quirks.cpp >@@ -242,16 +242,6 @@ static bool shouldSuppressAutocorrectionAndAutocaptializationInHiddenEditableAre > #endif > } > >-static bool shouldEmulateEditingButtonsAndGesturesInHiddenEditableAreasForHost(const StringView& host) >-{ >-#if PLATFORM(IOS_FAMILY) >- return equalLettersIgnoringASCIICase(host, "docs.google.com"); >-#else >- UNUSED_PARAM(host); >- return false; >-#endif >-} >- > bool Quirks::shouldDispatchSyntheticMouseEventsWhenModifyingSelection() const > { > if (m_document->settings().shouldDispatchSyntheticMouseEventsWhenModifyingSelection()) >@@ -270,14 +260,6 @@ bool Quirks::shouldDispatchSyntheticMouseEventsWhenModifyingSelection() const > return false; > } > >-bool Quirks::shouldEmulateEditingButtonsAndGesturesInHiddenEditableAreas() const >-{ >- if (!needsQuirks()) >- return false; >- >- return shouldEmulateEditingButtonsAndGesturesInHiddenEditableAreasForHost(m_document->topDocument().url().host()); >-} >- > bool Quirks::shouldSuppressAutocorrectionAndAutocaptializationInHiddenEditableAreas() const > { > if (!needsQuirks()) >diff --git a/Source/WebCore/page/Quirks.h b/Source/WebCore/page/Quirks.h >index 0235733ab11e4cb3761404b25c9b3b1c1bca8004..cbd2fd23e6878a1139bb65199f00c3362e3735b2 100644 >--- a/Source/WebCore/page/Quirks.h >+++ b/Source/WebCore/page/Quirks.h >@@ -58,7 +58,6 @@ public: > > WEBCORE_EXPORT bool shouldDispatchSyntheticMouseEventsWhenModifyingSelection() const; > WEBCORE_EXPORT bool shouldSuppressAutocorrectionAndAutocaptializationInHiddenEditableAreas() const; >- WEBCORE_EXPORT bool shouldEmulateEditingButtonsAndGesturesInHiddenEditableAreas() const; > WEBCORE_EXPORT bool isTouchBarUpdateSupressedForHiddenContentEditable() const; > WEBCORE_EXPORT bool isNeverRichlyEditableForTouchBar() const; > >diff --git a/Source/WebCore/page/RuntimeEnabledFeatures.h b/Source/WebCore/page/RuntimeEnabledFeatures.h >index 1b9ddaccb8cf3bcdafd70904688cfee466944599..cb200e513d3b9d4e3adb572d04818f18d45b4000 100644 >--- a/Source/WebCore/page/RuntimeEnabledFeatures.h >+++ b/Source/WebCore/page/RuntimeEnabledFeatures.h >@@ -183,6 +183,9 @@ public: > > void setPointerEventsEnabled(bool isEnabled) { m_pointerEventsEnabled = isEnabled; } > bool pointerEventsEnabled() const { return m_pointerEventsEnabled; } >+ >+ void setSyntheticEditingCommandsEnabled(bool isEnabled) { m_syntheticEditingCommandsEnabled = isEnabled; } >+ bool syntheticEditingCommandsEnabled() const { return m_syntheticEditingCommandsEnabled; } > > #if ENABLE(LAYOUT_FORMATTING_CONTEXT) > void setLayoutFormattingContextEnabled(bool isEnabled) { m_layoutFormattingContextEnabled = isEnabled; } >@@ -411,6 +414,7 @@ private: > bool m_webAPIStatisticsEnabled { false }; > bool m_CSSCustomPropertiesAndValuesEnabled { false }; > bool m_pointerEventsEnabled { true }; >+ bool m_syntheticEditingCommandsEnabled { true }; > bool m_webSQLEnabled { true }; > bool m_pageAtRuleSupportEnabled { false }; > >diff --git a/Source/WebCore/page/Settings.yaml b/Source/WebCore/page/Settings.yaml >index f77fca3a4c2a196b7e951717426aad170f71a720..20345a32d59662cbc16c497798a1a9456bd1f18f 100644 >--- a/Source/WebCore/page/Settings.yaml >+++ b/Source/WebCore/page/Settings.yaml >@@ -586,6 +586,9 @@ visualViewportEnabled: > visualViewportAPIEnabled: > initial: false > >+syntheticEditingCommandsEnabled: >+ initial: true >+ > CSSOMViewScrollingAPIEnabled: > initial: false > >diff --git a/Source/WebKit/Shared/WebPreferences.yaml b/Source/WebKit/Shared/WebPreferences.yaml >index 5ec408bf75c7ad61cfdd98c99ebfe196d7f64951..a295073dc66846ba12faa6ba8b22bdd401e5b3cf 100644 >--- a/Source/WebKit/Shared/WebPreferences.yaml >+++ b/Source/WebKit/Shared/WebPreferences.yaml >@@ -1254,6 +1254,13 @@ PointerEventsEnabled: > webcoreBinding: RuntimeEnabledFeatures > category: experimental > >+SyntheticEditingCommandsEnabled: >+ type: bool >+ defaultValue: true >+ humanReadableName: "Synthetic Editing Commands" >+ humanReadableDescription: "Enable Synthetic Editing Commands" >+ category: experimental >+ > CSSOMViewScrollingAPIEnabled: > type: bool > defaultValue: true >diff --git a/Source/WebKit/UIProcess/API/C/WKPreferences.cpp b/Source/WebKit/UIProcess/API/C/WKPreferences.cpp >index be87e9631d6010397f49f8807045ac0c90bbbdf4..460187abb85f4c2939a6c6030435ea8ea765db41 100644 >--- a/Source/WebKit/UIProcess/API/C/WKPreferences.cpp >+++ b/Source/WebKit/UIProcess/API/C/WKPreferences.cpp >@@ -1980,6 +1980,16 @@ bool WKPreferencesGetAriaReflectionEnabled(WKPreferencesRef preferencesRef) > return toImpl(preferencesRef)->ariaReflectionEnabled(); > } > >+void WKPreferencesSetSyntheticEditingCommandsEnabled(WKPreferencesRef preferencesRef, bool flag) >+{ >+ toImpl(preferencesRef)->setSyntheticEditingCommandsEnabled(flag); >+} >+ >+bool WKPreferencesGetSyntheticEditingCommandsEnabled(WKPreferencesRef preferencesRef) >+{ >+ return toImpl(preferencesRef)->syntheticEditingCommandsEnabled(); >+} >+ > void WKPreferencesSetCSSOMViewScrollingAPIEnabled(WKPreferencesRef preferencesRef, bool flag) > { > toImpl(preferencesRef)->setCSSOMViewScrollingAPIEnabled(flag); >diff --git a/Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h b/Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h >index 1bd21c868d58971ba438a8ac7423cfd5dadfd41d..5c3398cb2754fcc4c05d53f26e9d6a1379bd850c 100644 >--- a/Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h >+++ b/Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h >@@ -559,6 +559,10 @@ WK_EXPORT bool WKPreferencesGetAccessibilityObjectModelEnabled(WKPreferencesRef) > WK_EXPORT void WKPreferencesSetAriaReflectionEnabled(WKPreferencesRef, bool flag); > WK_EXPORT bool WKPreferencesGetAriaReflectionEnabled(WKPreferencesRef); > >+// Defaults to true. >+WK_EXPORT void WKPreferencesSetSyntheticEditingCommandsEnabled(WKPreferencesRef, bool); >+WK_EXPORT bool WKPreferencesGetSyntheticEditingCommandsEnabled(WKPreferencesRef); >+ > // Defaults to false. > WK_EXPORT void WKPreferencesSetCSSOMViewScrollingAPIEnabled(WKPreferencesRef, bool); > WK_EXPORT bool WKPreferencesGetCSSOMViewScrollingAPIEnabled(WKPreferencesRef); >diff --git a/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm b/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >index 0887027410c6ffd4534fbbda7ddc96315150ecd7..4cb2f2719e3cbc2ffe27566ef0082fb777aa6114 100644 >--- a/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >+++ b/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >@@ -2937,7 +2937,7 @@ void WebPage::getFocusedElementInformation(FocusedElementInformation& informatio > information.isAutocorrect = focusedElement.shouldAutocorrect(); > information.autocapitalizeType = focusedElement.autocapitalizeType(); > information.inputMode = focusedElement.canonicalInputMode(); >- information.shouldSynthesizeKeyEventsForEditing = focusedElement.document().quirks().shouldEmulateEditingButtonsAndGesturesInHiddenEditableAreas(); >+ information.shouldSynthesizeKeyEventsForEditing = focusedElement.document().settings().syntheticEditingCommandsEnabled(); > } else { > information.isAutocorrect = true; > information.autocapitalizeType = AutocapitalizeTypeDefault; >diff --git a/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h b/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h >index 3b21e6405e224d71a0d43ad4615da91d66fcf295..86addf6a11b5efa3e73a0f5c20a368a54acceeaf 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h >+++ b/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h >@@ -54,6 +54,7 @@ > #define WebKitJavaScriptMarkupEnabledPreferenceKey @"WebKitJavaScriptMarkupEnabled" > #define WebKitWebAnimationsEnabledPreferenceKey @"WebKitWebAnimationsEnabled" > #define WebKitPointerEventsEnabledPreferenceKey @"WebKitPointerEventsEnabled" >+#define WebKitSyntheticEditingCommandsEnabledPreferenceKey @"WebKitSyntheticEditingCommandsEnabled" > #define WebKitWebSecurityEnabledPreferenceKey @"WebKitWebSecurityEnabled" > #define WebKitAllowUniversalAccessFromFileURLsPreferenceKey @"WebKitAllowUniversalAccessFromFileURLs" > #define WebKitAllowFileAccessFromFileURLsPreferenceKey @"WebKitAllowFileAccessFromFileURLs" >diff --git a/Source/WebKitLegacy/mac/WebView/WebPreferences.mm b/Source/WebKitLegacy/mac/WebView/WebPreferences.mm >index 81877304a01d9a9f6823c871c30341e2d9397647..ec9132769148fa7008b1c49b2718ccd26244b08d 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebPreferences.mm >+++ b/Source/WebKitLegacy/mac/WebView/WebPreferences.mm >@@ -643,6 +643,7 @@ + (void)initialize > [NSNumber numberWithBool:NO], WebKitDirectoryUploadEnabledPreferenceKey, > [NSNumber numberWithBool:YES], WebKitWebAnimationsEnabledPreferenceKey, > [NSNumber numberWithBool:YES], WebKitPointerEventsEnabledPreferenceKey, >+ [NSNumber numberWithBool:YES], WebKitSyntheticEditingCommandsEnabledPreferenceKey, > > #if PLATFORM(IOS_FAMILY) > @NO, WebKitVisualViewportAPIEnabledPreferenceKey, >@@ -3156,6 +3157,16 @@ - (void)setPointerEventsEnabled:(BOOL)flag > [self _setBoolValue:flag forKey:WebKitPointerEventsEnabledPreferenceKey]; > } > >+- (BOOL)syntheticEditingCommandsEnabled >+{ >+ return [self _boolValueForKey:WebKitPointerEventsEnabledPreferenceKey]; >+} >+ >+- (void)setSyntheticEditingCommandsEnabled:(BOOL)flag >+{ >+ [self _setBoolValue:flag forKey:WebKitPointerEventsEnabledPreferenceKey]; >+} >+ > - (BOOL)fetchAPIKeepAliveEnabled > { > return [self _boolValueForKey:WebKitFetchAPIEnabledPreferenceKey]; >diff --git a/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h b/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h >index 1229edf9e6d6b2d4d1cb731b14168f58f0f17175..a8b9ac7206268f4260acb996c9d6d7eab093bd99 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h >+++ b/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h >@@ -573,6 +573,9 @@ extern NSString *WebPreferencesCacheModelChangedInternalNotification WEBKIT_DEPR > - (void)setPointerEventsEnabled:(BOOL)flag; > - (BOOL)pointerEventsEnabled; > >+- (void)setSyntheticEditingCommandsEnabled:(BOOL)flag; >+- (BOOL)syntheticEditingCommandsEnabled; >+ > - (void)setFetchAPIKeepAliveEnabled:(BOOL)flag; > - (BOOL)fetchAPIKeepAliveEnabled; > >diff --git a/Source/WebKitLegacy/mac/WebView/WebView.mm b/Source/WebKitLegacy/mac/WebView/WebView.mm >index 38de68b3e0e9dda18edccbdd456117211a9f4602..ad420ff649ff0b742297ccce81e94a2928a1c20d 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebView.mm >+++ b/Source/WebKitLegacy/mac/WebView/WebView.mm >@@ -2981,6 +2981,7 @@ - (void)_preferencesChanged:(WebPreferences *)preferences > settings.setJavaScriptCanOpenWindowsAutomatically([preferences javaScriptCanOpenWindowsAutomatically] || shouldAllowWindowOpenWithoutUserGesture()); > > settings.setVisualViewportAPIEnabled([preferences visualViewportAPIEnabled]); >+ settings.setSyntheticEditingCommandsEnabled([preferences syntheticEditingCommandsEnabled]); > settings.setCSSOMViewScrollingAPIEnabled([preferences CSSOMViewScrollingAPIEnabled]); > settings.setMediaContentTypesRequiringHardwareSupport([preferences mediaContentTypesRequiringHardwareSupport]); > >@@ -3160,6 +3161,8 @@ - (void)_preferencesChanged:(WebPreferences *)preferences > #if ENABLE(POINTER_EVENTS) > RuntimeEnabledFeatures::sharedFeatures().setPointerEventsEnabled([preferences pointerEventsEnabled]); > #endif >+ >+ RuntimeEnabledFeatures::sharedFeatures().setSyntheticEditingCommandsEnabled([preferences syntheticEditingCommandsEnabled]); > > #if ENABLE(INTERSECTION_OBSERVER) > RuntimeEnabledFeatures::sharedFeatures().setIntersectionObserverEnabled(preferences.intersectionObserverEnabled);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198842
:
372077
|
372081
|
372087
|
372137