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

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: Rebaselined and updated awesomeness! 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
Index: Source/core/rendering/RenderTable.cpp
diff --git a/Source/core/rendering/RenderTable.cpp b/Source/core/rendering/RenderTable.cpp
index a3f626ad065dab6490374307aca0d156e21a81ff..792fc82a888d6aad58d242e96e8ad2274550cf0e 100644
--- a/Source/core/rendering/RenderTable.cpp
+++ b/Source/core/rendering/RenderTable.cpp
@@ -381,8 +381,12 @@ void RenderTable::layoutCaption(RenderTableCaption* caption)
}
caption->setLogicalLocation(LayoutPoint(caption->marginStart(), captionLogicalTop));
- if (!selfNeedsLayout() && caption->checkForPaintInvalidationDuringLayout())
- caption->repaintDuringLayoutIfMoved(captionRect);
+ if (!selfNeedsLayout()) {
+ if (caption->checkForPaintInvalidationDuringLayout())
dsinclair 2014/06/25 12:51:16 This branch can go away as checkForPaintInvalidati
Julien - ping for review 2014/06/30 22:36:30 done!
+ caption->repaintDuringLayoutIfMoved(captionRect);
+ else
+ caption->setMayNeedPaintInvalidation(true);
+ }
setLogicalHeight(logicalHeight() + caption->logicalHeight() + collapsedMarginBeforeForChild(caption) + collapsedMarginAfterForChild(caption));
}
@@ -544,7 +548,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);
}

Powered by Google App Engine
This is Rietveld 408576698