Title: [129046] trunk/Source/WebCore
- Revision
- 129046
- Author
- [email protected]
- Date
- 2012-09-19 14:47:40 -0700 (Wed, 19 Sep 2012)
Log Message
Remove RenderIFrame::updateLogicalHeight and RenderIFrame::updateLogicalWidth
https://bugs.webkit.org/show_bug.cgi?id=97049
Reviewed by Ojan Vafai.
This is an incremental step in making updateLogicalHeight non-virtual so it's
possible to call computeLogicalHeight on any RenderBox and get the right
version of the function.
The code in RenderIFrame::layout was calling flattenFrame(), which would
query it's bounding box size. Since we hadn't done a layout yet, the size
is unknown. The fix is to only call flattenFrame() after calling
updateLogicalWidth and updateLogicalHeight. We can then fixup the size of
the iframe.
No new tests, existing tests in fast/frames/flattening should continue to pass.
* rendering/RenderIFrame.cpp:
(WebCore::RenderIFrame::layout):
* rendering/RenderIFrame.h:
(RenderIFrame):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (129045 => 129046)
--- trunk/Source/WebCore/ChangeLog 2012-09-19 21:43:10 UTC (rev 129045)
+++ trunk/Source/WebCore/ChangeLog 2012-09-19 21:47:40 UTC (rev 129046)
@@ -1,3 +1,27 @@
+2012-09-19 Tony Chang <[email protected]>
+
+ Remove RenderIFrame::updateLogicalHeight and RenderIFrame::updateLogicalWidth
+ https://bugs.webkit.org/show_bug.cgi?id=97049
+
+ Reviewed by Ojan Vafai.
+
+ This is an incremental step in making updateLogicalHeight non-virtual so it's
+ possible to call computeLogicalHeight on any RenderBox and get the right
+ version of the function.
+
+ The code in RenderIFrame::layout was calling flattenFrame(), which would
+ query it's bounding box size. Since we hadn't done a layout yet, the size
+ is unknown. The fix is to only call flattenFrame() after calling
+ updateLogicalWidth and updateLogicalHeight. We can then fixup the size of
+ the iframe.
+
+ No new tests, existing tests in fast/frames/flattening should continue to pass.
+
+ * rendering/RenderIFrame.cpp:
+ (WebCore::RenderIFrame::layout):
+ * rendering/RenderIFrame.h:
+ (RenderIFrame):
+
2012-09-19 Joshua Bell <[email protected]>
IndexedDB: Free up resources used by completed cursors earlier
Modified: trunk/Source/WebCore/rendering/RenderIFrame.cpp (129045 => 129046)
--- trunk/Source/WebCore/rendering/RenderIFrame.cpp 2012-09-19 21:43:10 UTC (rev 129045)
+++ trunk/Source/WebCore/rendering/RenderIFrame.cpp 2012-09-19 21:47:40 UTC (rev 129046)
@@ -43,46 +43,6 @@
{
}
-void RenderIFrame::updateLogicalHeight()
-{
- RenderPart::updateLogicalHeight();
- if (!flattenFrame())
- return;
-
- HTMLIFrameElement* frame = static_cast<HTMLIFrameElement*>(node());
- bool isScrollable = frame->scrollingMode() != ScrollbarAlwaysOff;
-
- if (isScrollable || !style()->height().isFixed()) {
- FrameView* view = static_cast<FrameView*>(widget());
- if (!view)
- return;
- int border = borderTop() + borderBottom();
- setHeight(max<LayoutUnit>(height(), view->contentsHeight() + border));
- }
-}
-
-void RenderIFrame::updateLogicalWidth()
-{
- // When we're seamless, we behave like a block. Thankfully RenderBox has all the right logic for this.
- if (isSeamless())
- return RenderBox::updateLogicalWidth();
-
- RenderPart::updateLogicalWidth();
- if (!flattenFrame())
- return;
-
- HTMLIFrameElement* frame = static_cast<HTMLIFrameElement*>(node());
- bool isScrollable = frame->scrollingMode() != ScrollbarAlwaysOff;
-
- if (isScrollable || !style()->width().isFixed()) {
- FrameView* view = static_cast<FrameView*>(widget());
- if (!view)
- return;
- LayoutUnit border = borderLeft() + borderRight();
- setWidth(max<LayoutUnit>(width(), view->contentsWidth() + border));
- }
-}
-
bool RenderIFrame::shouldComputeSizeAsReplaced() const
{
// When we're seamless, we use normal block/box sizing code except when inline.
@@ -189,19 +149,16 @@
{
ASSERT(needsLayout());
- if (flattenFrame()) {
- RenderPart::updateLogicalWidth();
- RenderPart::updateLogicalHeight();
- layoutWithFlattening(style()->width().isFixed(), style()->height().isFixed());
- // FIXME: Is early return really OK here? What about transform/overflow code below?
- return;
- } else if (isSeamless()) {
+ if (isSeamless()) {
layoutSeamlessly();
// Do not return so as to share the layer and overflow updates below.
} else {
updateLogicalWidth();
// No kids to layout as a replaced element.
updateLogicalHeight();
+
+ if (flattenFrame())
+ layoutWithFlattening(style()->width().isFixed(), style()->height().isFixed());
}
m_overflow.clear();
Modified: trunk/Source/WebCore/rendering/RenderIFrame.h (129045 => 129046)
--- trunk/Source/WebCore/rendering/RenderIFrame.h 2012-09-19 21:43:10 UTC (rev 129045)
+++ trunk/Source/WebCore/rendering/RenderIFrame.h 2012-09-19 21:47:40 UTC (rev 129046)
@@ -40,9 +40,6 @@
bool isSeamless() const;
private:
- virtual void updateLogicalWidth() OVERRIDE;
- virtual void updateLogicalHeight() OVERRIDE;
-
virtual LayoutUnit minPreferredLogicalWidth() const OVERRIDE;
virtual LayoutUnit maxPreferredLogicalWidth() const OVERRIDE;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes