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

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

Issue 412353004: Clean up GraphicsLayerPaintInfo to remove unused or unnecessary fields. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: f Created 6 years, 3 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/RenderText.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderText.cpp
diff --git a/Source/core/rendering/RenderText.cpp b/Source/core/rendering/RenderText.cpp
index 1170cddfc7c91f7dbcc921b0c483092966cd6e6f..4a2aab7d5a37cb0b0d6c09feb97204403945914b 100644
--- a/Source/core/rendering/RenderText.cpp
+++ b/Source/core/rendering/RenderText.cpp
@@ -1576,20 +1576,29 @@ LayoutRect RenderText::linesVisualOverflowBoundingBox() const
LayoutRect RenderText::clippedOverflowRectForPaintInvalidation(const RenderLayerModelObject* paintInvalidationContainer, const PaintInvalidationState* paintInvalidationState) const
{
+ const RenderObject* rendererToIssuePaintInvalidations = containingObjectForPaintInvalidation();
+ return rendererToIssuePaintInvalidations->clippedOverflowRectForPaintInvalidation(paintInvalidationContainer, paintInvalidationState);
+}
+
+const RenderObject* RenderText::containingObjectForPaintInvalidation() const
+{
RenderObject* rendererToIssuePaintInvalidations = containingBlock();
// Do not cross self-painting layer boundaries.
RenderObject* enclosingLayerRenderer = enclosingLayer()->renderer();
if (enclosingLayerRenderer != rendererToIssuePaintInvalidations && !rendererToIssuePaintInvalidations->isDescendantOf(enclosingLayerRenderer))
rendererToIssuePaintInvalidations = enclosingLayerRenderer;
+ return enclosingLayerRenderer;
+}
- // The renderer we chose to issue paint invalidations may be an ancestor of paintInvalidationContainer, but we need to do a paintInvalidationContainer-relative paint invalidation.
- if (paintInvalidationContainer && paintInvalidationContainer != rendererToIssuePaintInvalidations && !rendererToIssuePaintInvalidations->isDescendantOf(paintInvalidationContainer))
- return paintInvalidationContainer->clippedOverflowRectForPaintInvalidation(paintInvalidationContainer, paintInvalidationState);
-
- return rendererToIssuePaintInvalidations->clippedOverflowRectForPaintInvalidation(paintInvalidationContainer, paintInvalidationState);
+const RenderLayerModelObject* RenderText::containerForPaintInvalidation() const
+{
+ const RenderObject* rendererToIssuePaintInvalidations = containingObjectForPaintInvalidation();
+ ASSERT(rendererToIssuePaintInvalidations);
+ return rendererToIssuePaintInvalidations->containerForPaintInvalidation();
}
+
LayoutRect RenderText::selectionRectForPaintInvalidation(const RenderLayerModelObject* paintInvalidationContainer, bool clipToVisibleContent)
{
ASSERT(!needsLayout());
« no previous file with comments | « Source/core/rendering/RenderText.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698