WebKit Bugzilla
Attachment 348497 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.80 KB, created by
Frédéric Wang (:fredw)
on 2018-08-30 08:09:24 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Frédéric Wang (:fredw)
Created:
2018-08-30 08:09:24 PDT
Size:
31.80 KB
patch
obsolete
>From b7b495f222bc9940d08625fae87045b6954b1ac7 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 | 7 ++++ > 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 | 3 ++ > 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 35beb5abfd6..f690d6fb5d1 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*.html 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-08-29 Aditya Keerthi <akeerthi@apple.com> > > [Datalist] Display prefix-matched suggestions first >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 1cea52d02b2..f33b8e59700 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-08-29 Andy Estes <aestes@apple.com> > > Addressed additional review feedback after r235342. >diff --git a/Source/WebCore/dom/Document.cpp b/Source/WebCore/dom/Document.cpp >index e723591a913..a22dfcbc795 100644 >--- a/Source/WebCore/dom/Document.cpp >+++ b/Source/WebCore/dom/Document.cpp >@@ -1443,10 +1443,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(); > } >@@ -2704,7 +2740,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 9e3c31853f1..2ed409ab417 100644 >--- a/Source/WebCore/dom/Document.h >+++ b/Source/WebCore/dom/Document.h >@@ -960,7 +960,12 @@ 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>&&); > >@@ -1604,6 +1609,8 @@ private: > > void enableTemporaryTimeUserGesture(); > >+ 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 2122e909135..24514295a5e 100644 >--- a/Source/WebCore/page/Settings.yaml >+++ b/Source/WebCore/page/Settings.yaml >@@ -554,6 +554,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 42c8b452c60..a208500f07b 100644 >--- a/Source/WebCore/rendering/style/RenderStyle.h >+++ b/Source/WebCore/rendering/style/RenderStyle.h >@@ -331,6 +331,7 @@ public: > Overflow overflowY() const { return static_cast<Overflow>(m_nonInheritedFlags.overflowY); } > Overflow overflowInlineDirection() const { return isHorizontalWritingMode() ? overflowX() : overflowY(); } > Overflow overflowBlockDirection() const { return isHorizontalWritingMode() ? overflowY() : overflowX(); } >+ bool isOverflowVisible() const { return overflowX() == Overflow::Visible || overflowY() == Overflow::Visible; } > > Visibility visibility() const { return static_cast<Visibility>(m_inheritedFlags.visibility); } > VerticalAlign verticalAlign() const { return static_cast<VerticalAlign>(m_nonInheritedFlags.verticalAlign); } >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 953e494c332..8fe90c277c4 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-08-29 Chris Dumez <cdumez@apple.com> > > Avoid code duplication in ResourceLoadStatisticsMemoryStore::processStatisticsAndDataRecords() >diff --git a/Source/WebKit/Shared/WebPreferences.yaml b/Source/WebKit/Shared/WebPreferences.yaml >index 10f49ba4609..94a01eb260e 100644 >--- a/Source/WebKit/Shared/WebPreferences.yaml >+++ b/Source/WebKit/Shared/WebPreferences.yaml >@@ -1198,6 +1198,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: DEFAULT_EXPERIMENTAL_FEATURES_ENABLED >diff --git a/Source/WebKit/UIProcess/API/C/WKPreferences.cpp b/Source/WebKit/UIProcess/API/C/WKPreferences.cpp >index cf73032327a..2e1ce2206bb 100644 >--- a/Source/WebKit/UIProcess/API/C/WKPreferences.cpp >+++ b/Source/WebKit/UIProcess/API/C/WKPreferences.cpp >@@ -1978,6 +1978,16 @@ bool WKPreferencesGetAriaReflectionEnabled(WKPreferencesRef preferencesRef) > return toImpl(preferencesRef)->ariaReflectionEnabled(); > } > >+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 862a045737c..a90ad3c12fc 100644 >--- a/Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h >+++ b/Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h >@@ -569,6 +569,10 @@ WK_EXPORT bool WKPreferencesGetAccessibilityObjectModelEnabled(WKPreferencesRef) > WK_EXPORT void WKPreferencesSetAriaReflectionEnabled(WKPreferencesRef, bool flag); > WK_EXPORT bool WKPreferencesGetAriaReflectionEnabled(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 99b64c09886..c0c73c93d1e 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-08-29 Olivia Barnett <obarnett@apple.com> > > Implement the Web Share API >diff --git a/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h b/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h >index d774691c817..2e022e658c1 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h >+++ b/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h >@@ -182,6 +182,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 be6eb0b6322..2d1a9d73e8d 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebPreferences.mm >+++ b/Source/WebKitLegacy/mac/WebView/WebPreferences.mm >@@ -654,6 +654,7 @@ public: > #endif > [NSNumber numberWithBool:NO], WebKitVisualViewportAPIEnabledPreferenceKey, > >+ [NSNumber numberWithBool:NO], WebKitCSSOMViewScrollingAPIEnabledPreferenceKey, > [NSNumber numberWithBool:YES], WebKitNeedsStorageAccessFromFileURLsQuirkKey, > [NSNumber numberWithBool:NO], WebKitAllowCrossOriginSubresourcesToAskForCredentialsKey, > #if ENABLE(MEDIA_STREAM) >@@ -3092,6 +3093,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 894011833fa..3076ad24137 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h >+++ b/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h >@@ -584,6 +584,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 0121b084f63..e6218431be6 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebView.mm >+++ b/Source/WebKitLegacy/mac/WebView/WebView.mm >@@ -2938,6 +2938,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 283618c30f6..fbf1c2ad029 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-08-21 Wenson Hsieh <wenson_hsieh@apple.com> > > [Attachment Support] Augment _WKAttachment SPI to handle NSFileWrappers in addition to NSData >diff --git a/Source/WebKitLegacy/win/Interfaces/IWebPreferencesPrivate.idl b/Source/WebKitLegacy/win/Interfaces/IWebPreferencesPrivate.idl >index d1643f3facd..19882cdd0f0 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 3c48fb078dc..2ffe49ca8b9 100644 >--- a/Source/WebKitLegacy/win/WebPreferenceKeysPrivate.h >+++ b/Source/WebKitLegacy/win/WebPreferenceKeysPrivate.h >@@ -205,3 +205,6 @@ > #define WebKitVisualViewportAPIEnabledPreferenceKey "WebKitVisualViewportAPIEnabled" > > #define WebKitServerTimingEnabledPreferenceKey "WebKitServerTimingEnabled" >+ >+#define WebKitCSSOMViewScrollingAPIEnabledPreferenceKey "WebKitCSSOMViewScrollingAPIEnabled" >+ >diff --git a/Source/WebKitLegacy/win/WebPreferences.cpp b/Source/WebKitLegacy/win/WebPreferences.cpp >index c08f2f72720..f1d81d83dcc 100644 >--- a/Source/WebKitLegacy/win/WebPreferences.cpp >+++ b/Source/WebKitLegacy/win/WebPreferences.cpp >@@ -328,6 +328,8 @@ void WebPreferences::initializeDefaultSettings() > > CFDictionaryAddValue(defaults, CFSTR(WebKitVisualViewportAPIEnabledPreferenceKey), kCFBooleanFalse); > >+ CFDictionaryAddValue(defaults, CFSTR(WebKitCSSOMViewScrollingAPIEnabledPreferenceKey), kCFBooleanFalse); >+ > defaultSettings = defaults; > } > >@@ -2185,6 +2187,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 ae76f99bbe3..3ce4485b8a0 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 c9e52137df1..f543a032d2d 100644 >--- a/Source/WebKitLegacy/win/WebView.cpp >+++ b/Source/WebKitLegacy/win/WebView.cpp >@@ -5284,6 +5284,11 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification) > return hr; > settings.setCrossOriginWindowPolicySupportEnabled(!!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 450da50eea2..5e98c44fff9 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-08-29 Myles C. Maxfield <mmaxfield@apple.com> > > [WHLSL] Test row-majorness of matrices >diff --git a/Tools/DumpRenderTree/mac/DumpRenderTree.mm b/Tools/DumpRenderTree/mac/DumpRenderTree.mm >index 15c68786014..4341388c742 100644 >--- a/Tools/DumpRenderTree/mac/DumpRenderTree.mm >+++ b/Tools/DumpRenderTree/mac/DumpRenderTree.mm >@@ -869,6 +869,7 @@ static void enableExperimentalFeatures(WebPreferences* preferences) > [preferences setServerTimingEnabled:YES]; > [preferences setIntersectionObserverEnabled:YES]; > preferences.sourceBufferChangeTypeEnabled = YES; >+ // FIXME: CSSOMViewScrollingAPIEnabled > } > > // Called before each test. >@@ -921,6 +922,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 70465cf031b..6c530515a0b 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); > prefsPrivate->setServerTimingEnabled(TRUE); > // FIXME: WebGL2 >diff --git a/Tools/WebKitTestRunner/TestController.cpp b/Tools/WebKitTestRunner/TestController.cpp >index 41b95051202..7cdaaf0a869 100644 >--- a/Tools/WebKitTestRunner/TestController.cpp >+++ b/Tools/WebKitTestRunner/TestController.cpp >@@ -791,6 +791,7 @@ void TestController::resetPreferencesToConsistentValues(const TestOptions& optio > > WKPreferencesSetAccessibilityObjectModelEnabled(preferences, true); > WKPreferencesSetAriaReflectionEnabled(preferences, true); >+ WKPreferencesSetCSSOMViewScrollingAPIEnabled(preferences, false); > WKPreferencesSetMediaCapabilitiesEnabled(preferences, true); > > WKPreferencesSetCrossOriginWindowPolicyEnabled(preferences, true); >-- >2.18.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