Bug 299816
| Summary: | [CSS ZOOM] Zoom evaluation-time flag causes double zoom on border-width with em units | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Taher <taher_ali> |
| Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | koivisto, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Taher
After PR #51076 is merged, we need to investigate and fix failures in tests such as:
LayoutTests/fast/sub-pixel/zoomed-em-border.html
The flag introduced in the PR #51076 enables applying zoom at evaluation time instead of style-build time. The goal is to move zoom application from style building into layout/rendering, and the feature flag is meant to prevent zoom from being applied during style building to avoid double zooming.
However, what currently happens is:
- The em unit on border-width is being resolved against the computed font size rather than the specified size
- The computed font size already includes the zoom factor
- When zoom is applied again during evaluation time to the border-width, it causes double zooming
To address this, I modified font size computation at style-build time in computedFontSizeFromSpecifiedSize. I skipped applying zoom if the evaluation-time flag was enabled.
This fixes the double zoom issue for border-width with font-related units but a new problem gets introduced: text itself is no longer zoom-induced as expected. This breaks assumptions in other parts of the engine where the computed font size is expected to already include zoom.
Could this change also break other assumptions that rely on zoomed computed font sizes?
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/161590209>
Vitor Roriz
Pull request: https://github.com/WebKit/WebKit/pull/52094
Taher
investigate: LayoutTests/svg/zoom/page/zoom-replaced-intrinsic-ratio-001.htm
EWS
Committed 301757@main (4082642c7f1c): <https://commits.webkit.org/301757@main>
Reviewed commits have been landed. Closing PR #52094 and removing active labels.