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

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

Issue 1025213002: Begin tracking why layout is invalidated (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 5 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
« no previous file with comments | « Source/core/dom/Element.cpp ('k') | Source/core/frame/LocalFrame.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index f5d4082393cae191dd61d5318bf2e6e714832457..0c0a4a8e3d4f26ca07efc841fc34fec642c2968a 100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -788,7 +788,7 @@ inline void FrameView::forceLayoutParentViewIfNeeded()
RefPtrWillBeRawPtr<FrameView> frameView = ownerLayoutObject->frame()->view();
// Mark the owner renderer as needing layout.
- ownerLayoutObject->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation();
+ ownerLayoutObject->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(LayoutInvalidationReason::Unknown);
// Synchronously enter layout, to layout the view containing the host object/embed/iframe.
ASSERT(frameView);
@@ -1314,13 +1314,13 @@ void FrameView::viewportConstrainedVisibleContentSizeChanged(bool widthChanged,
if (style.width().isFixed() && (style.left().isAuto() || style.right().isAuto()))
renderer->setNeedsPositionedMovementLayout();
else
- renderer->setNeedsLayoutAndFullPaintInvalidation();
+ renderer->setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReason::SizeChanged);
}
if (heightChanged) {
if (style.height().isFixed() && (style.top().isAuto() || style.bottom().isAuto()))
renderer->setNeedsPositionedMovementLayout();
else
- renderer->setNeedsLayoutAndFullPaintInvalidation();
+ renderer->setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReason::SizeChanged);
}
}
}
@@ -1882,7 +1882,7 @@ void FrameView::setNeedsLayout()
RELEASE_ASSERT(!m_frame->document() || m_frame->document()->lifecycle().stateAllowsLayoutInvalidation() || (box && box->isSVGRoot()));
if (LayoutView* layoutView = this->layoutView())
- layoutView->setNeedsLayout();
+ layoutView->setNeedsLayout(LayoutInvalidationReason::Unknown);
}
bool FrameView::isTransparent() const
@@ -2694,7 +2694,7 @@ void FrameView::forceLayoutForPagination(const FloatSize& pageSize, const FloatS
LayoutUnit flooredPageLogicalHeight = static_cast<LayoutUnit>(pageLogicalHeight);
layoutView->setLogicalWidth(flooredPageLogicalWidth);
layoutView->setPageLogicalHeight(flooredPageLogicalHeight);
- layoutView->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation();
+ layoutView->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(LayoutInvalidationReason::PrintingChanged);
layout();
// If we don't fit in the given page width, we'll lay out again. If we don't fit in the
@@ -2714,7 +2714,7 @@ void FrameView::forceLayoutForPagination(const FloatSize& pageSize, const FloatS
flooredPageLogicalHeight = static_cast<LayoutUnit>(pageLogicalHeight);
layoutView->setLogicalWidth(flooredPageLogicalWidth);
layoutView->setPageLogicalHeight(flooredPageLogicalHeight);
- layoutView->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation();
+ layoutView->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(LayoutInvalidationReason::PrintingChanged);
layout();
const LayoutRect& updatedDocumentRect = LayoutRect(layoutView->documentRect());
« no previous file with comments | « Source/core/dom/Element.cpp ('k') | Source/core/frame/LocalFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698