Auto-sized frames may be taller than expected
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Apr 2012 05:08:58 +0000 (05:08 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Apr 2012 05:08:58 +0000 (05:08 +0000)
https://bugs.webkit.org/show_bug.cgi?id=84106

Patch by Andrei Burago <aburago@chromium.org> on 2012-04-16
Reviewed by David Levin.

No new tests. The repro steps require using Chrome notifications on Win.

* page/FrameView.cpp:
(WebCore::FrameView::autoSizeIfEnabled):

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

Source/WebCore/ChangeLog
Source/WebCore/page/FrameView.cpp

index 0f09602..896b2eb 100644 (file)
@@ -1,3 +1,15 @@
+2012-04-16  Andrei Burago  <aburago@chromium.org>
+
+        Auto-sized frames may be taller than expected
+        https://bugs.webkit.org/show_bug.cgi?id=84106
+
+        Reviewed by David Levin.
+
+        No new tests. The repro steps require using Chrome notifications on Win.
+
+        * page/FrameView.cpp:
+        (WebCore::FrameView::autoSizeIfEnabled):
+
 2012-04-13  James Robinson  <jamesr@chromium.org>
 
         [chromium] Expose WebVideoLayer to Platform API and port WebMediaPlayerClientImpl to using it
index 844de28..3675a68 100644 (file)
@@ -2433,12 +2433,13 @@ void FrameView::autoSizeIfEnabled()
     if (!m_didRunAutosize)
         resize(frameRect().width(), m_minAutoSize.height());
 
+    IntSize size = frameRect().size();
+
     // Do the resizing twice. The first time is basically a rough calculation using the preferred width
     // which may result in a height change during the second iteration.
     for (int i = 0; i < 2; i++) {
         // Update various sizes including contentsSize, scrollHeight, etc.
         document->updateLayoutIgnorePendingStylesheets();
-        IntSize size = frameRect().size();
         int width = documentView->minPreferredLogicalWidth();
         int height = documentRenderBox->scrollHeight();
         IntSize newSize(width, height);