Title: [187077] branches/safari-601.1-branch/Source/WebKit2
Revision
187077
Author
matthew_han...@apple.com
Date
2015-07-20 21:37:51 -0700 (Mon, 20 Jul 2015)

Log Message

Merge r187001. rdar://problem/21769577

Modified Paths

Diff

Modified: branches/safari-601.1-branch/Source/WebKit2/ChangeLog (187076 => 187077)


--- branches/safari-601.1-branch/Source/WebKit2/ChangeLog	2015-07-21 04:37:48 UTC (rev 187076)
+++ branches/safari-601.1-branch/Source/WebKit2/ChangeLog	2015-07-21 04:37:51 UTC (rev 187077)
@@ -1,5 +1,37 @@
 2015-07-20  Matthew Hanson  <matthew_han...@apple.com>
 
+        Merge r187001. rdar://problem/21769577
+
+    2015-07-18  Simon Fraser  <simon.fra...@apple.com>
+
+            Scroll position jumps when scrolling scaling pages down in split view
+            https://bugs.webkit.org/show_bug.cgi?id=147072
+            rdar://problem/21769577
+
+            Reviewed by Sam Weinig.
+
+            When apple.com/music is in Split View at a reduced scale, scrolling the page
+            can cause unwanted scroll jumps. This happened because we'd enter
+            TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded() with a pending
+            layout, so run the autosizing logic. When scrolled near the bottom, the unconstrained
+            layout resulted in a shorter document, which truncated the scroll position. The
+            scaled layout then restored the longer document, but it also restored that
+            truncated scroll position.
+
+            Forcing a layout is sufficient to fix the bug for this page, and doing a single
+            layout (which will happen anyway) is preferable to running the autosize logic
+            if layout happens to be dirty.
+
+            I was not able to make a test to reproduce the problem. Entering
+            scaleViewToFitDocumentIfNeeded() with pending layout was triggerable
+            using a transform transition, but I was not able to reproduce incorrect
+            scroll position restoration.
+
+            * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
+            (WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
+
+2015-07-20  Matthew Hanson  <matthew_han...@apple.com>
+
         Merge r186982. rdar://problem/21567820
 
     2015-07-17  Andy Estes  <aes...@apple.com>

Modified: branches/safari-601.1-branch/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm (187076 => 187077)


--- branches/safari-601.1-branch/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm	2015-07-21 04:37:48 UTC (rev 187076)
+++ branches/safari-601.1-branch/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm	2015-07-21 04:37:51 UTC (rev 187077)
@@ -280,6 +280,8 @@
     if (!m_shouldScaleViewToFitDocument)
         return;
 
+    m_webPage.layoutIfNeeded();
+
     int viewWidth = m_webPage.size().width();
     bool documentWidthChangedOrInvalidated = m_webPage.mainFrame()->view()->needsLayout() || (m_lastDocumentSizeForScaleToFit.width() != m_webPage.mainFrameView()->renderView()->unscaledDocumentRect().width());
     bool viewWidthChanged = m_lastViewSizeForScaleToFit.width() != viewWidth;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to