Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c05a8c24b9c124bc60229c4364206772d243adad
      
https://github.com/WebKit/WebKit/commit/c05a8c24b9c124bc60229c4364206772d243adad
  Author: Alan Baradlay <[email protected]>
  Date:   2024-05-31 (Fri, 31 May 2024)

  Changed paths:
    A LayoutTests/fast/inline/min-width-with-inline-boxes-expected.html
    A LayoutTests/fast/inline/min-width-with-inline-boxes.html
    M Source/WebCore/layout/formattingContexts/inline/AbstractLineBuilder.h
    M Source/WebCore/layout/formattingContexts/inline/IntrinsicWidthHandler.cpp
    M Source/WebCore/layout/formattingContexts/inline/IntrinsicWidthHandler.h

  Log Message:
  -----------
  REGRESSION(273633@main): Text is displayed outside of the view in DHL app
https://bugs.webkit.org/show_bug.cgi?id=274937
<rdar://128348427>

Reviewed by Antti Koivisto.

This change ensures that the correct container is passed in to LineBuilders as 
root so that they can consult the correct RenderStyle.

This fix is specific to range builders when we ask the TextOnlyLineBuilder to 
run layout only on a subset of inline items
e.g.
<div><span>run layout on this text content only</span></div>

Line builder only "sees" the text content. However we incorrectly pass in the 
IFC root (<div>) as the container for this text content.
This mostly works unless the actual container (has to be an inline box e.g. 
<span>) overrides certain styles related to line breaking.

* LayoutTests/fast/inline/min-width-with-inline-boxes-expected.html: Added.
* LayoutTests/fast/inline/min-width-with-inline-boxes.html: Added.
* Source/WebCore/layout/formattingContexts/inline/AbstractLineBuilder.h:
* Source/WebCore/layout/formattingContexts/inline/IntrinsicWidthHandler.cpp:
(WebCore::Layout::IntrinsicWidthHandler::IntrinsicWidthHandler):
(WebCore::Layout::IntrinsicWidthHandler::minimumContentSize):
(WebCore::Layout::IntrinsicWidthHandler::maximumContentSize):
(WebCore::Layout::IntrinsicWidthHandler::simplifiedMaximumWidth):
(WebCore::Layout::IntrinsicWidthHandler::formattingContextRoot const):
(WebCore::Layout::IntrinsicWidthHandler::lineBuilerRoot const):
(WebCore::Layout::IntrinsicWidthHandler::root const): Deleted.
* Source/WebCore/layout/formattingContexts/inline/IntrinsicWidthHandler.h:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to