diff options
Diffstat (limited to 'chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGInlineText.cpp')
-rw-r--r-- | chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGInlineText.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGInlineText.cpp b/chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGInlineText.cpp index e8041f8c1c2..d19fed0516d 100644 --- a/chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGInlineText.cpp +++ b/chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGInlineText.cpp @@ -89,17 +89,17 @@ void RenderSVGInlineText::styleDidChange(StyleDifference diff, const RenderStyle return; } - if (diff != StyleDifferenceLayout) + if (!diff.needsFullLayout()) return; // The text metrics may be influenced by style changes. if (RenderSVGText* textRenderer = RenderSVGText::locateRenderSVGTextAncestor(this)) - textRenderer->subtreeStyleDidChange(this); + textRenderer->setNeedsLayoutAndFullPaintInvalidation(); } InlineTextBox* RenderSVGInlineText::createTextBox() { - InlineTextBox* box = new SVGInlineTextBox(this); + InlineTextBox* box = new SVGInlineTextBox(*this); box->setHasVirtualLogicalHeight(); return box; } @@ -186,8 +186,7 @@ PositionWithAffinity RenderSVGInlineText::positionForPoint(const LayoutPoint& po const SVGTextFragment& fragment = fragments.at(i); FloatRect fragmentRect(fragment.x, fragment.y - baseline, fragment.width, fragment.height); fragment.buildFragmentTransform(fragmentTransform); - if (!fragmentTransform.isIdentity()) - fragmentRect = fragmentTransform.mapRect(fragmentRect); + fragmentRect = fragmentTransform.mapRect(fragmentRect); float distance = powf(fragmentRect.x() - absolutePoint.x(), 2) + powf(fragmentRect.y() + fragmentRect.height() / 2 - absolutePoint.y(), 2); @@ -226,7 +225,7 @@ void RenderSVGInlineText::computeNewScaledFontForStyle(RenderObject* renderer, c return; } - if (style->fontDescription().textRenderingMode() == GeometricPrecision) + if (style->fontDescription().textRendering() == GeometricPrecision) scalingFactor = 1; FontDescription fontDescription(style->fontDescription()); @@ -235,7 +234,7 @@ void RenderSVGInlineText::computeNewScaledFontForStyle(RenderObject* renderer, c // FIXME: We need to better handle the case when we compute very small fonts below (below 1pt). fontDescription.setComputedSize(FontSize::getComputedSizeFromSpecifiedSize(&document, scalingFactor, fontDescription.isAbsoluteSize(), fontDescription.specifiedSize(), DoNotUseSmartMinimumForFontSize)); - scaledFont = Font(fontDescription, 0, 0); + scaledFont = Font(fontDescription); scaledFont.update(document.styleEngine()->fontSelector()); } |