WebKit Bugzilla
Attachment 340078 Details for
Bug 182053
: [CSSOM View] Implement standard behavior for scrollingElement
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
0001-Bug-182053-CSSOM-View-Implement-standard-behavior-fo.patch (text/plain), 31.93 KB, created by
Frédéric Wang (:fredw)
on 2018-05-10 02:03:42 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Frédéric Wang (:fredw)
Created:
2018-05-10 02:03:42 PDT
Size:
31.93 KB
patch
obsolete
>From e161a38f6dcc396269f522870ce1ed06c40f81d1 Mon Sep 17 00:00:00 2001 >From: Frederic Wang <fwang@igalia.com> >Date: Wed, 9 May 2018 14:39:28 +0200 >Subject: [PATCH xserver 1/2] Bug 182053 - [CSSOM View] Implement standard > behavior for scrollingElement > >--- > LayoutTests/ChangeLog | 17 ++++++++ > .../scrollingElement-quirks-mode-expected.txt | 5 ++- > .../scrollingElement-quirks-mode.html | 15 ++++++- > ...rollingElement-standards-mode-expected.txt | 3 +- > .../scrollingElement-standards-mode.html | 3 +- > Source/WebCore/ChangeLog | 37 ++++++++++++++++ > Source/WebCore/dom/Document.cpp | 42 +++++++++++++++++-- > Source/WebCore/dom/Document.h | 8 ++++ > Source/WebCore/page/Settings.yaml | 3 ++ > Source/WebCore/rendering/style/RenderStyle.h | 1 + > Source/WebKit/ChangeLog | 15 +++++++ > Source/WebKit/Shared/WebPreferences.yaml | 7 ++++ > .../WebKit/UIProcess/API/C/WKPreferences.cpp | 10 +++++ > .../UIProcess/API/C/WKPreferencesRefPrivate.h | 4 ++ > Source/WebKitLegacy/mac/ChangeLog | 18 ++++++++ > .../mac/WebView/WebPreferenceKeysPrivate.h | 1 + > .../mac/WebView/WebPreferences.mm | 11 +++++ > .../mac/WebView/WebPreferencesPrivate.h | 1 + > Source/WebKitLegacy/mac/WebView/WebView.mm | 1 + > Source/WebKitLegacy/win/ChangeLog | 19 +++++++++ > .../win/Interfaces/IWebPreferencesPrivate.idl | 2 + > .../win/WebPreferenceKeysPrivate.h | 2 + > Source/WebKitLegacy/win/WebPreferences.cpp | 16 +++++++ > Source/WebKitLegacy/win/WebPreferences.h | 2 + > Source/WebKitLegacy/win/WebView.cpp | 5 +++ > Tools/ChangeLog | 17 ++++++++ > Tools/DumpRenderTree/mac/DumpRenderTree.mm | 2 + > Tools/DumpRenderTree/win/DumpRenderTree.cpp | 1 + > Tools/WebKitTestRunner/TestController.cpp | 1 + > 29 files changed, 259 insertions(+), 10 deletions(-) > >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 834d5f7a207..49f8402c983 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,20 @@ >+2018-02-07 Frederic Wang <fwang@igalia.com> >+ >+ Bug 182053 - [CSSOM View] Implement standard behavior for scrollingElement >+ https://bugs.webkit.org/show_bug.cgi?id=182053 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add a test to check that in Quirks mode, the <body> element returned by >+ document.scrollingElement is indeed a child of a <html> root (i.e. in the HTML namespace). >+ Adjust scrollingElement*.thml tests so that they are executed with the flag >+ CSSOMViewScrollingAPI enabled and update expectations now that these tests pass. >+ >+ * fast/dom/Document/scrollingElement-quirks-mode.html: >+ * fast/dom/Document/scrollingElement-quirks-mode-expected.txt: >+ * fast/dom/Document/scrollingElement-standards-mode.html: >+ * fast/dom/Document/scrollingElement-standards-mode-expected.txt: >+ > 2018-05-09 Dominik Infuehr <dinfuehr@igalia.com> > > [ARM] Disable test on Linux due to lack of executable memory >diff --git a/LayoutTests/fast/dom/Document/scrollingElement-quirks-mode-expected.txt b/LayoutTests/fast/dom/Document/scrollingElement-quirks-mode-expected.txt >index 518696ba35e..50aa684f704 100644 >--- a/LayoutTests/fast/dom/Document/scrollingElement-quirks-mode-expected.txt >+++ b/LayoutTests/fast/dom/Document/scrollingElement-quirks-mode-expected.txt >@@ -8,10 +8,11 @@ PASS document.scrollingElement is document.body > PASS document.scrollingElement is document.body > PASS document.scrollingElement is document.body > In quirks mode, if the `BODY` is scrollable, the scrolling element is `null` >-INTENTIONAL FAILURE. This can be fixed once https://bugs.webkit.org/show_bug.cgi?id=106133 is fixed. >-FAIL document.scrollingElement.scrollingElement should be null (of type object). Was undefined (of type undefined). >+PASS document.scrollingElement is null > In quirks mode, if the `BODY` is `display: none`, the scrolling element is `BODY` > PASS document.scrollingElement is document.body >+In quirks mode, the document.scrollingElement is null if there is no `HTML` root. >+PASS scrollingElement is null > PASS successfullyParsed is true > > TEST COMPLETE >diff --git a/LayoutTests/fast/dom/Document/scrollingElement-quirks-mode.html b/LayoutTests/fast/dom/Document/scrollingElement-quirks-mode.html >index 16c8ca4331f..56492a05b8d 100644 >--- a/LayoutTests/fast/dom/Document/scrollingElement-quirks-mode.html >+++ b/LayoutTests/fast/dom/Document/scrollingElement-quirks-mode.html >@@ -5,6 +5,8 @@ > </head> > <body> > <script> >+if (window.internals) >+ internals.settings.setCSSOMViewScrollingAPIEnabled(true); > > description("Tests the behavior of document.scrollingElement in quirks mode."); > >@@ -20,10 +22,9 @@ document.body.setAttribute('style', 'overflow: scroll'); > shouldBe("document.scrollingElement", "document.body"); > > debug("In quirks mode, if the `BODY` is scrollable, the scrolling element is `null`"); >-debug("INTENTIONAL FAILURE. This can be fixed once https://bugs.webkit.org/show_bug.cgi?id=106133 is fixed."); > document.documentElement.setAttribute('style', 'overflow: scroll'); > document.body.setAttribute('style', 'overflow: scroll'); >-shouldBeNull("document.scrollingElement.scrollingElement"); >+shouldBeNull("document.scrollingElement"); > > debug("In quirks mode, if the `BODY` is `display: none`, the scrolling element is `BODY`"); > document.documentElement.setAttribute('style', 'overflow: scroll'); >@@ -32,6 +33,16 @@ shouldBe("document.scrollingElement", "document.body"); > > document.body.setAttribute('style', ''); > >+debug("In quirks mode, the document.scrollingElement is null if there is no `HTML` root."); >+// We save and restore the root before testing so that the result can be printed. >+var oldRoot = document.removeChild(document.documentElement); >+document.appendChild(document.createElementNS("foobarNS", "html")); >+document.documentElement.appendChild(document.createElement("body")); >+var scrollingElement = document.scrollingElement; >+document.removeChild(document.documentElement); >+document.appendChild(oldRoot); >+shouldBeNull("scrollingElement"); >+ > </script> > <script src="../../../resources/js-test-post.js"></script> > </body> >diff --git a/LayoutTests/fast/dom/Document/scrollingElement-standards-mode-expected.txt b/LayoutTests/fast/dom/Document/scrollingElement-standards-mode-expected.txt >index 5bf5a1c39a4..eb55f90727c 100644 >--- a/LayoutTests/fast/dom/Document/scrollingElement-standards-mode-expected.txt >+++ b/LayoutTests/fast/dom/Document/scrollingElement-standards-mode-expected.txt >@@ -4,8 +4,7 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE > > > In standards mode the scrolling element is supposed to be `HTML` >-INTENTIONAL FAILURE. This can be fixed once https://bugs.webkit.org/show_bug.cgi?id=106133 is fixed. >-FAIL document.scrollingElement should be [object HTMLHtmlElement]. Was [object HTMLBodyElement]. >+PASS document.scrollingElement is document.documentElement > PASS successfullyParsed is true > > TEST COMPLETE >diff --git a/LayoutTests/fast/dom/Document/scrollingElement-standards-mode.html b/LayoutTests/fast/dom/Document/scrollingElement-standards-mode.html >index 05029565d5b..89012f7bec2 100644 >--- a/LayoutTests/fast/dom/Document/scrollingElement-standards-mode.html >+++ b/LayoutTests/fast/dom/Document/scrollingElement-standards-mode.html >@@ -6,11 +6,12 @@ > </head> > <body> > <script> >+if (window.internals) >+ internals.settings.setCSSOMViewScrollingAPIEnabled(true); > > description("Tests the behavior of document.scrollingElement in standards mode."); > > debug("In standards mode the scrolling element is supposed to be `HTML`"); >-debug("INTENTIONAL FAILURE. This can be fixed once https://bugs.webkit.org/show_bug.cgi?id=106133 is fixed."); > shouldBe("document.scrollingElement", "document.documentElement"); > > </script> >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 980634c1a88..ad2243e59e5 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,40 @@ >+2018-02-07 Frederic Wang <fwang@igalia.com> >+ >+ Bug 182053 - [CSSOM View] Implement standard behavior for scrollingElement >+ https://bugs.webkit.org/show_bug.cgi?id=182053 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This commit introduces a new CSSOMViewScrollingAPIEnabled flag that will be used to implement >+ the standard behavior of DOM scroll* API as specified by the CSSOM View spec (see bug 5991). >+ It changes the behavior of document.scrollingElement so that it follows the spec when the >+ flag is enabled. This will allow to pass the WPT test cssom-view/scrollingElement.html when >+ it becomes the default behavior. WPT tests cssom-view/scrollingElement-quirks-dynamic*.html >+ still fail; comparing with Chromium's code, we might need to propagate the style of <html> >+ and <body> to the viewport element. Behaviors for other scrolling attributes will be changed >+ in follow-up bugs. >+ >+ Tests: fast/dom/Document/scrollingElement-quirks-mode.html >+ fast/dom/Document/scrollingElement-standard-mode.html >+ >+ * dom/Document.cpp: >+ (WebCore::Document::isPotentiallyScrollable): Helper function to verify whether the body >+ is potentially scrollable, as defined by the CSSOM View spec. It seems that >+ RenderObject::hasOverflowClip() may return incorrect value at this point and we might need >+ to do something similar to Chromium's style propagation to make it work. For now, we just >+ use the computed style. See bug 182292. >+ (WebCore::Document::scrollingElement): When CSSOMViewScrollingAPIEnabled is enabled, we >+ implement the algorithm of the CSSOM View spec. >+ (WebCore::Document::body const): Verify that the root is actually a <html> element or >+ otherwise return null. This is required by the CSSOM View spec and for WPT test >+ scrollingElement.html. It is consistent with bodyOrFrameset(). >+ * dom/Document.h: Add spec references for body() and bodyOrFrameset() and declare >+ isPotentiallyScrollable(). >+ * page/Settings.yaml: Add developer option for enabling the CSSOM View behavior. >+ * rendering/style/RenderStyle.h: >+ (WebCore::RenderStyle::isOverflowVisible const): Add helper function to check whether the >+ style implies visible overflow. >+ > 2018-05-09 Yacine Bandou <yacine.bandou_ext@softathome.com> > > [EME][GStreamer] Crash when the mediaKeys are created before loading the media in debug conf >diff --git a/Source/WebCore/dom/Document.cpp b/Source/WebCore/dom/Document.cpp >index d1bb4f37b59..a106c6ea40f 100644 >--- a/Source/WebCore/dom/Document.cpp >+++ b/Source/WebCore/dom/Document.cpp >@@ -1424,10 +1424,46 @@ RefPtr<Range> Document::caretRangeFromPoint(const LayoutPoint& clientPoint) > return Range::create(*this, node, offset, node, offset); > } > >+bool Document::isPotentiallyScrollable(HTMLBodyElement& body) >+{ >+ // See https://www.w3.org/TR/cssom-view-1/#potentially-scrollable. >+ // An element is potentially scrollable if all of the following conditions are true: >+ // - The element has an associated CSS layout box. >+ // - The element is not the HTML body element, or it is and the root element's used value of the >+ // overflow-x or overflow-y properties is not visible. >+ // - The element's used value of the overflow-x or overflow-y properties is not visible. >+ // >+ // FIXME: We should use RenderObject::hasOverflowClip() instead of Element::computedStyle() but >+ // the used values are currently not correctly updated. See https://webkit.org/b/182292. >+ return body.renderer() >+ && documentElement()->computedStyle() >+ && !documentElement()->computedStyle()->isOverflowVisible() >+ && body.computedStyle() >+ && !body.computedStyle()->isOverflowVisible(); >+} >+ > Element* Document::scrollingElement() > { >- // FIXME: When we fix https://bugs.webkit.org/show_bug.cgi?id=106133, this should be replaced with the full implementation >- // of Document.scrollingElement() as specified at http://dev.w3.org/csswg/cssom-view/#dom-document-scrollingelement. >+ if (settings().CSSOMViewScrollingAPIEnabled()) { >+ // See https://drafts.csswg.org/cssom-view/#dom-document-scrollingelement. >+ // The scrollingElement attribute, on getting, must run these steps: >+ // 1. If the Document is in quirks mode, follow these substeps: >+ if (inQuirksMode()) { >+ updateLayoutIgnorePendingStylesheets(); >+ auto* firstBody = body(); >+ // 1. If the HTML body element exists, and it is not potentially scrollable, return the >+ // HTML body element and abort these steps. >+ if (firstBody && !isPotentiallyScrollable(*firstBody)) >+ return firstBody; >+ >+ // 2. Return null and abort these steps. >+ return nullptr; >+ } >+ >+ // 2. If there is a root element, return the root element and abort these steps. >+ // 3. Return null. >+ return documentElement(); >+ } > > return body(); > } >@@ -2672,7 +2708,7 @@ void Document::implicitOpen() > HTMLBodyElement* Document::body() const > { > auto* element = documentElement(); >- if (!element) >+ if (!is<HTMLHtmlElement>(element)) > return nullptr; > return childrenOfType<HTMLBodyElement>(*element).first(); > } >diff --git a/Source/WebCore/dom/Document.h b/Source/WebCore/dom/Document.h >index 0066219d8b0..e5502a93ee5 100644 >--- a/Source/WebCore/dom/Document.h >+++ b/Source/WebCore/dom/Document.h >@@ -939,8 +939,14 @@ public: > static bool hasValidNamespaceForElements(const QualifiedName&); > static bool hasValidNamespaceForAttributes(const QualifiedName&); > >+ // This is the "HTML body element" as defined by CSSOM View spec, the first body child of the >+ // document element. See http://dev.w3.org/csswg/cssom-view/#the-html-body-element. > WEBCORE_EXPORT HTMLBodyElement* body() const; >+ >+ // This is the "body element" as defined by HTML5, the first body or frameset child of the >+ // document element. See https://html.spec.whatwg.org/multipage/dom.html#the-body-element-2. > WEBCORE_EXPORT HTMLElement* bodyOrFrameset() const; >+ > WEBCORE_EXPORT ExceptionOr<void> setBodyOrFrameset(RefPtr<HTMLElement>&&); > > Location* location() const; >@@ -1542,6 +1548,8 @@ private: > > bool domainIsRegisterable(const String&) const; > >+ bool isPotentiallyScrollable(HTMLBodyElement&); >+ > const Ref<Settings> m_settings; > > std::unique_ptr<StyleResolver> m_userAgentShadowTreeStyleResolver; >diff --git a/Source/WebCore/page/Settings.yaml b/Source/WebCore/page/Settings.yaml >index 5a2ca70e755..23d332b8a9f 100644 >--- a/Source/WebCore/page/Settings.yaml >+++ b/Source/WebCore/page/Settings.yaml >@@ -548,6 +548,9 @@ visualViewportEnabled: > visualViewportAPIEnabled: > initial: false > >+CSSOMViewScrollingAPIEnabled: >+ initial: false >+ > inputEventsEnabled: > initial: true > >diff --git a/Source/WebCore/rendering/style/RenderStyle.h b/Source/WebCore/rendering/style/RenderStyle.h >index a32cdfc3a70..d63fec14ea5 100644 >--- a/Source/WebCore/rendering/style/RenderStyle.h >+++ b/Source/WebCore/rendering/style/RenderStyle.h >@@ -330,6 +330,7 @@ public: > EOverflow overflowY() const { return static_cast<EOverflow>(m_nonInheritedFlags.overflowY); } > EOverflow overflowInlineDirection() const { return isHorizontalWritingMode() ? overflowX() : overflowY(); } > EOverflow overflowBlockDirection() const { return isHorizontalWritingMode() ? overflowY() : overflowX(); } >+ bool isOverflowVisible() const { return overflowX() == OVISIBLE || overflowY() == OVISIBLE; } > > EVisibility visibility() const { return static_cast<EVisibility>(m_inheritedFlags.visibility); } > EVerticalAlign verticalAlign() const { return static_cast<EVerticalAlign>(m_nonInheritedFlags.verticalAlign); } >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 013a18a36bd..a3363e0c854 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,18 @@ >+2018-02-07 Frederic Wang <fwang@igalia.com> >+ >+ Bug 182053 - [CSSOM View] Implement standard behavior for scrollingElement >+ https://bugs.webkit.org/show_bug.cgi?id=182053 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add developer flag to use standard behavior for scrolling* attributes. >+ >+ * Shared/WebPreferences.yaml: >+ * UIProcess/API/C/WKPreferences.cpp: >+ (WKPreferencesSetCSSOMViewScrollingAPIEnabled): >+ (WKPreferencesGetCSSOMViewScrollingAPIEnabled): >+ * UIProcess/API/C/WKPreferencesRefPrivate.h: >+ > 2018-05-08 Sihui Liu <sihui_liu@apple.com> > > Adopt new async _savecookies SPI for keeping networking process active during flushing cookies >diff --git a/Source/WebKit/Shared/WebPreferences.yaml b/Source/WebKit/Shared/WebPreferences.yaml >index 3189575a8d7..78a6a08c184 100644 >--- a/Source/WebKit/Shared/WebPreferences.yaml >+++ b/Source/WebKit/Shared/WebPreferences.yaml >@@ -1185,6 +1185,13 @@ VisualViewportAPIEnabled: > humanReadableDescription: "Enable Visual Viewport API" > category: experimental > >+CSSOMViewScrollingAPIEnabled: >+ type: bool >+ defaultValue: false >+ humanReadableName: "CSSOM View Scrolling API" >+ humanReadableDescription: "Implement standard behavior for scrollLeft, scrollTop, scrollWidth, scrollHeight, scrollTo, scrollBy and scrollingElement." >+ category: experimental >+ > WebAnimationsEnabled: > type: bool > defaultValue: true >diff --git a/Source/WebKit/UIProcess/API/C/WKPreferences.cpp b/Source/WebKit/UIProcess/API/C/WKPreferences.cpp >index 80a1e5caaee..fa9386a0df7 100644 >--- a/Source/WebKit/UIProcess/API/C/WKPreferences.cpp >+++ b/Source/WebKit/UIProcess/API/C/WKPreferences.cpp >@@ -1944,6 +1944,16 @@ bool WKPreferencesGetAccessibilityObjectModelEnabled(WKPreferencesRef preference > return toImpl(preferencesRef)->accessibilityObjectModelEnabled(); > } > >+void WKPreferencesSetCSSOMViewScrollingAPIEnabled(WKPreferencesRef preferencesRef, bool flag) >+{ >+ toImpl(preferencesRef)->setCSSOMViewScrollingAPIEnabled(flag); >+} >+ >+bool WKPreferencesGetCSSOMViewScrollingAPIEnabled(WKPreferencesRef preferencesRef) >+{ >+ return toImpl(preferencesRef)->cssOMViewScrollingAPIEnabled(); >+} >+ > void WKPreferencesSetShouldAllowUserInstalledFonts(WKPreferencesRef preferencesRef, bool flag) > { > toImpl(preferencesRef)->setShouldAllowUserInstalledFonts(flag); >diff --git a/Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h b/Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h >index 809b31891b2..9012163e1a3 100644 >--- a/Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h >+++ b/Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h >@@ -553,6 +553,10 @@ WK_EXPORT bool WKPreferencesGetStorageAccessAPIEnabled(WKPreferencesRef); > WK_EXPORT void WKPreferencesSetAccessibilityObjectModelEnabled(WKPreferencesRef, bool flag); > WK_EXPORT bool WKPreferencesGetAccessibilityObjectModelEnabled(WKPreferencesRef); > >+// Defaults to false. >+WK_EXPORT void WKPreferencesSetCSSOMViewScrollingAPIEnabled(WKPreferencesRef, bool); >+WK_EXPORT bool WKPreferencesGetCSSOMViewScrollingAPIEnabled(WKPreferencesRef); >+ > // Defaults to false. > WK_EXPORT void WKPreferencesSetShouldAllowUserInstalledFonts(WKPreferencesRef, bool flag); > WK_EXPORT bool WKPreferencesGetShouldAllowUserInstalledFonts(WKPreferencesRef); >diff --git a/Source/WebKitLegacy/mac/ChangeLog b/Source/WebKitLegacy/mac/ChangeLog >index 4483a51d790..607d58dcb4f 100644 >--- a/Source/WebKitLegacy/mac/ChangeLog >+++ b/Source/WebKitLegacy/mac/ChangeLog >@@ -1,3 +1,21 @@ >+2018-02-07 Frederic Wang <fwang@igalia.com> >+ >+ Bug 182053 - [CSSOM View] Implement standard behavior for scrollingElement >+ https://bugs.webkit.org/show_bug.cgi?id=182053 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add developer flag to use standard behavior for scrolling* attributes. >+ >+ * WebView/WebPreferenceKeysPrivate.h: >+ * WebView/WebPreferences.mm: >+ (+[WebPreferences initialize]): >+ (-[WebPreferences CSSOMViewScrollingAPIEnabled]): >+ (-[WebPreferences setCSSOMViewScrollingAPIEnabled:]): >+ * WebView/WebPreferencesPrivate.h: >+ * WebView/WebView.mm: >+ (-[WebView _preferencesChanged:]): >+ > 2018-05-07 Daniel Bates <dabates@apple.com> > > Substitute CrossOriginPreflightResultCache::clear() for CrossOriginPreflightResultCache::empty() >diff --git a/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h b/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h >index 5cc4a2b7def..ee83c926507 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h >+++ b/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h >@@ -180,6 +180,7 @@ > #define WebKitDirectoryUploadEnabledPreferenceKey @"WebKitDirectoryUploadEnabled" > #define WebKitVisualViewportEnabledPreferenceKey @"WebKitVisualViewportEnabled" > #define WebKitVisualViewportAPIEnabledPreferenceKey @"WebKitVisualViewportAPIEnabled" >+#define WebKitCSSOMViewScrollingAPIEnabledPreferenceKey @"WebKitCSSOMViewScrollingAPIEnabled" > #define WebKitModernMediaControlsEnabledPreferenceKey @"WebKitModernMediaControlsEnabled" > #define WebKitSubtleCryptoEnabledPreferenceKey @"WebKitSubtleCryptoEnabled" > #define WebKitMediaDevicesEnabledPreferenceKey @"WebKitMediaDevicesEnabled" >diff --git a/Source/WebKitLegacy/mac/WebView/WebPreferences.mm b/Source/WebKitLegacy/mac/WebView/WebPreferences.mm >index 6858597adf9..c6072def6d8 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebPreferences.mm >+++ b/Source/WebKitLegacy/mac/WebView/WebPreferences.mm >@@ -653,6 +653,7 @@ public: > #endif > [NSNumber numberWithBool:NO], WebKitVisualViewportAPIEnabledPreferenceKey, > >+ [NSNumber numberWithBool:NO], WebKitCSSOMViewScrollingAPIEnabledPreferenceKey, > [NSNumber numberWithBool:YES], WebKitNeedsStorageAccessFromFileURLsQuirkKey, > [NSNumber numberWithBool:NO], WebKitAllowCrossOriginSubresourcesToAskForCredentialsKey, > #if ENABLE(MEDIA_STREAM) >@@ -3079,6 +3080,16 @@ static NSString *classIBCreatorID = nil; > [self _setBoolValue:flag forKey:WebKitVisualViewportAPIEnabledPreferenceKey]; > } > >+- (BOOL)CSSOMViewScrollingAPIEnabled >+{ >+ return [self _boolValueForKey:WebKitCSSOMViewScrollingAPIEnabledPreferenceKey]; >+} >+ >+- (void)setCSSOMViewScrollingAPIEnabled:(BOOL)flag >+{ >+ [self _setBoolValue:flag forKey:WebKitCSSOMViewScrollingAPIEnabledPreferenceKey]; >+} >+ > - (BOOL)webAnimationsEnabled > { > return [self _boolValueForKey:WebKitWebAnimationsEnabledPreferenceKey]; >diff --git a/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h b/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h >index fdaba840ec8..477f020fe8b 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h >+++ b/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h >@@ -578,6 +578,7 @@ extern NSString *WebPreferencesCacheModelChangedInternalNotification WEBKIT_DEPR > > @property (nonatomic) BOOL visualViewportEnabled; > @property (nonatomic) BOOL visualViewportAPIEnabled; >+@property (nonatomic) BOOL CSSOMViewScrollingAPIEnabled; > @property (nonatomic) BOOL largeImageAsyncDecodingEnabled; > @property (nonatomic) BOOL animatedImageAsyncDecodingEnabled; > @property (nonatomic) BOOL javaScriptMarkupEnabled; >diff --git a/Source/WebKitLegacy/mac/WebView/WebView.mm b/Source/WebKitLegacy/mac/WebView/WebView.mm >index fefadfc81a6..bdc6f6b41e4 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebView.mm >+++ b/Source/WebKitLegacy/mac/WebView/WebView.mm >@@ -2936,6 +2936,7 @@ static bool needsSelfRetainWhileLoadingQuirk() > > settings.setVisualViewportEnabled([preferences visualViewportEnabled]); > settings.setVisualViewportAPIEnabled([preferences visualViewportAPIEnabled]); >+ settings.setCSSOMViewScrollingAPIEnabled([preferences CSSOMViewScrollingAPIEnabled]); > settings.setMediaContentTypesRequiringHardwareSupport([preferences mediaContentTypesRequiringHardwareSupport]); > > switch ([preferences storageBlockingPolicy]) { >diff --git a/Source/WebKitLegacy/win/ChangeLog b/Source/WebKitLegacy/win/ChangeLog >index f2cce84875b..8272ae211b1 100644 >--- a/Source/WebKitLegacy/win/ChangeLog >+++ b/Source/WebKitLegacy/win/ChangeLog >@@ -1,3 +1,22 @@ >+2018-02-07 Frederic Wang <fwang@igalia.com> >+ >+ Bug 182053 - [CSSOM View] Implement standard behavior for scrollingElement >+ https://bugs.webkit.org/show_bug.cgi?id=182053 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add developer flag to use standard behavior for scrolling* attributes. >+ >+ * Interfaces/IWebPreferencesPrivate.idl: >+ * WebPreferenceKeysPrivate.h: >+ * WebPreferences.cpp: >+ (WebPreferences::initializeDefaultSettings): >+ (WebPreferences::CSSOMViewScrollingAPIEnabled): >+ (WebPreferences::setCSSOMViewScrollingAPIEnabled): >+ * WebPreferences.h: >+ * WebView.cpp: >+ (WebView::notifyPreferencesChanged): >+ > 2018-05-07 Daniel Bates <dabates@apple.com> > > Substitute CrossOriginPreflightResultCache::clear() for CrossOriginPreflightResultCache::empty() >diff --git a/Source/WebKitLegacy/win/Interfaces/IWebPreferencesPrivate.idl b/Source/WebKitLegacy/win/Interfaces/IWebPreferencesPrivate.idl >index 891a7d0fa8f..03c6ef64f5e 100644 >--- a/Source/WebKitLegacy/win/Interfaces/IWebPreferencesPrivate.idl >+++ b/Source/WebKitLegacy/win/Interfaces/IWebPreferencesPrivate.idl >@@ -221,6 +221,8 @@ interface IWebPreferencesPrivate6 : IWebPreferencesPrivate5 > HRESULT setInspectorAdditionsEnabled([in] BOOL enabled); > HRESULT visualViewportAPIEnabled([out, retval] BOOL*); > HRESULT setVisualViewportAPIEnabled([in] BOOL enabled); >+ HRESULT CSSOMViewScrollingAPIEnabled([out, retval] BOOL*); >+ HRESULT setCSSOMViewScrollingAPIEnabled([in] BOOL enabled); > HRESULT fetchAPIKeepAliveEnabled([out, retval] BOOL* enabled); > HRESULT setFetchAPIKeepAliveEnabled([in] BOOL enabled); > HRESULT spatialNavigationEnabled([out, retval] BOOL *enabled); >diff --git a/Source/WebKitLegacy/win/WebPreferenceKeysPrivate.h b/Source/WebKitLegacy/win/WebPreferenceKeysPrivate.h >index 37d73e6dfd4..707c055ed9a 100644 >--- a/Source/WebKitLegacy/win/WebPreferenceKeysPrivate.h >+++ b/Source/WebKitLegacy/win/WebPreferenceKeysPrivate.h >@@ -201,3 +201,5 @@ > #define WebKitInspectorAdditionsEnabledPreferenceKey "WebKitInspectorAdditionsEnabled" > > #define WebKitVisualViewportAPIEnabledPreferenceKey "WebKitVisualViewportAPIEnabled" >+ >+#define WebKitCSSOMViewScrollingAPIEnabledPreferenceKey "WebKitCSSOMViewScrollingAPIEnabled" >diff --git a/Source/WebKitLegacy/win/WebPreferences.cpp b/Source/WebKitLegacy/win/WebPreferences.cpp >index e460d13d3cb..d3f56c44f7a 100644 >--- a/Source/WebKitLegacy/win/WebPreferences.cpp >+++ b/Source/WebKitLegacy/win/WebPreferences.cpp >@@ -326,6 +326,8 @@ void WebPreferences::initializeDefaultSettings() > > CFDictionaryAddValue(defaults, CFSTR(WebKitVisualViewportAPIEnabledPreferenceKey), kCFBooleanFalse); > >+ CFDictionaryAddValue(defaults, CFSTR(WebKitCSSOMViewScrollingAPIEnabledPreferenceKey), kCFBooleanFalse); >+ > defaultSettings = defaults; > } > >@@ -2167,6 +2169,20 @@ HRESULT WebPreferences::setVisualViewportAPIEnabled(BOOL enabled) > return S_OK; > } > >+HRESULT WebPreferences::CSSOMViewScrollingAPIEnabled(_Out_ BOOL* enabled) >+{ >+ if (!enabled) >+ return E_POINTER; >+ *enabled = boolValueForKey(WebKitCSSOMViewScrollingAPIEnabledPreferenceKey); >+ return S_OK; >+} >+ >+HRESULT WebPreferences::setCSSOMViewScrollingAPIEnabled(BOOL enabled) >+{ >+ setBoolValue(WebKitCSSOMViewScrollingAPIEnabledPreferenceKey, enabled); >+ return S_OK; >+} >+ > HRESULT WebPreferences::setApplicationId(BSTR applicationId) > { > m_applicationId = String(applicationId).createCFString(); >diff --git a/Source/WebKitLegacy/win/WebPreferences.h b/Source/WebKitLegacy/win/WebPreferences.h >index ddd8dcca9d2..6ad4e544ef0 100644 >--- a/Source/WebKitLegacy/win/WebPreferences.h >+++ b/Source/WebKitLegacy/win/WebPreferences.h >@@ -269,6 +269,8 @@ public: > virtual HRESULT STDMETHODCALLTYPE setInspectorAdditionsEnabled(BOOL); > virtual HRESULT STDMETHODCALLTYPE visualViewportAPIEnabled(_Out_ BOOL*); > virtual HRESULT STDMETHODCALLTYPE setVisualViewportAPIEnabled(BOOL); >+ virtual HRESULT STDMETHODCALLTYPE CSSOMViewScrollingAPIEnabled(_Out_ BOOL*); >+ virtual HRESULT STDMETHODCALLTYPE setCSSOMViewScrollingAPIEnabled(BOOL); > virtual HRESULT STDMETHODCALLTYPE fetchAPIKeepAliveEnabled(_Out_ BOOL*); > virtual HRESULT STDMETHODCALLTYPE setFetchAPIKeepAliveEnabled(BOOL); > virtual HRESULT STDMETHODCALLTYPE spatialNavigationEnabled(_Out_ BOOL*); >diff --git a/Source/WebKitLegacy/win/WebView.cpp b/Source/WebKitLegacy/win/WebView.cpp >index d81c831fe2e..40d4d06dfb2 100644 >--- a/Source/WebKitLegacy/win/WebView.cpp >+++ b/Source/WebKitLegacy/win/WebView.cpp >@@ -5279,6 +5279,11 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification) > return hr; > settings.setVisualViewportAPIEnabled(!!enabled); > >+ hr = prefsPrivate->CSSOMViewScrollingAPIEnabled(&enabled); >+ if (FAILED(hr)) >+ return hr; >+ settings.setCSSOMViewScrollingAPIEnabled(!!enabled); >+ > hr = preferences->privateBrowsingEnabled(&enabled); > if (FAILED(hr)) > return hr; >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 91f9f8a7473..23a5d037059 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,20 @@ >+2018-02-07 Frederic Wang <fwang@igalia.com> >+ >+ Bug 182053 - [CSSOM View] Implement standard behavior for scrollingElement >+ https://bugs.webkit.org/show_bug.cgi?id=182053 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add FIXMEs comments to add the new developer flag in the future and disable it for now. >+ >+ * DumpRenderTree/mac/DumpRenderTree.mm: >+ (enableExperimentalFeatures): >+ (resetWebPreferencesToConsistentValues): >+ * DumpRenderTree/win/DumpRenderTree.cpp: >+ (enableExperimentalFeatures): >+ * WebKitTestRunner/TestController.cpp: >+ (WTR::TestController::resetPreferencesToConsistentValues): >+ > 2018-05-09 Antti Koivisto <antti@apple.com> > > Add OptionSet::operator& and operator bool >diff --git a/Tools/DumpRenderTree/mac/DumpRenderTree.mm b/Tools/DumpRenderTree/mac/DumpRenderTree.mm >index 5ac28d2f704..34a3a3b02e8 100644 >--- a/Tools/DumpRenderTree/mac/DumpRenderTree.mm >+++ b/Tools/DumpRenderTree/mac/DumpRenderTree.mm >@@ -862,6 +862,7 @@ static void enableExperimentalFeatures(WebPreferences* preferences) > [preferences setAccessibilityObjectModelEnabled:YES]; > [preferences setVisualViewportAPIEnabled:YES]; > [preferences setColorFilterEnabled:YES]; >+ // FIXME: CSSOMViewScrollingAPIEnabled > } > > // Called before each test. >@@ -914,6 +915,7 @@ static void resetWebPreferencesToConsistentValues() > [preferences setLoadsSiteIconsIgnoringImageLoadingPreference:NO]; > [preferences setFrameFlattening:WebKitFrameFlatteningDisabled]; > [preferences setAsyncFrameScrollingEnabled:NO]; >+ [preferences setCSSOMViewScrollingAPIEnabled:NO]; > [preferences setSpatialNavigationEnabled:NO]; > [preferences setMetaRefreshEnabled:YES]; > >diff --git a/Tools/DumpRenderTree/win/DumpRenderTree.cpp b/Tools/DumpRenderTree/win/DumpRenderTree.cpp >index ac6519f412c..908f92c5b74 100644 >--- a/Tools/DumpRenderTree/win/DumpRenderTree.cpp >+++ b/Tools/DumpRenderTree/win/DumpRenderTree.cpp >@@ -785,6 +785,7 @@ static void enableExperimentalFeatures(IWebPreferences* preferences) > // FIXME: InputEvents > // FIXME: SubtleCrypto > prefsPrivate->setVisualViewportAPIEnabled(TRUE); >+ // FIXME: CSSOMViewScrollingAPI > prefsPrivate->setWebAnimationsEnabled(TRUE); > // FIXME: WebGL2 > // FIXME: WebRTC >diff --git a/Tools/WebKitTestRunner/TestController.cpp b/Tools/WebKitTestRunner/TestController.cpp >index 68c49c84130..907d87d5d58 100644 >--- a/Tools/WebKitTestRunner/TestController.cpp >+++ b/Tools/WebKitTestRunner/TestController.cpp >@@ -767,6 +767,7 @@ void TestController::resetPreferencesToConsistentValues(const TestOptions& optio > WKPreferencesSetStorageAccessAPIEnabled(preferences, true); > > WKPreferencesSetAccessibilityObjectModelEnabled(preferences, true); >+ WKPreferencesSetCSSOMViewScrollingAPIEnabled(preferences, false); > WKPreferencesSetMediaCapabilitiesEnabled(preferences, true); > > WKPreferencesSetRestrictedHTTPResponseAccess(preferences, true); >-- >2.17.0 >
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 182053
:
332173
|
332362
|
332363
|
332364
|
332365
|
332371
|
332402
|
332412
|
332413
|
332465
|
332466
|
332471
|
332510
|
333273
|
340078
|
344694
|
348497
|
348615