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

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

Issue 204843002: Reduce invalidation on children-needs-layout containers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: And more and more... Created 6 years, 6 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/rendering/RenderObject.cpp ('k') | Source/core/rendering/style/RenderStyle.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderTable.cpp
diff --git a/Source/core/rendering/RenderTable.cpp b/Source/core/rendering/RenderTable.cpp
index cd5869661efc0ab8a5d172d450272b7d2a61bae0..0cf9469d3309f9408c10c02da744cf2e8e8918c8 100644
--- a/Source/core/rendering/RenderTable.cpp
+++ b/Source/core/rendering/RenderTable.cpp
@@ -366,6 +366,9 @@ void RenderTable::layoutCaption(RenderTableCaption* caption)
}
caption->setLogicalLocation(LayoutPoint(caption->marginStart(), captionLogicalTop));
+ if (!selfNeedsLayout())
+ caption->setMayNeedPaintInvalidation(true);
+
setLogicalHeight(logicalHeight() + caption->logicalHeight() + collapsedMarginBeforeForChild(caption) + collapsedMarginAfterForChild(caption));
}
@@ -521,7 +524,12 @@ void RenderTable::layout()
}
section->setLogicalLocation(LayoutPoint(sectionLogicalLeft, logicalHeight()));
+ // As we may skip invalidation on the table, we need to ensure that sections are invalidated when they moved.
+ if (sectionMoved && !section->selfNeedsLayout())
+ section->setMayNeedPaintInvalidation(true);
+
setLogicalHeight(logicalHeight() + section->logicalHeight());
+
section = sectionBelow(section);
}
« no previous file with comments | « Source/core/rendering/RenderObject.cpp ('k') | Source/core/rendering/style/RenderStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698