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

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

Issue 544743003: Clean up paint invalidation container logic for RenderText. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix 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
Index: Source/core/rendering/RenderText.h
diff --git a/Source/core/rendering/RenderText.h b/Source/core/rendering/RenderText.h
index 97ab8febe31dd1530d9753d0f1a1ddb26a58c64f..927e7d145010941a57cf74190689ede211092fc9 100644
--- a/Source/core/rendering/RenderText.h
+++ b/Source/core/rendering/RenderText.h
@@ -120,6 +120,7 @@ public:
LayoutUnit marginRight() const { return minimumValueForLength(style()->marginRight(), 0); }
virtual LayoutRect clippedOverflowRectForPaintInvalidation(const RenderLayerModelObject* paintInvalidationContainer, const PaintInvalidationState* = 0) const OVERRIDE FINAL;
+ virtual const RenderLayerModelObject* containerForPaintInvalidation() const OVERRIDE;
InlineTextBox* firstTextBox() const { return m_firstTextBox; }
InlineTextBox* lastTextBox() const { return m_lastTextBox; }
@@ -161,6 +162,10 @@ protected:
virtual InlineTextBox* createTextBox(); // Subclassed by SVG.
private:
+ // RenderText objects don't know how to invalidate paint for themselves, since they don't know how to compute their bounds. Instead, they
+ // invalidate paint for the containing block or layer, as computed by this method.
+ const RenderLayerModelObject* containingObjectForPaintInvalidation() const;
+
void computePreferredLogicalWidths(float leadWidth);
void computePreferredLogicalWidths(float leadWidth, HashSet<const SimpleFontData*>& fallbackFonts, GlyphOverflow&);

Powered by Google App Engine
This is Rietveld 408576698