Title: [271010] trunk/Source/WebCore
- Revision
- 271010
- Author
- [email protected]
- Date
- 2020-12-19 20:17:02 -0800 (Sat, 19 Dec 2020)
Log Message
[LFC][Integration] Remove redundant InlineContent::InlineBox
https://bugs.webkit.org/show_bug.cgi?id=220042
<rdar://problem/72511784>
Reviewed by Simon Fraser.
This is not used anymore since we've decided to turn everything into a run for integration.
* layout/integration/LayoutIntegrationInlineContent.h:
(WebCore::LayoutIntegration::InlineContent::shrinkToFit):
(WebCore::LayoutIntegration::InlineContent::InlineBox::InlineBox): Deleted.
(WebCore::LayoutIntegration::InlineContent::InlineBox::layoutBox const): Deleted.
(WebCore::LayoutIntegration::InlineContent::InlineBox::lineIndex const): Deleted.
(WebCore::LayoutIntegration::InlineContent::InlineBox::rect const): Deleted.
* layout/integration/LayoutIntegrationInlineContentBuilder.cpp:
(WebCore::LayoutIntegration::InlineContentBuilder::build const):
(WebCore::LayoutIntegration::InlineContentBuilder::createDisplayInlineBoxes const): Deleted.
* layout/integration/LayoutIntegrationInlineContentBuilder.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (271009 => 271010)
--- trunk/Source/WebCore/ChangeLog 2020-12-20 00:11:11 UTC (rev 271009)
+++ trunk/Source/WebCore/ChangeLog 2020-12-20 04:17:02 UTC (rev 271010)
@@ -1,5 +1,26 @@
2020-12-19 Zalan Bujtas <[email protected]>
+ [LFC][Integration] Remove redundant InlineContent::InlineBox
+ https://bugs.webkit.org/show_bug.cgi?id=220042
+ <rdar://problem/72511784>
+
+ Reviewed by Simon Fraser.
+
+ This is not used anymore since we've decided to turn everything into a run for integration.
+
+ * layout/integration/LayoutIntegrationInlineContent.h:
+ (WebCore::LayoutIntegration::InlineContent::shrinkToFit):
+ (WebCore::LayoutIntegration::InlineContent::InlineBox::InlineBox): Deleted.
+ (WebCore::LayoutIntegration::InlineContent::InlineBox::layoutBox const): Deleted.
+ (WebCore::LayoutIntegration::InlineContent::InlineBox::lineIndex const): Deleted.
+ (WebCore::LayoutIntegration::InlineContent::InlineBox::rect const): Deleted.
+ * layout/integration/LayoutIntegrationInlineContentBuilder.cpp:
+ (WebCore::LayoutIntegration::InlineContentBuilder::build const):
+ (WebCore::LayoutIntegration::InlineContentBuilder::createDisplayInlineBoxes const): Deleted.
+ * layout/integration/LayoutIntegrationInlineContentBuilder.h:
+
+2020-12-19 Zalan Bujtas <[email protected]>
+
width: max-content with box-sizing: border-box should leave space for padding (Twitter date hover overflow)
https://bugs.webkit.org/show_bug.cgi?id=219687
<rdar://problem/72137685>
Modified: trunk/Source/WebCore/layout/integration/LayoutIntegrationInlineContent.h (271009 => 271010)
--- trunk/Source/WebCore/layout/integration/LayoutIntegrationInlineContent.h 2020-12-20 00:11:11 UTC (rev 271009)
+++ trunk/Source/WebCore/layout/integration/LayoutIntegrationInlineContent.h 2020-12-20 04:17:02 UTC (rev 271010)
@@ -50,31 +50,11 @@
static Ref<InlineContent> create(const LineLayout& lineLayout) { return adoptRef(*new InlineContent(lineLayout)); }
~InlineContent();
- class InlineBox {
- public:
- InlineBox(const Layout::Box& layoutBox, size_t lineIndex, const FloatRect& rect)
- : m_layoutBox(makeWeakPtr(layoutBox))
- , m_lineIndex(lineIndex)
- , m_rect(rect)
- {
- }
- const Layout::Box& layoutBox() const { return *m_layoutBox; }
-
- size_t lineIndex() const { return m_lineIndex; }
- const FloatRect& rect() const { return m_rect; }
-
- private:
- WeakPtr<const Layout::Box> m_layoutBox;
- size_t m_lineIndex;
- FloatRect m_rect;
- };
-
using Runs = Vector<Run, 4>;
using Lines = Vector<Line, 4>;
Runs runs;
Lines lines;
- Vector<InlineBox> inlineBoxes;
float clearGapAfterLastLine { 0 };
@@ -96,7 +76,6 @@
{
runs.shrinkToFit();
lines.shrinkToFit();
- inlineBoxes.shrinkToFit();
}
}
Modified: trunk/Source/WebCore/layout/integration/LayoutIntegrationInlineContentBuilder.cpp (271009 => 271010)
--- trunk/Source/WebCore/layout/integration/LayoutIntegrationInlineContentBuilder.cpp 2020-12-20 00:11:11 UTC (rev 271009)
+++ trunk/Source/WebCore/layout/integration/LayoutIntegrationInlineContentBuilder.cpp 2020-12-20 04:17:02 UTC (rev 271010)
@@ -157,7 +157,6 @@
auto lineLevelVisualAdjustmentsForRuns = computeLineLevelVisualAdjustmentsForRuns(inlineFormattingState);
createDisplayLineRuns(inlineFormattingState, inlineContent, lineLevelVisualAdjustmentsForRuns);
createDisplayLines(inlineFormattingState, inlineContent, lineLevelVisualAdjustmentsForRuns);
- createDisplayInlineBoxes(inlineFormattingState, inlineContent);
}
InlineContentBuilder::LineLevelVisualAdjustmentsForRunsList InlineContentBuilder::computeLineLevelVisualAdjustmentsForRuns(const Layout::InlineFormattingState& inlineFormattingState) const
@@ -349,33 +348,7 @@
}
}
-void InlineContentBuilder::createDisplayInlineBoxes(const Layout::InlineFormattingState& inlineFormattingState, InlineContent& inlineContent) const
-{
- auto& lines = inlineFormattingState.lines();
- auto& lineBoxes = inlineFormattingState.lineBoxes();
- for (size_t lineIndex = 0; lineIndex < lineBoxes.size(); ++lineIndex) {
- auto& lineBox = lineBoxes[lineIndex];
- auto& line = lines[lineIndex];
-
- auto& lineBoxLogicalRect = line.lineBoxLogicalRect();
-
- for (auto& inlineLevelBox : lineBox.inlineLevelBoxList()) {
- if (!inlineLevelBox->isInlineBox() || inlineLevelBox->isRootInlineBox())
- continue;
- auto& layoutBox = inlineLevelBox->layoutBox();
- auto& geometry = m_layoutState.geometryForBox(layoutBox);
- auto inlineLevelBoxLogicalRect = lineBox.logicalMarginRectForInlineLevelBox(layoutBox, geometry);
- // inlineLevelBoxLogicalRect encloses the margin box, but we need border box for the display line.
- inlineLevelBoxLogicalRect.expandVertically(-std::max(0_lu, geometry.marginBefore() + geometry.marginAfter()));
- inlineLevelBoxLogicalRect.moveVertically(std::max(0_lu, geometry.marginBefore()));
- inlineLevelBoxLogicalRect.moveBy(lineBoxLogicalRect.topLeft());
-
- inlineContent.inlineBoxes.append({ layoutBox, lineIndex, inlineLevelBoxLogicalRect });
- }
- }
}
-
}
-}
#endif
Modified: trunk/Source/WebCore/layout/integration/LayoutIntegrationInlineContentBuilder.h (271009 => 271010)
--- trunk/Source/WebCore/layout/integration/LayoutIntegrationInlineContentBuilder.h 2020-12-20 00:11:11 UTC (rev 271009)
+++ trunk/Source/WebCore/layout/integration/LayoutIntegrationInlineContentBuilder.h 2020-12-20 04:17:02 UTC (rev 271010)
@@ -55,7 +55,6 @@
LineLevelVisualAdjustmentsForRunsList computeLineLevelVisualAdjustmentsForRuns(const Layout::InlineFormattingState&) const;
void createDisplayLineRuns(const Layout::InlineFormattingState&, InlineContent&, const LineLevelVisualAdjustmentsForRunsList&) const;
void createDisplayLines(const Layout::InlineFormattingState&, InlineContent&, const LineLevelVisualAdjustmentsForRunsList&) const;
- void createDisplayInlineBoxes(const Layout::InlineFormattingState&, InlineContent&) const;
const Layout::LayoutState& m_layoutState;
const RenderBlockFlow& m_blockFlow;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes