mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 12:25:53 +00:00
Bug 841174 - Handle ::first-letter on a combining mark in SVG text without crashing. r=jwatt
--HG-- extra : rebase_source : 9b0b38eccfe1f355996d8e4b4be5dcfc4e00b3be
This commit is contained in:
parent
aa30282f1e
commit
02273bad6d
7
layout/reftests/svg/text/pseudo-first-letter-2-ref.svg
Normal file
7
layout/reftests/svg/text/pseudo-first-letter-2-ref.svg
Normal file
@ -0,0 +1,7 @@
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="700" height="200">
|
||||
<text x="100" y="100" style="font: 16px sans-serif">́t</text>
|
||||
</svg>
|
After Width: | Height: | Size: 262 B |
10
layout/reftests/svg/text/pseudo-first-letter-2.svg
Normal file
10
layout/reftests/svg/text/pseudo-first-letter-2.svg
Normal file
@ -0,0 +1,10 @@
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="700" height="200">
|
||||
<style>
|
||||
text::first-letter { font-size: 32px }
|
||||
</style>
|
||||
<text x="100" y="100" style="font: 16px sans-serif">́t</text>
|
||||
</svg>
|
After Width: | Height: | Size: 326 B |
@ -134,6 +134,7 @@ HTTP(../..) == simple-transform-rotate.svg simple-transform-rotate-ref.svg
|
||||
== pseudo-first-line.svg pseudo-first-line-ref.svg
|
||||
== pseudo-first-line-2.svg pseudo-first-line-2-ref.svg
|
||||
== pseudo-first-letter.svg pseudo-first-letter-ref.svg
|
||||
== pseudo-first-letter-2.svg pseudo-first-letter-2-ref.svg
|
||||
== ignore-before-after.svg ignore-prop-ref.svg
|
||||
|
||||
# invalid child nodes
|
||||
|
@ -273,11 +273,7 @@ IsNonEmptyTextFrame(nsIFrame* aFrame)
|
||||
return false;
|
||||
}
|
||||
|
||||
nsIContent* content = textFrame->GetContent();
|
||||
NS_ASSERTION(content && content->IsNodeOfType(nsINode::eTEXT),
|
||||
"unexpected content type for nsTextFrame");
|
||||
|
||||
return static_cast<nsTextNode*>(content)->TextLength() != 0;
|
||||
return textFrame->GetContentLength() != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1440,6 +1436,9 @@ TextNodeCorrespondenceRecorder::TraverseAndRecord(nsIFrame* aFrame)
|
||||
* * what nsInlineFrame corresponding to a <textPath> element it is a
|
||||
* descendant of
|
||||
* * what computed dominant-baseline value applies to it
|
||||
*
|
||||
* Note that any text frames that are empty -- whose ContentLength() is 0 --
|
||||
* will be skipped over.
|
||||
*/
|
||||
class TextFrameIterator
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user