| Summary: | Add a fast path for subdivideAndResolveStyle() | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> | ||||||
| Component: | Layout and Rendering | Assignee: | Simon Fraser (smfr) <simon.fraser> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | bfulgham, changseok, dbates, esprehn+autocc, ews-watchlist, glenn, kondapallykalyan, mmaxfield, pdr, simon.fraser, webkit-bug-importer, zalan | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Attachments: |
|
||||||||
|
Description
Simon Fraser (smfr)
2021-03-18 14:35:57 PDT
Created attachment 423661 [details]
Patch
Comment on attachment 423661 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=423661&action=review > Source/WebCore/ChangeLog:9 > + Most of the time, InlineTextBox::paint() will be painting text runs with no marked text, > + so optimize subdivideAndResolveStyle() for this case. Is the motivation cleanliness or performance? If performance, would be good to validate with a perf test. > Source/WebCore/rendering/MarkedTextStyle.cpp:157 > + if (textsToCoalesce.size() < 2) nit: I think 1 is a more obvious sentinel than 2, so I would say "<= 1" instead of "< 2". Created attachment 423665 [details]
Patch
Looks good Comment on attachment 423665 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=423665&action=review > Source/WebCore/rendering/MarkedTextStyle.cpp:123 > + Vector<StyledMarkedText> frontmostMarkedTexts; Consider moving this back to avoid allocating inline storage. Committed r274700: <https://commits.webkit.org/r274700> All reviewed patches have been landed. Closing bug and clearing flags on attachment 423665 [details]. |