Commit 5c38a23
SVG textLength not working correctly
SVG textLength not working correctly
https://bugs.webkit.org/show_bug.cgi?id=171805
Reviewed by Simon Fraser.
Merge - https://chromium.googlesource.com/chromium/src/+/308e792b8d4648ba4e298c80faca80bc780b5735 &
https://chromium.googlesource.com/chromium/src/+/1cc74004b24c8a79dcee523e913c1d929c1167da
There should be no advance adjustment after the last character (really,
"typographic unit"), so divide the excess space by the character count
minus one - i.e the number of gaps - rather than the character count.
Further, extend it to adjusting the 'textPath', 'textLength' computation in the same way.
* Source/WebCore/rendering/svg/SVGTextChunk.cpp:
(SVGTextChunk::layout): Update to account for last character in adjustment
* Source/WebCore/rendering/svg/SVGTextLayoutEngine.cpp:
(SVGTextLayoutEngine::beginTextPathLayout): Ditto
* LayoutTests/imported/w3c/web-platform-tests/svg/text/scripted/texpath-textLength-text-anchor-001.tentative-expected.txt: Rebaselined
* LayoutTests/platform/gtk/imported/w3c/web-platform-tests/svg/import/text-text-01-b-manual-expected.txt: Ditto
* LayoutTests/platform/gtk/svg/batik/text/textLayout-expected.txt: Ditto
* LayoutTests/platform/gtk/svg/batik/text/textLayout-expected.png: Ditto
* LayoutTests/platform/gtk/svg/batik/text/textLength-expected.txt: Ditto
* LayoutTests/platform/gtk/svg/batik/text/textLength-expected.png: Ditto
* LayoutTests/platform/gtk/svg/batik/text/textOnPathSpaces-expected.png: Ditto
* LayoutTests/platform/gtk/svg/batik/text/textOnPathSpaces-expected.txt: Ditto
* LayoutTests/platform/gtk/svg/text/select-textLength-spacing-squeeze-1-expected.txt: Ditto
* LayoutTests/platform/gtk/svg/text/select-textLength-spacing-squeeze-1-expected.png: Ditto
* LayoutTests/platform/gtk/svg/text/select-textLength-spacing-squeeze-2-expected.txt: Ditto
* LayoutTests/platform/gtk/svg/text/select-textLength-spacing-squeeze-2-expected.png: Ditto
* LayoutTests/platform/gtk/svg/text/select-textLength-spacing-squeeze-4-expected.txt: Ditto
* LayoutTests/platform/gtk/svg/text/select-textLength-spacing-squeeze-4-expected.png: Ditto
* LayoutTests/platform/gtk/svg/text/select-textLength-spacing-stretch-1-expected.txt: Ditto
* LayoutTests/platform/gtk/svg/text/select-textLength-spacing-stretch-1-expected.png: Ditto
* LayoutTests/platform/gtk/svg/text/select-textLength-spacing-stretch-2-expected.txt: Ditto
* LayoutTests/platform/gtk/svg/text/select-textLength-spacing-stretch-2-expected.png: Ditto
* LayoutTests/platform/gtk/svg/text/select-textLength-spacing-stretch-3-expected.txt: Ditto
* LayoutTests/platform/gtk/svg/text/select-textLength-spacing-stretch-3-expected.png: Ditto
* LayoutTests/platform/gtk/svg/text/select-textLength-spacing-stretch-4-expected.txt: Ditto
* LayoutTests/platform/gtk/svg/text/select-textLength-spacing-stretch-4-expected.png: Ditto
* LayoutTests/platform/gtk/svg/text/text-text-01-b-expected.png: Ditto
* LayoutTests/platform/gtk/svg/text/text-text-01-b-expected.txt: Ditto
* LayoutTests/platform/gtk/svg/W3C-SVG-1.1/text-text-01-b-expected.png: Ditto
* LayoutTests/platform/gtk/svg/W3C-SVG-1.1/text-text-01-b-expected.txt: Ditto
* LayoutTests/platform/mac/svg/batik/text/textLayout-expected.png: Ditto
* LayoutTests/platform/mac/svg/batik/text/textLayout-expected.txt: Ditto
* LayoutTests/platform/mac/svg/batik/text/texOnPathSpaces-expected.txt: Ditto
* LayoutTests/platform/mac/svg/batik/text/texOnPathSpaces-expected.png: Ditto
* LayoutTests/platform/mac/svg/text/select-textLength-spacing-squeeze-1-expected.png: Ditto
* LayoutTests/platform/mac/svg/text/select-textLength-spacing-squeeze-1-expected.txt: Ditto
* LayoutTests/platform/mac/svg/text/select-textLength-spacing-squeeze-2-expected.png: Ditto
* LayoutTests/platform/mac/svg/text/select-textLength-spacing-squeeze-2-expected.txt: Ditto
* LayoutTests/platform/mac/svg/text/select-textLength-spacing-squeeze-3-expected.png: Ditto
* LayoutTests/platform/mac/svg/text/select-textLength-spacing-squeeze-3-expected.txt: Ditto
* LayoutTests/platform/mac/svg/text/select-textLength-spacing-squeeze-4-expected.png: Ditto
* LayoutTests/platform/mac/svg/text/select-textLength-spacing-squeeze-4-expected.txt: Ditto
* LayoutTests/platform/mac/svg/text/select-textLength-spacing-stretch-1-expected.png: Ditto
* LayoutTests/platform/mac/svg/text/select-textLength-spacing-stretch-1-expected.txt: Ditto
* LayoutTests/platform/mac/svg/text/select-textLength-spacing-stretch-2-expected.png: Ditto
* LayoutTests/platform/mac/svg/text/select-textLength-spacing-stretch-2-expected.txt: Ditto
* LayoutTests/platform/mac/svg/text/select-textLength-spacing-stretch-3-expected.png: Ditto
* LayoutTests/platform/mac/svg/text/select-textLength-spacing-stretch-3-expected.txt: Ditto
* LayoutTests/platform/mac/svg/text/select-textLength-spacing-stretch-4-expected.png: Ditto
* LayoutTests/platform/mac/svg/text/select-textLength-spacing-stretch-4-expected.txt: Ditto
* LayoutTests/platform/mac/svg/text/text-text-01-b-expected.txt: Ditto
* LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-text-01-b-expected.png: Ditto
* LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-text-01-b-expected.png: Ditto
* LayoutTests/platform/ios/svg/batik/text/textLayout-expected.txt: Ditto
* LayoutTests/platform/ios/svg/batik/text/textLength-expected.txt: Ditto
* LayoutTests/platform/ios/svg/batik/text/textOnPathSpaces-expected.txt: Ditto
* LayoutTests/platform/ios/svg/text/text-text-01-b-expected.txt: Ditto
* LayoutTests/platform/ios/svg/W3C-SVG-1.1/text-text-01-b-expected.txt: Ditto
* LayoutTests/platform/ios-simulator/imported/w3c/web-platform-tests/svg/import/text-text-01-b-manual-expected.txt: Ditto
* LayoutTests/platform/mac/imported/w3c/web-platform-tests/svg/import/text-text-01-b-manual-expected.txt: Ditto
Canonical link: https://commits.webkit.org/258921@main1 parent 6eceb6d commit 5c38a23
File tree
59 files changed
+1391
-1389
lines changed- LayoutTests
- imported/w3c/web-platform-tests/svg/text/scripted
- platform
- gtk
- imported/w3c/web-platform-tests/svg/import
- svg
- W3C-SVG-1.1
- batik/text
- text
- ios-simulator/imported/w3c/web-platform-tests/svg/import
- ios/svg
- W3C-SVG-1.1
- batik/text
- text
- mac
- imported/w3c/web-platform-tests/svg/import
- svg
- W3C-SVG-1.1
- batik/text
- text
- Source/WebCore/rendering/svg
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
59 files changed
+1391
-1389
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
Lines changed: 82 additions & 82 deletions
Large diffs are not rendered by default.
Lines changed: 82 additions & 82 deletions
Large diffs are not rendered by default.
Loading
Lines changed: 74 additions & 74 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | | - | |
54 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
55 | 55 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
195 | | - | |
196 | | - | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
197 | 197 | | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
| |||
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
93 | 93 | | |
94 | | - | |
95 | | - | |
| 94 | + | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| |||
0 commit comments