[webkit-changes] [WebKit/WebKit] 2a3796: [LFC][IFC] Use the line's margin box rect when pro...

Alan Baradlay noreply at github.com
Fri Oct 14 14:37:43 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2a37961edb868f532fe70f3f78ce28485fd32a80
      https://github.com/WebKit/WebKit/commit/2a37961edb868f532fe70f3f78ce28485fd32a80
  Author: Alan Bujtas <zalan at apple.com>
  Date:   2022-10-14 (Fri, 14 Oct 2022)

  Changed paths:
    A LayoutTests/fast/inline/negative-text-indext-with-float-expected.html
    A LayoutTests/fast/inline/negative-text-indext-with-float.html
    M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp

  Log Message:
  -----------
  [LFC][IFC] Use the line's margin box rect when probing for intrusive floats
https://bugs.webkit.org/show_bug.cgi?id=246527

Reviewed by Antti Koivisto.

text-indent acts as (start)margin on the line (per spec). When checking if there's any intrusive float on the current line, we should
check against the line's _margin_ box (may sound a bit odd as we don't really have a corresponding _border_ box on the line).
This patch converts the line rect to margin rect before calling floatConstraints() and covert the result back to (non-margin)line rect.
This is mostly relevant with negative tex-indent values where the inline content may visually overlap the float box (where the margin box is not).

* LayoutTests/fast/block/float/tall-line-vs-intrusive-floats-quirks-mode-expected.html: Added.
* LayoutTests/fast/block/float/tall-line-vs-intrusive-floats-quirks-mode.html: Added.
* LayoutTests/fast/block/out-of-flow-becomes-float-crash-expected.txt: Added.
* LayoutTests/fast/block/out-of-flow-becomes-float-crash.html: Added.
* LayoutTests/fast/inline/negative-text-indext-with-float-expected.html: Added.
* LayoutTests/fast/inline/negative-text-indext-with-float.html: Added.
* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::floatConstraints const):
(WebCore::Layout::LineBuilder::lineRectForCandidateInlineContent const):

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




More information about the webkit-changes mailing list