Bug 118818
Summary: | Account for zoom when computing SVG font size | ||
---|---|---|---|
Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> |
Component: | SVG | Assignee: | Fujii Hironori <fujii.hironori> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | ahmad.saleem792, fujii.hironori, krit, pdr, sabouhallawa, simon.fraser, webkit-bug-importer, zimmermann |
Priority: | P2 | Keywords: | BlinkMergeCandidate, InRadar, LayerBasedSVGEngine |
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
URL: | https://jsfiddle.net/mEZq8/5/ | ||
See Also: |
https://bugs.webkit.org/show_bug.cgi?id=199236 https://bugs.webkit.org/show_bug.cgi?id=259435 |
Ryosuke Niwa
Consider merging https://chromium.googlesource.com/chromium/blink/+/5624c6e475af92d541edc8a3394602e320d00323
Previously, text that was zoomed appeared larger than geometry under
the same zoom value. This was caused by two bugs:
1) When setting the computed font size, we incorrectly referenced the
computedTextSize instead of the specified size.
2) Text with GeometricPrecision did not set a computed size but
instead relied on the text size being correct.
This change addresses both of these issues and adds a test to prove correctness.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Simon Fraser (smfr)
https://github.com/WebKit/WebKit/pull/4011
Ahmad Saleem
There is an issue in this patch as it is and cause following regression:
https://src.chromium.org/viewvc/blink?view=revision&revision=180995
Ahmad Saleem
Just to document my PR attempt:
https://github.com/WebKit/WebKit/pull/4011
____________
1) ScalingFactor can go below '1' so restricting it at "1" is not ideal. Someone need to think about on how to add this to the code and manage it.
2) iOS-wk2 has "text-size-adjst" in svg.css as "UA" stylesheet, so "font-small-enlarged-minimum-larger-expected.svg" does not work and have to add "platform" specific expectations.
3) font-small-enlarged-minimum-larger-expected.svg has "Script" in it, while it can be hardcoded to "80" to work perfectly fine except (2).
4) Due to LBSE work, GeometricPrecision work is now handled differently.
___________
Further, this patch had issue, which was resolved further in Comment 02 patch, so when merging, you had to account for both.
I am waiting on final response but if I am not able to tackle it. I will close my PR 4011 and then leave it to someone else to finish it.
Just wanted to summarise the work here.
Ahmad Saleem
It is reproducible in LBSE only for 'purple' container, where the text 'A' does not go out of 'yellow' constraint but 'purple' container does get bigger.
Adding tag to flag following issue.
Ahmad Saleem
Might have to add this into mix: https://src.chromium.org/viewvc/blink?view=revision&revision=154004
Fujii Hironori
*** Bug 276984 has been marked as a duplicate of this bug. ***
Fujii Hironori
Pull request: https://github.com/WebKit/WebKit/pull/31452
EWS
Committed 281919@main (6639b68a68a6): <https://commits.webkit.org/281919@main>
Reviewed commits have been landed. Closing PR #31452 and removing active labels.
Radar WebKit Bug Importer
<rdar://problem/133331984>