Changeset 140262 in webkit


Ignore:
Timestamp:
Jan 19, 2013 4:10:35 PM (11 years ago)
Author:
mikhail.pozdnyakov@intel.com
Message:

Delegated scrolling: Assertion on attempt to show a CSS sticky element
https://bugs.webkit.org/show_bug.cgi?id=106890

Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

The problem was that frame view (when delegated scrolling enabled) calculated the positions of sticky elements for
a scroll event before sending scroll request. In case of multiple scroll events that caused assertion as the response
for previous scroll request was received after the expected sticky elements positions had been already updated for the following
scroll request.

No new tests. Covered by existing 'fast/css/sticky' tests.

  • page/FrameView.cpp:

(WebCore::FrameView::setFixedVisibleContentRect):

  • platform/ScrollView.cpp:

(WebCore::ScrollView::scrollTo):

Tools:

Enabled fixed layout mode in WTR for 'fast/css/sticky' tests.

  • WebKitTestRunner/TestInvocation.cpp:

(WTR::shouldUseFixedLayout):
(WTR):
(WTR::updateLayoutType):

LayoutTests:

Skipped failing css/sticky tests on WK2 EFL.

  • platform/efl-wk2/TestExpectations:
Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r140258 r140262  
     12013-01-19  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
     2
     3        Delegated scrolling: Assertion on attempt to show a CSS sticky element
     4        https://bugs.webkit.org/show_bug.cgi?id=106890
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        Skipped failing css/sticky tests on WK2 EFL.
     9
     10        * platform/efl-wk2/TestExpectations:
     11
    1122013-01-19  Zan Dobersek  <zdobersek@igalia.com>
    213
  • trunk/LayoutTests/platform/efl-wk2/TestExpectations

    r140251 r140262  
    413413webkit.org/b/106407 http/tests/xmlhttprequest/failed-auth.html [ Failure ]
    414414webkit.org/b/106407 http/tests/xmlhttprequest/remember-bad-password.html [ Failure ]
     415
     416# Most probably failures are result of delay in scrolling caused by 'delegated scrolling' usage.
     417webkit.org/b/107286 fast/css/sticky/sticky-margins.html [ ImageOnlyFailure ]
     418webkit.org/b/107286 fast/css/sticky/sticky-writing-mode-vertical-lr.html [ ImageOnlyFailure ]
     419webkit.org/b/107286 fast/css/sticky/sticky-overflowing.html [ ImageOnlyFailure ]
     420webkit.org/b/107286 fast/css/sticky/sticky-top-margins.html [ ImageOnlyFailure ]
     421webkit.org/b/107286 fast/css/sticky/sticky-left.html [ ImageOnlyFailure ]
     422webkit.org/b/107286 fast/css/sticky/sticky-as-positioning-container.html [ ImageOnlyFailure ]
     423webkit.org/b/107286 fast/css/sticky/sticky-left-percentage.html [ ImageOnlyFailure ]
     424webkit.org/b/107286 fast/css/sticky/sticky-writing-mode-vertical-rl.html [ ImageOnlyFailure ]
     425webkit.org/b/107286 fast/css/sticky/sticky-stacking-context.html [ ImageOnlyFailure ]
     426webkit.org/b/107286 fast/css/sticky/inflow-sticky.html [ ImageOnlyFailure ]
     427webkit.org/b/107286 fast/css/sticky/sticky-top-zoomed.html [ ImageOnlyFailure ]
     428webkit.org/b/107286 fast/css/sticky/sticky-both-sides.html [ ImageOnlyFailure ]
     429webkit.org/b/107286 fast/css/sticky/sticky-writing-mode-horizontal-bt.html [ ImageOnlyFailure ]
     430webkit.org/b/107286 fast/css/sticky/sticky-top.html [ ImageOnlyFailure ]
     431webkit.org/b/107286 fast/css/sticky/sticky-side-margins.html [ ImageOnlyFailure ]
     432webkit.org/b/107286 fast/css/sticky/replaced-sticky.html [ ImageOnlyFailure ]
  • trunk/Source/WebCore/ChangeLog

    r140252 r140262  
     12013-01-19  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
     2
     3        Delegated scrolling: Assertion on attempt to show a CSS sticky element
     4        https://bugs.webkit.org/show_bug.cgi?id=106890
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        The problem was that frame view (when delegated scrolling enabled) calculated the positions of sticky elements for
     9        a scroll event before sending scroll request. In case of multiple scroll events that caused assertion as the response
     10        for previous scroll request was received after the expected sticky elements positions had been already updated for the following
     11        scroll request.
     12
     13        No new tests. Covered by existing 'fast/css/sticky' tests.
     14
     15        * page/FrameView.cpp:
     16        (WebCore::FrameView::setFixedVisibleContentRect):
     17        * platform/ScrollView.cpp:
     18        (WebCore::ScrollView::scrollTo):
     19
    1202013-01-19  Kondapally Kalyan  <kalyan.kondapally@intel.com>
    221
  • trunk/Source/WebCore/page/FrameView.cpp

    r140244 r140262  
    18001800    ScrollView::setFixedVisibleContentRect(visibleContentRect);
    18011801    if (offset != scrollOffset()) {
     1802        repaintFixedElementsAfterScrolling();
    18021803        if (m_frame->page()->settings()->acceleratedCompositingForFixedPositionEnabled())
    18031804            updateFixedElementsAfterScrolling();
  • trunk/Source/WebCore/platform/ScrollView.cpp

    r135029 r140262  
    375375        return;
    376376
    377     repaintFixedElementsAfterScrolling();
    378377#if USE(TILED_BACKING_STORE)
    379378    if (delegatesScrolling()) {
     
    382381    }
    383382#endif
     383    repaintFixedElementsAfterScrolling();
    384384    scrollContents(scrollDelta);
    385385    updateFixedElementsAfterScrolling();
  • trunk/Tools/ChangeLog

    r140260 r140262  
     12013-01-19  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
     2
     3        Delegated scrolling: Assertion on attempt to show a CSS sticky element
     4        https://bugs.webkit.org/show_bug.cgi?id=106890
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        Enabled fixed layout mode in WTR for 'fast/css/sticky' tests.
     9
     10        * WebKitTestRunner/TestInvocation.cpp:
     11        (WTR::shouldUseFixedLayout):
     12        (WTR):
     13        (WTR::updateLayoutType):
     14
    1152013-01-19  Nico Weber  <thakis@chromium.org>
    216
  • trunk/Tools/WebKitTestRunner/TestInvocation.cpp

    r139194 r140262  
    175175}
    176176
     177static bool shouldUseFixedLayout(const char* pathOrURL)
     178{
    177179#if ENABLE(CSS_DEVICE_ADAPTATION)
    178 static bool shouldUseFixedLayout(const char* pathOrURL)
    179 {
    180     return strstr(pathOrURL, "device-adapt/") || strstr(pathOrURL, "device-adapt\\");
    181 }
    182 #endif
     180    if (strstr(pathOrURL, "device-adapt/") || strstr(pathOrURL, "device-adapt\\"))
     181        return true;
     182#endif
     183
     184#if USE(TILED_BACKING_STORE) && PLATFORM(EFL)
     185    if (strstr(pathOrURL, "sticky/") || strstr(pathOrURL, "sticky\\"))
     186        return true;
     187#endif
     188    return false;
     189
     190    UNUSED_PARAM(pathOrURL);
     191}
    183192
    184193static void updateLayoutType(const char* pathOrURL)
    185194{
    186 #if ENABLE(CSS_DEVICE_ADAPTATION)
     195    bool useFixedLayout = shouldUseFixedLayout(pathOrURL);
     196    if (!useFixedLayout)
     197        return;
     198
    187199    WKRetainPtr<WKMutableDictionaryRef> viewOptions = adoptWK(WKMutableDictionaryCreate());
    188200    WKRetainPtr<WKStringRef> useFixedLayoutKey = adoptWK(WKStringCreateWithUTF8CString("UseFixedLayout"));
    189     WKRetainPtr<WKBooleanRef> useFixedLayoutValue = adoptWK(WKBooleanCreate(shouldUseFixedLayout(pathOrURL)));
     201    WKRetainPtr<WKBooleanRef> useFixedLayoutValue = adoptWK(WKBooleanCreate(useFixedLayout));
    190202    WKDictionaryAddItem(viewOptions.get(), useFixedLayoutKey.get(), useFixedLayoutValue.get());
    191203
    192204    TestController::shared().ensureViewSupportsOptions(viewOptions.get());
    193 #else
    194     UNUSED_PARAM(pathOrURL);
    195 #endif
    196205}
    197206
Note: See TracChangeset for help on using the changeset viewer.