Skip to content

Commit

Permalink
[Legacy line layout removal] Remove layout overflow and box model pro…
Browse files Browse the repository at this point in the history
…perties

https://bugs.webkit.org/show_bug.cgi?id=271757
rdar://125477907

Reviewed by Alan Baradlay.

These are not relevant for the remaining client, SVG text.

* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/layout/integration/inline/InlineIteratorLineBoxLegacyPath.h:
(WebCore::InlineIterator::LineBoxIteratorLegacyPath::scrollableOverflowTop const):
(WebCore::InlineIterator::LineBoxIteratorLegacyPath::scrollableOverflowBottom const):
* Source/WebCore/rendering/LegacyInlineFlowBox.cpp:
(WebCore::LegacyInlineFlowBox::addToLine):
(WebCore::LegacyInlineFlowBox::computeOverflow):
(WebCore::LegacyInlineFlowBox::setOverflowFromLogicalRects):
(WebCore::LegacyInlineFlowBox::addBoxShadowVisualOverflow): Deleted.
(WebCore::LegacyInlineFlowBox::addBorderOutsetVisualOverflow): Deleted.
(WebCore::LegacyInlineFlowBox::addOutlineVisualOverflow): Deleted.
(WebCore::LegacyInlineFlowBox::addReplacedChildOverflow): Deleted.
(WebCore::LegacyInlineFlowBox::setLayoutOverflow): Deleted.
* Source/WebCore/rendering/LegacyInlineFlowBox.h:
(WebCore::LegacyInlineFlowBox::marginLogicalLeft const): Deleted.
(WebCore::LegacyInlineFlowBox::marginLogicalRight const): Deleted.
(WebCore::LegacyInlineFlowBox::layoutOverflowRect const): Deleted.
(WebCore::LegacyInlineFlowBox::logicalTopLayoutOverflow const): Deleted.
(WebCore::LegacyInlineFlowBox::logicalBottomLayoutOverflow const): Deleted.
(WebCore::LegacyInlineFlowBox::logicalLayoutOverflowRect const): Deleted.
* Source/WebCore/rendering/LegacyInlineFlowBoxInlines.h: Removed.
* Source/WebCore/rendering/LegacyLineLayout.cpp:
(WebCore::LegacyLineLayout::createLineBoxesFromBidiRuns):
(WebCore::LegacyLineLayout::layoutRunsAndFloats):
(WebCore::LegacyLineLayout::layoutRunsAndFloatsInRange):
(WebCore::LegacyLineLayout::layoutLineBoxes):
(WebCore::LegacyLineLayout::addOverflowFromInlineChildren):
* Source/WebCore/rendering/LegacyLineLayout.h:
* Source/WebCore/rendering/LegacyRootInlineBox.cpp:
(WebCore::LegacyRootInlineBox::paddedLayoutOverflowRect const): Deleted.
* Source/WebCore/rendering/LegacyRootInlineBox.h:
(WebCore::LegacyRootInlineBox::baselineType const):
(WebCore::LegacyRootInlineBox::logicalBottomVisualOverflow const):
(WebCore::LegacyRootInlineBox::logicalTopLayoutOverflow const): Deleted.
(WebCore::LegacyRootInlineBox::logicalBottomLayoutOverflow const): Deleted.
* Source/WebCore/rendering/RenderInline.cpp:
(WebCore::RenderInline::innerPaddingBoxWidth const):
* Source/WebCore/rendering/line/BreakingContext.h:
(WebCore::BreakingContext::handleEmptyInline):
* Source/WebCore/rendering/line/LineInlineHeaders.h:
(WebCore::requiresLineBox):
(WebCore::hasInlineDirectionBordersPaddingOrMargin): Deleted.
(WebCore::alwaysRequiresLineBox): Deleted.
* Source/WebCore/rendering/line/LineLayoutState.h: Removed.

Remove as it has been reduced to nothing.

Canonical link: https://commits.webkit.org/276735@main
  • Loading branch information
anttijk committed Mar 27, 2024
1 parent 4c3caa5 commit b852cc0
Show file tree
Hide file tree
Showing 13 changed files with 35 additions and 415 deletions.
8 changes: 0 additions & 8 deletions Source/WebCore/WebCore.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3501,7 +3501,6 @@
9331BAB329EA415500137ED2 /* RenderElementInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 9331BAB229EA415400137ED2 /* RenderElementInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
9331BAB929EC6C6500137ED2 /* LegacyInlineIteratorInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 9331BAB829EC6C6400137ED2 /* LegacyInlineIteratorInlines.h */; };
9331BABB29EC801400137ED2 /* RenderBoxModelObjectInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 9331BABA29EC801300137ED2 /* RenderBoxModelObjectInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
9331BABD29EC839E00137ED2 /* LegacyInlineFlowBoxInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 9331BABC29EC839B00137ED2 /* LegacyInlineFlowBoxInlines.h */; };
9331BABF29EC853900137ED2 /* RenderBoxInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 9331BABE29EC853800137ED2 /* RenderBoxInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
9331BAC129EC8D9900137ED2 /* RenderBlockInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 9331BAC029EC8D9800137ED2 /* RenderBlockInlines.h */; };
9331BAC329EC916C00137ED2 /* LayoutBoxInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 9331BAC229EC916C00137ED2 /* LayoutBoxInlines.h */; };
Expand Down Expand Up @@ -6516,7 +6515,6 @@
FF945ECC161F7F3600971BC8 /* PseudoElement.h in Headers */ = {isa = PBXBuildFile; fileRef = FF945ECA161F7F3600971BC8 /* PseudoElement.h */; };
FFAC30FE184FB145008C4F1E /* TrailingObjects.h in Headers */ = {isa = PBXBuildFile; fileRef = FFAC30FC184FB145008C4F1E /* TrailingObjects.h */; settings = {ATTRIBUTES = (Private, ); }; };
FFDBC047183D27B700407109 /* LineWidth.h in Headers */ = {isa = PBXBuildFile; fileRef = FFDBC045183D27B700407109 /* LineWidth.h */; settings = {ATTRIBUTES = (Private, ); }; };
FFEFAB2A18380DA000514534 /* LineLayoutState.h in Headers */ = {isa = PBXBuildFile; fileRef = FFEFAB2918380DA000514534 /* LineLayoutState.h */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -14720,7 +14718,6 @@
9331BAB229EA415400137ED2 /* RenderElementInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderElementInlines.h; sourceTree = "<group>"; };
9331BAB829EC6C6400137ED2 /* LegacyInlineIteratorInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LegacyInlineIteratorInlines.h; sourceTree = "<group>"; };
9331BABA29EC801300137ED2 /* RenderBoxModelObjectInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderBoxModelObjectInlines.h; sourceTree = "<group>"; };
9331BABC29EC839B00137ED2 /* LegacyInlineFlowBoxInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LegacyInlineFlowBoxInlines.h; sourceTree = "<group>"; };
9331BABE29EC853800137ED2 /* RenderBoxInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderBoxInlines.h; sourceTree = "<group>"; };
9331BAC029EC8D9800137ED2 /* RenderBlockInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderBlockInlines.h; sourceTree = "<group>"; };
9331BAC229EC916C00137ED2 /* LayoutBoxInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayoutBoxInlines.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -20737,7 +20734,6 @@
FFB698CE1833F17600158A31 /* LineInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LineInfo.h; sourceTree = "<group>"; };
FFDBC045183D27B700407109 /* LineWidth.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LineWidth.h; sourceTree = "<group>"; };
FFDBC046183D27B700407109 /* LineWidth.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LineWidth.cpp; sourceTree = "<group>"; };
FFEFAB2918380DA000514534 /* LineLayoutState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LineLayoutState.h; sourceTree = "<group>"; };
FFEFAB2D183BCB6F00514534 /* LineInlineHeaders.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LineInlineHeaders.h; sourceTree = "<group>"; };
/* End PBXFileReference section */

Expand Down Expand Up @@ -36256,7 +36252,6 @@
A8CFF5DE0A155A05000A4234 /* LegacyInlineBox.h */,
A8CFF5DD0A155A05000A4234 /* LegacyInlineFlowBox.cpp */,
A8CFF5DC0A155A05000A4234 /* LegacyInlineFlowBox.h */,
9331BABC29EC839B00137ED2 /* LegacyInlineFlowBoxInlines.h */,
930C90DC19CF965300D6C21A /* LegacyInlineIterator.cpp */,
BCE789151120D6080060ECE5 /* LegacyInlineIterator.h */,
9331BAB829EC6C6400137ED2 /* LegacyInlineIteratorInlines.h */,
Expand Down Expand Up @@ -37709,7 +37704,6 @@
FFB698CD1833F17600158A31 /* LineInfo.cpp */,
FFB698CE1833F17600158A31 /* LineInfo.h */,
FFEFAB2D183BCB6F00514534 /* LineInlineHeaders.h */,
FFEFAB2918380DA000514534 /* LineLayoutState.h */,
FFDBC046183D27B700407109 /* LineWidth.cpp */,
FFDBC045183D27B700407109 /* LineWidth.h */,
FFAC30FD184FB145008C4F1E /* TrailingObjects.cpp */,
Expand Down Expand Up @@ -40714,7 +40708,6 @@
2DE70023192FE82A00B0975C /* LegacyDisplayRefreshMonitorMac.h in Headers */,
A8CFF5E50A155A05000A4234 /* LegacyInlineBox.h in Headers */,
A8CFF5E30A155A05000A4234 /* LegacyInlineFlowBox.h in Headers */,
9331BABD29EC839E00137ED2 /* LegacyInlineFlowBoxInlines.h in Headers */,
BCE789161120D6080060ECE5 /* LegacyInlineIterator.h in Headers */,
9331BAB929EC6C6500137ED2 /* LegacyInlineIteratorInlines.h in Headers */,
BCEA485A097D93020094C9E4 /* LegacyInlineTextBox.h in Headers */,
Expand Down Expand Up @@ -40784,7 +40777,6 @@
B22279650D00BF220071B782 /* LinearGradientAttributes.h in Headers */,
AB31C91E10AE1B8E000C7B92 /* LineClampValue.h in Headers */,
DDD517EC2A9FC5440069AF81 /* LineLayoutResult.h in Headers */,
FFEFAB2A18380DA000514534 /* LineLayoutState.h in Headers */,
6F1B101427E2D524007178E6 /* LineSelection.h in Headers */,
FFDBC047183D27B700407109 /* LineWidth.h in Headers */,
0245150C297CAFA300DFD845 /* LinkDecorationFilteringData.h in Headers */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ class LineBoxIteratorLegacyPath {
float logicalWidth() const { return m_rootInlineBox->lineBoxWidth().toFloat(); }
float inkOverflowLogicalTop() const { return m_rootInlineBox->logicalTopVisualOverflow(); }
float inkOverflowLogicalBottom() const { return m_rootInlineBox->logicalBottomVisualOverflow(); }
float scrollableOverflowTop() const { return m_rootInlineBox->logicalTopLayoutOverflow(); }
float scrollableOverflowBottom() const { return m_rootInlineBox->logicalBottomLayoutOverflow(); }
float scrollableOverflowTop() const { return logicalTop(); }
float scrollableOverflowBottom() const { return logicalBottom(); }

bool hasEllipsis() const { return false; }
FloatRect ellipsisVisualRectIgnoringBlockDirection() const
Expand Down
132 changes: 5 additions & 127 deletions Source/WebCore/rendering/LegacyInlineFlowBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include "GraphicsContext.h"
#include "HitTestResult.h"
#include "InlineBoxPainter.h"
#include "LegacyInlineFlowBoxInlines.h"
#include "LegacyInlineTextBox.h"
#include "LegacyRootInlineBox.h"
#include "RenderBlock.h"
Expand Down Expand Up @@ -118,7 +117,7 @@ void LegacyInlineFlowBox::addToLine(LegacyInlineBox* child)
hasMarkers = textBox->hasMarkers();
if (childStyle->letterSpacing() < 0 || childStyle->textShadow() || childStyle->textEmphasisMark() != TextEmphasisMark::None || childStyle->hasPositiveStrokeWidth() || hasMarkers || !childStyle->textUnderlineOffset().isAuto() || !childStyle->textDecorationThickness().isAuto() || childStyle->textUnderlinePosition() != TextUnderlinePosition::Auto)
child->clearKnownToHaveNoOverflow();
} else if (childStyle.boxShadow() || child->boxModelObject()->hasSelfPaintingLayer() || childStyle.hasBorderImageOutsets())
} else if (child->boxModelObject()->hasSelfPaintingLayer())
child->clearKnownToHaveNoOverflow();
else if (childStyle.hasOutlineInVisualOverflow())
child->clearKnownToHaveNoOverflow();
Expand Down Expand Up @@ -221,67 +220,6 @@ void LegacyInlineFlowBox::adjustPosition(float dx, float dy)
m_overflow->move(LayoutUnit(dx), LayoutUnit(dy));
}

inline void LegacyInlineFlowBox::addBoxShadowVisualOverflow(LayoutRect& logicalVisualOverflow)
{
// box-shadow on root line boxes is applying to the block and not to the lines.
if (!parent())
return;

const RenderStyle& lineStyle = this->lineStyle();
if (!lineStyle.boxShadow())
return;

LayoutUnit boxShadowLogicalTop;
LayoutUnit boxShadowLogicalBottom;
lineStyle.getBoxShadowBlockDirectionExtent(boxShadowLogicalTop, boxShadowLogicalBottom);

// Similar to how glyph overflow works, if our lines are flipped, then it's actually the opposite shadow that applies, since
// the line is "upside down" in terms of block coordinates.
LayoutUnit shadowLogicalTop = lineStyle.isFlippedLinesWritingMode() ? -boxShadowLogicalBottom : boxShadowLogicalTop;
LayoutUnit shadowLogicalBottom = lineStyle.isFlippedLinesWritingMode() ? -boxShadowLogicalTop : boxShadowLogicalBottom;

LayoutUnit logicalTopVisualOverflow = std::min(LayoutUnit(logicalTop() + shadowLogicalTop), logicalVisualOverflow.y());
LayoutUnit logicalBottomVisualOverflow = std::max(LayoutUnit(logicalBottom() + shadowLogicalBottom), logicalVisualOverflow.maxY());

LayoutUnit boxShadowLogicalLeft;
LayoutUnit boxShadowLogicalRight;
lineStyle.getBoxShadowInlineDirectionExtent(boxShadowLogicalLeft, boxShadowLogicalRight);

LayoutUnit logicalLeftVisualOverflow = std::min(LayoutUnit(logicalLeft() + boxShadowLogicalLeft), logicalVisualOverflow.x());
LayoutUnit logicalRightVisualOverflow = std::max(LayoutUnit(logicalRight() + boxShadowLogicalRight), logicalVisualOverflow.maxX());

logicalVisualOverflow = LayoutRect(logicalLeftVisualOverflow, logicalTopVisualOverflow, logicalRightVisualOverflow - logicalLeftVisualOverflow, logicalBottomVisualOverflow - logicalTopVisualOverflow);
}

inline void LegacyInlineFlowBox::addBorderOutsetVisualOverflow(LayoutRect& logicalVisualOverflow)
{
// border-image-outset on root line boxes is applying to the block and not to the lines.
if (!parent())
return;

const RenderStyle& lineStyle = this->lineStyle();
if (!lineStyle.hasBorderImageOutsets())
return;

LayoutBoxExtent borderOutsets = lineStyle.borderImageOutsets();

LayoutUnit borderOutsetLogicalTop = borderOutsets.before(lineStyle.writingMode());
LayoutUnit borderOutsetLogicalBottom = borderOutsets.after(lineStyle.writingMode());

// Similar to how glyph overflow works, if our lines are flipped, then it's actually the opposite border that applies, since
// the line is "upside down" in terms of block coordinates. vertical-rl and horizontal-bt are the flipped line modes.
LayoutUnit outsetLogicalTop = lineStyle.isFlippedLinesWritingMode() ? borderOutsetLogicalBottom : borderOutsetLogicalTop;
LayoutUnit outsetLogicalBottom = lineStyle.isFlippedLinesWritingMode() ? borderOutsetLogicalTop : borderOutsetLogicalBottom;

LayoutUnit logicalTopVisualOverflow = std::min(LayoutUnit(logicalTop() - outsetLogicalTop), logicalVisualOverflow.y());
LayoutUnit logicalBottomVisualOverflow = std::max(LayoutUnit(logicalBottom() + outsetLogicalBottom), logicalVisualOverflow.maxY());

LayoutUnit logicalLeftVisualOverflow = std::min(LayoutUnit(logicalLeft()), logicalVisualOverflow.x());
LayoutUnit logicalRightVisualOverflow = std::max(LayoutUnit(logicalRight()), logicalVisualOverflow.maxX());

logicalVisualOverflow = LayoutRect(logicalLeftVisualOverflow, logicalTopVisualOverflow, logicalRightVisualOverflow - logicalLeftVisualOverflow, logicalBottomVisualOverflow - logicalTopVisualOverflow);
}

inline void LegacyInlineFlowBox::addTextBoxVisualOverflow(LegacyInlineTextBox& textBox, GlyphOverflowAndFallbackFontsMap& textBoxDataMap, LayoutRect& logicalVisualOverflow)
{
if (textBox.knownToHaveNoOverflow())
Expand Down Expand Up @@ -345,41 +283,6 @@ inline void LegacyInlineFlowBox::addTextBoxVisualOverflow(LegacyInlineTextBox& t
textBox.setLogicalOverflowRect(logicalVisualOverflow);
}

inline void LegacyInlineFlowBox::addOutlineVisualOverflow(LayoutRect& logicalVisualOverflow)
{
const auto& lineStyle = this->lineStyle();
if (!lineStyle.hasOutlineInVisualOverflow())
return;
LayoutUnit outlineSize { lineStyle.outlineSize() };
LayoutUnit logicalTopVisualOverflow = std::min(LayoutUnit(logicalTop() - outlineSize), logicalVisualOverflow.y());
LayoutUnit logicalBottomVisualOverflow = std::max(LayoutUnit(logicalBottom() + outlineSize), logicalVisualOverflow.maxY());
LayoutUnit logicalLeftVisualOverflow = std::min(LayoutUnit(logicalLeft() - outlineSize), logicalVisualOverflow.x());
LayoutUnit logicalRightVisualOverflow = std::max(LayoutUnit(logicalRight() + outlineSize), logicalVisualOverflow.maxX());
logicalVisualOverflow = LayoutRect(logicalLeftVisualOverflow, logicalTopVisualOverflow,
logicalRightVisualOverflow - logicalLeftVisualOverflow, logicalBottomVisualOverflow - logicalTopVisualOverflow);
}

inline void LegacyInlineFlowBox::addReplacedChildOverflow(const LegacyInlineBox* inlineBox, LayoutRect& logicalLayoutOverflow, LayoutRect& logicalVisualOverflow)
{
const RenderBox& box = downcast<RenderBox>(inlineBox->renderer());

// Visual overflow only propagates if the box doesn't have a self-painting layer. This rectangle does not include
// transforms or relative positioning (since those objects always have self-painting layers), but it does need to be adjusted
// for writing-mode differences.
if (!box.hasSelfPaintingLayer()) {
LayoutRect childLogicalVisualOverflow = box.logicalVisualOverflowRectForPropagation(&renderer().style());
childLogicalVisualOverflow.move(inlineBox->logicalLeft(), inlineBox->logicalTop());
logicalVisualOverflow.unite(childLogicalVisualOverflow);
}

// Layout overflow internal to the child box only propagates if the child box doesn't have overflow clip set.
// Otherwise the child border box propagates as layout overflow. This rectangle must include transforms and relative positioning
// and be adjusted for writing-mode differences.
LayoutRect childLogicalLayoutOverflow = box.logicalLayoutOverflowRectForPropagation(&renderer().style());
childLogicalLayoutOverflow.move(inlineBox->logicalLeft(), inlineBox->logicalTop());
logicalLayoutOverflow.unite(childLogicalLayoutOverflow);
}

void LegacyInlineFlowBox::computeOverflow(LayoutUnit lineTop, LayoutUnit lineBottom, GlyphOverflowAndFallbackFontsMap& textBoxDataMap)
{
// If we know we have no overflow, we can just bail.
Expand All @@ -392,12 +295,7 @@ void LegacyInlineFlowBox::computeOverflow(LayoutUnit lineTop, LayoutUnit lineBot
// Visual overflow just includes overflow for stuff we need to repaint ourselves. Self-painting layers are ignored.
// Layout overflow is used to determine scrolling extent, so it still includes child layers and also factors in
// transforms, relative positioning, etc.
LayoutRect logicalLayoutOverflow(enclosingLayoutRect(logicalFrameRectIncludingLineHeight(lineTop, lineBottom)));
LayoutRect logicalVisualOverflow(logicalLayoutOverflow);

addBoxShadowVisualOverflow(logicalVisualOverflow);
addOutlineVisualOverflow(logicalVisualOverflow);
addBorderOutsetVisualOverflow(logicalVisualOverflow);
LayoutRect logicalVisualOverflow(enclosingLayoutRect(logicalFrameRectIncludingLineHeight(lineTop, lineBottom)));

for (auto* child = firstChild(); child; child = child->nextOnLine()) {
if (is<RenderText>(child->renderer())) {
Expand All @@ -410,26 +308,9 @@ void LegacyInlineFlowBox::computeOverflow(LayoutUnit lineTop, LayoutUnit lineBot
flow.computeOverflow(lineTop, lineBottom, textBoxDataMap);
if (!flow.renderer().hasSelfPaintingLayer())
logicalVisualOverflow.unite(flow.logicalVisualOverflowRect(lineTop, lineBottom));
LayoutRect childLayoutOverflow = flow.logicalLayoutOverflowRect(lineTop, lineBottom);
childLayoutOverflow.move(flow.renderer().relativePositionLogicalOffset());
logicalLayoutOverflow.unite(childLayoutOverflow);
} else
addReplacedChildOverflow(child, logicalLayoutOverflow, logicalVisualOverflow);
}
}

setOverflowFromLogicalRects(logicalLayoutOverflow, logicalVisualOverflow, lineTop, lineBottom);
}

void LegacyInlineFlowBox::setLayoutOverflow(const LayoutRect& rect, LayoutUnit lineTop, LayoutUnit lineBottom)
{
LayoutRect frameBox = enclosingLayoutRect(frameRectIncludingLineHeight(lineTop, lineBottom));
if (frameBox.contains(rect) || rect.isEmpty())
return;

if (!m_overflow)
m_overflow = adoptRef(new RenderOverflow(frameBox, frameBox));

m_overflow->setLayoutOverflow(rect);
setOverflowFromLogicalRects(logicalVisualOverflow, lineTop, lineBottom);
}

void LegacyInlineFlowBox::setVisualOverflow(const LayoutRect& rect, LayoutUnit lineTop, LayoutUnit lineBottom)
Expand All @@ -444,11 +325,8 @@ void LegacyInlineFlowBox::setVisualOverflow(const LayoutRect& rect, LayoutUnit l
m_overflow->setVisualOverflow(rect);
}

void LegacyInlineFlowBox::setOverflowFromLogicalRects(const LayoutRect& logicalLayoutOverflow, const LayoutRect& logicalVisualOverflow, LayoutUnit lineTop, LayoutUnit lineBottom)
void LegacyInlineFlowBox::setOverflowFromLogicalRects(const LayoutRect& logicalVisualOverflow, LayoutUnit lineTop, LayoutUnit lineBottom)
{
LayoutRect layoutOverflow(isHorizontal() ? logicalLayoutOverflow : logicalLayoutOverflow.transposedRect());
setLayoutOverflow(layoutOverflow, lineTop, lineBottom);

LayoutRect visualOverflow(isHorizontal() ? logicalVisualOverflow : logicalVisualOverflow.transposedRect());
setVisualOverflow(visualOverflow, lineTop, lineBottom);
}
Expand Down
Loading

0 comments on commit b852cc0

Please sign in to comment.