Title: [271087] trunk/Source/WebCore
- Revision
- 271087
- Author
- [email protected]
- Date
- 2020-12-26 02:20:03 -0800 (Sat, 26 Dec 2020)
Log Message
[LFC][IFC] Remove redundant LineBox::inlineLevelBoxList()
https://bugs.webkit.org/show_bug.cgi?id=220147
Reviewed by Antti Koivisto.
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent):
* layout/inlineformatting/InlineLineBox.h:
(WebCore::Layout::LineBox::inlineLevelBoxList const): Deleted.
* layout/integration/LayoutIntegrationInlineContentBuilder.cpp:
(WebCore::LayoutIntegration::InlineContentBuilder::computeLineLevelVisualAdjustmentsForRuns const):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (271086 => 271087)
--- trunk/Source/WebCore/ChangeLog 2020-12-26 05:39:28 UTC (rev 271086)
+++ trunk/Source/WebCore/ChangeLog 2020-12-26 10:20:03 UTC (rev 271087)
@@ -1,3 +1,17 @@
+2020-12-26 Zalan Bujtas <[email protected]>
+
+ [LFC][IFC] Remove redundant LineBox::inlineLevelBoxList()
+ https://bugs.webkit.org/show_bug.cgi?id=220147
+
+ Reviewed by Antti Koivisto.
+
+ * layout/inlineformatting/InlineFormattingContext.cpp:
+ (WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent):
+ * layout/inlineformatting/InlineLineBox.h:
+ (WebCore::Layout::LineBox::inlineLevelBoxList const): Deleted.
+ * layout/integration/LayoutIntegrationInlineContentBuilder.cpp:
+ (WebCore::LayoutIntegration::InlineContentBuilder::computeLineLevelVisualAdjustmentsForRuns const):
+
2020-12-25 Andy Estes <[email protected]>
REGRESSION (r270662): SourceBufferParserWebM leaks CMSampleBufferRefs
Modified: trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp (271086 => 271087)
--- trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp 2020-12-26 05:39:28 UTC (rev 271086)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp 2020-12-26 10:20:03 UTC (rev 271087)
@@ -518,14 +518,10 @@
return;
// Grab the inline boxes (even those that don't have associated layout boxes on the current line due to line wrapping)
// and update their geometries.
- for (auto& inlineLevelBox : lineBox.inlineLevelBoxList()) {
+ for (auto& inlineLevelBox : lineBox.nonRootInlineLevelBoxes()) {
if (!inlineLevelBox->isInlineBox())
continue;
auto& layoutBox = inlineLevelBox->layoutBox();
- if (&layoutBox == &root()) {
- // Ignore root inline box.
- continue;
- }
auto& boxGeometry = formattingState.boxGeometry(layoutBox);
// Inline boxes may or may not be wrapped and have runs on multiple lines (e.g. <span>first line<br>second line<br>third line</span>)
auto inlineBoxMarginRect = lineBox.logicalMarginRectForInlineLevelBox(layoutBox, boxGeometry);
Modified: trunk/Source/WebCore/layout/inlineformatting/InlineLineBox.h (271086 => 271087)
--- trunk/Source/WebCore/layout/inlineformatting/InlineLineBox.h 2020-12-26 05:39:28 UTC (rev 271086)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineLineBox.h 2020-12-26 10:20:03 UTC (rev 271087)
@@ -147,8 +147,6 @@
InlineRect logicalRectForRootInlineBox() const { return m_rootInlineBox->logicalRect(); }
InlineRect logicalMarginRectForInlineLevelBox(const Box&, const BoxGeometry&) const;
- auto inlineLevelBoxList() const { return m_inlineLevelBoxRectMap.values(); }
-
const InlineLevelBox& rootInlineBox() const { return *m_rootInlineBox; }
using InlineLevelBoxList = Vector<std::unique_ptr<InlineLevelBox>>;
const InlineLevelBoxList& nonRootInlineLevelBoxes() const { return m_nonRootInlineLevelBoxList; }
Modified: trunk/Source/WebCore/layout/integration/LayoutIntegrationInlineContentBuilder.cpp (271086 => 271087)
--- trunk/Source/WebCore/layout/integration/LayoutIntegrationInlineContentBuilder.cpp 2020-12-26 05:39:28 UTC (rev 271086)
+++ trunk/Source/WebCore/layout/integration/LayoutIntegrationInlineContentBuilder.cpp 2020-12-26 10:20:03 UTC (rev 271087)
@@ -169,13 +169,13 @@
for (size_t lineIndex = 0; lineIndex < lines.size(); ++lineIndex) {
auto lineNeedsLegacyIntegralVerticalPosition = [&] {
// InlineTree rounds y position to integral value for certain content (see InlineFlowBox::placeBoxesInBlockDirection).
- auto inlineLevelBoxList = inlineFormattingState.lineBoxes()[lineIndex].inlineLevelBoxList();
- if (inlineLevelBoxList.size() == 1) {
+ auto& nonRootInlineLevelBoxList = inlineFormattingState.lineBoxes()[lineIndex].nonRootInlineLevelBoxes();
+ if (nonRootInlineLevelBoxList.isEmpty()) {
// This is text content only with root inline box.
return true;
}
// Text + <br> (or just <br> or text<span></span><br>) behaves like text.
- for (auto& inlineLevelBox : inlineLevelBoxList) {
+ for (auto& inlineLevelBox : nonRootInlineLevelBoxList) {
if (inlineLevelBox->isAtomicInlineLevelBox()) {
// Content like text<img> prevents legacy snapping.
return false;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes