Changeset 205537 in webkit


Ignore:
Timestamp:
Sep 6, 2016 11:40:57 PM (8 years ago)
Author:
Carlos Garcia Campos
Message:

[GTK][Threaded Compositor] Several flaky tests
https://bugs.webkit.org/show_bug.cgi?id=161242

Reviewed by Michael Catanzaro.

Source/WebKit2:

Reset the viewport attributes on SimpleViewportController when viewport attributes change and fixed layout is
not used. We were only updating the viewport attributes when fixed layout was used, but not resetting them again
when it's no longer used. That caused that reference tests run after fast/fixed-layout/fixed-layout.html or
compositing/fixed-with-fixed-layout.html in the same worker thread were incorrectly rendered.

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::dispatchViewportPropertiesDidChange): Remove ifdefs and call
WebPage::viewportPropertiesDidChange() unconditionally.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::setSize): Pass current page viewport arguments to sendViewportAttributesChanged().
(WebKit::WebPage::sendViewportAttributesChanged): It now receives the viewport arguments.
(WebKit::WebPage::viewportPropertiesDidChange): Move the iOS implementation from WebPageIOS.mm and for
coordinated graphics call sendViewportAttributesChanged() when fixed layout is used or reset the viewport
attributes when not used in case of threaded compositor.

  • WebProcess/WebPage/WebPage.h:

(WebKit::WebPage::viewportPropertiesDidChange): Moved out of iOS ifdef.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::viewportPropertiesDidChange): Deleted.

LayoutTests:

Unskip compositing/fixed-with-fixed-layout.html and fast/fixed-layout/fixed-layout.html.

  • platform/gtk/TestExpectations:
Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r205525 r205537  
     12016-09-06  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK][Threaded Compositor] Several flaky tests
     4        https://bugs.webkit.org/show_bug.cgi?id=161242
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        Unskip compositing/fixed-with-fixed-layout.html and fast/fixed-layout/fixed-layout.html.
     9
     10        * platform/gtk/TestExpectations:
     11
    1122016-09-06  Ryan Haddad  <ryanhaddad@apple.com>
    213
  • trunk/LayoutTests/platform/gtk/TestExpectations

    r205471 r205537  
    28082808webkit.org/b/160119 svg/repaint/remove-outline-property-on-root.html [ ImageOnlyFailure ]
    28092809
    2810 webkit.org/b/161242 compositing/fixed-with-fixed-layout.html [ Skip ]
    2811 webkit.org/b/161242 fast/fixed-layout/fixed-layout.html [ Skip ]
    2812 
    28132810webkit.org/b/161242 animations/negative-delay.html [ Pass Failure ]
    28142811
  • trunk/Source/WebKit2/ChangeLog

    r205536 r205537  
     12016-09-06  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK][Threaded Compositor] Several flaky tests
     4        https://bugs.webkit.org/show_bug.cgi?id=161242
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        Reset the viewport attributes on SimpleViewportController when viewport attributes change and fixed layout is
     9        not used. We were only updating the viewport attributes when fixed layout was used, but not resetting them again
     10        when it's no longer used. That caused that reference tests run after fast/fixed-layout/fixed-layout.html or
     11        compositing/fixed-with-fixed-layout.html in the same worker thread were incorrectly rendered.
     12
     13        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
     14        (WebKit::WebChromeClient::dispatchViewportPropertiesDidChange): Remove ifdefs and call
     15        WebPage::viewportPropertiesDidChange() unconditionally.
     16        * WebProcess/WebPage/WebPage.cpp:
     17        (WebKit::WebPage::setSize): Pass current page viewport arguments to sendViewportAttributesChanged().
     18        (WebKit::WebPage::sendViewportAttributesChanged): It now receives the viewport arguments.
     19        (WebKit::WebPage::viewportPropertiesDidChange): Move the iOS implementation from WebPageIOS.mm and for
     20        coordinated graphics call sendViewportAttributesChanged() when fixed layout is used or reset the viewport
     21        attributes when not used in case of threaded compositor.
     22        * WebProcess/WebPage/WebPage.h:
     23        (WebKit::WebPage::viewportPropertiesDidChange): Moved out of iOS ifdef.
     24        * WebProcess/WebPage/ios/WebPageIOS.mm:
     25        (WebKit::WebPage::viewportPropertiesDidChange): Deleted.
     26
    1272016-09-06  Carlos Garcia Campos  <cgarcia@igalia.com>
    228
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp

    r204996 r205537  
    925925void WebChromeClient::dispatchViewportPropertiesDidChange(const ViewportArguments& viewportArguments) const
    926926{
    927     UNUSED_PARAM(viewportArguments);
    928 #if PLATFORM(IOS)
    929927    m_page->viewportPropertiesDidChange(viewportArguments);
    930 #endif
    931 #if USE(COORDINATED_GRAPHICS)
    932     if (!m_page->useFixedLayout())
    933         return;
    934 
    935     m_page->sendViewportAttributesChanged();
    936 #endif
    937928}
    938929
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp

    r205498 r205537  
    13791379#if USE(COORDINATED_GRAPHICS)
    13801380    if (view->useFixedLayout())
    1381         sendViewportAttributesChanged();
     1381        sendViewportAttributesChanged(m_page->viewportArguments());
    13821382#endif
    13831383}
    13841384
    13851385#if USE(COORDINATED_GRAPHICS)
    1386 void WebPage::sendViewportAttributesChanged()
     1386void WebPage::sendViewportAttributesChanged(const ViewportArguments& viewportArguments)
    13871387{
    13881388    FrameView* view = m_page->mainFrame().view();
     
    14021402    int deviceHeight = (settings.deviceHeight() > 0) ? settings.deviceHeight() : m_viewSize.height();
    14031403
    1404     ViewportAttributes attr = computeViewportAttributes(m_page->viewportArguments(), minimumLayoutFallbackWidth, deviceWidth, deviceHeight, 1, m_viewSize);
     1404    ViewportAttributes attr = computeViewportAttributes(viewportArguments, minimumLayoutFallbackWidth, deviceWidth, deviceHeight, 1, m_viewSize);
    14051405
    14061406    // If no layout was done yet set contentFixedOrigin to (0,0).
     
    17291729        return IntSize();
    17301730    return view->fixedLayoutSize();
     1731}
     1732
     1733void WebPage::viewportPropertiesDidChange(const ViewportArguments& viewportArguments)
     1734{
     1735#if PLATFORM(IOS)
     1736    if (m_viewportConfiguration.setViewportArguments(viewportArguments))
     1737        viewportConfigurationChanged();
     1738#endif
     1739
     1740#if USE(COORDINATED_GRAPHICS)
     1741    FrameView* view = m_page->mainFrame().view();
     1742    if (view && view->useFixedLayout())
     1743        sendViewportAttributesChanged(viewportArguments);
     1744#if USE(COORDINATED_GRAPHICS_THREADED)
     1745    else if (auto* layerTreeHost = m_drawingArea->layerTreeHost())
     1746        layerTreeHost->didChangeViewportProperties(ViewportAttributes());
     1747#endif
     1748#endif
     1749
     1750#if !PLATFORM(IOS) && !USE(COORDINATED_GRAPHICS)
     1751    UNUSED_PARAM(viewportArguments);
     1752#endif
    17311753}
    17321754
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h

    r205381 r205537  
    505505    void resetAssistedNodeForFrame(WebFrame*);
    506506
     507    void viewportPropertiesDidChange(const WebCore::ViewportArguments&);
     508
    507509#if PLATFORM(IOS)
    508510    WebCore::FloatSize screenSize() const;
    509511    WebCore::FloatSize availableScreenSize() const;
    510512    int32_t deviceOrientation() const { return m_deviceOrientation; }
    511     void viewportPropertiesDidChange(const WebCore::ViewportArguments&);
    512513    void didReceiveMobileDocType(bool);
    513514
     
    598599#if USE(COORDINATED_GRAPHICS)
    599600    void pageDidRequestScroll(const WebCore::IntPoint&);
    600     void sendViewportAttributesChanged();
    601601#endif
    602602
     
    11281128    void countStringMatches(const String&, uint32_t findOptions, uint32_t maxMatchCount);
    11291129
     1130#if USE(COORDINATED_GRAPHICS)
     1131    void sendViewportAttributesChanged(const WebCore::ViewportArguments&);
     1132#endif
     1133
    11301134#if USE(COORDINATED_GRAPHICS_MULTIPROCESS)
    11311135    void findZoomableAreaForPoint(const WebCore::IntPoint&, const WebCore::IntSize& area);
  • trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm

    r204720 r205537  
    208208}
    209209
    210 void WebPage::viewportPropertiesDidChange(const ViewportArguments& viewportArguments)
    211 {
    212     if (m_viewportConfiguration.setViewportArguments(viewportArguments))
    213         viewportConfigurationChanged();
    214 }
    215 
    216210void WebPage::didReceiveMobileDocType(bool isMobileDoctype)
    217211{
Note: See TracChangeset for help on using the changeset viewer.