Title: [159231] trunk/Source/WebCore
- Revision
- 159231
- Author
- [email protected]
- Date
- 2013-11-13 13:28:55 -0800 (Wed, 13 Nov 2013)
Log Message
Code cleanup: change FrameView::doLayoutWithFrameFlattening() to make it more explicit.
https://bugs.webkit.org/show_bug.cgi?id=124238
Reviewed by Simon Fraser.
Rename doLayoutWithFrameFlattening() and change its signature so that it's inline with
what it does.
Covered by existing tests.
* page/FrameView.cpp:
(WebCore::FrameView::layout):
(WebCore::FrameView::startLayoutAtMainFrameViewIfNeeded):
* page/FrameView.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (159230 => 159231)
--- trunk/Source/WebCore/ChangeLog 2013-11-13 21:26:48 UTC (rev 159230)
+++ trunk/Source/WebCore/ChangeLog 2013-11-13 21:28:55 UTC (rev 159231)
@@ -1,3 +1,20 @@
+2013-11-13 Zalan Bujtas <[email protected]>
+
+ Code cleanup: change FrameView::doLayoutWithFrameFlattening() to make it more explicit.
+ https://bugs.webkit.org/show_bug.cgi?id=124238
+
+ Reviewed by Simon Fraser.
+
+ Rename doLayoutWithFrameFlattening() and change its signature so that it's inline with
+ what it does.
+
+ Covered by existing tests.
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::layout):
+ (WebCore::FrameView::startLayoutAtMainFrameViewIfNeeded):
+ * page/FrameView.h:
+
2013-11-13 Thiago de Barros Lacerda <[email protected]>
Modifying RTCSessionDescription object construction to match the spec
Modified: trunk/Source/WebCore/page/FrameView.cpp (159230 => 159231)
--- trunk/Source/WebCore/page/FrameView.cpp 2013-11-13 21:26:48 UTC (rev 159230)
+++ trunk/Source/WebCore/page/FrameView.cpp 2013-11-13 21:28:55 UTC (rev 159231)
@@ -1081,7 +1081,9 @@
bool inChildFrameLayoutWithFrameFlattening = isInChildFrameWithFrameFlattening();
if (inChildFrameLayoutWithFrameFlattening) {
- if (doLayoutWithFrameFlattening(allowSubtree))
+ startLayoutAtMainFrameViewIfNeeded(allowSubtree);
+ RenderElement* root = m_layoutRoot ? m_layoutRoot : frame().document()->renderView();
+ if (!root->needsLayout())
return;
}
@@ -3360,21 +3362,22 @@
return false;
}
-bool FrameView::doLayoutWithFrameFlattening(bool allowSubtree)
+void FrameView::startLayoutAtMainFrameViewIfNeeded(bool allowSubtree)
{
- // Try initiating layout from the topmost parent.
+ // When we start a layout at the child level as opposed to the topmost frame view and this child
+ // frame requires flattening, we need to re-initiate the layout at the topmost view. Layout
+ // will hit this view eventually.
FrameView* parentView = parentFrameView();
-
if (!parentView)
- return false;
+ return;
// In the middle of parent layout, no need to restart from topmost.
if (parentView->m_nestedLayoutCount)
- return false;
+ return;
// Parent tree is clean. Starting layout from it would have no effect.
if (!parentView->needsLayout())
- return false;
+ return;
while (parentView->parentFrameView())
parentView = parentView->parentFrameView();
@@ -3383,8 +3386,6 @@
RenderElement* root = m_layoutRoot ? m_layoutRoot : frame().document()->renderView();
ASSERT_UNUSED(root, !root->needsLayout());
-
- return true;
}
void FrameView::updateControlTints()
Modified: trunk/Source/WebCore/page/FrameView.h (159230 => 159231)
--- trunk/Source/WebCore/page/FrameView.h 2013-11-13 21:26:48 UTC (rev 159230)
+++ trunk/Source/WebCore/page/FrameView.h 2013-11-13 21:28:55 UTC (rev 159231)
@@ -539,7 +539,7 @@
FrameView* parentFrameView() const;
- bool doLayoutWithFrameFlattening(bool allowSubtree);
+ void startLayoutAtMainFrameViewIfNeeded(bool allowSubtree);
bool frameFlatteningEnabled() const;
bool isFrameFlatteningValidForThisFrame() const;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes