DescriptionMerge 123637 - https://bugs.webkit.org/show_bug.cgi?id=89114
REGRESSION (r112919): Setting scrollTop after setting display from none to block
fails
-and corresponding-
<rdar://problem/11656050>
Reviewed by Simon Fraser.
Source/WebCore:
ScrollAnimatorMac::immediateScrollTo() and ScrollAnimatorMac::immediateScrollBy()
both have an optimization in place so that they do not call
notifyPositionChanged() if the new scroll offset matches the ScrollAnimator's
cached m_currentPosX and m_currentPosY. So revision 112919 caused troubled with
this optimization because it allowed RenderLayers to restore a scrollOffset from
the Element if there is one cached there. This caused the RenderLayer to have a
scrollOffset that is improperly out-of-synch with the ScrollAnimator's
currentPosition (which will just be 0,0 since it is being re-created like the
RenderLayer). This fix makes sure they are in synch by calling
setCurrentPosition() on the ScrollAnimator when the cached position is non-zero.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::RenderLayer):
LayoutTests:
* fast/overflow/setting-scrollTop-after-hide-show-expected.txt: Added.
* fast/overflow/setting-scrollTop-after-hide-show.html: Added.
TBR=karen@chromium.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=125733
Patch Set 1 #
Messages
Total messages: 1 (0 generated)
|