REGRESSION: Page footers are displayed above the bottom of the WebView due to tiled...
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 28 Jun 2015 15:33:21 +0000 (15:33 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 28 Jun 2015 15:33:21 +0000 (15:33 +0000)
https://bugs.webkit.org/show_bug.cgi?id=146393
<rdar://problem/21113217>

Reviewed by Sam Weinig.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
Don't include the top content inset in the layout size.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186045 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm

index 312ffd4..8bb6352 100644 (file)
@@ -1,3 +1,15 @@
+2015-06-28  Tim Horton  <timothy_horton@apple.com>
+
+        REGRESSION: Page footers are displayed above the bottom of the WebView due to tiled scaling
+        https://bugs.webkit.org/show_bug.cgi?id=146393
+        <rdar://problem/21113217>
+
+        Reviewed by Sam Weinig.
+
+        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
+        (WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
+        Don't include the top content inset in the layout size.
+
 2015-06-26  Antti Koivisto  <antti@apple.com>
 
         Make NetworkCache::traverse faster
index f824aac..ece97de 100644 (file)
@@ -297,7 +297,7 @@ void TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded()
         viewScale = std::max(viewScale, minimumViewScale);
         m_webPage.scaleView(viewScale);
 
-        IntSize fixedLayoutSize(std::ceil(m_webPage.size().width() / viewScale), std::ceil(m_webPage.size().height() / viewScale));
+        IntSize fixedLayoutSize(std::ceil(m_webPage.size().width() / viewScale), std::ceil((m_webPage.size().height() - m_webPage.corePage()->topContentInset()) / viewScale));
         m_webPage.setFixedLayoutSize(fixedLayoutSize);
         return;
     }
@@ -322,7 +322,7 @@ void TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded()
         m_webPage.setUseFixedLayout(true);
         viewScale = (float)viewWidth / (float)documentWidth;
         viewScale = std::max(viewScale, minimumViewScale);
-        IntSize fixedLayoutSize(std::ceil(m_webPage.size().width() / viewScale), std::ceil(m_webPage.size().height() / viewScale));
+        IntSize fixedLayoutSize(std::ceil(m_webPage.size().width() / viewScale), std::ceil((m_webPage.size().height() - m_webPage.corePage()->topContentInset()) / viewScale));
         m_webPage.setFixedLayoutSize(fixedLayoutSize);
     }