Changeset 292043 in webkit
- Timestamp:
- Mar 29, 2022 10:55:21 AM (2 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r292042 r292043 1 2022-03-29 Alan Bujtas <zalan@apple.com> 2 3 RenderText::width should call FontCascade directly on single space characters 4 https://bugs.webkit.org/show_bug.cgi?id=238484 5 6 Reviewed by Antti Koivisto. 7 8 Some "text and inline box" heavy pages (e.g. wikipedia) have the pattern of leaving one space 9 gap between adjacent inline boxes (<span>some content</span> <span>and some more</span>). 10 This patch ensures that we don't construct redundant TextRun objects (and measure their widths) 11 for such simple cases when applicable. 12 13 * rendering/RenderText.cpp: 14 (WebCore::RenderText::width const): 15 1 16 2022-03-29 Devin Rousso <drousso@apple.com> 2 17 -
trunk/Source/WebCore/rendering/RenderText.cpp
r291992 r292043 1561 1561 return *width; 1562 1562 1563 if (length == 1 && (characterAt(from) == space)) 1564 return canUseSimplifiedTextMeasuring() ? fontCascade.primaryFont().spaceWidth() : fontCascade.widthOfSpaceString(); 1565 1563 1566 float width = 0.f; 1564 1567 if (&fontCascade == &style.fontCascade()) {
Note: See TracChangeset
for help on using the changeset viewer.