Changeset 127520 in webkit


Ignore:
Timestamp:
Sep 4, 2012 4:39:00 PM (12 years ago)
Author:
jchaffraix@webkit.org
Message:

REGRESSION(r120832): RenderLayer::clampScrollOffset doesn't properly clamp
https://bugs.webkit.org/show_bug.cgi?id=95776

Reviewed by Simon Fraser.

.:

  • ManualTests/select-menu-list-wrongly-positioned.html: Added.

Source/WebCore:

r120832 consolidated the clamping logic into RenderLayer::clampScrollOffset. The existing code wouldn't properly ensure that
the offset were positive which got exposed to other code paths, leading to the regression.

Tested by ManualTests/select-menu-list-wrongly-positioned.html as I didn't find a way to create a reliable layout test.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::clampScrollOffset):
Fixed the clamping logic to ensure that the scroll offset's dimensions are positive.

Location:
trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r127462 r127520  
     12012-09-04  Julien Chaffraix  <jchaffraix@webkit.org>
     2
     3        REGRESSION(r120832): RenderLayer::clampScrollOffset doesn't properly clamp
     4        https://bugs.webkit.org/show_bug.cgi?id=95776
     5
     6        Reviewed by Simon Fraser.
     7
     8        * ManualTests/select-menu-list-wrongly-positioned.html: Added.
     9
    1102012-09-04  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
    211
  • trunk/Source/WebCore/ChangeLog

    r127518 r127520  
     12012-09-04  Julien Chaffraix  <jchaffraix@webkit.org>
     2
     3        REGRESSION(r120832): RenderLayer::clampScrollOffset doesn't properly clamp
     4        https://bugs.webkit.org/show_bug.cgi?id=95776
     5
     6        Reviewed by Simon Fraser.
     7
     8        r120832 consolidated the clamping logic into RenderLayer::clampScrollOffset. The existing code wouldn't properly ensure that
     9        the offset were positive which got exposed to other code paths, leading to the regression.
     10
     11        Tested by ManualTests/select-menu-list-wrongly-positioned.html as I didn't find a way to create a reliable layout test.
     12
     13        * rendering/RenderLayer.cpp:
     14        (WebCore::RenderLayer::clampScrollOffset):
     15        Fixed the clamping logic to ensure that the scroll offset's dimensions are positive.
     16
    1172012-09-04  Joshua Bell  <jsbell@chromium.org>
    218
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r127480 r127520  
    16661666    int maxY = scrollHeight() - box->pixelSnappedClientHeight();
    16671667
    1668     int x = min(max(scrollOffset.width(), 0), maxX);
    1669     int y = min(max(scrollOffset.height(), 0), maxY);
     1668    int x = max(min(scrollOffset.width(), maxX), 0);
     1669    int y = max(min(scrollOffset.height(), maxY), 0);
    16701670    return IntSize(x, y);
    16711671}
Note: See TracChangeset for help on using the changeset viewer.