| Index: Source/core/rendering/svg/RenderSVGInlineText.cpp
|
| diff --git a/Source/core/rendering/svg/RenderSVGInlineText.cpp b/Source/core/rendering/svg/RenderSVGInlineText.cpp
|
| index 1aeb6d9eb244bf53b1f5b645a269e332abd72c7f..a21c09919c366e0e0704d136e9e774f9a8a0fee1 100644
|
| --- a/Source/core/rendering/svg/RenderSVGInlineText.cpp
|
| +++ b/Source/core/rendering/svg/RenderSVGInlineText.cpp
|
| @@ -80,13 +80,8 @@ void RenderSVGInlineText::styleDidChange(StyleDifference diff, const RenderStyle
|
|
|
| bool newPreserves = style() ? style()->whiteSpace() == PRE : false;
|
| bool oldPreserves = oldStyle ? oldStyle->whiteSpace() == PRE : false;
|
| - if (oldPreserves && !newPreserves) {
|
| - setText(applySVGWhitespaceRules(originalText(), false), true);
|
| - return;
|
| - }
|
| -
|
| - if (!oldPreserves && newPreserves) {
|
| - setText(applySVGWhitespaceRules(originalText(), true), true);
|
| + if (oldPreserves != newPreserves) {
|
| + setText(originalText(), true);
|
| return;
|
| }
|
|
|
| @@ -247,4 +242,12 @@ LayoutRect RenderSVGInlineText::clippedOverflowRectForPaintInvalidation(const Re
|
| return parent()->clippedOverflowRectForPaintInvalidation(paintInvalidationContainer, paintInvalidationState);
|
| }
|
|
|
| +PassRefPtr<StringImpl> RenderSVGInlineText::originalText() const
|
| +{
|
| + RefPtr<StringImpl> result = RenderText::originalText();
|
| + if (!result)
|
| + return nullptr;
|
| + return applySVGWhitespaceRules(result, style() && style()->whiteSpace() == PRE);
|
| +}
|
| +
|
| }
|
|
|