Changeset 235539 in webkit


Ignore:
Timestamp:
Aug 31, 2018 12:49:32 AM (6 years ago)
Author:
commit-queue@webkit.org
Message:

Bug 182053 - [CSSOM View] Implement standard behavior for scrollingElement
https://bugs.webkit.org/show_bug.cgi?id=182053

Patch by Frederic Wang <fwang@igalia.com> on 2018-08-31
Reviewed by Simon Fraser.

Source/WebCore:

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::isBodyPotentiallyScrollable): 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

isBodyPotentiallyScrollable().

  • 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.

Source/WebKit:

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:

Source/WebKitLegacy/mac:

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:]):

Source/WebKitLegacy/win:

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):

Tools:

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):

LayoutTests:

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:
Location:
trunk
Files:
29 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r235537 r235539  
     12018-08-31  Frederic Wang  <fwang@igalia.com>
     2
     3        Bug 182053 - [CSSOM View] Implement standard behavior for scrollingElement
     4        https://bugs.webkit.org/show_bug.cgi?id=182053
     5
     6        Reviewed by Simon Fraser.
     7
     8        Add a test to check that in Quirks mode, the <body> element returned by
     9        document.scrollingElement is indeed a child of a <html> root (i.e. in the HTML namespace).
     10        Adjust scrollingElement*.html tests so that they are executed with the flag
     11        CSSOMViewScrollingAPI enabled and update expectations now that these tests pass.
     12
     13        * fast/dom/Document/scrollingElement-quirks-mode.html:
     14        * fast/dom/Document/scrollingElement-quirks-mode-expected.txt:
     15        * fast/dom/Document/scrollingElement-standards-mode.html:
     16        * fast/dom/Document/scrollingElement-standards-mode-expected.txt:
     17
    1182018-08-30  Zalan Bujtas  <zalan@apple.com>
    219
  • trunk/LayoutTests/fast/dom/Document/scrollingElement-quirks-mode-expected.txt

    r183967 r235539  
    99PASS document.scrollingElement is document.body
    1010In quirks mode, if the `BODY` is scrollable, the scrolling element is `null`
    11 INTENTIONAL FAILURE. This can be fixed once https://bugs.webkit.org/show_bug.cgi?id=106133 is fixed.
    12 FAIL document.scrollingElement.scrollingElement should be null (of type object). Was undefined (of type undefined).
     11PASS document.scrollingElement is null
    1312In quirks mode, if the `BODY` is `display: none`, the scrolling element is `BODY`
    1413PASS document.scrollingElement is document.body
     14In quirks mode, the document.scrollingElement is null if there is no `HTML` root.
     15PASS scrollingElement is null
    1516PASS successfullyParsed is true
    1617
  • trunk/LayoutTests/fast/dom/Document/scrollingElement-quirks-mode.html

    r183967 r235539  
    66<body>
    77<script>
     8if (window.internals)
     9    internals.settings.setCSSOMViewScrollingAPIEnabled(true);
    810
    911description("Tests the behavior of document.scrollingElement in quirks mode.");
     
    2123
    2224debug("In quirks mode, if the `BODY` is scrollable, the scrolling element is `null`");
    23 debug("INTENTIONAL FAILURE. This can be fixed once https://bugs.webkit.org/show_bug.cgi?id=106133 is fixed.");
    2425document.documentElement.setAttribute('style', 'overflow: scroll');
    2526document.body.setAttribute('style', 'overflow: scroll');
    26 shouldBeNull("document.scrollingElement.scrollingElement");
     27shouldBeNull("document.scrollingElement");
    2728
    2829debug("In quirks mode, if the `BODY` is `display: none`, the scrolling element is `BODY`");
     
    3334document.body.setAttribute('style', '');
    3435
     36debug("In quirks mode, the document.scrollingElement is null if there is no `HTML` root.");
     37// We save and restore the root before testing so that the result can be printed.
     38var oldRoot = document.removeChild(document.documentElement);
     39document.appendChild(document.createElementNS("foobarNS", "html"));
     40document.documentElement.appendChild(document.createElement("body"));
     41var scrollingElement = document.scrollingElement;
     42document.removeChild(document.documentElement);
     43document.appendChild(oldRoot);
     44shouldBeNull("scrollingElement");
     45
    3546</script>
    3647<script src="../../../resources/js-test-post.js"></script>
  • trunk/LayoutTests/fast/dom/Document/scrollingElement-standards-mode-expected.txt

    r183967 r235539  
    55
    66In standards mode the scrolling element is supposed to be `HTML`
    7 INTENTIONAL FAILURE. This can be fixed once https://bugs.webkit.org/show_bug.cgi?id=106133 is fixed.
    8 FAIL document.scrollingElement should be [object HTMLHtmlElement]. Was [object HTMLBodyElement].
     7PASS document.scrollingElement is document.documentElement
    98PASS successfullyParsed is true
    109
  • trunk/LayoutTests/fast/dom/Document/scrollingElement-standards-mode.html

    r183967 r235539  
    77<body>
    88<script>
     9if (window.internals)
     10    internals.settings.setCSSOMViewScrollingAPIEnabled(true);
    911
    1012description("Tests the behavior of document.scrollingElement in standards mode.");
    1113
    1214debug("In standards mode the scrolling element is supposed to be `HTML`");
    13 debug("INTENTIONAL FAILURE. This can be fixed once https://bugs.webkit.org/show_bug.cgi?id=106133 is fixed.");
    1415shouldBe("document.scrollingElement", "document.documentElement");
    1516
  • trunk/Source/WebCore/ChangeLog

    r235537 r235539  
     12018-08-31  Frederic Wang  <fwang@igalia.com>
     2
     3        Bug 182053 - [CSSOM View] Implement standard behavior for scrollingElement
     4        https://bugs.webkit.org/show_bug.cgi?id=182053
     5
     6        Reviewed by Simon Fraser.
     7
     8        This commit introduces a new CSSOMViewScrollingAPIEnabled flag that will be used to implement
     9        the standard behavior of DOM scroll* API as specified by the CSSOM View spec (see bug 5991).
     10        It changes the behavior of document.scrollingElement so that it follows the spec when the
     11        flag is enabled. This will allow to pass the WPT test cssom-view/scrollingElement.html when
     12        it becomes the default behavior. WPT tests cssom-view/scrollingElement-quirks-dynamic*.html
     13        still fail; comparing with Chromium's code, we might need to propagate the style of <html>
     14        and <body> to the viewport element. Behaviors for other scrolling attributes will be changed
     15        in follow-up bugs.
     16
     17        Tests: fast/dom/Document/scrollingElement-quirks-mode.html
     18               fast/dom/Document/scrollingElement-standard-mode.html
     19
     20        * dom/Document.cpp:
     21        (WebCore::Document::isBodyPotentiallyScrollable): Helper function to verify whether the body
     22        is potentially scrollable, as defined by the CSSOM View spec. It seems that
     23        RenderObject::hasOverflowClip() may return incorrect value at this point and we might need
     24        to do something similar to Chromium's style propagation to make it work. For now, we just
     25        use the computed style. See bug 182292.
     26        (WebCore::Document::scrollingElement): When CSSOMViewScrollingAPIEnabled is enabled, we
     27        implement the algorithm of the CSSOM View spec.
     28        (WebCore::Document::body const): Verify that the root is actually a <html> element or
     29        otherwise return null. This is required by the CSSOM View spec and for WPT test
     30        scrollingElement.html. It is consistent  with bodyOrFrameset().
     31        * dom/Document.h: Add spec references for body() and bodyOrFrameset() and declare
     32        isBodyPotentiallyScrollable().
     33        * page/Settings.yaml: Add developer option for enabling the CSSOM View behavior.
     34        * rendering/style/RenderStyle.h:
     35        (WebCore::RenderStyle::isOverflowVisible const): Add helper function to check whether the
     36        style implies visible overflow.
     37
    1382018-08-30  Zalan Bujtas  <zalan@apple.com>
    239
  • trunk/Source/WebCore/dom/Document.cpp

    r235459 r235539  
    14441444}
    14451445
     1446bool Document::isBodyPotentiallyScrollable(HTMLBodyElement& body)
     1447{
     1448    // See https://www.w3.org/TR/cssom-view-1/#potentially-scrollable.
     1449    // An element is potentially scrollable if all of the following conditions are true:
     1450    // - The element has an associated CSS layout box.
     1451    // - The element is not the HTML body element, or it is and the root element's used value of the
     1452    //   overflow-x or overflow-y properties is not visible.
     1453    // - The element's used value of the overflow-x or overflow-y properties is not visible.
     1454    //
     1455    // FIXME: We should use RenderObject::hasOverflowClip() instead of Element::computedStyle() but
     1456    // the used values are currently not correctly updated. See https://webkit.org/b/182292.
     1457    return body.renderer()
     1458        && documentElement()->computedStyle()
     1459        && !documentElement()->computedStyle()->isOverflowVisible()
     1460        && body.computedStyle()
     1461        && !body.computedStyle()->isOverflowVisible();
     1462}
     1463
    14461464Element* Document::scrollingElement()
    14471465{
    1448     // FIXME: When we fix https://bugs.webkit.org/show_bug.cgi?id=106133, this should be replaced with the full implementation
    1449     // of Document.scrollingElement() as specified at http://dev.w3.org/csswg/cssom-view/#dom-document-scrollingelement.
     1466    if (settings().CSSOMViewScrollingAPIEnabled()) {
     1467        // See https://drafts.csswg.org/cssom-view/#dom-document-scrollingelement.
     1468        // The scrollingElement attribute, on getting, must run these steps:
     1469        // 1. If the Document is in quirks mode, follow these substeps:
     1470        if (inQuirksMode()) {
     1471            updateLayoutIgnorePendingStylesheets();
     1472            auto* firstBody = body();
     1473            // 1. If the HTML body element exists, and it is not potentially scrollable, return the
     1474            // HTML body element and abort these steps.
     1475            if (firstBody && !isBodyPotentiallyScrollable(*firstBody))
     1476                return firstBody;
     1477
     1478            // 2. Return null and abort these steps.
     1479            return nullptr;
     1480        }
     1481
     1482        // 2. If there is a root element, return the root element and abort these steps.
     1483        // 3. Return null.
     1484        return documentElement();
     1485    }
    14501486
    14511487    return body();
     
    27052741{
    27062742    auto* element = documentElement();
    2707     if (!element)
     2743    if (!is<HTMLHtmlElement>(element))
    27082744        return nullptr;
    27092745    return childrenOfType<HTMLBodyElement>(*element).first();
  • trunk/Source/WebCore/dom/Document.h

    r235521 r235539  
    961961    static bool hasValidNamespaceForAttributes(const QualifiedName&);
    962962
     963    // This is the "HTML body element" as defined by CSSOM View spec, the first body child of the
     964    // document element. See http://dev.w3.org/csswg/cssom-view/#the-html-body-element.
    963965    WEBCORE_EXPORT HTMLBodyElement* body() const;
     966
     967    // This is the "body element" as defined by HTML5, the first body or frameset child of the
     968    // document element. See https://html.spec.whatwg.org/multipage/dom.html#the-body-element-2.
    964969    WEBCORE_EXPORT HTMLElement* bodyOrFrameset() const;
    965970    WEBCORE_EXPORT ExceptionOr<void> setBodyOrFrameset(RefPtr<HTMLElement>&&);
     
    16051610    void enableTemporaryTimeUserGesture();
    16061611
     1612    bool isBodyPotentiallyScrollable(HTMLBodyElement&);
     1613
    16071614    const Ref<Settings> m_settings;
    16081615
  • trunk/Source/WebCore/page/Settings.yaml

    r234967 r235539  
    555555  initial: false
    556556
     557CSSOMViewScrollingAPIEnabled:
     558  initial: false
     559
    557560inputEventsEnabled:
    558561  initial: true
  • trunk/Source/WebCore/rendering/style/RenderStyle.h

    r234808 r235539  
    332332    Overflow overflowInlineDirection() const { return isHorizontalWritingMode() ? overflowX() : overflowY(); }
    333333    Overflow overflowBlockDirection() const { return isHorizontalWritingMode() ? overflowY() : overflowX(); }
     334    bool isOverflowVisible() const { return overflowX() == Overflow::Visible || overflowY() == Overflow::Visible; }
    334335   
    335336    Visibility visibility() const { return static_cast<Visibility>(m_inheritedFlags.visibility); }
  • trunk/Source/WebKit/ChangeLog

    r235534 r235539  
     12018-08-31  Frederic Wang  <fwang@igalia.com>
     2
     3        Bug 182053 - [CSSOM View] Implement standard behavior for scrollingElement
     4        https://bugs.webkit.org/show_bug.cgi?id=182053
     5
     6        Reviewed by Simon Fraser.
     7
     8        Add developer flag to use standard behavior for scrolling* attributes.
     9
     10        * Shared/WebPreferences.yaml:
     11        * UIProcess/API/C/WKPreferences.cpp:
     12        (WKPreferencesSetCSSOMViewScrollingAPIEnabled):
     13        (WKPreferencesGetCSSOMViewScrollingAPIEnabled):
     14        * UIProcess/API/C/WKPreferencesRefPrivate.h:
     15
    1162018-08-30  Tim Horton  <timothy_horton@apple.com>
    217
  • trunk/Source/WebKit/Shared/WebPreferences.yaml

    r235489 r235539  
    11991199  category: experimental
    12001200
     1201CSSOMViewScrollingAPIEnabled:
     1202  type: bool
     1203  defaultValue: false
     1204  humanReadableName: "CSSOM View Scrolling API"
     1205  humanReadableDescription: "Implement standard behavior for scrollLeft, scrollTop, scrollWidth, scrollHeight, scrollTo, scrollBy and scrollingElement."
     1206  category: experimental
     1207
    12011208WebAnimationsEnabled:
    12021209  type: bool
  • trunk/Source/WebKit/UIProcess/API/C/WKPreferences.cpp

    r235489 r235539  
    19791979}
    19801980
     1981void WKPreferencesSetCSSOMViewScrollingAPIEnabled(WKPreferencesRef preferencesRef, bool flag)
     1982{
     1983    toImpl(preferencesRef)->setCSSOMViewScrollingAPIEnabled(flag);
     1984}
     1985
     1986bool WKPreferencesGetCSSOMViewScrollingAPIEnabled(WKPreferencesRef preferencesRef)
     1987{
     1988    return toImpl(preferencesRef)->cssOMViewScrollingAPIEnabled();
     1989}
     1990
    19811991void WKPreferencesSetShouldAllowUserInstalledFonts(WKPreferencesRef preferencesRef, bool flag)
    19821992{
  • trunk/Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h

    r235489 r235539  
    571571
    572572// Defaults to false.
     573WK_EXPORT void WKPreferencesSetCSSOMViewScrollingAPIEnabled(WKPreferencesRef, bool);
     574WK_EXPORT bool WKPreferencesGetCSSOMViewScrollingAPIEnabled(WKPreferencesRef);
     575
     576// Defaults to false.
    573577WK_EXPORT void WKPreferencesSetShouldAllowUserInstalledFonts(WKPreferencesRef, bool flag);
    574578WK_EXPORT bool WKPreferencesGetShouldAllowUserInstalledFonts(WKPreferencesRef);
  • trunk/Source/WebKitLegacy/mac/ChangeLog

    r235489 r235539  
     12018-08-31  Frederic Wang  <fwang@igalia.com>
     2
     3        Bug 182053 - [CSSOM View] Implement standard behavior for scrollingElement
     4        https://bugs.webkit.org/show_bug.cgi?id=182053
     5
     6        Reviewed by Simon Fraser.
     7
     8        Add developer flag to use standard behavior for scrolling* attributes.
     9
     10        * WebView/WebPreferenceKeysPrivate.h:
     11        * WebView/WebPreferences.mm:
     12        (+[WebPreferences initialize]):
     13        (-[WebPreferences CSSOMViewScrollingAPIEnabled]):
     14        (-[WebPreferences setCSSOMViewScrollingAPIEnabled:]):
     15        * WebView/WebPreferencesPrivate.h:
     16        * WebView/WebView.mm:
     17        (-[WebView _preferencesChanged:]):
     18
    1192018-08-29  Olivia Barnett  <obarnett@apple.com>
    220
  • trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h

    r235484 r235539  
    183183#define WebKitVisualViewportEnabledPreferenceKey @"WebKitVisualViewportEnabled"
    184184#define WebKitVisualViewportAPIEnabledPreferenceKey @"WebKitVisualViewportAPIEnabled"
     185#define WebKitCSSOMViewScrollingAPIEnabledPreferenceKey @"WebKitCSSOMViewScrollingAPIEnabled"
    185186#define WebKitModernMediaControlsEnabledPreferenceKey @"WebKitModernMediaControlsEnabled"
    186187#define WebKitSubtleCryptoEnabledPreferenceKey @"WebKitSubtleCryptoEnabled"
  • trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm

    r235484 r235539  
    655655        [NSNumber numberWithBool:NO], WebKitVisualViewportAPIEnabledPreferenceKey,
    656656
     657        [NSNumber numberWithBool:NO], WebKitCSSOMViewScrollingAPIEnabledPreferenceKey,
    657658        [NSNumber numberWithBool:YES], WebKitNeedsStorageAccessFromFileURLsQuirkKey,
    658659        [NSNumber numberWithBool:NO], WebKitAllowCrossOriginSubresourcesToAskForCredentialsKey,
     
    30933094}
    30943095
     3096- (BOOL)CSSOMViewScrollingAPIEnabled
     3097{
     3098    return [self _boolValueForKey:WebKitCSSOMViewScrollingAPIEnabledPreferenceKey];
     3099}
     3100
     3101- (void)setCSSOMViewScrollingAPIEnabled:(BOOL)flag
     3102{
     3103    [self _setBoolValue:flag forKey:WebKitCSSOMViewScrollingAPIEnabledPreferenceKey];
     3104}
     3105
    30953106- (BOOL)webAnimationsEnabled
    30963107{
  • trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h

    r235484 r235539  
    585585@property (nonatomic) BOOL visualViewportEnabled;
    586586@property (nonatomic) BOOL visualViewportAPIEnabled;
     587@property (nonatomic) BOOL CSSOMViewScrollingAPIEnabled;
    587588@property (nonatomic) BOOL largeImageAsyncDecodingEnabled;
    588589@property (nonatomic) BOOL animatedImageAsyncDecodingEnabled;
  • trunk/Source/WebKitLegacy/mac/WebView/WebView.mm

    r235484 r235539  
    29392939    settings.setVisualViewportEnabled([preferences visualViewportEnabled]);
    29402940    settings.setVisualViewportAPIEnabled([preferences visualViewportAPIEnabled]);
     2941    settings.setCSSOMViewScrollingAPIEnabled([preferences CSSOMViewScrollingAPIEnabled]);
    29412942    settings.setMediaContentTypesRequiringHardwareSupport([preferences mediaContentTypesRequiringHardwareSupport]);
    29422943
  • trunk/Source/WebKitLegacy/win/ChangeLog

    r235531 r235539  
     12018-08-31  Frederic Wang  <fwang@igalia.com>
     2
     3        Bug 182053 - [CSSOM View] Implement standard behavior for scrollingElement
     4        https://bugs.webkit.org/show_bug.cgi?id=182053
     5
     6        Reviewed by Simon Fraser.
     7
     8        Add developer flag to use standard behavior for scrolling* attributes.
     9
     10        * Interfaces/IWebPreferencesPrivate.idl:
     11        * WebPreferenceKeysPrivate.h:
     12        * WebPreferences.cpp:
     13        (WebPreferences::initializeDefaultSettings):
     14        (WebPreferences::CSSOMViewScrollingAPIEnabled):
     15        (WebPreferences::setCSSOMViewScrollingAPIEnabled):
     16        * WebPreferences.h:
     17        * WebView.cpp:
     18        (WebView::notifyPreferencesChanged):
     19
    1202018-08-30  Don Olmstead  <don.olmstead@sony.com>
    221
  • trunk/Source/WebKitLegacy/win/Interfaces/IWebPreferencesPrivate.idl

    r232499 r235539  
    222222    HRESULT visualViewportAPIEnabled([out, retval] BOOL*);
    223223    HRESULT setVisualViewportAPIEnabled([in] BOOL enabled);
     224    HRESULT CSSOMViewScrollingAPIEnabled([out, retval] BOOL*);
     225    HRESULT setCSSOMViewScrollingAPIEnabled([in] BOOL enabled);
    224226    HRESULT fetchAPIKeepAliveEnabled([out, retval] BOOL* enabled);
    225227    HRESULT setFetchAPIKeepAliveEnabled([in] BOOL enabled);
  • trunk/Source/WebKitLegacy/win/WebPreferenceKeysPrivate.h

    r232499 r235539  
    206206
    207207#define WebKitServerTimingEnabledPreferenceKey "WebKitServerTimingEnabled"
     208
     209#define WebKitCSSOMViewScrollingAPIEnabledPreferenceKey "WebKitCSSOMViewScrollingAPIEnabled"
     210
  • trunk/Source/WebKitLegacy/win/WebPreferences.cpp

    r234376 r235539  
    329329    CFDictionaryAddValue(defaults, CFSTR(WebKitVisualViewportAPIEnabledPreferenceKey), kCFBooleanFalse);
    330330
     331    CFDictionaryAddValue(defaults, CFSTR(WebKitCSSOMViewScrollingAPIEnabledPreferenceKey), kCFBooleanFalse);
     332
    331333    defaultSettings = defaults;
    332334}
     
    21862188}
    21872189
     2190HRESULT WebPreferences::CSSOMViewScrollingAPIEnabled(_Out_ BOOL* enabled)
     2191{
     2192    if (!enabled)
     2193        return E_POINTER;
     2194    *enabled = boolValueForKey(WebKitCSSOMViewScrollingAPIEnabledPreferenceKey);
     2195    return S_OK;
     2196}
     2197
     2198HRESULT WebPreferences::setCSSOMViewScrollingAPIEnabled(BOOL enabled)
     2199{
     2200    setBoolValue(WebKitCSSOMViewScrollingAPIEnabledPreferenceKey, enabled);
     2201    return S_OK;
     2202}
     2203
    21882204HRESULT WebPreferences::setApplicationId(BSTR applicationId)
    21892205{
  • trunk/Source/WebKitLegacy/win/WebPreferences.h

    r232499 r235539  
    270270    virtual HRESULT STDMETHODCALLTYPE visualViewportAPIEnabled(_Out_ BOOL*);
    271271    virtual HRESULT STDMETHODCALLTYPE setVisualViewportAPIEnabled(BOOL);
     272    virtual HRESULT STDMETHODCALLTYPE CSSOMViewScrollingAPIEnabled(_Out_ BOOL*);
     273    virtual HRESULT STDMETHODCALLTYPE setCSSOMViewScrollingAPIEnabled(BOOL);
    272274    virtual HRESULT STDMETHODCALLTYPE fetchAPIKeepAliveEnabled(_Out_ BOOL*);
    273275    virtual HRESULT STDMETHODCALLTYPE setFetchAPIKeepAliveEnabled(BOOL);
  • trunk/Source/WebKitLegacy/win/WebView.cpp

    r234501 r235539  
    52855285    settings.setCrossOriginWindowPolicySupportEnabled(!!enabled);
    52865286
     5287    hr = prefsPrivate->CSSOMViewScrollingAPIEnabled(&enabled);
     5288    if (FAILED(hr))
     5289        return hr;
     5290    settings.setCSSOMViewScrollingAPIEnabled(!!enabled);
     5291
    52875292    hr = preferences->privateBrowsingEnabled(&enabled);
    52885293    if (FAILED(hr))
  • trunk/Tools/ChangeLog

    r235533 r235539  
     12018-08-31  Frederic Wang  <fwang@igalia.com>
     2
     3        Bug 182053 - [CSSOM View] Implement standard behavior for scrollingElement
     4        https://bugs.webkit.org/show_bug.cgi?id=182053
     5
     6        Reviewed by Simon Fraser.
     7
     8        Add FIXMEs comments to add the new developer flag in the future and  disable it for now.
     9
     10        * DumpRenderTree/mac/DumpRenderTree.mm:
     11        (enableExperimentalFeatures):
     12        (resetWebPreferencesToConsistentValues):
     13        * DumpRenderTree/win/DumpRenderTree.cpp:
     14        (enableExperimentalFeatures):
     15        * WebKitTestRunner/TestController.cpp:
     16        (WTR::TestController::resetPreferencesToConsistentValues):
     17
    1182018-08-30  Thomas Denney  <tdenney@apple.com>
    219
  • trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm

    r235484 r235539  
    870870    [preferences setIntersectionObserverEnabled:YES];
    871871    preferences.sourceBufferChangeTypeEnabled = YES;
     872    // FIXME: CSSOMViewScrollingAPIEnabled
    872873}
    873874
     
    922923    [preferences setFrameFlattening:WebKitFrameFlatteningDisabled];
    923924    [preferences setAsyncFrameScrollingEnabled:NO];
     925    [preferences setCSSOMViewScrollingAPIEnabled:NO];
    924926    [preferences setSpatialNavigationEnabled:NO];
    925927    [preferences setMetaRefreshEnabled:YES];
  • trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp

    r235408 r235539  
    786786    // FIXME: SubtleCrypto
    787787    prefsPrivate->setVisualViewportAPIEnabled(TRUE);
     788    // FIXME: CSSOMViewScrollingAPI
    788789    prefsPrivate->setWebAnimationsEnabled(TRUE);
    789790    prefsPrivate->setServerTimingEnabled(TRUE);
  • trunk/Tools/WebKitTestRunner/TestController.cpp

    r235484 r235539  
    792792    WKPreferencesSetAccessibilityObjectModelEnabled(preferences, true);
    793793    WKPreferencesSetAriaReflectionEnabled(preferences, true);
     794    WKPreferencesSetCSSOMViewScrollingAPIEnabled(preferences, false);
    794795    WKPreferencesSetMediaCapabilitiesEnabled(preferences, true);
    795796
Note: See TracChangeset for help on using the changeset viewer.