Bug 309822
| Summary: | Remove duplicate checks in CSSFontFaceSet::fontFace | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Brent Fulgham <bfulgham> |
| Component: | New Bugs | Assignee: | Brent Fulgham <bfulgham> |
| Status: | NEW | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | 120499 | ||
| Bug Blocks: | |||
Brent Fulgham
The changes in Bug 120499 brought WebKit's font selection logic in alignment with the web standard. This allows us to make two further improvements:
1. We no longer need the `isItalic` pre-filter lines that were used when considering candidate font faces. These filters were a shortcut that unconditionally excluded italic-only faces whenever the request was non-italic. But eliminatedCapabilities() already handles this correctly via the full CSS 5.2.6 matching algorithm, so this is now redundant.
2. We can make the search for "best match" font work in linear time (rather than O(n log n) time) by precomputing the width/style/weight distances for each candidate face once, then sort the resulting values instead of repeated redundant calls in each comparison.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/172401655>
Brent Fulgham
Pull request: https://github.com/WebKit/WebKit/pull/60497
Brent Fulgham
The worksets involved in font matching are too small to benefit from Idea #2, so I'll revise the patch to remove that.