[webkit-changes] [WebKit/WebKit] a5ba02: overflow:clip fails when intrusive float is present

Alan Baradlay noreply at github.com
Mon May 15 21:59:24 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a5ba024da4f42c80c7e5bdc79dff6e39abd97ab5
      https://github.com/WebKit/WebKit/commit/a5ba024da4f42c80c7e5bdc79dff6e39abd97ab5
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2023-05-15 (Mon, 15 May 2023)

  Changed paths:
    A LayoutTests/fast/block/overflow-clip-with-instrusive-float-expected.html
    A LayoutTests/fast/block/overflow-clip-with-instrusive-float.html
    M Source/WebCore/rendering/FloatingObjects.cpp
    M Source/WebCore/rendering/FloatingObjects.h
    M Source/WebCore/rendering/RenderBlockFlow.cpp

  Log Message:
  -----------
  overflow:clip fails when intrusive float is present
https://bugs.webkit.org/show_bug.cgi?id=256410
<rdar://problem/109293228>

Reviewed by Simon Fraser.

Intrusive (overhanging) float painting is propagated to the outermost block where the float stops being intrusive.
e.g.
<div outer>
  <div containing_block>
    <div tall_float></div>
  </div>
</div>

"tall_float" gets painted by "outer" (see RenderBlockFlow::paintFloats).

The "painting flag" gets propagated in RenderBlockFlow::addOverhangingFloats as we create copies of the original FloatingObject
for each block where the float overhangs (and only one (the outermost) of these copies has the flag "shouldPaint" turned on).

In this patch we stop propagating this "shouldPaint" flag when we see a ancestor block with overflow clip.

* LayoutTests/fast/block/overflow-clip-with-instrusive-float-expected.html: Added.
* LayoutTests/fast/block/overflow-clip-with-instrusive-float.html: Added.
* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::addOverhangingFloats):

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




More information about the webkit-changes mailing list