Scrollbars are left in the wrong position when resizing a fixed layout view
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Apr 2015 06:37:15 +0000 (06:37 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Apr 2015 06:37:15 +0000 (06:37 +0000)
commit03a8b889b437cca57dec1a2488fca3865d8f4918
tree146e1c55d5992e242c442bb5fbf72d3917425e3a
parent68ecf4acd8ce343c83ca9a9861f7774148327090
Scrollbars are left in the wrong position when resizing a fixed layout view
https://bugs.webkit.org/show_bug.cgi?id=143360

Reviewed by Beth Dakin.

Test: fast/fixed-layout/fixed-layout.html

* platform/ScrollView.cpp:
(WebCore::ScrollView::setFrameRect):
Update scrollbars when the ScrollView frameRect changes. We were previously
depending on the layout that always happens after this to update scrollbars,
but with fixed layout mode, there won't be a layout! Also, FrameView's
setFrameRect override will sync this scrollbar update with the scrollbar
layers (via RenderLayerCompositor::frameViewDidChangeSize) immediately afterwards.

* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
Turn off fixed layout when resetting state.

(WebCore::Internals::setUseFixedLayout):
(WebCore::Internals::setFixedLayoutSize):
* testing/Internals.h:
* testing/Internals.idl:
Add internals functions to set the fixed layout size and to turn on fixed layout.

* fast/fixed-layout/fixed-layout-expected.png: Added.
* fast/fixed-layout/fixed-layout-expected.txt: Added.
* fast/fixed-layout/fixed-layout.html: Added.
Add a simple fixed layout test. We can add more (or recover some from
when the Qt tests were purged) now that it's testable again.

This test also happens to test the aforementioned setFrameRect change,
because without it, the RenderView's layer would be left at the wrong
size (800x600) because the scrollbars would be left behind in the resize.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182307 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/fixed-layout/fixed-layout-expected.png [new file with mode: 0644]
LayoutTests/fast/fixed-layout/fixed-layout-expected.txt [new file with mode: 0644]
LayoutTests/fast/fixed-layout/fixed-layout.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/ScrollView.cpp
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl