Title: [117790] trunk
- Revision
- 117790
- Author
- schen...@chromium.org
- Date
- 2012-05-21 09:12:10 -0700 (Mon, 21 May 2012)
Log Message
[Chromium] REGRESSION: Assertion failure on svg/custom/acid3-test-77.html
https://bugs.webkit.org/show_bug.cgi?id=86715
Reviewed by Nikolas Zimmermann.
Source/WebCore:
Calls to clear the text positioning elements in RenderSVGText must be
protected with a FontCachePurgeProtector so that fonts are not removed
before the SVG metrics are rebuilt. The protection must cover both the
cache clearing and the reconstruction calls.
Patch fixes existing tests.
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::subtreeChildWasAdded):
(WebCore::RenderSVGText::subtreeChildWasRemoved):
(WebCore::RenderSVGText::subtreeTextDidChange):
(WebCore::RenderSVGText::removeChild):
LayoutTests:
* platform/chromium/test_expectations.txt: Removing expectation for acid3 test.
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (117789 => 117790)
--- trunk/LayoutTests/ChangeLog 2012-05-21 16:08:25 UTC (rev 117789)
+++ trunk/LayoutTests/ChangeLog 2012-05-21 16:12:10 UTC (rev 117790)
@@ -1,3 +1,12 @@
+2012-05-21 Stephen Chenney <schen...@chromium.org>
+
+ [Chromium] REGRESSION: Assertion failure on svg/custom/acid3-test-77.html
+ https://bugs.webkit.org/show_bug.cgi?id=86715
+
+ Reviewed by Nikolas Zimmermann.
+
+ * platform/chromium/test_expectations.txt: Removing expectation for acid3 test.
+
2012-05-21 Ilya Tikhonovsky <loi...@chromium.org>
Web Inspector: switch buildDominatedNodes function to front-end calculated _dominatorsTree
Modified: trunk/LayoutTests/platform/chromium/test_expectations.txt (117789 => 117790)
--- trunk/LayoutTests/platform/chromium/test_expectations.txt 2012-05-21 16:08:25 UTC (rev 117789)
+++ trunk/LayoutTests/platform/chromium/test_expectations.txt 2012-05-21 16:12:10 UTC (rev 117790)
@@ -3747,8 +3747,6 @@
BUGWK86683 WIN LINUX DEBUG SLOW : inspector/profiler/heap-snapshot-summary-show-ranges.html = TEXT
-BUGWK86715 DEBUG : svg/custom/acid3-test-77.html = CRASH PASS
-
BUGWK86907 WIN : http/tests/inspector/compiler-script-mapping.html = PASS TEXT
BUGWK86908 WIN : http/tests/security/cross-frame-access-put.html = PASS TEXT
Modified: trunk/Source/WebCore/ChangeLog (117789 => 117790)
--- trunk/Source/WebCore/ChangeLog 2012-05-21 16:08:25 UTC (rev 117789)
+++ trunk/Source/WebCore/ChangeLog 2012-05-21 16:12:10 UTC (rev 117790)
@@ -1,5 +1,25 @@
2012-05-21 Stephen Chenney <schen...@chromium.org>
+ [Chromium] REGRESSION: Assertion failure on svg/custom/acid3-test-77.html
+ https://bugs.webkit.org/show_bug.cgi?id=86715
+
+ Reviewed by Nikolas Zimmermann.
+
+ Calls to clear the text positioning elements in RenderSVGText must be
+ protected with a FontCachePurgeProtector so that fonts are not removed
+ before the SVG metrics are rebuilt. The protection must cover both the
+ cache clearing and the reconstruction calls.
+
+ Patch fixes existing tests.
+
+ * rendering/svg/RenderSVGText.cpp:
+ (WebCore::RenderSVGText::subtreeChildWasAdded):
+ (WebCore::RenderSVGText::subtreeChildWasRemoved):
+ (WebCore::RenderSVGText::subtreeTextDidChange):
+ (WebCore::RenderSVGText::removeChild):
+
+2012-05-21 Stephen Chenney <schen...@chromium.org>
+
SVGTextRunRenderingContext can return null font, calling code asserts not null
https://bugs.webkit.org/show_bug.cgi?id=86738
Modified: trunk/Source/WebCore/rendering/svg/RenderSVGText.cpp (117789 => 117790)
--- trunk/Source/WebCore/rendering/svg/RenderSVGText.cpp 2012-05-21 16:08:25 UTC (rev 117789)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGText.cpp 2012-05-21 16:12:10 UTC (rev 117790)
@@ -171,6 +171,9 @@
if (!shouldHandleSubtreeMutations() || documentBeingDestroyed())
return;
+ // Always protect the cache before clearing text positioning elements when the cache will subsequently be rebuilt.
+ FontCachePurgePreventer fontCachePurgePreventer;
+
// The positioning elements cache doesn't include the new 'child' yet. Clear the
// cache, as the next buildLayoutAttributesForTextRenderer() call rebuilds it.
m_layoutAttributesBuilder.clearTextPositioningElements();
@@ -306,6 +309,9 @@
return;
}
+ // Always protect the cache before clearing text positioning elements when the cache will subsequently be rebuilt.
+ FontCachePurgePreventer fontCachePurgePreventer;
+
// The positioning elements cache depends on the size of each text renderer in the
// subtree. If this changes, clear the cache. It's going to be rebuilt below.
m_layoutAttributesBuilder.clearTextPositioningElements();
@@ -526,6 +532,7 @@
RenderSVGInlineText* text = toRenderSVGInlineText(child);
Vector<SVGTextLayoutAttributes*, 2> affectedAttributes;
+ FontCachePurgePreventer fontCachePurgePreventer;
subtreeChildWillBeRemoved(text, affectedAttributes);
RenderSVGBlock::removeChild(child);
subtreeChildWasRemoved(affectedAttributes);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes