Patch by Robin Qiu <robin.qiu@torchmobile.com.cn> on 2011-07-19
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Jul 2011 09:21:01 +0000 (09:21 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Jul 2011 09:21:01 +0000 (09:21 +0000)
commitc34c927e5a8bfedf56535f27ff978f959a215fc4
tree7657cf2cb7004eee9f53d1717add9ccffa9c9489
parent68a1d9e24c7d45df4a2a028ddfc1612c522b950f
Patch by Robin Qiu <robin.qiu@torchmobile.com.cn> on 2011-07-19
Reviewed by Antonio Gomes.

ScrollBar should initialize current position in constructor.
https://bugs.webkit.org/show_bug.cgi?id=39284

When ScrollBar is created, m_currentPos should be initialized to
m_scrollableArea's current scrollPosition. Because scrollbars may
be created after the content of m_scrollableArea has been scrolled.

Source/WebCore:

Test: scrollbars/scrollbar-initial-position.html

* platform/Scrollbar.cpp:
(WebCore::Scrollbar::Scrollbar):

LayoutTests:

* scrollbars/scrollbar-initial-position-expected.png: Added.
* scrollbars/scrollbar-initial-position-expected.txt: Added.
* scrollbars/scrollbar-initial-position.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@91244 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/scrollbars/scrollbar-initial-position-expected.png [new file with mode: 0644]
LayoutTests/scrollbars/scrollbar-initial-position-expected.txt [new file with mode: 0644]
LayoutTests/scrollbars/scrollbar-initial-position.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/Scrollbar.cpp