Diff
Modified: trunk/Source/WebCore/ChangeLog (278406 => 278407)
--- trunk/Source/WebCore/ChangeLog 2021-06-03 14:27:11 UTC (rev 278406)
+++ trunk/Source/WebCore/ChangeLog 2021-06-03 15:23:25 UTC (rev 278407)
@@ -1,3 +1,32 @@
+2021-06-03 Antti Koivisto <[email protected]>
+
+ Remove TrailingFloatsRootInlineBox
+ https://bugs.webkit.org/show_bug.cgi?id=226579
+
+ Reviewed by Sam Weinig.
+
+ Replace it with a bit in LegacyRootInlineBox.
+
+ * Sources.txt:
+ * WebCore.xcodeproj/project.pbxproj:
+ * editing/VisibleUnits.cpp:
+ (WebCore::previousLinePosition):
+ (WebCore::nextLinePosition):
+ * rendering/LegacyInlineBox.cpp:
+ (WebCore::LegacyInlineBox::logicalHeight const):
+ * rendering/LegacyInlineFlowBox.h:
+ (WebCore::LegacyInlineFlowBox::LegacyInlineFlowBox):
+ * rendering/LegacyLineLayout.cpp:
+ (WebCore::LegacyLineLayout::linkToEndLineIfNeeded):
+ * rendering/LegacyRootInlineBox.h:
+ (WebCore::LegacyRootInlineBox::isForTrailingFloats const):
+ (WebCore::LegacyRootInlineBox::setIsForTrailingFloats):
+ (WebCore::LegacyRootInlineBox::isTrailingFloatsRootInlineBox const): Deleted.
+ * rendering/RenderLineBoxList.cpp:
+ (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
+ * rendering/TrailingFloatsRootInlineBox.cpp: Removed.
+ * rendering/TrailingFloatsRootInlineBox.h: Removed.
+
2021-06-03 Miguel Gomez <[email protected]>
[GStreamer] Remove dependency on glvideoflip and videoflip
Modified: trunk/Source/WebCore/Sources.txt (278406 => 278407)
--- trunk/Source/WebCore/Sources.txt 2021-06-03 14:27:11 UTC (rev 278406)
+++ trunk/Source/WebCore/Sources.txt 2021-06-03 15:23:25 UTC (rev 278407)
@@ -2358,7 +2358,6 @@
rendering/TextDecorationPainter.cpp
rendering/TextPaintStyle.cpp
rendering/TextPainter.cpp
-rendering/TrailingFloatsRootInlineBox.cpp
rendering/line/LineBreaker.cpp
rendering/line/LineInfo.cpp
rendering/line/LineWidth.cpp
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (278406 => 278407)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2021-06-03 14:27:11 UTC (rev 278406)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2021-06-03 15:23:25 UTC (rev 278407)
@@ -6394,7 +6394,6 @@
0FFF1B81251BC6630098795A /* DisplayTree.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DisplayTree.h; sourceTree = "<group>"; };
0FFF1B82251BC6630098795A /* DisplayTree.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = DisplayTree.cpp; sourceTree = "<group>"; };
10FB084A14E15C7E00A3DB98 /* PublicURLManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PublicURLManager.h; sourceTree = "<group>"; };
- 1100FC6E1FDB3C4D00DD961B /* TrailingFloatsRootInlineBox.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TrailingFloatsRootInlineBox.cpp; sourceTree = "<group>"; };
11100FC72092764C0081AA6C /* LayoutIterator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LayoutIterator.h; sourceTree = "<group>"; };
11100FC920927CBC0081AA6C /* LayoutChildIterator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LayoutChildIterator.h; sourceTree = "<group>"; };
11100FD5209514DE0081AA6C /* LayoutTreeBuilder.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = LayoutTreeBuilder.cpp; sourceTree = "<group>"; };
@@ -7713,7 +7712,6 @@
37E3524C12450C6600BAF5D9 /* InputType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InputType.h; sourceTree = "<group>"; };
37F818FB0D657606005E1F05 /* WebCoreURLResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebCoreURLResponse.h; sourceTree = "<group>"; };
37F818FC0D657606005E1F05 /* WebCoreURLResponse.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCoreURLResponse.mm; sourceTree = "<group>"; };
- 37FC96DA1104ED71003E1FAD /* TrailingFloatsRootInlineBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TrailingFloatsRootInlineBox.h; sourceTree = "<group>"; };
37FD4297118368460093C029 /* TreeDepthLimit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TreeDepthLimit.h; sourceTree = "<group>"; };
387AE9581E8E92EF0000DE96 /* JSWebGPUSize.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGPUSize.cpp; sourceTree = "<group>"; };
387AE9591E8E92EF0000DE96 /* JSWebGPUSize.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGPUSize.h; sourceTree = "<group>"; };
@@ -30421,8 +30419,6 @@
1C18DA57181AF6A500C4EF22 /* TextPainter.h */,
E4C91A0F1802343900A17F6D /* TextPaintStyle.cpp */,
E4C91A0D1802343100A17F6D /* TextPaintStyle.h */,
- 1100FC6E1FDB3C4D00DD961B /* TrailingFloatsRootInlineBox.cpp */,
- 37FC96DA1104ED71003E1FAD /* TrailingFloatsRootInlineBox.h */,
BCA257141293C010007A263D /* VerticalPositionCache.h */,
);
path = rendering;
Modified: trunk/Source/WebCore/editing/VisibleUnits.cpp (278406 => 278407)
--- trunk/Source/WebCore/editing/VisibleUnits.cpp 2021-06-03 14:27:11 UTC (rev 278406)
+++ trunk/Source/WebCore/editing/VisibleUnits.cpp 2021-06-03 15:23:25 UTC (rev 278407)
@@ -963,7 +963,7 @@
if (auto run = visiblePosition.inlineRunAndOffset().run) {
line = run.line().previous();
// We want to skip zero height boxes.
- // This could happen in case it is a TrailingFloatsRootInlineBox.
+ // This could happen in case it is a LegacyRootInlineBox with trailing floats.
if (!line || !line->logicalHeight() || !line.firstRun())
line = { };
}
@@ -1013,7 +1013,7 @@
if (auto run = visiblePosition.inlineRunAndOffset().run) {
line = run.line().next();
// We want to skip zero height boxes.
- // This could happen in case it is a TrailingFloatsRootInlineBox.
+ // This could happen in case it is a LegacyRootInlineBox with trailing floats.
if (!line || !line->logicalHeight() || !line.firstRun())
line = { };
}
Modified: trunk/Source/WebCore/rendering/LegacyInlineBox.cpp (278406 => 278407)
--- trunk/Source/WebCore/rendering/LegacyInlineBox.cpp 2021-06-03 14:27:11 UTC (rev 278406)
+++ trunk/Source/WebCore/rendering/LegacyInlineBox.cpp 2021-06-03 15:23:25 UTC (rev 278407)
@@ -131,6 +131,9 @@
if (hasVirtualLogicalHeight())
return virtualLogicalHeight();
+ if (is<LegacyRootInlineBox>(*this) && downcast<LegacyRootInlineBox>(*this).isForTrailingFloats())
+ return 0;
+
const RenderStyle& lineStyle = this->lineStyle();
if (renderer().isTextOrLineBreak())
return lineStyle.fontMetrics().height();
Modified: trunk/Source/WebCore/rendering/LegacyInlineFlowBox.h (278406 => 278407)
--- trunk/Source/WebCore/rendering/LegacyInlineFlowBox.h 2021-06-03 14:27:11 UTC (rev 278406)
+++ trunk/Source/WebCore/rendering/LegacyInlineFlowBox.h 2021-06-03 15:23:25 UTC (rev 278407)
@@ -50,6 +50,7 @@
, m_hasAnnotationsBefore(false)
, m_hasAnnotationsAfter(false)
, m_isFirstAfterPageBreak(false)
+ , m_isForTrailingFloats(false)
#if !ASSERT_WITH_SECURITY_IMPLICATION_DISABLED
, m_hasBadChildList(false)
#endif
@@ -332,6 +333,7 @@
unsigned m_lineBreakBidiStatusLast : 5; // UCharDirection
unsigned m_isFirstAfterPageBreak : 1;
+ unsigned m_isForTrailingFloats : 1;
// End of RootInlineBox-specific members.
Modified: trunk/Source/WebCore/rendering/LegacyLineLayout.cpp (278406 => 278407)
--- trunk/Source/WebCore/rendering/LegacyLineLayout.cpp 2021-06-03 14:27:11 UTC (rev 278406)
+++ trunk/Source/WebCore/rendering/LegacyLineLayout.cpp 2021-06-03 15:23:25 UTC (rev 278407)
@@ -47,7 +47,6 @@
#include "RenderView.h"
#include "SVGRootInlineBox.h"
#include "Settings.h"
-#include "TrailingFloatsRootInlineBox.h"
#include "VerticalPositionCache.h"
#include <wtf/StdLibExtras.h>
@@ -1660,7 +1659,8 @@
if (layoutState.checkForFloatsFromLastLine()) {
LayoutUnit bottomVisualOverflow = lastRootBox()->logicalBottomVisualOverflow();
LayoutUnit bottomLayoutOverflow = lastRootBox()->logicalBottomLayoutOverflow();
- auto newLineBox = makeUnique<TrailingFloatsRootInlineBox>(m_flow);
+ auto newLineBox = makeUnique<LegacyRootInlineBox>(m_flow);
+ newLineBox->setIsForTrailingFloats();
auto trailingFloatsLineBox = newLineBox.get();
m_lineBoxes.appendLineBox(WTFMove(newLineBox));
trailingFloatsLineBox->setConstructed();
Modified: trunk/Source/WebCore/rendering/LegacyRootInlineBox.h (278406 => 278407)
--- trunk/Source/WebCore/rendering/LegacyRootInlineBox.h 2021-06-03 14:27:11 UTC (rev 278406)
+++ trunk/Source/WebCore/rendering/LegacyRootInlineBox.h 2021-06-03 15:23:25 UTC (rev 278407)
@@ -97,6 +97,9 @@
unsigned lineBreakPos() const { return m_lineBreakPos; }
void setLineBreakPos(unsigned p) { m_lineBreakPos = p; }
+ bool isForTrailingFloats() const { return m_isForTrailingFloats; }
+ void setIsForTrailingFloats() { m_isForTrailingFloats = true; }
+
using LegacyInlineBox::endsWithBreak;
using LegacyInlineBox::setEndsWithBreak;
@@ -182,8 +185,6 @@
return LegacyInlineFlowBox::logicalBottomLayoutOverflow(lineBottom());
}
- virtual bool isTrailingFloatsRootInlineBox() const { return false; }
-
#if ENABLE(TREE_DEBUGGING)
void outputLineBox(WTF::TextStream&, bool mark, int depth) const final;
const char* boxName() const final;
Modified: trunk/Source/WebCore/rendering/RenderLineBoxList.cpp (278406 => 278407)
--- trunk/Source/WebCore/rendering/RenderLineBoxList.cpp 2021-06-03 14:27:11 UTC (rev 278406)
+++ trunk/Source/WebCore/rendering/RenderLineBoxList.cpp 2021-06-03 15:23:25 UTC (rev 278407)
@@ -389,7 +389,7 @@
// FIXME: We should be able to figure out the actual "changed child" even when we are calling through empty inlines recursively.
if (is<RenderInline>(child) && !downcast<RenderInline>(child).firstLineBoxIncludingCulling()) {
auto* lastRootBox = nextBox->blockFlow().lastRootBox();
- if (lastRootBox->isTrailingFloatsRootInlineBox() && !lastRootBox->isDirty())
+ if (lastRootBox->isForTrailingFloats() && !lastRootBox->isDirty())
lastRootBox->markDirty();
}
}
Deleted: trunk/Source/WebCore/rendering/TrailingFloatsRootInlineBox.cpp (278406 => 278407)
--- trunk/Source/WebCore/rendering/TrailingFloatsRootInlineBox.cpp 2021-06-03 14:27:11 UTC (rev 278406)
+++ trunk/Source/WebCore/rendering/TrailingFloatsRootInlineBox.cpp 2021-06-03 15:23:25 UTC (rev 278407)
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2017 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "TrailingFloatsRootInlineBox.h"
-
-#include <wtf/IsoMallocInlines.h>
-
-namespace WebCore {
-
-WTF_MAKE_ISO_ALLOCATED_IMPL(TrailingFloatsRootInlineBox);
-
-} // namespace WebCore
Deleted: trunk/Source/WebCore/rendering/TrailingFloatsRootInlineBox.h (278406 => 278407)
--- trunk/Source/WebCore/rendering/TrailingFloatsRootInlineBox.h 2021-06-03 14:27:11 UTC (rev 278406)
+++ trunk/Source/WebCore/rendering/TrailingFloatsRootInlineBox.h 2021-06-03 15:23:25 UTC (rev 278407)
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#include "LegacyRootInlineBox.h"
-
-namespace WebCore {
-
-class TrailingFloatsRootInlineBox final : public LegacyRootInlineBox {
- WTF_MAKE_ISO_ALLOCATED(TrailingFloatsRootInlineBox);
-public:
- explicit TrailingFloatsRootInlineBox(RenderBlockFlow& blockFlow)
- : LegacyRootInlineBox(blockFlow)
- {
- setHasVirtualLogicalHeight();
- }
-
-private:
- float virtualLogicalHeight() const override { return 0; }
- bool isTrailingFloatsRootInlineBox() const final { return true; }
-};
-
-} // namespace WebCore