Try to avoid applying per-glyph Spacing adjustments if they are known to all be zero
Categories
(Core :: Layout: Text and Fonts, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox146 | --- | fixed |
People
(Reporter: jfkthame, Assigned: jfkthame)
References
Details
(Whiteboard: [jp-mvp])
Attachments
(1 file)
If the TEXT_ENABLE_SPACING flag is set, but we are able to determine that all the values we computed in the spacing array turned out to be zero, we may be able to optimize measurement/drawing slightly by skipping the application of these values.
This is particularly relevant when the text-autospace property is enabled, as this will force spacing values to be computed for many text frames that previously were able to omit the TEXT_ENABLE_SPACING flag and skip all this processing.
| Assignee | ||
Comment 1•3 months ago
|
||
No behavior change is expected; this is just skipping some work
when we know it would be a no-op.
Updated•3 months ago
|
| Assignee | ||
Comment 2•3 months ago
|
||
Not sure if this will visibly move the needle on any of the reported text-autospace perf regressions (e.g. bug 1991421), but it seems worth doing in general.
Updated•3 months ago
|
Comment 4•3 months ago
|
||
Reverted this because it was causing assertion failures in nsTextFrame.cpp.
- Revert link
- Push with failures
- Failure Log
- Failure line: Assertion failure: aISize >= 0 (unexpected negative hangable advance), at /builds/worker/checkouts/gecko/layout/generic/nsTextFrame.cpp:X
Also, please check these wpt failures.
| Assignee | ||
Comment 5•3 months ago
|
||
The failures were from bug 1994197, which landed in the same push; this should be fine by itself, so re-landing.
Comment 7•3 months ago
|
||
| bugherder | ||
Updated•2 months ago
|
Description
•