Changeset 269780 in webkit
- Timestamp:
- Nov 13, 2020, 8:46:42 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 8 added
- 15 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/events/wheel/wheel-event-listeners-on-body-made-passive-expected.txt (added)
-
LayoutTests/fast/events/wheel/wheel-event-listeners-on-body-made-passive.html (added)
-
LayoutTests/fast/events/wheel/wheel-event-listeners-on-document-made-passive-expected.txt (added)
-
LayoutTests/fast/events/wheel/wheel-event-listeners-on-document-made-passive.html (added)
-
LayoutTests/fast/events/wheel/wheel-event-listeners-on-window-left-active-expected.txt (added)
-
LayoutTests/fast/events/wheel/wheel-event-listeners-on-window-left-active.html (added)
-
LayoutTests/fast/events/wheel/wheel-event-listeners-on-window-made-passive-expected.txt (added)
-
LayoutTests/fast/events/wheel/wheel-event-listeners-on-window-made-passive.html (added)
-
LayoutTests/fast/scrolling/mac/wheel-event-listener-region-root-invalidation-expected.txt (modified) (1 diff)
-
LayoutTests/platform/win/TestExpectations (modified) (1 diff)
-
LayoutTests/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-document-expected.txt (modified) (1 diff)
-
Source/WTF/ChangeLog (modified) (1 diff)
-
Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/page/Quirks.cpp (modified) (1 diff)
-
Source/WebCore/platform/cocoa/VersionChecks.h (modified) (1 diff)
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/Shared/WebPreferencesDefaultValues.cpp (modified) (1 diff)
-
Source/WebKit/Shared/WebPreferencesDefaultValues.h (modified) (1 diff)
-
Source/WebKitLegacy/mac/ChangeLog (modified) (1 diff)
-
Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.h (modified) (1 diff)
-
Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.mm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r269778 r269780 1 2020-11-12 Simon Fraser <simon.fraser@apple.com> 2 3 Force wheel event listeners on the root to be passive 4 https://bugs.webkit.org/show_bug.cgi?id=218842 5 <rdar://problem/71312668> 6 7 Reviewed by Chris Dumez. 8 9 Following Blink (https://www.chromestatus.com/feature/6662647093133312) force 'wheel' and 10 'mousewheel' event listeners on root objects (window, document and body) to be passive if 11 they were not explicitly registered as non-passive. 12 13 This behavior is controlled by an experimental feature flag, and a linked-on-or-after check 14 to avoid changing behavior for apps that embed WebKit until they link against new SDKs. 15 16 * fast/events/wheel/wheel-event-listeners-on-body-made-passive-expected.txt: Added. 17 * fast/events/wheel/wheel-event-listeners-on-body-made-passive.html: Added. 18 * fast/events/wheel/wheel-event-listeners-on-document-made-passive-expected.txt: Added. 19 * fast/events/wheel/wheel-event-listeners-on-document-made-passive.html: Added. 20 * fast/events/wheel/wheel-event-listeners-on-window-left-active-expected.txt: Added. 21 * fast/events/wheel/wheel-event-listeners-on-window-left-active.html: Added. 22 * fast/events/wheel/wheel-event-listeners-on-window-made-passive-expected.txt: Added. 23 * fast/events/wheel/wheel-event-listeners-on-window-made-passive.html: Added. 24 1 25 2020-11-13 Julian Gonzalez <julian_a_gonzalez@apple.com> 2 26 -
trunk/LayoutTests/fast/scrolling/mac/wheel-event-listener-region-root-invalidation-expected.txt
r261820 r269780 12 12 (wheel event listener region 13 13 (rect (0,0) width=800 height=600) 14 (non-passive15 (rect (0,0) width=800 height=600)16 )17 14 ) 18 15 ) -
trunk/LayoutTests/platform/win/TestExpectations
r269759 r269780 276 276 fast/events/wheel/wheelevent-in-horizontal-scrollbar-in-rtl.html [ Failure ] 277 277 fast/events/wheel/wheelevent-in-vertical-scrollbar-in-rtl.html [ Failure ] 278 fast/events/wheel/wheel-event-listeners-on-body-made-passive.html [ Skip ] 279 fast/events/wheel/wheel-event-listeners-on-document-made-passive.html [ Skip ] 280 fast/events/wheel/wheel-event-listeners-on-window-left-active.html [ Skip ] 281 fast/events/wheel/wheel-event-listeners-on-window-made-passive.html [ Skip ] 282 278 283 scrollbars/scroll-rtl-or-bt-layer.html [ Timeout ] 279 284 webkit.org/b/208559 fast/scrolling/arrow-key-scroll-in-rtl-document.html [ Skip ] -
trunk/LayoutTests/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-document-expected.txt
r268476 r269780 13 13 (wheel event listener region 14 14 (rect (0,0) width=800 height=600) 15 (non-passive16 (rect (0,0) width=800 height=600)17 )18 15 ) 19 16 ) -
trunk/Source/WTF/ChangeLog
r269775 r269780 1 2020-11-12 Simon Fraser <simon.fraser@apple.com> 2 3 Force wheel event listeners on the root to be passive 4 https://bugs.webkit.org/show_bug.cgi?id=218842 5 <rdar://problem/71312668> 6 7 Reviewed by Chris Dumez. 8 9 Following Blink (https://www.chromestatus.com/feature/6662647093133312) force 'wheel' and 10 'mousewheel' event listeners on root objects (window, document and body) to be passive if 11 they were not explicitly registered as non-passive. 12 13 This behavior is controlled by an experimental feature flag, and a linked-on-or-after check 14 to avoid changing behavior for apps that embed WebKit until they link against new SDKs. 15 16 * Scripts/Preferences/WebPreferencesExperimental.yaml: 17 1 18 2020-11-13 Aditya Keerthi <akeerthi@apple.com> 2 19 -
trunk/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml
r269764 r269780 602 602 default: true 603 603 604 PassiveWheelListenersAsDefaultOnDocument: 605 type: bool 606 humanReadableName: "Wheel Event listeners on the root made passive" 607 humanReadableDescription: "Force wheel event listeners registered on the window, document or body to be passive" 608 defaultValue: 609 WebKitLegacy: 610 "PLATFORM(MAC)": WebKit::defaultPassiveWheelListenersAsDefaultOnDocument() 611 default: true 612 WebKit: 613 "PLATFORM(MAC)": WebKit::defaultPassiveWheelListenersAsDefaultOnDocument() 614 default: true 615 WebCore: 616 default: true 617 604 618 # FIXME: Is this implemented for WebKitLegacy? If not, this should be excluded from WebKitLegacy entirely. 605 619 PerElementSpeakerSelectionEnabled: -
trunk/Source/WebCore/ChangeLog
r269779 r269780 1 2020-11-12 Simon Fraser <simon.fraser@apple.com> 2 3 Force wheel event listeners on the root to be passive 4 https://bugs.webkit.org/show_bug.cgi?id=218842 5 <rdar://problem/71312668> 6 7 Reviewed by Chris Dumez. 8 9 Following Blink (https://www.chromestatus.com/feature/6662647093133312) force 'wheel' and 10 'mousewheel' event listeners on root objects (window, document and body) to be passive if 11 they were not explicitly registered as non-passive. 12 13 This behavior is controlled by an experimental feature flag, and a linked-on-or-after check 14 to avoid changing behavior for apps that embed WebKit until they link against new SDKs. 15 16 Tests: fast/events/wheel/wheel-event-listeners-on-body-made-passive.html 17 fast/events/wheel/wheel-event-listeners-on-document-made-passive.html 18 fast/events/wheel/wheel-event-listeners-on-window-left-active.html 19 fast/events/wheel/wheel-event-listeners-on-window-made-passive.html 20 21 * page/Quirks.cpp: 22 (WebCore::Quirks::shouldMakeEventListenerPassive): 23 * platform/cocoa/VersionChecks.h: 24 1 25 2020-11-13 Antti Koivisto <antti@apple.com> 2 26 -
trunk/Source/WebCore/page/Quirks.cpp
r268987 r269780 804 804 bool Quirks::shouldMakeEventListenerPassive(const EventTarget& eventTarget, const AtomString& eventType, const EventListener& eventListener) 805 805 { 806 auto eventTargetIsRoot = [](const EventTarget& eventTarget) { 807 if (is<DOMWindow>(eventTarget)) 808 return true; 809 810 if (is<Node>(eventTarget)) { 811 auto& node = downcast<Node>(eventTarget); 812 return is<Document>(node) || node.document().documentElement() == &node || node.document().body() == &node; 813 } 814 return false; 815 }; 816 817 auto documentFromEventTarget = [](const EventTarget& eventTarget) -> Document* { 818 return downcast<Document>(eventTarget.scriptExecutionContext()); 819 }; 820 806 821 if (eventNames().isTouchScrollBlockingEventType(eventType)) { 807 if (is<DOMWindow>(eventTarget)) { 808 auto& window = downcast<DOMWindow>(eventTarget); 809 if (auto* document = window.document()) 822 if (eventTargetIsRoot(eventTarget)) { 823 if (auto* document = documentFromEventTarget(eventTarget)) 810 824 return document->settings().passiveTouchListenersAsDefaultOnDocument(); 811 } else if (is<Node>(eventTarget)) { 812 auto& node = downcast<Node>(eventTarget); 813 if (is<Document>(node) || node.document().documentElement() == &node || node.document().body() == &node) 814 return node.document().settings().passiveTouchListenersAsDefaultOnDocument(); 825 } 826 return false; 827 } 828 829 if (eventNames().isWheelEventType(eventType)) { 830 if (eventTargetIsRoot(eventTarget)) { 831 if (auto* document = documentFromEventTarget(eventTarget)) 832 return document->settings().passiveWheelListenersAsDefaultOnDocument(); 815 833 } 816 834 return false; -
trunk/Source/WebCore/platform/cocoa/VersionChecks.h
r269279 r269780 72 72 FirstWithDropToNavigateDisallowedByDefault = DYLD_MACOSX_VERSION_10_13, 73 73 FirstWithExpiredOnlyReloadBehavior = DYLD_MACOSX_VERSION_10_13, 74 FirstThatDefaultsToPassiveWheelListenersOnDocument = DYLD_MACOSX_VERSION_11_3, 74 75 FirstWithWebIconDatabaseWarning = DYLD_MACOSX_VERSION_10_13, 75 76 FirstWithMainThreadReleaseAssertionInWebPageProxy = DYLD_MACOSX_VERSION_10_14, -
trunk/Source/WebKit/ChangeLog
r269777 r269780 1 2020-11-12 Simon Fraser <simon.fraser@apple.com> 2 3 Force wheel event listeners on the root to be passive 4 https://bugs.webkit.org/show_bug.cgi?id=218842 5 <rdar://problem/71312668> 6 7 Reviewed by Chris Dumez. 8 9 Following Blink (https://www.chromestatus.com/feature/6662647093133312) force 'wheel' and 10 'mousewheel' event listeners on root objects (window, document and body) to be passive if 11 they were not explicitly registered as non-passive. 12 13 This behavior is controlled by an experimental feature flag, and a linked-on-or-after check 14 to avoid changing behavior for apps that embed WebKit until they link against new SDKs. 15 16 * Shared/WebPreferencesDefaultValues.cpp: 17 (WebKit::defaultCSSOMViewScrollingAPIEnabled): 18 (WebKit::defaultPassiveWheelListenersAsDefaultOnDocument): 19 * Shared/WebPreferencesDefaultValues.h: 20 1 21 2020-11-13 Eric Carlson <eric.carlson@apple.com> 2 22 -
trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp
r269374 r269780 53 53 #endif 54 54 55 #if PLATFORM(MAC) 56 57 bool defaultPassiveWheelListenersAsDefaultOnDocument() 58 { 59 static bool result = linkedOnOrAfter(WebCore::SDKVersion::FirstThatDefaultsToPassiveWheelListenersOnDocument); 60 return result; 61 } 62 63 #endif 64 55 65 #if PLATFORM(MAC) || PLATFORM(IOS_FAMILY) 56 66 -
trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h
r269374 r269780 46 46 bool defaultTextAutosizingUsesIdempotentMode(); 47 47 #endif 48 #endif 49 50 #if PLATFORM(MAC) 51 bool defaultPassiveWheelListenersAsDefaultOnDocument(); 48 52 #endif 49 53 -
trunk/Source/WebKitLegacy/mac/ChangeLog
r269760 r269780 1 2020-11-12 Simon Fraser <simon.fraser@apple.com> 2 3 Force wheel event listeners on the root to be passive 4 https://bugs.webkit.org/show_bug.cgi?id=218842 5 <rdar://problem/71312668> 6 7 Reviewed by Chris Dumez. 8 9 Following Blink (https://www.chromestatus.com/feature/6662647093133312) force 'wheel' and 10 'mousewheel' event listeners on root objects (window, document and body) to be passive if 11 they were not explicitly registered as non-passive. 12 13 This behavior is controlled by an experimental feature flag, and a linked-on-or-after check 14 to avoid changing behavior for apps that embed WebKit until they link against new SDKs. 15 16 * WebView/WebPreferencesDefaultValues.h: 17 * WebView/WebPreferencesDefaultValues.mm: 18 (WebKit::defaultPassiveTouchListenersAsDefaultOnDocument): 19 (WebKit::defaultPassiveWheelListenersAsDefaultOnDocument): 20 1 21 2020-11-12 Sam Weinig <weinig@apple.com> 2 22 -
trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.h
r269760 r269780 83 83 bool defaultShouldConvertInvalidURLsToBlank(); 84 84 85 #if PLATFORM(MAC) 86 bool defaultPassiveWheelListenersAsDefaultOnDocument(); 87 #endif 88 85 89 } // namespace WebKit -
trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.mm
r269760 r269780 133 133 bool defaultPassiveTouchListenersAsDefaultOnDocument() 134 134 { 135 return linkedOnOrAfter(WebCore::SDKVersion::FirstThatDefaultsToPassiveTouchListenersOnDocument); 135 static bool result = linkedOnOrAfter(WebCore::SDKVersion::FirstThatDefaultsToPassiveTouchListenersOnDocument); 136 return result; 136 137 } 137 138 … … 283 284 } 284 285 286 #if PLATFORM(MAC) 287 288 bool defaultPassiveWheelListenersAsDefaultOnDocument() 289 { 290 static bool result = linkedOnOrAfter(WebCore::SDKVersion::FirstThatDefaultsToPassiveWheelListenersOnDocument); 291 return result; 292 } 293 294 #endif 295 285 296 } // namespace WebKit
Note:
See TracChangeset
for help on using the changeset viewer.