[webkit-changes] [WebKit/WebKit] 6b7ffb: Text disappears due to unknown max/min width after...

Alan Baradlay noreply at github.com
Sun Mar 3 09:46:04 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6b7ffb51bcb32032fbf586a3d2aa90c3721c5618
      https://github.com/WebKit/WebKit/commit/6b7ffb51bcb32032fbf586a3d2aa90c3721c5618
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2024-03-03 (Sun, 03 Mar 2024)

  Changed paths:
    A LayoutTests/fast/inline/preferred-width-computation-after-codepath-change-expected.html
    A LayoutTests/fast/inline/preferred-width-computation-after-codepath-change.html
    M Source/WebCore/rendering/RenderText.cpp

  Log Message:
  -----------
  Text disappears due to unknown max/min width after style change
https://bugs.webkit.org/show_bug.cgi?id=270343
<rdar://problem/123913666>

Reviewed by Antti Koivisto.

When inline content preferred width computation changes from IFC and legacy, we have to make sure
we treat the legacy state as if preferred width was dirty (i.e. not computed yet).
Both RenderText::minLogicalWidth and RenderText::maxLogicalWidth() already check against m_minWidth/m_maxWidth in addition to the preferred width flag.

(Alternatively we could set the preferred width flag to dirty when calling RenderText::resetMinMaxWidth but
that could have unintended side effects and this is temporary anyway until after we switch over to IFC only)

* LayoutTests/fast/inline/preferred-width-computation-after-codepath-change-expected.html: Added.
* LayoutTests/fast/inline/preferred-width-computation-after-codepath-change.html: Added.
* Source/WebCore/rendering/RenderText.cpp:
(WebCore::RenderText::trimmedPreferredWidths):

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list