Bug 212944 - ComplexTextController: Use std::sort to calculate m_runIndices
Summary: ComplexTextController: Use std::sort to calculate m_runIndices
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Fujii Hironori
URL:
Keywords: InRadar
Depends on:
Blocks: 212670
  Show dependency treegraph
 
Reported: 2020-06-08 18:05 PDT by Fujii Hironori
Modified: 2020-06-09 12:40 PDT (History)
2 users (show)

See Also:


Attachments
Patch (3.51 KB, patch)
2020-06-08 18:24 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fujii Hironori 2020-06-08 18:05:34 PDT
ComplexTextController: Use std::sort to calculate m_runIndices
Comment 1 Fujii Hironori 2020-06-08 18:24:19 PDT
Created attachment 401405 [details]
Patch
Comment 2 Myles C. Maxfield 2020-06-09 12:13:05 PDT
Comment on attachment 401405 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=401405&action=review

This is probably okay. One perhaps unintended consequence is that these values will no longer be computed lazily. However, most of the time, we iterate through the entire ComplexTextController, so the laziness doesn't buy us much in the common case. So I think this is fine.

> Source/WebCore/platform/graphics/ComplexTextController.cpp:156
> +            m_runIndices.uncheckedAppend(length - i - 1);

This is kind of a neat idea. I like it.
Comment 3 EWS 2020-06-09 12:39:50 PDT
Committed r262803: <https://trac.webkit.org/changeset/262803>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 401405 [details].
Comment 4 Radar WebKit Bug Importer 2020-06-09 12:40:18 PDT
<rdar://problem/64175319>