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

Unified Diff: Source/core/rendering/RenderFlowThread.cpp

Issue 757933003: Get rid of a lot of special code for RenderFlowThread invalidation. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Ahemify and pxify tests. Created 6 years, 1 month 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/rendering/RenderFlowThread.h ('k') | Source/core/rendering/RenderMultiColumnSet.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderFlowThread.cpp
diff --git a/Source/core/rendering/RenderFlowThread.cpp b/Source/core/rendering/RenderFlowThread.cpp
index bc5892a34b49ebe785feafb0aa8c9fe733967a93..43505bd3e9a1eee518ab13f405791b446dd55f9e 100644
--- a/Source/core/rendering/RenderFlowThread.cpp
+++ b/Source/core/rendering/RenderFlowThread.cpp
@@ -122,6 +122,13 @@ void RenderFlowThread::validateRegions()
updateRegionsFlowThreadPortionRect();
}
+void RenderFlowThread::mapRectToPaintInvalidationBacking(const RenderLayerModelObject* paintInvalidationContainer, LayoutRect& rect, const PaintInvalidationState* paintInvalidationState) const
+{
+ ASSERT(paintInvalidationContainer != this); // A flow thread should never be an invalidation container.
+ rect = fragmentsBoundingBox(rect);
+ RenderBlockFlow::mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect, paintInvalidationState);
+}
+
void RenderFlowThread::layout()
{
m_pageLogicalSizeChanged = m_regionsInvalidated && everHadLayout();
@@ -150,30 +157,6 @@ bool RenderFlowThread::nodeAtPoint(const HitTestRequest& request, HitTestResult&
return RenderBlockFlow::nodeAtPoint(request, result, locationInContainer, accumulatedOffset, hitTestAction);
}
-bool RenderFlowThread::shouldIssuePaintInvalidations(const LayoutRect& r) const
-{
- if (view()->document().printing() || r.isEmpty())
- return false;
-
- return true;
-}
-
-void RenderFlowThread::paintInvalidationRectangleInRegions(const LayoutRect& paintInvalidationRect) const
-{
- if (!shouldIssuePaintInvalidations(paintInvalidationRect) || !hasValidRegionInfo())
- return;
-
- // We can't use currentFlowThread as it is possible to have interleaved flow threads and the wrong one could be used.
- // Let each columnSet figure out the proper enclosing flow thread.
- CurrentRenderFlowThreadDisabler disabler(view());
-
- for (RenderMultiColumnSetList::const_iterator iter = m_multiColumnSetList.begin(); iter != m_multiColumnSetList.end(); ++iter) {
- RenderMultiColumnSet* columnSet = *iter;
-
- columnSet->paintInvalidationForFlowThreadContent(paintInvalidationRect);
- }
-}
-
LayoutUnit RenderFlowThread::pageLogicalHeightForOffset(LayoutUnit offset)
{
RenderMultiColumnSet* columnSet = columnSetAtBlockOffset(offset);
@@ -247,7 +230,7 @@ void RenderFlowThread::collectLayerFragments(LayerFragments& layerFragments, con
}
}
-LayoutRect RenderFlowThread::fragmentsBoundingBox(const LayoutRect& layerBoundingBox)
+LayoutRect RenderFlowThread::fragmentsBoundingBox(const LayoutRect& layerBoundingBox) const
{
ASSERT(!m_regionsInvalidated);
« no previous file with comments | « Source/core/rendering/RenderFlowThread.h ('k') | Source/core/rendering/RenderMultiColumnSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698