Commit 0190f2cc authored by mitz@apple.com's avatar mitz@apple.com

<rdar://problem/10178576> REGRESSION (r95391): Crash in -[WebCascadeList...

<rdar://problem/10178576> REGRESSION (r95391): Crash in -[WebCascadeList objectAtIndex:] when a font-family list contains missing fonts
https://bugs.webkit.org/show_bug.cgi?id=68737

Reviewed by Darin Adler.

Source/WebCore: 

Test: fast/text/combining-character-sequence-fallback-crash.html

* platform/graphics/mac/ComplexTextControllerCoreText.mm:
(-[WebCascadeList initWithFont:WebCore::character:]): Changed to intialize _count to the exact
number of FontData instances in the fallback list rather than the number of font families in the
font description.

LayoutTests: 

* fast/text/combining-character-sequence-fallback-crash-expected.txt: Added.
* fast/text/combining-character-sequence-fallback-crash.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95874 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent f77f1222
2011-09-23 Dan Bernstein <mitz@apple.com>
<rdar://problem/10178576> REGRESSION (r95391): Crash in -[WebCascadeList objectAtIndex:] when a font-family list contains missing fonts
https://bugs.webkit.org/show_bug.cgi?id=68737
Reviewed by Darin Adler.
* fast/text/combining-character-sequence-fallback-crash-expected.txt: Added.
* fast/text/combining-character-sequence-fallback-crash.html: Added.
2011-09-23 David Reveman <reveman@chromium.org>
[Chromium] Fix CSS 3D corner anti-aliasing.
Test for https://bugs.webkit.org/show_bug.cgi?id=68737 REGRESSION (r95391): Crash in -[WebCascadeList objectAtIndex:] when a font-family list contains missing fonts.
The test passes if it does not cause a crash.
î and i̿
<p>
Test for <i><a href="https://bugs.webkit.org/show_bug.cgi?id=68737">https://bugs.webkit.org/show_bug.cgi?id=68737</a>
REGRESSION (r95391): Crash in -[WebCascadeList objectAtIndex:] when a font-family list contains missing fonts</i>.
</p>
<p>
The test passes if it does not cause a crash.
</p>
<script>
if (window.layoutTestController)
layoutTestController.dumpAsText();
</script>
<div style="font-family: verdana, a-font-you-do-not-have;">
i&#x0302; and i&#x033f;
</div>
2011-09-23 Dan Bernstein <mitz@apple.com>
<rdar://problem/10178576> REGRESSION (r95391): Crash in -[WebCascadeList objectAtIndex:] when a font-family list contains missing fonts
https://bugs.webkit.org/show_bug.cgi?id=68737
Reviewed by Darin Adler.
Test: fast/text/combining-character-sequence-fallback-crash.html
* platform/graphics/mac/ComplexTextControllerCoreText.mm:
(-[WebCascadeList initWithFont:WebCore::character:]): Changed to intialize _count to the exact
number of FontData instances in the fallback list rather than the number of font families in the
font description.
2011-09-23 David Reveman <reveman@chromium.org>
[Chromium] Fix CSS 3D corner anti-aliasing.
......@@ -70,7 +70,9 @@ extern const CFStringRef kCTTypesetterOptionForcedEmbeddingLevel;
_font = font;
_character = character;
for (const WebCore::FontFamily* family = &font->family(); family; family = family->next())
// By the time a WebCascadeList is used, the Font has already been asked to realize all of its
// FontData, so this loop does not hit the FontCache.
while (_font->fontDataAt(_count))
_count++;
return self;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment