Title: [104056] branches/safari-534.54-branch
Diff
Modified: branches/safari-534.54-branch/LayoutTests/ChangeLog (104055 => 104056)
--- branches/safari-534.54-branch/LayoutTests/ChangeLog 2012-01-04 19:44:47 UTC (rev 104055)
+++ branches/safari-534.54-branch/LayoutTests/ChangeLog 2012-01-04 19:47:55 UTC (rev 104056)
@@ -1,5 +1,19 @@
2011-1-4 Lucas Forschler <[email protected]>
+ Merge 95301
+
+ 2011-09-16 Abhishek Arya <[email protected]>
+
+ cachedFont not getting updated for inline SVG text.
+ https://bugs.webkit.org/show_bug.cgi?id=68060
+
+ Reviewed by Nikolas Zimmermann.
+
+ * svg/text/text-style-recalc-crash-expected.txt: Added.
+ * svg/text/text-style-recalc-crash.html: Added.
+
+2011-1-4 Lucas Forschler <[email protected]>
+
Merge 95126
2011-09-14 Jeremy Apthorp <[email protected]>
Copied: branches/safari-534.54-branch/LayoutTests/svg/text/text-style-recalc-crash-expected.txt (from rev 95301, trunk/LayoutTests/svg/text/text-style-recalc-crash-expected.txt) (0 => 104056)
--- branches/safari-534.54-branch/LayoutTests/svg/text/text-style-recalc-crash-expected.txt (rev 0)
+++ branches/safari-534.54-branch/LayoutTests/svg/text/text-style-recalc-crash-expected.txt 2012-01-04 19:47:55 UTC (rev 104056)
@@ -0,0 +1,3 @@
+Test passes if it does not crash.
+PASS
+
Copied: branches/safari-534.54-branch/LayoutTests/svg/text/text-style-recalc-crash.html (from rev 95301, trunk/LayoutTests/svg/text/text-style-recalc-crash.html) (0 => 104056)
--- branches/safari-534.54-branch/LayoutTests/svg/text/text-style-recalc-crash.html (rev 0)
+++ branches/safari-534.54-branch/LayoutTests/svg/text/text-style-recalc-crash.html 2012-01-04 19:47:55 UTC (rev 104056)
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+Test passes if it does not crash.
+<svg viewBox="0 0 1 1">
+<font-face font-family="A">
+<font-face-src>
+<font-face-uri xlink:href=""
+</font-face-src>
+</font-face>
+<g font-family="A">
+<text>PASS</text>
+<script>
+ if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+
+ document.execCommand("SelectAll");
+</script>
+<g>
+<text></text>
+</g>
+</g>
+</svg>
+</html>
Modified: branches/safari-534.54-branch/Source/WebCore/ChangeLog (104055 => 104056)
--- branches/safari-534.54-branch/Source/WebCore/ChangeLog 2012-01-04 19:44:47 UTC (rev 104055)
+++ branches/safari-534.54-branch/Source/WebCore/ChangeLog 2012-01-04 19:47:55 UTC (rev 104056)
@@ -1,5 +1,29 @@
2011-1-4 Lucas Forschler <[email protected]>
+ Merge 95301
+
+ 2011-09-16 Abhishek Arya <[email protected]>
+
+ cachedFont not getting updated for inline SVG text.
+ https://bugs.webkit.org/show_bug.cgi?id=68060
+
+ Reviewed by Nikolas Zimmermann.
+
+ The cached scaledFont needs to be updated on every style set call. It
+ is not similar to m_style which can get derived from parent's style and
+ hence will get automatically updated on ancestor's style change. This is
+ required, otherwise we will maintain stale font list in cached scaledFont
+ when custom fonts are retired on Document::recalcStyle.
+
+ Test: svg/text/text-style-recalc-crash.html
+
+ * rendering/svg/RenderSVGInlineText.cpp:
+ (WebCore::RenderSVGInlineText::styleDidChange):
+ (WebCore::RenderSVGInlineText::setStyle):
+ * rendering/svg/RenderSVGInlineText.h:
+
+2011-1-4 Lucas Forschler <[email protected]>
+
Merge 95074
2011-09-13 Abhishek Arya <[email protected]>
Modified: branches/safari-534.54-branch/Source/WebCore/rendering/svg/RenderSVGInlineText.cpp (104055 => 104056)
--- branches/safari-534.54-branch/Source/WebCore/rendering/svg/RenderSVGInlineText.cpp 2012-01-04 19:44:47 UTC (rev 104055)
+++ branches/safari-534.54-branch/Source/WebCore/rendering/svg/RenderSVGInlineText.cpp 2012-01-04 19:47:55 UTC (rev 104056)
@@ -87,8 +87,6 @@
// The text metrics may be influenced by style changes.
if (RenderSVGText* textRenderer = RenderSVGText::locateRenderSVGTextAncestor(this))
textRenderer->setNeedsPositioningValuesUpdate();
-
- updateScaledFont();
}
const RenderStyle* newStyle = style();
@@ -223,6 +221,19 @@
return createVisiblePosition(offset + closestDistanceBox->start(), offset > 0 ? VP_UPSTREAM_IF_POSSIBLE : DOWNSTREAM);
}
+void RenderSVGInlineText::setStyle(PassRefPtr<RenderStyle> style)
+{
+ RenderText::setStyle(style);
+
+ // The cached scaledFont needs to be updated on every style set call. It
+ // is not similar to m_style which can get derived from parent's style and
+ // hence will get automatically updated on ancestor's style change. This is
+ // required, otherwise we will maintain stale font list in cached scaledFont
+ // when custom fonts are retired on Document::recalcStyle. See webkit bug
+ // https://bugs.webkit.org/show_bug.cgi?id=68060.
+ updateScaledFont();
+}
+
void RenderSVGInlineText::updateScaledFont()
{
computeNewScaledFontForStyle(this, style(), m_scalingFactor, m_scaledFont);
Modified: branches/safari-534.54-branch/Source/WebCore/rendering/svg/RenderSVGInlineText.h (104055 => 104056)
--- branches/safari-534.54-branch/Source/WebCore/rendering/svg/RenderSVGInlineText.h 2012-01-04 19:44:47 UTC (rev 104055)
+++ branches/safari-534.54-branch/Source/WebCore/rendering/svg/RenderSVGInlineText.h 2012-01-04 19:47:55 UTC (rev 104056)
@@ -49,6 +49,8 @@
virtual const char* renderName() const { return "RenderSVGInlineText"; }
virtual void destroy();
+
+ virtual void setStyle(PassRefPtr<RenderStyle>);
virtual void styleDidChange(StyleDifference, const RenderStyle*);
// FIXME: We need objectBoundingBox for DRT results and filters at the moment.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes