Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 1785123003: Rework embeddedContentBox into embeddedReplacedContent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index 901d7b8a7c4103463c0cecab406f96b56961acb0..fe6c3285936e93d57736e4cd077a4deadf264b01 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -735,7 +735,7 @@ inline void FrameView::forceLayoutParentViewIfNeeded()
if (!ownerLayoutObject || !ownerLayoutObject->frame())
return;
- LayoutBox* contentBox = embeddedContentBox();
+ LayoutReplaced* contentBox = embeddedReplacedContent();
if (!contentBox)
return;
@@ -745,7 +745,7 @@ inline void FrameView::forceLayoutParentViewIfNeeded()
// If the embedded SVG document appears the first time, the ownerLayoutObject has already finished
// layout without knowing about the existence of the embedded SVG document, because LayoutReplaced
- // embeddedContentBox() returns 0, as long as the embedded document isn't loaded yet. Before
+ // embeddedReplacedContent() returns 0, as long as the embedded document isn't loaded yet. Before
// bothering to lay out the SVG document, mark the ownerLayoutObject needing layout and ask its
// FrameView for a layout. After that the LayoutEmbeddedObject (ownerLayoutObject) carries the
// correct size, which LayoutSVGRoot::computeReplacedLogicalWidth/Height rely on, when laying
@@ -1172,7 +1172,7 @@ DocumentLifecycle& FrameView::lifecycle() const
return m_frame->document()->lifecycle();
}
-LayoutBox* FrameView::embeddedContentBox() const
+LayoutReplaced* FrameView::embeddedReplacedContent() const
{
LayoutView* layoutView = this->layoutView();
if (!layoutView)
@@ -1182,9 +1182,9 @@ LayoutBox* FrameView::embeddedContentBox() const
if (!firstChild || !firstChild->isBox())
return nullptr;
- // Curently only embedded SVG documents participate in the size-negotiation logic.
+ // Currently only embedded SVG documents participate in the size-negotiation logic.
if (firstChild->isSVGRoot())
- return toLayoutBox(firstChild);
+ return toLayoutSVGRoot(firstChild);
return nullptr;
}
@@ -1851,7 +1851,7 @@ bool FrameView::needsLayout() const
void FrameView::setNeedsLayout()
{
- LayoutBox* box = embeddedContentBox();
+ LayoutReplaced* box = embeddedReplacedContent();
// It's illegal to ask for layout changes during the layout compositing or paint invalidation step.
// FIXME: the third conditional is a hack to support embedded SVG. See FrameView::forceLayoutParentViewIfNeeded and crbug.com/442939
RELEASE_ASSERT(!m_frame->document() || m_frame->document()->lifecycle().stateAllowsLayoutInvalidation() || (box && box->isSVGRoot()));
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.h ('k') | third_party/WebKit/Source/core/layout/LayoutEmbeddedObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698