commit | 8bbe4f276630745041c421453568353db65b9e7e | [log] [tgz] |
---|---|---|
author | Peng Zhou <zhoupeng.1996@bytedance.com> | Fri Nov 18 06:02:28 2022 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Nov 18 06:02:28 2022 |
tree | a1aa62dfa04b73bed64f089b15a7644933fda41c | |
parent | 305a1f6083f6b253e7a5b244b52d5aeb0f34ad3a [diff] |
NGLineBreaker::ShapeText re-shape the specified range defined by `start` to `end` of `NGInlineItem` Before this patch, if some custom fonts that render a line of extremely long texts, it will lead to jank. NGLineBreaker::ShapeText re-shape the specified range of `NGInlineItem`, but when `items_data_.segments` is nullptr will re-shape the whole segment, not defined by `start` to `end`. If rendered extremely long texts will be split into n lines, the whole segment will be re-shaped n times. When `font-family` has m custom fonts, FontFallbackIterator::Next will try to traverse the segment to find FontDataForRangeSet. So the whole segment will be traversed m * n times. With this patch, NGLineBreaker::ShapeText re-shape the specified range defined by `start` to `end` whether items_data_.segments is nullptr or not. Bug: 1385798 Change-Id: I7baff10a5fd5a2156c6a3f5eec86dc025d939da7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4033811 Reviewed-by: Koji Ishii <kojii@chromium.org> Commit-Queue: Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/main@{#1073227}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.