зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1446614 - textPath should not render if the path it uses is invalid r=dholbert
This commit is contained in:
Родитель
2ed97dae93
Коммит
fd2cceeb03
|
@ -475,6 +475,7 @@ fuzzy(16,3) == text-stroke-scaling-02b.html text-stroke-scaling-02-ref.html # an
|
|||
fuzzy-if(skiaContent,1,610) == textPath-03.svg pass.svg
|
||||
== textPath-04.svg pass.svg
|
||||
== textPath-05.html pass.svg
|
||||
== textPath-06.svg pass.svg
|
||||
== textPath-line-01.svg textPath-line-01-ref.svg
|
||||
|
||||
== text-white-space-01.svg text-white-space-01-ref.svg
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<defs>
|
||||
<path id="path" d="" />
|
||||
</defs>
|
||||
|
||||
<rect fill="lime" width="100%" height="100%"/>
|
||||
|
||||
<text y="50" font-size="50" fill="red" >
|
||||
<textPath path="">Empty paths should be invisible</textPath>
|
||||
</text>
|
||||
|
||||
<text y="100" font-size="50" fill="red" >
|
||||
<textPath href="#path">Empty paths should be invisible</textPath>
|
||||
</text>
|
||||
|
||||
<text y="150" font-size="50" fill="red" >
|
||||
<textPath>No path at all should be invisible too</textPath>
|
||||
</text>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 508 B |
|
@ -5083,7 +5083,12 @@ SVGTextFrame::DoTextPathLayout()
|
|||
// Get the path itself.
|
||||
RefPtr<Path> path = GetTextPath(textPathFrame);
|
||||
if (!path) {
|
||||
uint32_t start = it.TextElementCharIndex();
|
||||
it.AdvancePastCurrentTextPathFrame();
|
||||
uint32_t end = it.TextElementCharIndex();
|
||||
for (uint32_t i = start; i < end; i++) {
|
||||
mPositions[i].mHidden = true;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче