Diff
Modified: branches/safari-611-branch/LayoutTests/ChangeLog (273458 => 273459)
--- branches/safari-611-branch/LayoutTests/ChangeLog 2021-02-25 00:39:53 UTC (rev 273458)
+++ branches/safari-611-branch/LayoutTests/ChangeLog 2021-02-25 00:39:57 UTC (rev 273459)
@@ -1,5 +1,49 @@
2021-02-24 Russell Epstein <repst...@apple.com>
+ Cherry-pick r272906. rdar://problem/74410175
+
+ [LFC][Integration] Pass child inline block scroll overflow to parent
+ https://bugs.webkit.org/show_bug.cgi?id=221958
+ rdar://74050874
+
+ Reviewed by Zalan Bujtas.
+
+ Source/WebCore:
+
+ Integrated LFC fails to pass through overflow from nested inline blocks.
+
+ Test: fast/overflow/inline-block-scroll-overflow.html
+
+ * layout/integration/LayoutIntegrationInlineContentBuilder.cpp:
+ (WebCore::LayoutIntegration::InlineContentBuilder::InlineContentBuilder):
+ (WebCore::LayoutIntegration::InlineContentBuilder::createDisplayLines const):
+
+ Find the associated RenderBox and collect overflow from it.
+
+ * layout/integration/LayoutIntegrationInlineContentBuilder.h:
+ * layout/integration/LayoutIntegrationLineLayout.cpp:
+ (WebCore::LayoutIntegration::LineLayout::constructContent):
+
+ LayoutTests:
+
+ * fast/overflow/inline-block-scroll-overflow-expected.html: Added.
+ * fast/overflow/inline-block-scroll-overflow.html: Added.
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@272906 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2021-02-16 Antti Koivisto <an...@apple.com>
+
+ [LFC][Integration] Pass child inline block scroll overflow to parent
+ https://bugs.webkit.org/show_bug.cgi?id=221958
+ rdar://74050874
+
+ Reviewed by Zalan Bujtas.
+
+ * fast/overflow/inline-block-scroll-overflow-expected.html: Added.
+ * fast/overflow/inline-block-scroll-overflow.html: Added.
+
+2021-02-24 Russell Epstein <repst...@apple.com>
+
Cherry-pick r272359. rdar://problem/74451201
[MSE] Move the call to didParseInitializationDataCallback() from the beginning of a cluster to the end of "tracks" element
Added: branches/safari-611-branch/LayoutTests/fast/overflow/inline-block-scroll-overflow-expected.html (0 => 273459)
--- branches/safari-611-branch/LayoutTests/fast/overflow/inline-block-scroll-overflow-expected.html (rev 0)
+++ branches/safari-611-branch/LayoutTests/fast/overflow/inline-block-scroll-overflow-expected.html 2021-02-25 00:39:57 UTC (rev 273459)
@@ -0,0 +1,5 @@
+<div style="white-space: nowrap;">
+ <div style="display:inline-block; white-space: normal; background-color: yellow">This text is long and it should wrap at the edge of the viewport. Pass if the green image can be scrolled into the viewport. This text is long and it should wrap at the edge of the viewport. Pass if the green image can be scrolled into the viewport.
+ </div>
+ <img src="" style="width: 500px; height: 20px; background-color: green;">
+</div>
Added: branches/safari-611-branch/LayoutTests/fast/overflow/inline-block-scroll-overflow.html (0 => 273459)
--- branches/safari-611-branch/LayoutTests/fast/overflow/inline-block-scroll-overflow.html (rev 0)
+++ branches/safari-611-branch/LayoutTests/fast/overflow/inline-block-scroll-overflow.html 2021-02-25 00:39:57 UTC (rev 273459)
@@ -0,0 +1,5 @@
+<div style="display:inline-block; white-space: nowrap;">
+ <div style="display:inline-block; white-space: normal; background-color: yellow">This text is long and it should wrap at the edge of the viewport. Pass if the green image can be scrolled into the viewport. This text is long and it should wrap at the edge of the viewport. Pass if the green image can be scrolled into the viewport.
+ </div>
+ <img src="" style="width: 500px; height: 20px; background-color: green;">
+</div>
Modified: branches/safari-611-branch/Source/WebCore/ChangeLog (273458 => 273459)
--- branches/safari-611-branch/Source/WebCore/ChangeLog 2021-02-25 00:39:53 UTC (rev 273458)
+++ branches/safari-611-branch/Source/WebCore/ChangeLog 2021-02-25 00:39:57 UTC (rev 273459)
@@ -1,5 +1,60 @@
2021-02-24 Russell Epstein <repst...@apple.com>
+ Cherry-pick r272906. rdar://problem/74410175
+
+ [LFC][Integration] Pass child inline block scroll overflow to parent
+ https://bugs.webkit.org/show_bug.cgi?id=221958
+ rdar://74050874
+
+ Reviewed by Zalan Bujtas.
+
+ Source/WebCore:
+
+ Integrated LFC fails to pass through overflow from nested inline blocks.
+
+ Test: fast/overflow/inline-block-scroll-overflow.html
+
+ * layout/integration/LayoutIntegrationInlineContentBuilder.cpp:
+ (WebCore::LayoutIntegration::InlineContentBuilder::InlineContentBuilder):
+ (WebCore::LayoutIntegration::InlineContentBuilder::createDisplayLines const):
+
+ Find the associated RenderBox and collect overflow from it.
+
+ * layout/integration/LayoutIntegrationInlineContentBuilder.h:
+ * layout/integration/LayoutIntegrationLineLayout.cpp:
+ (WebCore::LayoutIntegration::LineLayout::constructContent):
+
+ LayoutTests:
+
+ * fast/overflow/inline-block-scroll-overflow-expected.html: Added.
+ * fast/overflow/inline-block-scroll-overflow.html: Added.
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@272906 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2021-02-16 Antti Koivisto <an...@apple.com>
+
+ [LFC][Integration] Pass child inline block scroll overflow to parent
+ https://bugs.webkit.org/show_bug.cgi?id=221958
+ rdar://74050874
+
+ Reviewed by Zalan Bujtas.
+
+ Integrated LFC fails to pass through overflow from nested inline blocks.
+
+ Test: fast/overflow/inline-block-scroll-overflow.html
+
+ * layout/integration/LayoutIntegrationInlineContentBuilder.cpp:
+ (WebCore::LayoutIntegration::InlineContentBuilder::InlineContentBuilder):
+ (WebCore::LayoutIntegration::InlineContentBuilder::createDisplayLines const):
+
+ Find the associated RenderBox and collect overflow from it.
+
+ * layout/integration/LayoutIntegrationInlineContentBuilder.h:
+ * layout/integration/LayoutIntegrationLineLayout.cpp:
+ (WebCore::LayoutIntegration::LineLayout::constructContent):
+
+2021-02-24 Russell Epstein <repst...@apple.com>
+
Cherry-pick r272977. rdar://problem/74500812
REGRESSION (r266695): Unable to scroll the menu in 北京114预约挂号 official account - WeChat
Modified: branches/safari-611-branch/Source/WebCore/layout/integration/LayoutIntegrationInlineContentBuilder.cpp (273458 => 273459)
--- branches/safari-611-branch/Source/WebCore/layout/integration/LayoutIntegrationInlineContentBuilder.cpp 2021-02-25 00:39:53 UTC (rev 273458)
+++ branches/safari-611-branch/Source/WebCore/layout/integration/LayoutIntegrationInlineContentBuilder.cpp 2021-02-25 00:39:57 UTC (rev 273459)
@@ -150,9 +150,10 @@
}
#endif
-InlineContentBuilder::InlineContentBuilder(const Layout::LayoutState& layoutState, const RenderBlockFlow& blockFlow)
+InlineContentBuilder::InlineContentBuilder(const Layout::LayoutState& layoutState, const RenderBlockFlow& blockFlow, const BoxTree& boxTree)
: m_layoutState(layoutState)
, m_blockFlow(blockFlow)
+ , m_boxTree(boxTree)
{
}
@@ -315,8 +316,27 @@
auto firstRunIndex = runIndex;
auto lineInkOverflowRect = scrollableOverflowRect;
- while (runIndex < runs.size() && runs[runIndex].lineIndex() == lineIndex)
- lineInkOverflowRect.unite(runs[runIndex++].inkOverflow());
+ // Collect overflow from runs.
+ for (; runIndex < runs.size() && runs[runIndex].lineIndex() == lineIndex; ++runIndex) {
+ auto& run = runs[runIndex];
+ lineInkOverflowRect.unite(run.inkOverflow());
+
+ auto& layoutBox = run.layoutBox();
+ if (!layoutBox.isReplacedBox())
+ continue;
+
+ // Similar to InlineFlowBox::addReplacedChildOverflow.
+ auto& box = downcast<RenderBox>(m_boxTree.rendererForLayoutBox(layoutBox));
+ if (!box.hasSelfPaintingLayer()) {
+ auto childInkOverflow = box.logicalVisualOverflowRectForPropagation(&box.parent()->style());
+ childInkOverflow.move(run.rect().x(), run.rect().y());
+ lineInkOverflowRect.unite(childInkOverflow);
+ }
+ auto childScrollableOverflow = box.logicalLayoutOverflowRectForPropagation(&box.parent()->style());
+ childScrollableOverflow.move(run.rect().x(), run.rect().y());
+ scrollableOverflowRect.unite(childScrollableOverflow);
+ }
+
auto adjustedLineBoxRect = FloatRect { lineBoxLogicalRect };
auto enclosingTopAndBottom = line.enclosingTopAndBottom();
if (lineLevelVisualAdjustmentsForRuns[lineIndex].needsIntegralPosition) {
Modified: branches/safari-611-branch/Source/WebCore/layout/integration/LayoutIntegrationInlineContentBuilder.h (273458 => 273459)
--- branches/safari-611-branch/Source/WebCore/layout/integration/LayoutIntegrationInlineContentBuilder.h 2021-02-25 00:39:53 UTC (rev 273458)
+++ branches/safari-611-branch/Source/WebCore/layout/integration/LayoutIntegrationInlineContentBuilder.h 2021-02-25 00:39:57 UTC (rev 273459)
@@ -45,7 +45,7 @@
class InlineContentBuilder {
public:
- InlineContentBuilder(const Layout::LayoutState&, const RenderBlockFlow&);
+ InlineContentBuilder(const Layout::LayoutState&, const RenderBlockFlow&, const BoxTree&);
void build(const Layout::InlineFormattingState&, InlineContent&) const;
@@ -58,6 +58,7 @@
const Layout::LayoutState& m_layoutState;
const RenderBlockFlow& m_blockFlow;
+ const BoxTree& m_boxTree;
};
}
Modified: branches/safari-611-branch/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp (273458 => 273459)
--- branches/safari-611-branch/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp 2021-02-25 00:39:53 UTC (rev 273458)
+++ branches/safari-611-branch/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp 2021-02-25 00:39:57 UTC (rev 273459)
@@ -206,8 +206,9 @@
void LineLayout::constructContent()
{
- auto inlineContentBuilder = InlineContentBuilder { m_layoutState, flow() };
+ auto inlineContentBuilder = InlineContentBuilder { m_layoutState, flow(), m_boxTree };
inlineContentBuilder.build(m_inlineFormattingState, ensureInlineContent());
+
ASSERT(m_inlineContent);
for (auto& run : m_inlineContent->runs) {