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

Unified Diff: Source/core/layout/svg/LayoutSVGText.cpp

Issue 1331053002: Propagate resource-triggered repaints to text node children of <text> (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Name/comment updates. Created 5 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/layout/svg/LayoutSVGText.h ('k') | Source/platform/graphics/PaintInvalidationReason.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/svg/LayoutSVGText.cpp
diff --git a/Source/core/layout/svg/LayoutSVGText.cpp b/Source/core/layout/svg/LayoutSVGText.cpp
index 86e5bbeb7c19edefd1c587bcbf48b1f5848aa343..9f54daf628f4eed9752cb39ae9fb1fbada199257 100644
--- a/Source/core/layout/svg/LayoutSVGText.cpp
+++ b/Source/core/layout/svg/LayoutSVGText.cpp
@@ -25,7 +25,6 @@
*/
#include "config.h"
-
#include "core/layout/svg/LayoutSVGText.h"
#include "core/editing/PositionWithAffinity.h"
@@ -33,6 +32,7 @@
#include "core/layout/HitTestResult.h"
#include "core/layout/LayoutAnalyzer.h"
#include "core/layout/LayoutState.h"
+#include "core/layout/LayoutView.h"
#include "core/layout/PointerEventsHitRules.h"
#include "core/layout/api/LineLayoutItem.h"
#include "core/layout/svg/LayoutSVGInline.h"
@@ -517,4 +517,24 @@ void LayoutSVGText::removeChild(LayoutObject* child)
subtreeChildWasRemoved(affectedAttributes);
}
+void LayoutSVGText::invalidateTreeIfNeeded(PaintInvalidationState& paintInvalidationState)
+{
+ ASSERT(!needsLayout());
+
+ if (!shouldCheckForPaintInvalidation(paintInvalidationState))
+ return;
+
+ PaintInvalidationReason reason = invalidatePaintIfNeeded(paintInvalidationState, paintInvalidationState.paintInvalidationContainer());
+ clearPaintInvalidationState(paintInvalidationState);
+
+ if (reason == PaintInvalidationDelayedFull)
+ paintInvalidationState.pushDelayedPaintInvalidationTarget(*this);
+
+ ForceHorriblySlowRectMapping slowRectMapping(&paintInvalidationState);
+ PaintInvalidationState childTreeWalkState(paintInvalidationState, *this, paintInvalidationState.paintInvalidationContainer());
+ if (reason == PaintInvalidationSVGResourceChange)
+ childTreeWalkState.setForceSubtreeInvalidationWithinContainer();
+ invalidatePaintOfSubtreesIfNeeded(childTreeWalkState);
+}
+
}
« no previous file with comments | « Source/core/layout/svg/LayoutSVGText.h ('k') | Source/platform/graphics/PaintInvalidationReason.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698