Changeset 208983 in webkit
- Timestamp:
- Nov 26, 2016 8:21:49 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 27 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r208981 r208983 1 2016-11-26 Sam Weinig <sam@webkit.org> 2 3 Convert IntersectionObserver over to using RuntimeEnabledFeatures so it can be properly excluded from script 4 https://bugs.webkit.org/show_bug.cgi?id=164965 5 6 Reviewed by Simon Fraser. 7 8 * intersection-observer/intersection-observer-entry-interface.html: 9 * intersection-observer/intersection-observer-interface.html: 10 * resources/testharnessreport.js: 11 Switch from enabling IntersectionObserver via internals.settings to using 12 comment header switches. 13 1 14 2016-11-26 Simon Fraser <simon.fraser@apple.com> 2 15 -
trunk/LayoutTests/intersection-observer/intersection-observer-entry-interface.html
r208181 r208983 1 <!DOCTYPE html> 1 <!DOCTYPE html><!-- webkit-test-runner [ enableIntersectionObserver=true ] --> 2 2 <head> 3 3 <title>IntersectionObserverEntry interface tests.</title> -
trunk/LayoutTests/intersection-observer/intersection-observer-interface.html
r208181 r208983 1 <!DOCTYPE html> 1 <!DOCTYPE html><!-- webkit-test-runner [ enableIntersectionObserver=true ] --> 2 2 <head> 3 3 <title>IntersectionObserver interface tests.</title> -
trunk/LayoutTests/resources/testharnessreport.js
r208980 r208983 91 91 if (window.internals) { 92 92 internals.setResourceTimingSupport(true); 93 internals.settings.setIntersectionObserverEnabled(true);94 93 } 95 94 } -
trunk/Source/JavaScriptCore/ChangeLog
r208970 r208983 1 2016-11-26 Sam Weinig <sam@webkit.org> 2 3 Convert IntersectionObserver over to using RuntimeEnabledFeatures so it can be properly excluded from script 4 https://bugs.webkit.org/show_bug.cgi?id=164965 5 6 Reviewed by Simon Fraser. 7 8 * runtime/CommonIdentifiers.h: 9 Add identifiers needed for RuntimeEnabledFeatures. 10 1 11 2016-11-23 Zan Dobersek <zdobersek@igalia.com> 2 12 -
trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h
r208939 r208983 65 65 macro(Infinity) \ 66 66 macro(InputEvent) \ 67 macro(IntersectionObserver) \ 68 macro(IntersectionObserverEntry) \ 67 69 macro(Intl) \ 68 70 macro(JSON) \ -
trunk/Source/WebCore/ChangeLog
r208982 r208983 1 2016-11-26 Sam Weinig <sam@webkit.org> 2 3 Convert IntersectionObserver over to using RuntimeEnabledFeatures so it can be properly excluded from script 4 https://bugs.webkit.org/show_bug.cgi?id=164965 5 6 Reviewed by Simon Fraser. 7 8 * bindings/generic/RuntimeEnabledFeatures.cpp: 9 (WebCore::RuntimeEnabledFeatures::reset): 10 * bindings/generic/RuntimeEnabledFeatures.h: 11 (WebCore::RuntimeEnabledFeatures::setIntersectionObserverEnabled): 12 (WebCore::RuntimeEnabledFeatures::intersectionObserverEnabled): 13 Add intersection observer setting. 14 15 * page/IntersectionObserver.idl: 16 * page/IntersectionObserverEntry.idl: 17 Convert to use EnabledAtRuntime extended attribute. 18 19 * page/Settings.in: 20 Remove the old intersection observer setting. 21 1 22 2016-11-26 Simon Fraser <simon.fraser@apple.com> 2 23 -
trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp
r205214 r208983 110 110 m_cssGridLayoutEnabled = true; 111 111 #endif 112 112 #if ENABLE(INTERSECTION_OBSERVER) 113 m_intersectionObserverEnabled = false; 114 #endif 113 115 } 114 116 -
trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h
r208939 r208983 228 228 #endif 229 229 230 #if ENABLE(INTERSECTION_OBSERVER) 231 void setIntersectionObserverEnabled(bool isEnabled) { m_intersectionObserverEnabled = isEnabled; } 232 bool intersectionObserverEnabled() const { return m_intersectionObserverEnabled; } 233 #endif 234 230 235 void setModernMediaControlsEnabled(bool areEnabled) { m_areModernMediaControlsEnabled = areEnabled; } 231 236 bool modernMediaControlsEnabled() const { return m_areModernMediaControlsEnabled; } … … 354 359 #endif 355 360 361 #if ENABLE(INTERSECTION_OBSERVER) 362 bool m_intersectionObserverEnabled { false }; 363 #endif 364 356 365 friend class WTF::NeverDestroyed<RuntimeEnabledFeatures>; 357 366 }; -
trunk/Source/WebCore/page/IntersectionObserver.idl
r208181 r208983 30 30 Constructor(IntersectionObserverCallback callback, optional IntersectionObserverInit options), 31 31 ImplementationLacksVTable, 32 Enabled BySetting=IntersectionObserver32 EnabledAtRuntime=IntersectionObserver 33 33 ] interface IntersectionObserver { 34 34 readonly attribute Element? root; -
trunk/Source/WebCore/page/IntersectionObserverEntry.idl
r208181 r208983 32 32 Constructor(IntersectionObserverEntryInit intersectionObserverEntryInit), 33 33 ImplementationLacksVTable, 34 Enabled BySetting=IntersectionObserver34 EnabledAtRuntime=IntersectionObserver 35 35 ] interface IntersectionObserverEntry { 36 36 readonly attribute DOMHighResTimeStamp time; -
trunk/Source/WebCore/page/Settings.in
r208903 r208983 280 280 # Runtime-enabled features 281 281 visualViewportEnabled initial=false, setNeedsStyleRecalcInAllFrames=1 282 intersectionObserverEnabled initial=false283 282 284 283 inputEventsEnabled initial=true -
trunk/Source/WebKit/mac/ChangeLog
r208969 r208983 1 2016-11-26 Sam Weinig <sam@webkit.org> 2 3 Convert IntersectionObserver over to using RuntimeEnabledFeatures so it can be properly excluded from script 4 https://bugs.webkit.org/show_bug.cgi?id=164965 5 6 Reviewed by Simon Fraser. 7 8 * WebView/WebPreferenceKeysPrivate.h: 9 * WebView/WebPreferences.mm: 10 (-[WebPreferences intersectionObserverEnabled]): 11 (-[WebPreferences setIntersectionObserverEnabled:]): 12 * WebView/WebPreferencesPrivate.h: 13 * WebView/WebView.mm: 14 (-[WebView _preferencesChanged:]): 15 Add a preference, defaulting to off, for enabling IntersectionObserver. 16 1 17 2016-11-22 Dan Bernstein <mitz@apple.com> 2 18 -
trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
r208903 r208983 217 217 #define WebKitMockCaptureDevicesEnabledPreferenceKey @"WebKitMockCaptureDevicesEnabled" 218 218 #define WebKitMediaCaptureRequiresSecureConnectionPreferenceKey @"WebKitMediaCaptureRequiresSecureConnection" 219 220 219 #define WebKitAttachmentElementEnabledPreferenceKey @"WebKitAttachmentElementEnabled" 221 220 #define WebKitIntersectionObserverEnabledPreferenceKey @"WebKitIntersectionObserverEnabled" 221 -
trunk/Source/WebKit/mac/WebView/WebPreferences.mm
r208903 r208983 2850 2850 } 2851 2851 2852 - (BOOL)intersectionObserverEnabled 2853 { 2854 return [self _boolValueForKey:WebKitIntersectionObserverEnabledPreferenceKey]; 2855 } 2856 2857 - (void)setIntersectionObserverEnabled:(BOOL)flag 2858 { 2859 [self _setBoolValue:flag forKey:WebKitIntersectionObserverEnabledPreferenceKey]; 2860 } 2861 2852 2862 @end 2853 2863 -
trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h
r208982 r208983 519 519 @property (nonatomic) BOOL attachmentElementEnabled; 520 520 @property (nonatomic) BOOL allowsInlineMediaPlaybackAfterFullscreen; 521 521 @property (nonatomic) BOOL intersectionObserverEnabled; 522 522 523 523 @end -
trunk/Source/WebKit/mac/WebView/WebView.mm
r208982 r208983 2863 2863 #endif 2864 2864 2865 #if ENABLE(INTERSECTION_OBSERVER) 2866 RuntimeEnabledFeatures::sharedFeatures().setIntersectionObserverEnabled(preferences.intersectionObserverEnabled); 2867 #endif 2868 2865 2869 NSTimeInterval timeout = [preferences incrementalRenderingSuppressionTimeoutInSeconds]; 2866 2870 if (timeout > 0) -
trunk/Source/WebKit2/ChangeLog
r208982 r208983 1 2016-11-26 Sam Weinig <sam@webkit.org> 2 3 Convert IntersectionObserver over to using RuntimeEnabledFeatures so it can be properly excluded from script 4 https://bugs.webkit.org/show_bug.cgi?id=164965 5 6 Reviewed by Simon Fraser. 7 8 * Shared/WebPreferencesDefinitions.h: 9 * UIProcess/API/C/WKPreferences.cpp: 10 (WKPreferencesSetIntersectionObserverEnabled): 11 (WKPreferencesGetIntersectionObserverEnabled): 12 * UIProcess/API/C/WKPreferencesRefPrivate.h: 13 * WebProcess/WebPage/WebPage.cpp: 14 (WebKit::WebPage::updatePreferences): 15 Add a preference, defaulting to off, for enabling IntersectionObserver. 16 1 17 2016-11-26 Simon Fraser <simon.fraser@apple.com> 2 18 -
trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h
r208939 r208983 238 238 macro(CustomElementsEnabled, customElementsEnabled, Bool, bool, true, "", "") \ 239 239 macro(EncryptedMediaAPIEnabled, encryptedMediaAPIEnabled, Bool, bool, false, "", "") \ 240 macro(IntersectionObserverEnabled, intersectionObserverEnabled, Bool, bool, false, "Intersection Observer", "Enable Intersection Observer support") \ 240 241 \ 241 242 -
trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp
r208903 r208983 1552 1552 } 1553 1553 1554 void WKPreferencesSetIntersectionObserverEnabled(WKPreferencesRef preferencesRef, bool flag) 1555 { 1556 toImpl(preferencesRef)->setIntersectionObserverEnabled(flag); 1557 } 1558 1559 bool WKPreferencesGetIntersectionObserverEnabled(WKPreferencesRef preferencesRef) 1560 { 1561 return toImpl(preferencesRef)->intersectionObserverEnabled(); 1562 } 1563 1554 1564 void WKPreferencesSetSelectionPaintingWithoutSelectionGapsEnabled(WKPreferencesRef preferencesRef, bool flag) 1555 1565 { -
trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h
r208824 r208983 443 443 WK_EXPORT bool WKPreferencesGetES6ModulesEnabled(WKPreferencesRef); 444 444 445 // Defaults to false 446 WK_EXPORT void WKPreferencesSetIntersectionObserverEnabled(WKPreferencesRef, bool flag); 447 WK_EXPORT bool WKPreferencesGetIntersectionObserverEnabled(WKPreferencesRef); 448 445 449 #ifdef __cplusplus 446 450 } -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r208982 r208983 3192 3192 #endif 3193 3193 3194 #if ENABLE(INTERSECTION_OBSERVER) 3195 RuntimeEnabledFeatures::sharedFeatures().setIntersectionObserverEnabled(store.getBoolValueForKey(WebPreferencesKey::intersectionObserverEnabledKey())); 3196 #endif 3197 3194 3198 platformPreferencesDidChange(store); 3195 3199 -
trunk/Tools/ChangeLog
r208982 r208983 1 2016-11-26 Sam Weinig <sam@webkit.org> 2 3 Convert IntersectionObserver over to using RuntimeEnabledFeatures so it can be properly excluded from script 4 https://bugs.webkit.org/show_bug.cgi?id=164965 5 6 Reviewed by Simon Fraser. 7 8 * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: 9 Add new files. 10 11 * DumpRenderTree/TestOptions.h: Added. 12 * DumpRenderTree/TestOptions.mm: Added. 13 (parseBooleanTestHeaderValue): 14 (TestOptions::TestOptions): 15 Port TestOption parsing from WKTR to DRT. 16 17 * DumpRenderTree/mac/DumpRenderTree.mm: 18 (resetWebPreferencesToConsistentValues): 19 (resetWebViewToConsistentStateBeforeTesting): 20 (runTest): 21 * WebKitTestRunner/TestController.cpp: 22 Pass TestOptions down to resetWebPreferencesToConsistentValues to allow setting 23 preferences conditionally. 24 25 (WTR::TestController::resetPreferencesToConsistentValues): 26 (WTR::updateTestOptionsFromTestHeader): 27 * WebKitTestRunner/TestOptions.h: 28 Add a new test option header, enableIntersectionObserver, to enable IntersectionObserver. 29 1 30 2016-11-26 Simon Fraser <simon.fraser@apple.com> 2 31 -
trunk/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj
r208593 r208983 103 103 5DB9AC9F0F722C3600684641 /* WebKitWeightWatcher800.ttf in Copy Font Files */ = {isa = PBXBuildFile; fileRef = 375F09780DAC3CB600C8B4E5 /* WebKitWeightWatcher800.ttf */; }; 104 104 5DB9ACA00F722C3600684641 /* WebKitWeightWatcher900.ttf in Copy Font Files */ = {isa = PBXBuildFile; fileRef = 375F09790DAC3CB600C8B4E5 /* WebKitWeightWatcher900.ttf */; }; 105 7CBBC3231DDFCF9A00786B9D /* TestOptions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7CBBC3211DDFCF9A00786B9D /* TestOptions.mm */; }; 105 106 80045AEE147718E7008290A8 /* AccessibilityNotificationHandler.mm in Sources */ = {isa = PBXBuildFile; fileRef = 80045AEC147718E7008290A8 /* AccessibilityNotificationHandler.mm */; }; 106 107 8465E2C70FFA8DF2003B8342 /* PixelDumpSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8465E2C60FFA8DF2003B8342 /* PixelDumpSupport.cpp */; }; … … 322 323 53CBB831134E42F3001CE6A4 /* CyclicRedundancyCheck.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyclicRedundancyCheck.h; sourceTree = "<group>"; }; 323 324 5DE8AE4313A2C15800D6A37D /* libWebCoreTestSupport.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libWebCoreTestSupport.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; 325 7CBBC3211DDFCF9A00786B9D /* TestOptions.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TestOptions.mm; sourceTree = "<group>"; }; 326 7CBBC3221DDFCF9A00786B9D /* TestOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestOptions.h; sourceTree = "<group>"; }; 324 327 80045AEB147718E7008290A8 /* AccessibilityNotificationHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AccessibilityNotificationHandler.h; path = mac/AccessibilityNotificationHandler.h; sourceTree = "<group>"; }; 325 328 80045AEC147718E7008290A8 /* AccessibilityNotificationHandler.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AccessibilityNotificationHandler.mm; path = mac/AccessibilityNotificationHandler.mm; sourceTree = "<group>"; }; … … 490 493 A8B91BF70CF522B4008F91FF /* CheckedMalloc.cpp */, 491 494 A8B91BF90CF522B4008F91FF /* CheckedMalloc.h */, 495 7CBBC3211DDFCF9A00786B9D /* TestOptions.mm */, 496 7CBBC3221DDFCF9A00786B9D /* TestOptions.h */, 492 497 BC4741290D038A4C0072B006 /* JavaScriptThreading.h */, 493 498 BCA18C0A0C9B59EF00114369 /* DumpRenderTreeMac.h */, … … 1146 1151 0F18E6ED1D6B9C070027E547 /* UIScriptController.cpp in Sources */, 1147 1152 0F18E70D1D6BAC8C0027E547 /* UIScriptControllerIOS.mm in Sources */, 1153 7CBBC3231DDFCF9A00786B9D /* TestOptions.mm in Sources */, 1148 1154 0F18E70F1D6BACB60027E547 /* UIScriptControllerMac.mm in Sources */, 1149 1155 4437730E125CBC3600AAE02C /* WebArchiveDumpSupport.cpp in Sources */, -
trunk/Tools/DumpRenderTree/TestOptions.h
r208982 r208983 1 1 /* 2 * Copyright (C) 201 5Apple Inc. All rights reserved.2 * Copyright (C) 2016 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 #ifndef TestOptions_h 27 #define TestOptions_h 28 29 #include <wtf/Vector.h> 30 #include <wtf/text/WTFString.h> 31 32 namespace WTR { 26 #pragma once 33 27 34 28 struct TestOptions { 35 bool useThreadedScrolling { false }; 36 bool useRemoteLayerTree { false }; 37 bool shouldShowWebView { false }; 38 bool useFlexibleViewport { false }; 39 bool useFixedLayout { false }; 40 bool isSVGTest { false }; 41 bool useDataDetection { false }; 42 bool useMockScrollbars { true }; 43 bool needsSiteSpecificQuirks { false }; 44 bool ignoresViewportScaleLimits { false }; 45 bool useCharacterSelectionGranularity { false }; 29 bool enableIntersectionObserver { false }; 46 30 47 float deviceScaleFactor { 1 }; 48 Vector<String> overrideLanguages; 49 50 TestOptions(const std::string& pathOrURL); 31 TestOptions(NSURL *testURL); 51 32 }; 52 53 }54 55 #endif // TestOptions_h -
trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm
r208824 r208983 50 50 #import "PolicyDelegate.h" 51 51 #import "ResourceLoadDelegate.h" 52 #import "TestOptions.h" 52 53 #import "TestRunner.h" 53 54 #import "UIDelegate.h" … … 896 897 897 898 // Called before each test. 898 static void resetWebPreferencesToConsistentValues( )899 static void resetWebPreferencesToConsistentValues(const TestOptions& options) 899 900 { 900 901 WebPreferences *preferences = [WebPreferences standardPreferences]; … … 999 1000 [preferences setHiddenPageDOMTimerThrottlingEnabled:NO]; 1000 1001 [preferences setHiddenPageCSSAnimationSuspensionEnabled:NO]; 1002 1003 preferences.intersectionObserverEnabled = options.enableIntersectionObserver; 1001 1004 1002 1005 [WebPreferences _clearNetworkLoaderSession]; … … 1819 1822 #endif 1820 1823 1821 static void resetWebViewToConsistentStateBeforeTesting( )1824 static void resetWebViewToConsistentStateBeforeTesting(const TestOptions& options) 1822 1825 { 1823 1826 WebView *webView = [mainFrame webView]; … … 1852 1855 [WebCache clearCachedCredentials]; 1853 1856 1854 resetWebPreferencesToConsistentValues( );1857 resetWebPreferencesToConsistentValues(options); 1855 1858 1856 1859 TestRunner::setSerializeHTTPLoads(false); … … 1986 1989 WKSetCrashReportApplicationSpecificInformation((CFStringRef)informationString); 1987 1990 1991 TestOptions options(url); 1992 resetWebViewToConsistentStateBeforeTesting(options); 1993 1988 1994 const char* testURL([[url absoluteString] UTF8String]); 1989 1990 resetWebViewToConsistentStateBeforeTesting(); 1995 1991 1996 #if !PLATFORM(IOS) 1992 1997 changeWindowScaleIfNeeded(testURL); … … 2097 2102 } 2098 2103 2099 resetWebViewToConsistentStateBeforeTesting( );2104 resetWebViewToConsistentStateBeforeTesting(options); 2100 2105 2101 2106 // Loading an empty request synchronously replaces the document with a blank one, which is necessary -
trunk/Tools/WebKitTestRunner/TestController.cpp
r208841 r208983 650 650 WKPreferencesSetMockScrollbarsEnabled(preferences, options.useMockScrollbars); 651 651 WKPreferencesSetNeedsSiteSpecificQuirks(preferences, options.needsSiteSpecificQuirks); 652 WKPreferencesSetIntersectionObserverEnabled(preferences, options.enableIntersectionObserver); 652 653 653 654 static WKStringRef defaultTextEncoding = WKStringCreateWithUTF8CString("ISO-8859-1"); … … 955 956 if (key == "useCharacterSelectionGranularity") 956 957 testOptions.useCharacterSelectionGranularity = parseBooleanTestHeaderValue(value); 958 if (key == "enableIntersectionObserver") 959 testOptions.enableIntersectionObserver = parseBooleanTestHeaderValue(value); 957 960 pairStart = pairEnd + 1; 958 961 } -
trunk/Tools/WebKitTestRunner/TestOptions.h
r206449 r208983 44 44 bool ignoresViewportScaleLimits { false }; 45 45 bool useCharacterSelectionGranularity { false }; 46 bool enableIntersectionObserver { false }; 46 47 47 48 float deviceScaleFactor { 1 };
Note: See TracChangeset
for help on using the changeset viewer.