OSDN Git Service

Merge WebKit at Chromium 9.0.597.55: RenderFrame docWidth method changed
authorBen Murdoch <benm@google.com>
Thu, 6 Jan 2011 21:47:36 +0000 (21:47 +0000)
committerBen Murdoch <benm@google.com>
Fri, 7 Jan 2011 10:58:14 +0000 (10:58 +0000)
See http://trac.webkit.org/changeset/72852

Change-Id: I8ab3171330e475bec7eade78b35b11304f74579a

WebCore/rendering/RenderFrame.cpp

index e7ad76a..c3283f8 100644 (file)
@@ -81,13 +81,14 @@ void RenderFrame::layout()
             view->layout();
             // We can only grow in width and height because if positionFrames gives us a width and we become smaller,
             // then the fixup process of forcing the frame to fill extra space will fail.
-            if (width() > root->docWidth()) {
-                view->resize(root->docWidth(), 0);
+            const int docLeft = root->docLeft();
+            if (width() > root->docWidth(docLeft)) {
+                view->resize(root->docWidth(docLeft), 0);
                 view->layout();
             }
             // Honor the height set by RenderFrameSet::positionFrames unless our document height is larger.
             setHeight(max(root->docHeight(), height()));
-            setWidth(max(root->docWidth(), width()));
+            setWidth(max(root->docWidth(docLeft), width()));
         }
     }
     setNeedsLayout(false);