[webkit-changes] [WebKit/WebKit] 7d5263: Move RenderText::canUseSimplifiedTextMeasuring log...

Alan Baradlay noreply at github.com
Wed Feb 22 07:19:27 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7d5263e5eaa4349793a6f5e9bc028d69fdf7981f
      https://github.com/WebKit/WebKit/commit/7d5263e5eaa4349793a6f5e9bc028d69fdf7981f
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2023-02-22 (Wed, 22 Feb 2023)

  Changed paths:
    M LayoutTests/TestExpectations
    M LayoutTests/fast/text/font-promises-gc-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/fallback-remote-to-data-url-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-display/font-display-failure-fallback-expected.txt
    M Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp
    M Source/WebCore/layout/formattingContexts/inline/text/TextUtil.h
    M Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp
    M Source/WebCore/rendering/RenderText.cpp
    M Source/WebCore/rendering/RenderText.h

  Log Message:
  -----------
  Move RenderText::canUseSimplifiedTextMeasuring logic to TextUtil
https://bugs.webkit.org/show_bug.cgi?id=252593

Reviewed by Antti Koivisto.

We need to know whether the incoming text content can be measured using the simplified codepath, at the time when InlineTextBox object is being created for IFC.
We collect this information by consulting the associated RenderText. However currently m_canUseSimplifiedTextMeasuring gets initialized in styleDidChange (since it needs style information) which runs after BoxTree::insert (partial tree construction).

(some of the tests are sensitive to when we access glyph data the first time. see webkit.org/b/252668 -and this change delays such calls now that we call them when constructing the LFC layout tree as opposed to when constructing the RenderTree in the non-partial layout case).
* Source/WebCore/rendering/RenderText.cpp: Move canUseSimplifiedTextMeasuring() to TextUtil.
(WebCore::RenderText::RenderText):
(WebCore::RenderText::styleDidChange):
* Source/WebCore/rendering/RenderText.h:

Canonical link: https://commits.webkit.org/260675@main




More information about the webkit-changes mailing list