Changeset 187077 in webkit
- Timestamp:
- Jul 20, 2015 9:37:51 PM (9 years ago)
- Location:
- branches/safari-601.1-branch/Source/WebKit2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-601.1-branch/Source/WebKit2/ChangeLog
r187073 r187077 1 2015-07-20 Matthew Hanson <matthew_hanson@apple.com> 2 3 Merge r187001. rdar://problem/21769577 4 5 2015-07-18 Simon Fraser <simon.fraser@apple.com> 6 7 Scroll position jumps when scrolling scaling pages down in split view 8 https://bugs.webkit.org/show_bug.cgi?id=147072 9 rdar://problem/21769577 10 11 Reviewed by Sam Weinig. 12 13 When apple.com/music is in Split View at a reduced scale, scrolling the page 14 can cause unwanted scroll jumps. This happened because we'd enter 15 TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded() with a pending 16 layout, so run the autosizing logic. When scrolled near the bottom, the unconstrained 17 layout resulted in a shorter document, which truncated the scroll position. The 18 scaled layout then restored the longer document, but it also restored that 19 truncated scroll position. 20 21 Forcing a layout is sufficient to fix the bug for this page, and doing a single 22 layout (which will happen anyway) is preferable to running the autosize logic 23 if layout happens to be dirty. 24 25 I was not able to make a test to reproduce the problem. Entering 26 scaleViewToFitDocumentIfNeeded() with pending layout was triggerable 27 using a transform transition, but I was not able to reproduce incorrect 28 scroll position restoration. 29 30 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: 31 (WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded): 32 1 33 2015-07-20 Matthew Hanson <matthew_hanson@apple.com> 2 34 -
branches/safari-601.1-branch/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm
r186662 r187077 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.