Bug 1689799 - Ensure we move to the next path when displaying multiple adjacent textPaths r=emilio

reverts part of bug 1678756

Differential Revision: https://phabricator.services.mozilla.com/D103558
This commit is contained in:
longsonr 2021-01-30 21:35:17 +00:00
Родитель 4d3481a3a2
Коммит c04dd7eafa
3 изменённых файлов: 16 добавлений и 1 удалений

Просмотреть файл

@ -119,6 +119,7 @@ random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == textpath-invalid-parent.
random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == textpath-multiline.svg textpath-multiline-ref.svg # Bug 1392106
random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == textpath-multiline-2.svg textpath-multiline-2-ref.svg # Bug 1392106
random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == textpath-after.svg textpath-after-ref.svg # Bug 1392106
random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == textpath-multiple.svg ../pass.svg # Bug 1392106
random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == textpath-after-anchor-end.svg textpath-after-anchor-end-ref.svg # Bug 1392106
random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == textpath-reset-position.svg textpath-reset-position-ref.svg # Bug 1392106
random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == textpath-inherit-position.svg textpath-inherit-position-ref.svg # Bug 1392106

Просмотреть файл

@ -0,0 +1,13 @@
<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%">
<defs>
<path id="path1" d="M100,100 H300"/>
<path id="path2" d="M200,100 H300"/>
</defs>
<rect width="100%" height="100%" fill="lime"/>
<g font-size="50px">
<text fill="red"><textPath href="#path1">Text</textPath> <textPath href="#path2">Text</textPath></text>
<text fill="lime" stroke="lime" stroke-width="4px"><textPath href="#path1">Text</textPath><textPath href="#path2">Text</textPath></text>
</g>
</svg>

После

Ширина:  |  Высота:  |  Размер: 506 B

Просмотреть файл

@ -4663,7 +4663,8 @@ void SVGTextFrame::DoTextPathLayout() {
bool skippedEndOfTextPath = false;
// Loop for each character in the text path.
while (!it.AtEnd() && it.TextPathFrame()) {
while (!it.AtEnd() && it.TextPathFrame() &&
it.TextPathFrame()->GetContent() == textPath) {
// The index of the cluster or ligature group's first character.
uint32_t i = it.TextElementCharIndex();