<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[283893] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/283893">283893</a></dd>
<dt>Author</dt> <dd>antti@apple.com</dd>
<dt>Date</dt> <dd>2021-10-11 08:12:27 -0700 (Mon, 11 Oct 2021)</dd>
</dl>

<h3>Log Message</h3>
<pre>[LFC][Integration] paintFillLayerExtended should use inline iterator
https://bugs.webkit.org/show_bug.cgi?id=231502

Reviewed by Alan Bujtas.

Prepare for LFC inline box painting.

* layout/integration/InlineIteratorInlineBox.cpp:
(WebCore::InlineIterator::InlineBox::hasClosedLeftAndRightEdge const):

Add a shared helper.

The answer is computed here though this information is needed for layout too.
We should be able to consult layout to get it.

* layout/integration/InlineIteratorInlineBox.h:
* rendering/InlineBoxPainter.cpp:
(WebCore::clipRectForNinePieceImageStrip):
(WebCore::InlineBoxPainter::paintDecorations):
(WebCore::InlineBoxPainter::paintFillLayer):
(WebCore::InlineBoxPainter::paintBoxShadow):
* rendering/LegacyInlineBox.h:
* rendering/LegacyInlineFlowBox.cpp:
(WebCore::LegacyInlineFlowBox::boxShadowCanBeAppliedToBackground const): Deleted.

Move to the only call site as a lambda.

* rendering/LegacyInlineFlowBox.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintBoxDecorations):
(WebCore::RenderBox::paintBackground):
(WebCore::RenderBox::paintFillLayer):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::getBackgroundRoundedRect const):
(WebCore::RenderBoxModelObject::backgroundRoundedRectAdjustedForBleedAvoidance const):
(WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
(WebCore::RenderBoxModelObject::boxShadowShouldBeAppliedToBackground const):
* rendering/RenderBoxModelObject.h:
* rendering/RenderImage.cpp:
(WebCore::RenderImage::boxShadowShouldBeAppliedToBackground const):
* rendering/RenderImage.h:
* rendering/RenderTable.cpp:
(WebCore::RenderTable::paintBoxDecorations):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::boxShadowShouldBeAppliedToBackground const):
* rendering/RenderTableCell.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorelayoutintegrationInlineIteratorInlineBoxcpp">trunk/Source/WebCore/layout/integration/InlineIteratorInlineBox.cpp</a></li>
<li><a href="#trunkSourceWebCorelayoutintegrationInlineIteratorInlineBoxh">trunk/Source/WebCore/layout/integration/InlineIteratorInlineBox.h</a></li>
<li><a href="#trunkSourceWebCorerenderingInlineBoxPaintercpp">trunk/Source/WebCore/rendering/InlineBoxPainter.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingLegacyInlineBoxh">trunk/Source/WebCore/rendering/LegacyInlineBox.h</a></li>
<li><a href="#trunkSourceWebCorerenderingLegacyInlineFlowBoxcpp">trunk/Source/WebCore/rendering/LegacyInlineFlowBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingLegacyInlineFlowBoxh">trunk/Source/WebCore/rendering/LegacyInlineFlowBox.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxcpp">trunk/Source/WebCore/rendering/RenderBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxModelObjectcpp">trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxModelObjecth">trunk/Source/WebCore/rendering/RenderBoxModelObject.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderImagecpp">trunk/Source/WebCore/rendering/RenderImage.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderImageh">trunk/Source/WebCore/rendering/RenderImage.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderTablecpp">trunk/Source/WebCore/rendering/RenderTable.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderTableCellcpp">trunk/Source/WebCore/rendering/RenderTableCell.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderTableCellh">trunk/Source/WebCore/rendering/RenderTableCell.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (283892 => 283893)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2021-10-11 13:50:39 UTC (rev 283892)
+++ trunk/Source/WebCore/ChangeLog      2021-10-11 15:12:27 UTC (rev 283893)
</span><span class="lines">@@ -1,3 +1,53 @@
</span><ins>+2021-10-11  Antti Koivisto  <antti@apple.com>
+
+        [LFC][Integration] paintFillLayerExtended should use inline iterator
+        https://bugs.webkit.org/show_bug.cgi?id=231502
+
+        Reviewed by Alan Bujtas.
+
+        Prepare for LFC inline box painting.
+
+        * layout/integration/InlineIteratorInlineBox.cpp:
+        (WebCore::InlineIterator::InlineBox::hasClosedLeftAndRightEdge const):
+
+        Add a shared helper.
+
+        The answer is computed here though this information is needed for layout too.
+        We should be able to consult layout to get it.
+
+        * layout/integration/InlineIteratorInlineBox.h:
+        * rendering/InlineBoxPainter.cpp:
+        (WebCore::clipRectForNinePieceImageStrip):
+        (WebCore::InlineBoxPainter::paintDecorations):
+        (WebCore::InlineBoxPainter::paintFillLayer):
+        (WebCore::InlineBoxPainter::paintBoxShadow):
+        * rendering/LegacyInlineBox.h:
+        * rendering/LegacyInlineFlowBox.cpp:
+        (WebCore::LegacyInlineFlowBox::boxShadowCanBeAppliedToBackground const): Deleted.
+
+        Move to the only call site as a lambda.
+
+        * rendering/LegacyInlineFlowBox.h:
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::paintBoxDecorations):
+        (WebCore::RenderBox::paintBackground):
+        (WebCore::RenderBox::paintFillLayer):
+        * rendering/RenderBoxModelObject.cpp:
+        (WebCore::RenderBoxModelObject::getBackgroundRoundedRect const):
+        (WebCore::RenderBoxModelObject::backgroundRoundedRectAdjustedForBleedAvoidance const):
+        (WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
+        (WebCore::RenderBoxModelObject::paintFillLayerExtended):
+        (WebCore::RenderBoxModelObject::boxShadowShouldBeAppliedToBackground const):
+        * rendering/RenderBoxModelObject.h:
+        * rendering/RenderImage.cpp:
+        (WebCore::RenderImage::boxShadowShouldBeAppliedToBackground const):
+        * rendering/RenderImage.h:
+        * rendering/RenderTable.cpp:
+        (WebCore::RenderTable::paintBoxDecorations):
+        * rendering/RenderTableCell.cpp:
+        (WebCore::RenderTableCell::boxShadowShouldBeAppliedToBackground const):
+        * rendering/RenderTableCell.h:
+
</ins><span class="cx"> 2021-10-10  Sihui Liu  <sihui_liu@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Add support for iterating FileSystemDirectoryHandle
</span></span></pre></div>
<a id="trunkSourceWebCorelayoutintegrationInlineIteratorInlineBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/layout/integration/InlineIteratorInlineBox.cpp (283892 => 283893)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/integration/InlineIteratorInlineBox.cpp      2021-10-11 13:50:39 UTC (rev 283892)
+++ trunk/Source/WebCore/layout/integration/InlineIteratorInlineBox.cpp 2021-10-11 15:12:27 UTC (rev 283893)
</span><span class="lines">@@ -36,6 +36,19 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+std::pair<bool, bool> InlineBox::hasClosedLeftAndRightEdge() const
+{
+    // FIXME: Layout knows the answer to this question so we should consult it.
+#if ENABLE(CSS_BOX_DECORATION_BREAK)
+    if (style().boxDecorationBreak() == BoxDecorationBreak::Clone)
+        return { true, true };
+#endif
+    bool isLTR = style().isLeftToRightDirection();
+    bool isFirst = !previousInlineBox() && !renderer().isContinuation();
+    bool isLast = !nextInlineBox() && !renderer().continuation();
+    return { isLTR ? isFirst : isLast, isLTR ? isLast : isFirst };
+};
+
</ins><span class="cx"> InlineBoxIterator InlineBox::nextInlineBox() const
</span><span class="cx"> {
</span><span class="cx">     return InlineBoxIterator(*this).traverseNextInlineBox();
</span></span></pre></div>
<a id="trunkSourceWebCorelayoutintegrationInlineIteratorInlineBoxh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/layout/integration/InlineIteratorInlineBox.h (283892 => 283893)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/layout/integration/InlineIteratorInlineBox.h        2021-10-11 13:50:39 UTC (rev 283892)
+++ trunk/Source/WebCore/layout/integration/InlineIteratorInlineBox.h   2021-10-11 15:12:27 UTC (rev 283893)
</span><span class="lines">@@ -39,6 +39,8 @@
</span><span class="cx"> 
</span><span class="cx">     const RenderBoxModelObject& renderer() const { return downcast<RenderBoxModelObject>(Box::renderer()); }
</span><span class="cx"> 
</span><ins>+    std::pair<bool, bool> hasClosedLeftAndRightEdge() const;
+
</ins><span class="cx">     // FIXME: Remove. For intermediate porting steps only.
</span><span class="cx">     const LegacyInlineFlowBox* legacyInlineBox() const { return downcast<LegacyInlineFlowBox>(Box::legacyInlineBox()); }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingInlineBoxPaintercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/InlineBoxPainter.cpp (283892 => 283893)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/InlineBoxPainter.cpp      2021-10-11 13:50:39 UTC (rev 283892)
+++ trunk/Source/WebCore/rendering/InlineBoxPainter.cpp 2021-10-11 15:12:27 UTC (rev 283893)
</span><span class="lines">@@ -100,23 +100,24 @@
</span><span class="cx">     LayoutRect clipRect(paintRect);
</span><span class="cx">     auto& style = box.renderer().style();
</span><span class="cx">     LayoutBoxExtent outsets = style.imageOutsets(image);
</span><ins>+    auto [hasClosedLeftEdge, hasClosedRightEdge] = box.hasClosedLeftAndRightEdge();
</ins><span class="cx">     if (box.isHorizontal()) {
</span><span class="cx">         clipRect.setY(paintRect.y() - outsets.top());
</span><span class="cx">         clipRect.setHeight(paintRect.height() + outsets.top() + outsets.bottom());
</span><del>-        if (box.legacyInlineBox()->includeLogicalLeftEdge()) {
</del><ins>+        if (hasClosedLeftEdge) {
</ins><span class="cx">             clipRect.setX(paintRect.x() - outsets.left());
</span><span class="cx">             clipRect.setWidth(paintRect.width() + outsets.left());
</span><span class="cx">         }
</span><del>-        if (box.legacyInlineBox()->includeLogicalRightEdge())
</del><ins>+        if (hasClosedRightEdge)
</ins><span class="cx">             clipRect.setWidth(clipRect.width() + outsets.right());
</span><span class="cx">     } else {
</span><span class="cx">         clipRect.setX(paintRect.x() - outsets.left());
</span><span class="cx">         clipRect.setWidth(paintRect.width() + outsets.left() + outsets.right());
</span><del>-        if (box.legacyInlineBox()->includeLogicalLeftEdge()) {
</del><ins>+        if (hasClosedLeftEdge) {
</ins><span class="cx">             clipRect.setY(paintRect.y() - outsets.top());
</span><span class="cx">             clipRect.setHeight(paintRect.height() + outsets.top());
</span><span class="cx">         }
</span><del>-        if (box.legacyInlineBox()->includeLogicalRightEdge())
</del><ins>+        if (hasClosedRightEdge)
</ins><span class="cx">             clipRect.setHeight(clipRect.height() + outsets.bottom());
</span><span class="cx">     }
</span><span class="cx">     return clipRect;
</span><span class="lines">@@ -218,7 +219,7 @@
</span><span class="cx">     GraphicsContext& context = m_paintInfo.context();
</span><span class="cx">     LayoutRect paintRect = LayoutRect(adjustedPaintoffset, frameRect.size());
</span><span class="cx">     // Shadow comes first and is behind the background and border.
</span><del>-    if (!renderer().boxShadowShouldBeAppliedToBackground(adjustedPaintoffset, BackgroundBleedNone, m_inlineBox.legacyInlineBox()))
</del><ins>+    if (!renderer().boxShadowShouldBeAppliedToBackground(adjustedPaintoffset, BackgroundBleedNone, m_inlineBox))
</ins><span class="cx">         paintBoxShadow(ShadowStyle::Normal, paintRect);
</span><span class="cx"> 
</span><span class="cx">     auto color = style.visitedDependentColor(CSSPropertyBackgroundColor);
</span><span class="lines">@@ -242,7 +243,8 @@
</span><span class="cx"> 
</span><span class="cx">     bool hasSingleLine = !m_inlineBox.previousInlineBox() && !m_inlineBox.nextInlineBox();
</span><span class="cx">     if (!hasBorderImage || hasSingleLine) {
</span><del>-        renderer().paintBorder(m_paintInfo, paintRect, style, BackgroundBleedNone, m_inlineBox.legacyInlineBox()->includeLogicalLeftEdge(), m_inlineBox.legacyInlineBox()->includeLogicalRightEdge());
</del><ins>+        auto [hasClosedLeftEdge, hasClosedRightEdge] = m_inlineBox.hasClosedLeftAndRightEdge();
+        renderer().paintBorder(m_paintInfo, paintRect, style, BackgroundBleedNone, hasClosedLeftEdge, hasClosedRightEdge);
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -290,7 +292,7 @@
</span><span class="cx">     bool hasSingleLine = !m_inlineBox.previousInlineBox() && !m_inlineBox.nextInlineBox();
</span><span class="cx"> 
</span><span class="cx">     if (!hasFillImageOrBorderRadious || hasSingleLine || m_isRootInlineBox) {
</span><del>-        renderer().paintFillLayerExtended(m_paintInfo, color, fillLayer, rect, BackgroundBleedNone, m_inlineBox.legacyInlineBox(), rect.size(), op);
</del><ins>+        renderer().paintFillLayerExtended(m_paintInfo, color, fillLayer, rect, BackgroundBleedNone, m_inlineBox, rect.size(), op);
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -298,7 +300,7 @@
</span><span class="cx">     if (renderer().style().boxDecorationBreak() == BoxDecorationBreak::Clone) {
</span><span class="cx">         GraphicsContextStateSaver stateSaver(m_paintInfo.context());
</span><span class="cx">         m_paintInfo.context().clip({ rect.x(), rect.y(), LayoutUnit(m_inlineBox.rect().width()), LayoutUnit(m_inlineBox.rect().height()) });
</span><del>-        renderer().paintFillLayerExtended(m_paintInfo, color, fillLayer, rect, BackgroundBleedNone, m_inlineBox.legacyInlineBox(), rect.size(), op);
</del><ins>+        renderer().paintFillLayerExtended(m_paintInfo, color, fillLayer, rect, BackgroundBleedNone, m_inlineBox, rect.size(), op);
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="lines">@@ -331,7 +333,7 @@
</span><span class="cx"> 
</span><span class="cx">     GraphicsContextStateSaver stateSaver(m_paintInfo.context());
</span><span class="cx">     m_paintInfo.context().clip({ rect.x(), rect.y(), LayoutUnit(m_inlineBox.rect().width()), LayoutUnit(m_inlineBox.rect().height()) });
</span><del>-    renderer().paintFillLayerExtended(m_paintInfo, color, fillLayer, LayoutRect(stripX, stripY, stripWidth, stripHeight), BackgroundBleedNone, m_inlineBox.legacyInlineBox(), rect.size(), op);
</del><ins>+    renderer().paintFillLayerExtended(m_paintInfo, color, fillLayer, LayoutRect(stripX, stripY, stripWidth, stripHeight), BackgroundBleedNone, m_inlineBox, rect.size(), op);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void InlineBoxPainter::paintBoxShadow(ShadowStyle shadowStyle, const LayoutRect& paintRect)
</span><span class="lines">@@ -344,7 +346,8 @@
</span><span class="cx"> 
</span><span class="cx">     // FIXME: We can do better here in the multi-line case. We want to push a clip so that the shadow doesn't
</span><span class="cx">     // protrude incorrectly at the edges, and we want to possibly include shadows cast from the previous/following lines
</span><del>-    renderer().paintBoxShadow(m_paintInfo, paintRect, style(), shadowStyle, m_inlineBox.legacyInlineBox()->includeLogicalLeftEdge(), m_inlineBox.legacyInlineBox()->includeLogicalRightEdge());
</del><ins>+    auto [hasClosedLeftEdge, hasClosedRightEdge] = m_inlineBox.hasClosedLeftAndRightEdge();
+    renderer().paintBoxShadow(m_paintInfo, paintRect, style(), shadowStyle, hasClosedLeftEdge, hasClosedRightEdge);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void InlineBoxPainter::constrainToLineTopAndBottomIfNeeded(LayoutRect& rect) const
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingLegacyInlineBoxh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/LegacyInlineBox.h (283892 => 283893)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/LegacyInlineBox.h 2021-10-11 13:50:39 UTC (rev 283892)
+++ trunk/Source/WebCore/rendering/LegacyInlineBox.h    2021-10-11 15:12:27 UTC (rev 283893)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class HitTestResult;
</span><ins>+class LegacyInlineFlowBox;
</ins><span class="cx"> class LegacyRootInlineBox;
</span><span class="cx"> 
</span><span class="cx"> // LegacyInlineBox represents a rectangle that occurs on a line. It corresponds to
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingLegacyInlineFlowBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/LegacyInlineFlowBox.cpp (283892 => 283893)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/LegacyInlineFlowBox.cpp   2021-10-11 13:50:39 UTC (rev 283892)
+++ trunk/Source/WebCore/rendering/LegacyInlineFlowBox.cpp      2021-10-11 15:12:27 UTC (rev 283893)
</span><span class="lines">@@ -1134,15 +1134,6 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool LegacyInlineFlowBox::boxShadowCanBeAppliedToBackground(const FillLayer& lastBackgroundLayer) const
-{
-    // The checks here match how paintFillLayer() decides whether to clip (if it does, the shadow
-    // would be clipped out, so it has to be drawn separately).
-    StyleImage* image = lastBackgroundLayer.image();
-    bool hasFillImage = image && image->canRender(&renderer(), renderer().style().effectiveZoom());
-    return (!hasFillImage && !renderer().style().hasBorderRadius()) || (!prevLineBox() && !nextLineBox()) || !parent();
-}
-
</del><span class="cx"> LegacyInlineBox* LegacyInlineFlowBox::firstLeafDescendant() const
</span><span class="cx"> {
</span><span class="cx">     LegacyInlineBox* leaf = nullptr;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingLegacyInlineFlowBoxh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/LegacyInlineFlowBox.h (283892 => 283893)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/LegacyInlineFlowBox.h     2021-10-11 13:50:39 UTC (rev 283892)
+++ trunk/Source/WebCore/rendering/LegacyInlineFlowBox.h        2021-10-11 15:12:27 UTC (rev 283893)
</span><span class="lines">@@ -118,8 +118,6 @@
</span><span class="cx">     void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutUnit lineBottom) override;
</span><span class="cx">     bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom, HitTestAction) override;
</span><span class="cx"> 
</span><del>-    bool boxShadowCanBeAppliedToBackground(const FillLayer&) const;
-
</del><span class="cx">     // logicalLeft = left in a horizontal line and top in a vertical line.
</span><span class="cx">     LayoutUnit marginBorderPaddingLogicalLeft() const { return LayoutUnit(marginLogicalLeft() + borderLogicalLeft() + paddingLogicalLeft()); }
</span><span class="cx">     LayoutUnit marginBorderPaddingLogicalRight() const { return LayoutUnit(marginLogicalRight() + borderLogicalRight() + paddingLogicalRight()); }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (283892 => 283893)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBox.cpp     2021-10-11 13:50:39 UTC (rev 283892)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp        2021-10-11 15:12:27 UTC (rev 283893)
</span><span class="lines">@@ -47,6 +47,7 @@
</span><span class="cx"> #include "HTMLSelectElement.h"
</span><span class="cx"> #include "HTMLTextAreaElement.h"
</span><span class="cx"> #include "HitTestResult.h"
</span><ins>+#include "InlineIteratorInlineBox.h"
</ins><span class="cx"> #include "InlineIteratorLine.h"
</span><span class="cx"> #include "InlineRunAndOffset.h"
</span><span class="cx"> #include "LayoutIntegrationLineLayout.h"
</span><span class="lines">@@ -1524,7 +1525,7 @@
</span><span class="cx"> 
</span><span class="cx">     // FIXME: Should eventually give the theme control over whether the box shadow should paint, since controls could have
</span><span class="cx">     // custom shadows of their own.
</span><del>-    if (!boxShadowShouldBeAppliedToBackground(paintRect.location(), bleedAvoidance))
</del><ins>+    if (!boxShadowShouldBeAppliedToBackground(paintRect.location(), bleedAvoidance, { }))
</ins><span class="cx">         paintBoxShadow(paintInfo, paintRect, style(), ShadowStyle::Normal);
</span><span class="cx"> 
</span><span class="cx">     GraphicsContextStateSaver stateSaver(paintInfo.context(), false);
</span><span class="lines">@@ -1590,7 +1591,7 @@
</span><span class="cx">     if (!paintsOwnBackground())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    if (backgroundIsKnownToBeObscured(paintRect.location()) && !boxShadowShouldBeAppliedToBackground(paintRect.location(), bleedAvoidance))
</del><ins>+    if (backgroundIsKnownToBeObscured(paintRect.location()) && !boxShadowShouldBeAppliedToBackground(paintRect.location(), bleedAvoidance, { }))
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     auto backgroundColor = style().visitedDependentColor(CSSPropertyBackgroundColor);
</span><span class="lines">@@ -1882,7 +1883,7 @@
</span><span class="cx"> void RenderBox::paintFillLayer(const PaintInfo& paintInfo, const Color& c, const FillLayer& fillLayer, const LayoutRect& rect,
</span><span class="cx">     BackgroundBleedAvoidance bleedAvoidance, CompositeOperator op, RenderElement* backgroundObject, BaseBackgroundColorUsage baseBgColorUsage)
</span><span class="cx"> {
</span><del>-    paintFillLayerExtended(paintInfo, c, fillLayer, rect, bleedAvoidance, nullptr, LayoutSize(), op, backgroundObject, baseBgColorUsage);
</del><ins>+    paintFillLayerExtended(paintInfo, c, fillLayer, rect, bleedAvoidance, { }, LayoutSize(), op, backgroundObject, baseBgColorUsage);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static StyleImage* findLayerUsedImage(WrappedImagePtr image, const FillLayer& layers)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxModelObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp (283892 => 283893)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp  2021-10-11 13:50:39 UTC (rev 283892)
+++ trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp     2021-10-11 15:12:27 UTC (rev 283893)
</span><span class="lines">@@ -621,11 +621,11 @@
</span><span class="cx">     return minimumValueForLength(padding, w);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RoundedRect RenderBoxModelObject::getBackgroundRoundedRect(const LayoutRect& borderRect, const LegacyInlineFlowBox* box, LayoutUnit inlineBoxWidth, LayoutUnit inlineBoxHeight,
</del><ins>+RoundedRect RenderBoxModelObject::getBackgroundRoundedRect(const LayoutRect& borderRect, const InlineIterator::InlineBoxIterator& box, LayoutUnit inlineBoxWidth, LayoutUnit inlineBoxHeight,
</ins><span class="cx">     bool includeLogicalLeftEdge, bool includeLogicalRightEdge) const
</span><span class="cx"> {
</span><span class="cx">     RoundedRect border = style().getRoundedBorderFor(borderRect, includeLogicalLeftEdge, includeLogicalRightEdge);
</span><del>-    if (box && (box->nextLineBox() || box->prevLineBox())) {
</del><ins>+    if (box && (box->nextInlineBox() || box->previousInlineBox())) {
</ins><span class="cx">         RoundedRect segmentBorder = style().getRoundedBorderFor(LayoutRect(0_lu, 0_lu, inlineBoxWidth, inlineBoxHeight), includeLogicalLeftEdge, includeLogicalRightEdge);
</span><span class="cx">         border.setRadii(segmentBorder.radii());
</span><span class="cx">     }
</span><span class="lines">@@ -682,7 +682,7 @@
</span><span class="cx">     return shrinkRectByOneDevicePixel(context, rect, document().deviceScaleFactor());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RoundedRect RenderBoxModelObject::backgroundRoundedRectAdjustedForBleedAvoidance(const GraphicsContext& context, const LayoutRect& borderRect, BackgroundBleedAvoidance bleedAvoidance, const LegacyInlineFlowBox* box, const LayoutSize& boxSize, bool includeLogicalLeftEdge, bool includeLogicalRightEdge) const
</del><ins>+RoundedRect RenderBoxModelObject::backgroundRoundedRectAdjustedForBleedAvoidance(const GraphicsContext& context, const LayoutRect& borderRect, BackgroundBleedAvoidance bleedAvoidance, const InlineIterator::InlineBoxIterator& box, const LayoutSize& boxSize, bool includeLogicalLeftEdge, bool includeLogicalRightEdge) const
</ins><span class="cx"> {
</span><span class="cx">     if (bleedAvoidance == BackgroundBleedShrinkBackground) {
</span><span class="cx">         // We shrink the rectangle by one device pixel on each side because the bleed is one pixel maximum.
</span><span class="lines">@@ -710,7 +710,7 @@
</span><span class="cx">     return view().imageQualityController().chooseInterpolationQuality(context, this, image, layer, size);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RenderBoxModelObject::paintMaskForTextFillBox(ImageBuffer* maskImage, const FloatRect& maskRect, const LegacyInlineFlowBox* box, const LayoutRect& scrolledPaintRect)
</del><ins>+void RenderBoxModelObject::paintMaskForTextFillBox(ImageBuffer* maskImage, const FloatRect& maskRect, const InlineIterator::InlineBoxIterator& box, const LayoutRect& scrolledPaintRect)
</ins><span class="cx"> {
</span><span class="cx">     GraphicsContext& maskImageContext = maskImage->context();
</span><span class="cx">     maskImageContext.translate(-maskRect.location());
</span><span class="lines">@@ -719,8 +719,9 @@
</span><span class="cx">     // LegacyInlineTextBoxes that they should just add their contents to the clip.
</span><span class="cx">     PaintInfo info(maskImageContext, LayoutRect { maskRect }, PaintPhase::TextClip, PaintBehavior::ForceBlackText);
</span><span class="cx">     if (box) {
</span><del>-        const LegacyRootInlineBox& rootBox = box->root();
-        const_cast<LegacyInlineFlowBox*>(box)->paint(info, LayoutPoint(scrolledPaintRect.x() - box->x(), scrolledPaintRect.y() - box->y()), rootBox.lineTop(), rootBox.lineBottom());
</del><ins>+        auto* legacyInlineBox = const_cast<LegacyInlineFlowBox*>(box->legacyInlineBox());
+        const auto& rootBox = legacyInlineBox->root();
+        legacyInlineBox->paint(info, LayoutPoint(scrolledPaintRect.x() - legacyInlineBox->x(), scrolledPaintRect.y() - legacyInlineBox->y()), rootBox.lineTop(), rootBox.lineBottom());
</ins><span class="cx">     } else {
</span><span class="cx">         LayoutSize localOffset = is<RenderBox>(*this) ? downcast<RenderBox>(*this).locationOffset() : LayoutSize();
</span><span class="cx">         paint(info, scrolledPaintRect.location() - localOffset);
</span><span class="lines">@@ -728,7 +729,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RenderBoxModelObject::paintFillLayerExtended(const PaintInfo& paintInfo, const Color& color, const FillLayer& bgLayer, const LayoutRect& rect,
</span><del>-    BackgroundBleedAvoidance bleedAvoidance, const LegacyInlineFlowBox* box, const LayoutSize& boxSize, CompositeOperator op, RenderElement* backgroundObject, BaseBackgroundColorUsage baseBgColorUsage)
</del><ins>+    BackgroundBleedAvoidance bleedAvoidance, const InlineIterator::InlineBoxIterator& box, const LayoutSize& boxSize, CompositeOperator op, RenderElement* backgroundObject, BaseBackgroundColorUsage baseBgColorUsage)
</ins><span class="cx"> {
</span><span class="cx">     GraphicsContext& context = paintInfo.context();
</span><span class="cx"> 
</span><span class="lines">@@ -735,8 +736,7 @@
</span><span class="cx">     if ((context.paintingDisabled() && !context.detectingContentfulPaint()) || rect.isEmpty())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    bool includeLeftEdge = box ? box->includeLogicalLeftEdge() : true;
-    bool includeRightEdge = box ? box->includeLogicalRightEdge() : true;
</del><ins>+    auto [includeLeftEdge, includeRightEdge] = box ? box->hasClosedLeftAndRightEdge() : std::pair(true, true);
</ins><span class="cx"> 
</span><span class="cx">     bool hasRoundedBorder = style().hasBorderRadius() && (includeLeftEdge || includeRightEdge);
</span><span class="cx">     bool clippedWithLocalScrolling = hasNonVisibleOverflow() && bgLayer.attachment() == FillAttachment::LocalBackground;
</span><span class="lines">@@ -2326,7 +2326,7 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool RenderBoxModelObject::boxShadowShouldBeAppliedToBackground(const LayoutPoint&, BackgroundBleedAvoidance bleedAvoidance, const LegacyInlineFlowBox* inlineFlowBox) const
</del><ins>+bool RenderBoxModelObject::boxShadowShouldBeAppliedToBackground(const LayoutPoint&, BackgroundBleedAvoidance bleedAvoidance, const InlineIterator::InlineBoxIterator& inlineBox) const
</ins><span class="cx"> {
</span><span class="cx">     if (bleedAvoidance != BackgroundBleedNone)
</span><span class="cx">         return false;
</span><span class="lines">@@ -2364,7 +2364,20 @@
</span><span class="cx">     if (lastBackgroundLayer->image() && style().hasBorderRadius())
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    if (inlineFlowBox && !inlineFlowBox->boxShadowCanBeAppliedToBackground(*lastBackgroundLayer))
</del><ins>+    auto applyToInlineBox = [&] {
+        // The checks here match how paintFillLayer() decides whether to clip (if it does, the shadow
+        // would be clipped out, so it has to be drawn separately).
+        if (inlineBox->isRootInlineBox())
+            return true;
+        if (!inlineBox->previousInlineBox() && !inlineBox->nextInlineBox())
+            return true;
+        auto* image = lastBackgroundLayer->image();
+        auto& renderer = inlineBox->renderer();
+        bool hasFillImage = image && image->canRender(&renderer, renderer.style().effectiveZoom());
+        return !hasFillImage && !renderer.style().hasBorderRadius();
+    };
+
+    if (inlineBox && !applyToInlineBox())
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     if (hasNonVisibleOverflow() && lastBackgroundLayer->attachment() == FillAttachment::LocalBackground)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxModelObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBoxModelObject.h (283892 => 283893)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBoxModelObject.h    2021-10-11 13:50:39 UTC (rev 283892)
+++ trunk/Source/WebCore/rendering/RenderBoxModelObject.h       2021-10-11 15:12:27 UTC (rev 283893)
</span><span class="lines">@@ -60,10 +60,13 @@
</span><span class="cx"> 
</span><span class="cx"> class BorderEdge;
</span><span class="cx"> class ImageBuffer;
</span><del>-class LegacyInlineFlowBox;
</del><span class="cx"> class RenderTextFragment;
</span><span class="cx"> class StickyPositionViewportConstraints;
</span><span class="cx"> 
</span><ins>+namespace InlineIterator {
+class InlineBoxIterator;
+};
+
</ins><span class="cx"> enum class BoxSideFlag : uint8_t;
</span><span class="cx"> using BoxSideSet = OptionSet<BoxSideFlag>;
</span><span class="cx"> using BorderEdges = RectEdges<BorderEdge>;
</span><span class="lines">@@ -210,9 +213,9 @@
</span><span class="cx">     void paintBorder(const PaintInfo&, const LayoutRect&, const RenderStyle&, BackgroundBleedAvoidance = BackgroundBleedNone, bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true);
</span><span class="cx">     bool paintNinePieceImage(GraphicsContext&, const LayoutRect&, const RenderStyle&, const NinePieceImage&, CompositeOperator = CompositeOperator::SourceOver);
</span><span class="cx">     void paintBoxShadow(const PaintInfo&, const LayoutRect&, const RenderStyle&, ShadowStyle, bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true);
</span><del>-    void paintFillLayerExtended(const PaintInfo&, const Color&, const FillLayer&, const LayoutRect&, BackgroundBleedAvoidance, const LegacyInlineFlowBox*  = nullptr, const LayoutSize& = LayoutSize(), CompositeOperator = CompositeOperator::SourceOver, RenderElement* backgroundObject = nullptr, BaseBackgroundColorUsage = BaseBackgroundColorUse);
</del><ins>+    void paintFillLayerExtended(const PaintInfo&, const Color&, const FillLayer&, const LayoutRect&, BackgroundBleedAvoidance, const InlineIterator::InlineBoxIterator&, const LayoutSize& = LayoutSize(), CompositeOperator = CompositeOperator::SourceOver, RenderElement* backgroundObject = nullptr, BaseBackgroundColorUsage = BaseBackgroundColorUse);
</ins><span class="cx"> 
</span><del>-    virtual bool boxShadowShouldBeAppliedToBackground(const LayoutPoint& absolutePaintPostion, BackgroundBleedAvoidance, const LegacyInlineFlowBox*  = nullptr) const;
</del><ins>+    virtual bool boxShadowShouldBeAppliedToBackground(const LayoutPoint& absolutePaintPostion, BackgroundBleedAvoidance, const InlineIterator::InlineBoxIterator&) const;
</ins><span class="cx"> 
</span><span class="cx">     // Overridden by subclasses to determine line height and baseline position.
</span><span class="cx">     virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const = 0;
</span><span class="lines">@@ -256,7 +259,7 @@
</span><span class="cx">         const LayoutRect& paintRect, RenderElement* = nullptr) const;
</span><span class="cx">     bool borderObscuresBackgroundEdge(const FloatSize& contextScale) const;
</span><span class="cx">     bool borderObscuresBackground() const;
</span><del>-    RoundedRect backgroundRoundedRectAdjustedForBleedAvoidance(const GraphicsContext&, const LayoutRect&, BackgroundBleedAvoidance, const LegacyInlineFlowBox* , const LayoutSize&, bool includeLogicalLeftEdge, bool includeLogicalRightEdge) const;
</del><ins>+    RoundedRect backgroundRoundedRectAdjustedForBleedAvoidance(const GraphicsContext&, const LayoutRect&, BackgroundBleedAvoidance, const InlineIterator::InlineBoxIterator&, const LayoutSize&, bool includeLogicalLeftEdge, bool includeLogicalRightEdge) const;
</ins><span class="cx">     LayoutRect borderInnerRectAdjustedForBleedAvoidance(const GraphicsContext&, const LayoutRect&, BackgroundBleedAvoidance) const;
</span><span class="cx"> 
</span><span class="cx">     InterpolationQuality chooseInterpolationQuality(GraphicsContext&, Image&, const void*, const LayoutSize&);
</span><span class="lines">@@ -307,7 +310,7 @@
</span><span class="cx"> 
</span><span class="cx">     LayoutSize calculateFillTileSize(const FillLayer&, const LayoutSize& scaledPositioningAreaSize) const;
</span><span class="cx"> 
</span><del>-    RoundedRect getBackgroundRoundedRect(const LayoutRect&, const LegacyInlineFlowBox* , LayoutUnit inlineBoxWidth, LayoutUnit inlineBoxHeight,
</del><ins>+    RoundedRect getBackgroundRoundedRect(const LayoutRect&, const InlineIterator::InlineBoxIterator&, LayoutUnit inlineBoxWidth, LayoutUnit inlineBoxHeight,
</ins><span class="cx">         bool includeLogicalLeftEdge, bool includeLogicalRightEdge) const;
</span><span class="cx">     
</span><span class="cx">     bool fixedBackgroundPaintsInLocalCoordinates() const;
</span><span class="lines">@@ -326,7 +329,7 @@
</span><span class="cx">     void drawBoxSideFromPath(GraphicsContext&, const LayoutRect&, const Path&, const BorderEdges&,
</span><span class="cx">         float thickness, float drawThickness, BoxSide, const RenderStyle&,
</span><span class="cx">         Color, BorderStyle, BackgroundBleedAvoidance, bool includeLogicalLeftEdge, bool includeLogicalRightEdge);
</span><del>-    void paintMaskForTextFillBox(ImageBuffer*, const FloatRect&, const LegacyInlineFlowBox* , const LayoutRect&);
</del><ins>+    void paintMaskForTextFillBox(ImageBuffer*, const FloatRect&, const InlineIterator::InlineBoxIterator&, const LayoutRect&);
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderImagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderImage.cpp (283892 => 283893)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderImage.cpp   2021-10-11 13:50:39 UTC (rev 283892)
+++ trunk/Source/WebCore/rendering/RenderImage.cpp      2021-10-11 15:12:27 UTC (rev 283893)
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx"> #include "HTMLMapElement.h"
</span><span class="cx"> #include "HTMLNames.h"
</span><span class="cx"> #include "HitTestResult.h"
</span><del>-#include "InlineIteratorBox.h"
</del><ins>+#include "InlineIteratorInlineBox.h"
</ins><span class="cx"> #include "InlineIteratorLine.h"
</span><span class="cx"> #include "Page.h"
</span><span class="cx"> #include "PaintInfo.h"
</span><span class="lines">@@ -692,9 +692,9 @@
</span><span class="cx">     return drawResult;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool RenderImage::boxShadowShouldBeAppliedToBackground(const LayoutPoint& paintOffset, BackgroundBleedAvoidance bleedAvoidance, const LegacyInlineFlowBox*) const
</del><ins>+bool RenderImage::boxShadowShouldBeAppliedToBackground(const LayoutPoint& paintOffset, BackgroundBleedAvoidance bleedAvoidance, const InlineIterator::InlineBoxIterator&) const
</ins><span class="cx"> {
</span><del>-    if (!RenderBoxModelObject::boxShadowShouldBeAppliedToBackground(paintOffset, bleedAvoidance))
</del><ins>+    if (!RenderBoxModelObject::boxShadowShouldBeAppliedToBackground(paintOffset, bleedAvoidance, { }))
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     return !const_cast<RenderImage*>(this)->backgroundIsKnownToBeObscured(paintOffset);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderImageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderImage.h (283892 => 283893)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderImage.h     2021-10-11 13:50:39 UTC (rev 283892)
+++ trunk/Source/WebCore/rendering/RenderImage.h        2021-10-11 15:12:27 UTC (rev 283893)
</span><span class="lines">@@ -121,7 +121,7 @@
</span><span class="cx">     void notifyFinished(CachedResource&, const NetworkLoadMetrics&) final;
</span><span class="cx">     bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) final;
</span><span class="cx"> 
</span><del>-    bool boxShadowShouldBeAppliedToBackground(const LayoutPoint& paintOffset, BackgroundBleedAvoidance, const LegacyInlineFlowBox*) const final;
</del><ins>+    bool boxShadowShouldBeAppliedToBackground(const LayoutPoint& paintOffset, BackgroundBleedAvoidance, const InlineIterator::InlineBoxIterator&) const final;
</ins><span class="cx"> 
</span><span class="cx">     IntSize imageSizeForError(CachedImage*) const;
</span><span class="cx">     void repaintOrMarkForLayout(ImageSizeChangeType, const IntRect* = nullptr);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderTablecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderTable.cpp (283892 => 283893)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTable.cpp   2021-10-11 13:50:39 UTC (rev 283892)
+++ trunk/Source/WebCore/rendering/RenderTable.cpp      2021-10-11 15:12:27 UTC (rev 283893)
</span><span class="lines">@@ -34,6 +34,7 @@
</span><span class="cx"> #include "HitTestResult.h"
</span><span class="cx"> #include "HTMLNames.h"
</span><span class="cx"> #include "HTMLTableElement.h"
</span><ins>+#include "InlineIteratorInlineBox.h"
</ins><span class="cx"> #include "LayoutRepainter.h"
</span><span class="cx"> #include "RenderBlockFlow.h"
</span><span class="cx"> #include "RenderChildIterator.h"
</span><span class="lines">@@ -787,7 +788,7 @@
</span><span class="cx">     adjustBorderBoxRectForPainting(rect);
</span><span class="cx">     
</span><span class="cx">     BackgroundBleedAvoidance bleedAvoidance = determineBackgroundBleedAvoidance(paintInfo.context());
</span><del>-    if (!boxShadowShouldBeAppliedToBackground(rect.location(), bleedAvoidance))
</del><ins>+    if (!boxShadowShouldBeAppliedToBackground(rect.location(), bleedAvoidance, { }))
</ins><span class="cx">         paintBoxShadow(paintInfo, rect, style(), ShadowStyle::Normal);
</span><span class="cx">     paintBackground(paintInfo, rect, bleedAvoidance);
</span><span class="cx">     paintBoxShadow(paintInfo, rect, style(), ShadowStyle::Inset);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderTableCellcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderTableCell.cpp (283892 => 283893)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTableCell.cpp       2021-10-11 13:50:39 UTC (rev 283892)
+++ trunk/Source/WebCore/rendering/RenderTableCell.cpp  2021-10-11 15:12:27 UTC (rev 283893)
</span><span class="lines">@@ -1348,7 +1348,7 @@
</span><span class="cx">     paintMaskImages(paintInfo, paintRect);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool RenderTableCell::boxShadowShouldBeAppliedToBackground(const LayoutPoint&, BackgroundBleedAvoidance, const LegacyInlineFlowBox*) const
</del><ins>+bool RenderTableCell::boxShadowShouldBeAppliedToBackground(const LayoutPoint&, BackgroundBleedAvoidance, const InlineIterator::InlineBoxIterator&) const
</ins><span class="cx"> {
</span><span class="cx">     return false;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderTableCellh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderTableCell.h (283892 => 283893)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTableCell.h 2021-10-11 13:50:39 UTC (rev 283892)
+++ trunk/Source/WebCore/rendering/RenderTableCell.h    2021-10-11 15:12:27 UTC (rev 283893)
</span><span class="lines">@@ -151,7 +151,7 @@
</span><span class="cx">     void paintBoxDecorations(PaintInfo&, const LayoutPoint&) override;
</span><span class="cx">     void paintMask(PaintInfo&, const LayoutPoint&) override;
</span><span class="cx"> 
</span><del>-    bool boxShadowShouldBeAppliedToBackground(const LayoutPoint& paintOffset, BackgroundBleedAvoidance, const LegacyInlineFlowBox*) const override;
</del><ins>+    bool boxShadowShouldBeAppliedToBackground(const LayoutPoint& paintOffset, BackgroundBleedAvoidance, const InlineIterator::InlineBoxIterator&) const override;
</ins><span class="cx"> 
</span><span class="cx">     LayoutSize offsetFromContainer(RenderElement&, const LayoutPoint&, bool* offsetDependsOnPoint = 0) const override;
</span><span class="cx">     std::optional<LayoutRect> computeVisibleRectInContainer(const LayoutRect&, const RenderLayerModelObject* container, VisibleRectContext) const override;
</span></span></pre>
</div>
</div>

</body>
</html>