diff options
3 files changed, 3 insertions, 20 deletions
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp index 5243c2c..b78cebe 100644 --- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp +++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp @@ -96,8 +96,10 @@ void LayoutSVGInlineText::styleDidChange(StyleDifference diff, const ComputedSty return; // The text metrics may be influenced by style changes. - if (LayoutSVGText* textLayoutObject = LayoutSVGText::locateLayoutSVGTextAncestor(this)) + if (LayoutSVGText* textLayoutObject = LayoutSVGText::locateLayoutSVGTextAncestor(this)) { + textLayoutObject->setNeedsTextMetricsUpdate(); textLayoutObject->setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReason::StyleChange); + } } InlineTextBox* LayoutSVGInlineText::createTextBox(int start, unsigned short length) diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGText.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGText.cpp index cc7ad13..1ef39af 100644 --- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGText.cpp +++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGText.cpp @@ -263,22 +263,6 @@ void LayoutSVGText::subtreeChildWasRemoved(const Vector<SVGTextLayoutAttributes* m_layoutAttributesBuilder.buildLayoutAttributesForText(affectedAttributes[i]->context()); } -void LayoutSVGText::subtreeStyleDidChange() -{ - if (!shouldHandleSubtreeMutations() || documentBeingDestroyed()) - return; - - checkLayoutAttributesConsistency(this, m_layoutAttributes); - - // Only update the metrics cache, but not the text positioning element cache - // nor the layout attributes cached in the leaf #text layoutObjects. - FontCachePurgePreventer fontCachePurgePreventer; - for (LayoutObject* descendant = firstChild(); descendant; descendant = descendant->nextInPreOrder(this)) { - if (descendant->isSVGInlineText()) - m_layoutAttributesBuilder.rebuildMetricsForTextLayoutObject(toLayoutSVGInlineText(descendant)); - } -} - void LayoutSVGText::subtreeTextDidChange(LayoutSVGInlineText* text) { ASSERT(text); @@ -319,8 +303,6 @@ void LayoutSVGText::layout() ASSERT(needsLayout()); LayoutAnalyzer::Scope analyzer(*this); - subtreeStyleDidChange(); - bool updateCachedBoundariesInParents = false; if (m_needsTransformUpdate) { m_localTransform = toSVGTextElement(node())->calculateAnimatedLocalTransform(); diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGText.h b/third_party/WebKit/Source/core/layout/svg/LayoutSVGText.h index fde5c84..566aba3 100644 --- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGText.h +++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGText.h @@ -54,7 +54,6 @@ public: void subtreeChildWasAdded(LayoutObject*); void subtreeChildWillBeRemoved(LayoutObject*, Vector<SVGTextLayoutAttributes*, 2>& affectedAttributes); void subtreeChildWasRemoved(const Vector<SVGTextLayoutAttributes*, 2>& affectedAttributes); - void subtreeStyleDidChange(); void subtreeTextDidChange(LayoutSVGInlineText*); const AffineTransform& localToParentTransform() const override { return m_localTransform; } |