Changeset 187001 in webkit
- Timestamp:
- Jul 18, 2015 4:54:32 PM (9 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r186982 r187001 1 2015-07-18 Simon Fraser <simon.fraser@apple.com> 2 3 Scroll position jumps when scrolling scaling pages down in split view 4 https://bugs.webkit.org/show_bug.cgi?id=147072 5 rdar://problem/21769577 6 7 Reviewed by Sam Weinig. 8 9 When apple.com/music is in Split View at a reduced scale, scrolling the page 10 can cause unwanted scroll jumps. This happened because we'd enter 11 TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded() with a pending 12 layout, so run the autosizing logic. When scrolled near the bottom, the unconstrained 13 layout resulted in a shorter document, which truncated the scroll position. The 14 scaled layout then restored the longer document, but it also restored that 15 truncated scroll position. 16 17 Forcing a layout is sufficient to fix the bug for this page, and doing a single 18 layout (which will happen anyway) is preferable to running the autosize logic 19 if layout happens to be dirty. 20 21 I was not able to make a test to reproduce the problem. Entering 22 scaleViewToFitDocumentIfNeeded() with pending layout was triggerable 23 using a transform transition, but I was not able to reproduce incorrect 24 scroll position restoration. 25 26 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: 27 (WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded): 28 1 29 2015-07-17 Andy Estes <aestes@apple.com> 2 30 -
trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm
r186662 r187001 281 281 return; 282 282 283 m_webPage.layoutIfNeeded(); 284 283 285 int viewWidth = m_webPage.size().width(); 284 286 bool documentWidthChangedOrInvalidated = m_webPage.mainFrame()->view()->needsLayout() || (m_lastDocumentSizeForScaleToFit.width() != m_webPage.mainFrameView()->renderView()->unscaledDocumentRect().width());
Note: See TracChangeset
for help on using the changeset viewer.