Skip to content

Commit

Permalink
Rename RenderObject::absoluteRects() to RenderObject::boundingRects()
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=259672
rdar://113175046

Reviewed by Alan Baradlay.

`RenderObject::absoluteRects()` didn't return absolute rects; it returns whatever
the caller asked for via the second parameter. So rename to `boundingRects()`.
Also change the rects to be LayoutRects.

* Source/WebCore/accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::elementPath const):
* Source/WebCore/html/HTMLAnchorElement.cpp:
(WebCore::hasNonEmptyBox):
* Source/WebCore/page/LocalFrameView.cpp:
(WebCore::LocalFrameView::textFragmentIndicatorTimerFired):
p* Source/WebCore/rendering/RenderBlock.cpp:
(WebCore::RenderBlock::boundingRects const):
(WebCore::RenderBlock::absoluteRects const): Deleted.
* Source/WebCore/rendering/RenderBlock.h:
* Source/WebCore/rendering/RenderBox.cpp:
(WebCore::RenderBox::boundingRects const):
(WebCore::RenderBox::absoluteRects const): Deleted.
* Source/WebCore/rendering/RenderBox.h:
* Source/WebCore/rendering/RenderInline.cpp:
(WebCore::RenderInline::boundingRects const):
(WebCore::RenderInline::absoluteRects const): Deleted.
* Source/WebCore/rendering/RenderInline.h:
* Source/WebCore/rendering/RenderLineBreak.cpp:
(WebCore::RenderLineBreak::boundingRects const):
(WebCore::RenderLineBreak::absoluteRects const): Deleted.
* Source/WebCore/rendering/RenderLineBreak.h:
* Source/WebCore/rendering/RenderObject.cpp:
(WebCore::RenderObject::absoluteBoundingBoxRect const):
(WebCore::RenderObject::absoluteTextRects):
* Source/WebCore/rendering/RenderObject.h:
(WebCore::RenderObject::boundingRects const):
(WebCore::RenderObject::absoluteRects const): Deleted.
* Source/WebCore/rendering/RenderText.cpp:
(WebCore::RenderText::boundingRects const):
(WebCore::RenderText::absoluteRects const): Deleted.
* Source/WebCore/rendering/RenderText.h:
* Source/WebCore/rendering/RenderView.cpp:
(WebCore::RenderView::boundingRects const):
(WebCore::RenderView::absoluteRects const): Deleted.
* Source/WebCore/rendering/RenderView.h:
* Source/WebCore/rendering/svg/LegacyRenderSVGModelObject.cpp:
(WebCore::LegacyRenderSVGModelObject::boundingRects const):
(WebCore::LegacyRenderSVGModelObject::absoluteRects const): Deleted.
* Source/WebCore/rendering/svg/LegacyRenderSVGModelObject.h:
* Source/WebCore/rendering/svg/RenderSVGBlock.cpp:
(WebCore::RenderSVGBlock::boundingRects const):
(WebCore::RenderSVGBlock::absoluteRects const): Deleted.
* Source/WebCore/rendering/svg/RenderSVGBlock.h:
* Source/WebCore/rendering/svg/RenderSVGHiddenContainer.h:
* Source/WebCore/rendering/svg/RenderSVGModelObject.cpp:
(WebCore::RenderSVGModelObject::boundingRects const):
(WebCore::RenderSVGModelObject::absoluteRects const): Deleted.
* Source/WebCore/rendering/svg/RenderSVGModelObject.h:
* Source/WebCore/rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::boundingRects const):
(WebCore::RenderSVGRoot::absoluteRects const): Deleted.
* Source/WebCore/rendering/svg/RenderSVGRoot.h:

Canonical link: https://commits.webkit.org/266494@main
  • Loading branch information
smfr committed Aug 1, 2023
1 parent 07b5559 commit 42d07b7
Show file tree
Hide file tree
Showing 26 changed files with 66 additions and 60 deletions.
13 changes: 7 additions & 6 deletions Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -877,21 +877,21 @@ bool AccessibilityRenderObject::supportsPath() const
Path AccessibilityRenderObject::elementPath() const
{
if (is<RenderText>(renderer())) {
Vector<IntRect> rects;
downcast<RenderText>(*m_renderer).absoluteRects(rects, flooredLayoutPoint(m_renderer->localToAbsolute()));
Vector<LayoutRect> rects;
downcast<RenderText>(*m_renderer).boundingRects(rects, flooredLayoutPoint(m_renderer->localToAbsolute()));
// If only 1 rect, don't compute path since the bounding rect will be good enough.
if (rects.size() < 2)
return Path();

// Compute the path only if this is the last part of a line followed by the beginning of the next line.
const auto& style = m_renderer->style();
bool rightToLeftText = style.direction() == TextDirection::RTL;
static const int xTolerance = 5;
static const int yTolerance = 5;
static const auto xTolerance = 5_lu;
static const auto yTolerance = 5_lu;
bool needsPath = false;
IntRect unionRect = rects[0];
auto unionRect = rects[0];
for (size_t i = 1; i < rects.size(); ++i) {
needsPath = std::abs(rects[i].y() - unionRect.maxY()) < yTolerance // This rect is in a new line.
needsPath = absoluteValue(rects[i].y() - unionRect.maxY()) < yTolerance // This rect is in a new line.
&& (rightToLeftText ? rects[i].x() - unionRect.x() > xTolerance
: unionRect.x() - rects[i].x() > xTolerance); // And this rect is to right/left of all previous rects.

Expand Down Expand Up @@ -922,6 +922,7 @@ Path AccessibilityRenderObject::elementPath() const
return path;

// The SVG path is in terms of the parent's bounding box. The path needs to be offset to frame coordinates.
// FIXME: This seems wrong for SVG inside HTML.
if (auto svgRoot = ancestorsOfType<LegacyRenderSVGRoot>(*m_renderer).first()) {
LayoutPoint parentOffset = cache->getOrCreate(&*svgRoot)->elementRect().location();
path.transform(AffineTransform().translate(parentOffset.x(), parentOffset.y()));
Expand Down
4 changes: 2 additions & 2 deletions Source/WebCore/html/HTMLAnchorElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ static bool hasNonEmptyBox(RenderBoxModelObject* renderer)

// FIXME: Since all we are checking is whether the rects are empty, could we just
// pass in 0,0 for the layout point instead of calling localToAbsolute?
Vector<IntRect> rects;
renderer->absoluteRects(rects, flooredLayoutPoint(renderer->localToAbsolute()));
Vector<LayoutRect> rects;
renderer->boundingRects(rects, flooredLayoutPoint(renderer->localToAbsolute()));
for (auto& rect : rects) {
if (!rect.isEmpty())
return true;
Expand Down
1 change: 1 addition & 0 deletions Source/WebCore/page/LocalFrameView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2597,6 +2597,7 @@ void LocalFrameView::textFragmentIndicatorTimerFired()
if (textIndicator) {
constexpr OptionSet<HitTestRequest::Type> hitType { HitTestRequest::Type::ReadOnly, HitTestRequest::Type::Active, HitTestRequest::Type::AllowVisibleChildFrameContentOnly };

// FIXME: Why is this using RenderFlexibleBox?
auto textRects = RenderFlexibleBox::absoluteTextRects(range);

HitTestResult result;
Expand Down
8 changes: 4 additions & 4 deletions Source/WebCore/rendering/RenderBlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2747,18 +2747,18 @@ void RenderBlock::setPageLogicalOffset(LayoutUnit logicalOffset)
rareData->m_pageLogicalOffset = logicalOffset;
}

void RenderBlock::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumulatedOffset) const
void RenderBlock::boundingRects(Vector<LayoutRect>& rects, const LayoutPoint& accumulatedOffset) const
{
// For blocks inside inlines, we include margins so that we run right up to the inline boxes
// above and below us (thus getting merged with them to form a single irregular shape).
if (auto* continuation = this->continuation()) {
// FIXME: This is wrong for block-flows that are horizontal.
// https://bugs.webkit.org/show_bug.cgi?id=46781
rects.append(snappedIntRect(accumulatedOffset.x(), accumulatedOffset.y() - collapsedMarginBefore(), width(), height() + collapsedMarginBefore() + collapsedMarginAfter()));
rects.append(LayoutRect(accumulatedOffset.x(), accumulatedOffset.y() - collapsedMarginBefore(), width(), height() + collapsedMarginBefore() + collapsedMarginAfter()));
auto* containingBlock = inlineContinuation()->containingBlock();
continuation->absoluteRects(rects, accumulatedOffset - locationOffset() + containingBlock->locationOffset());
continuation->boundingRects(rects, accumulatedOffset - locationOffset() + containingBlock->locationOffset());
} else
rects.append(snappedIntRect(accumulatedOffset, size()));
rects.append({ accumulatedOffset, size() });
}

void RenderBlock::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed) const
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/rendering/RenderBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ class RenderBlock : public RenderBox {
LayoutRect paintRectToClipOutFromBorder(const LayoutRect&) override;
bool isInlineBlockOrInlineTable() const final { return isInline() && isReplacedOrInlineBlock(); }

void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset) const override;
void boundingRects(Vector<LayoutRect>&, const LayoutPoint& accumulatedOffset) const override;
void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const override;

// Public for LegacyEllipsisBox
Expand Down
4 changes: 2 additions & 2 deletions Source/WebCore/rendering/RenderBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -620,9 +620,9 @@ void RenderBox::setScrollPosition(const ScrollPosition& position, const ScrollPo
scrollableArea->setScrollPosition(position, options);
}

void RenderBox::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumulatedOffset) const
void RenderBox::boundingRects(Vector<LayoutRect>& rects, const LayoutPoint& accumulatedOffset) const
{
rects.append(snappedIntRect(accumulatedOffset, size()));
rects.append({ accumulatedOffset, size() });
}

void RenderBox::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed) const
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/rendering/RenderBox.h
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ class RenderBox : public RenderBoxModelObject {

LayoutUnit constrainBlockMarginInAvailableSpaceOrTrim(const RenderBox& containingBlock, LayoutUnit availableSpace, MarginTrimType marginSide) const;

void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset) const override;
void boundingRects(Vector<LayoutRect>&, const LayoutPoint& accumulatedOffset) const override;
void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const override;

int reflectionOffset() const;
Expand Down
13 changes: 5 additions & 8 deletions Source/WebCore/rendering/RenderInline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,20 +276,17 @@ class AbsoluteRectsGeneratorContext {
const LayoutPoint& m_accumulatedOffset;
};

void RenderInline::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumulatedOffset) const
void RenderInline::boundingRects(Vector<LayoutRect>& rects, const LayoutPoint& accumulatedOffset) const
{
Vector<LayoutRect> lineboxRects;
AbsoluteRectsGeneratorContext context(lineboxRects, accumulatedOffset);
AbsoluteRectsGeneratorContext context(rects, accumulatedOffset);
generateLineBoxRects(context);
for (const auto& rect : lineboxRects)
rects.append(snappedIntRect(rect));

if (RenderBoxModelObject* continuation = this->continuation()) {
if (auto* continuation = this->continuation()) {
if (is<RenderBox>(*continuation)) {
auto& box = downcast<RenderBox>(*continuation);
continuation->absoluteRects(rects, toLayoutPoint(accumulatedOffset - containingBlock()->location() + box.locationOffset()));
continuation->boundingRects(rects, toLayoutPoint(accumulatedOffset - containingBlock()->location() + box.locationOffset()));
} else
continuation->absoluteRects(rects, toLayoutPoint(accumulatedOffset - containingBlock()->location()));
continuation->boundingRects(rects, toLayoutPoint(accumulatedOffset - containingBlock()->location()));
}
}

Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/rendering/RenderInline.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class RenderInline : public RenderBoxModelObject {
LayoutUnit marginStart(const RenderStyle* otherStyle = 0) const final;
LayoutUnit marginEnd(const RenderStyle* otherStyle = 0) const final;

void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset) const final;
void boundingRects(Vector<LayoutRect>&, const LayoutPoint& accumulatedOffset) const final;
void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const override;

LayoutSize offsetFromContainer(RenderElement&, const LayoutPoint&, bool* offsetDependsOnPoint = nullptr) const final;
Expand Down
7 changes: 4 additions & 3 deletions Source/WebCore/rendering/RenderLineBreak.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,15 @@ IntRect RenderLineBreak::linesBoundingBox() const
return enclosingIntRect(run->visualRectIgnoringBlockDirection());
}

void RenderLineBreak::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumulatedOffset) const
void RenderLineBreak::boundingRects(Vector<LayoutRect>& rects, const LayoutPoint& accumulatedOffset) const
{
auto box = InlineIterator::boxFor(*this);
if (!box)
return;

auto rect = box->visualRectIgnoringBlockDirection();
rects.append(enclosingIntRect(FloatRect(accumulatedOffset + rect.location(), rect.size())));
auto rect = LayoutRect { box->visualRectIgnoringBlockDirection() };
rect.moveBy(accumulatedOffset);
rects.append(rect);
}

void RenderLineBreak::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed) const
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/rendering/RenderLineBreak.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class RenderLineBreak final : public RenderBoxModelObject {

IntRect linesBoundingBox() const;

void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset) const final;
void boundingRects(Vector<LayoutRect>&, const LayoutPoint& accumulatedOffset) const final;
void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed = nullptr) const final;
#if PLATFORM(IOS_FAMILY)
void collectSelectionGeometries(Vector<SelectionGeometry>&, unsigned startOffset = 0, unsigned endOffset = std::numeric_limits<unsigned>::max()) final;
Expand Down
22 changes: 13 additions & 9 deletions Source/WebCore/rendering/RenderObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -807,16 +807,14 @@ IntRect RenderObject::absoluteBoundingBoxRect(bool useTransforms, bool* wasFixed
}

FloatPoint absPos = localToAbsolute(FloatPoint(), { } /* ignore transforms */, wasFixed);
Vector<IntRect> rects;
absoluteRects(rects, flooredLayoutPoint(absPos));
Vector<LayoutRect> rects;
boundingRects(rects, flooredLayoutPoint(absPos));

size_t n = rects.size();
if (!n)
return IntRect();

LayoutRect result = rects[0];
for (size_t i = 1; i < n; ++i)
result.unite(rects[i]);
LayoutRect result = unionRect(rects);
return snappedIntRect(result);
}

Expand Down Expand Up @@ -2230,17 +2228,23 @@ Vector<IntRect> RenderObject::absoluteTextRects(const SimpleRange& range, Option
{
ASSERT(!behavior.contains(BoundingRectBehavior::UseVisibleBounds));
ASSERT(!behavior.contains(BoundingRectBehavior::IgnoreTinyRects));
Vector<IntRect> rects;
Vector<LayoutRect> rects;
for (auto& node : intersectingNodes(range)) {
auto renderer = node.renderer();
if (renderer && renderer->isBR())
downcast<RenderLineBreak>(*renderer).absoluteRects(rects, flooredLayoutPoint(renderer->localToAbsolute()));
downcast<RenderLineBreak>(*renderer).boundingRects(rects, flooredLayoutPoint(renderer->localToAbsolute()));
else if (is<Text>(node)) {
for (auto& rect : absoluteRectsForRangeInText(range, downcast<Text>(node), behavior))
rects.append(enclosingIntRect(rect));
rects.append(LayoutRect { rect });
}
}
return rects;

Vector<IntRect> result;
result.reserveInitialCapacity(rects.size());
for (auto& layoutRect : rects)
result.uncheckedAppend(enclosingIntRect(layoutRect));

return result;
}

static RefPtr<Node> nodeBefore(const BoundaryPoint& point)
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/rendering/RenderObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ class RenderObject : public CachedImageClient {
WEBCORE_EXPORT static Vector<SelectionGeometry> collectSelectionGeometriesWithoutUnionInteriorLines(const SimpleRange&);
#endif

virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint&) const { }
virtual void boundingRects(Vector<LayoutRect>&, const LayoutPoint& /* offsetFromRoot */) const { }

WEBCORE_EXPORT IntRect absoluteBoundingBoxRect(bool useTransform = true, bool* wasFixed = nullptr) const;
IntRect absoluteBoundingBoxRectIgnoringTransforms() const { return absoluteBoundingBoxRect(false); }
Expand Down
7 changes: 4 additions & 3 deletions Source/WebCore/rendering/RenderText.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,11 +374,12 @@ String RenderText::originalText() const
return m_originalTextDiffersFromRendered ? originalTextMap().get(this) : m_text;
}

void RenderText::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumulatedOffset) const
void RenderText::boundingRects(Vector<LayoutRect>& rects, const LayoutPoint& accumulatedOffset) const
{
for (auto& run : InlineIterator::textBoxesFor(*this)) {
auto rect = run.visualRectIgnoringBlockDirection();
rects.append(enclosingIntRect(FloatRect(accumulatedOffset + rect.location(), rect.size())));
auto rect = LayoutRect { run.visualRectIgnoringBlockDirection() };
rect.moveBy(accumulatedOffset);
rects.append(rect);
}
}

Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/rendering/RenderText.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class RenderText : public RenderObject {
void dirtyLineBoxes(bool fullLayout);
void deleteLineBoxes();

void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset) const final;
void boundingRects(Vector<LayoutRect>&, const LayoutPoint& accumulatedOffset) const final;
Vector<IntRect> absoluteRectsForRange(unsigned startOffset = 0, unsigned endOffset = UINT_MAX, bool useSelectionHeight = false, bool* wasFixed = nullptr) const;
#if PLATFORM(IOS_FAMILY)
void collectSelectionGeometries(Vector<SelectionGeometry>&, unsigned startOffset = 0, unsigned endOffset = std::numeric_limits<unsigned>::max()) final;
Expand Down
5 changes: 3 additions & 2 deletions Source/WebCore/rendering/RenderView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -610,9 +610,10 @@ bool RenderView::isScrollableOrRubberbandableBox() const
return frameView().isScrollable(defineScrollable);
}

void RenderView::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumulatedOffset) const
void RenderView::boundingRects(Vector<LayoutRect>& rects, const LayoutPoint& accumulatedOffset) const
{
rects.append(snappedIntRect(accumulatedOffset, layer()->size()));
// FIXME: It's weird that this gets is size from the layer.
rects.append(LayoutRect { accumulatedOffset, layer()->size() });
}

void RenderView::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed) const
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/rendering/RenderView.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class RenderView final : public RenderBlockFlow {

bool printing() const;

void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset) const override;
void boundingRects(Vector<LayoutRect>&, const LayoutPoint& accumulatedOffset) const override;
void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const override;

LayoutRect viewRect() const;
Expand Down
6 changes: 3 additions & 3 deletions Source/WebCore/rendering/svg/LegacyRenderSVGModelObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ LayoutRect LegacyRenderSVGModelObject::outlineBoundsForRepaint(const RenderLayer
return LayoutRect(snapRectToDevicePixels(LayoutRect(containerRelativeQuad.boundingBox()), document().deviceScaleFactor()));
}

void LegacyRenderSVGModelObject::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumulatedOffset) const
void LegacyRenderSVGModelObject::boundingRects(Vector<LayoutRect>& rects, const LayoutPoint& accumulatedOffset) const
{
IntRect rect = enclosingIntRect(strokeBoundingBox());
rect.moveBy(roundedIntPoint(accumulatedOffset));
auto rect = LayoutRect { strokeBoundingBox() };
rect.moveBy(accumulatedOffset);
rects.append(rect);
}

Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/rendering/svg/LegacyRenderSVGModelObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class LegacyRenderSVGModelObject : public RenderElement {
std::optional<FloatRect> computeFloatVisibleRectInContainer(const FloatRect&, const RenderLayerModelObject* container, VisibleRectContext) const final;
LayoutRect outlineBoundsForRepaint(const RenderLayerModelObject* repaintContainer, const RenderGeometryMap*) const final;

void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset) const final;
void boundingRects(Vector<LayoutRect>&, const LayoutPoint& accumulatedOffset) const final;
void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const override;

void mapLocalToContainer(const RenderLayerModelObject* ancestorContainer, TransformState&, OptionSet<MapCoordinatesMode>, bool* wasFixed) const final;
Expand Down
4 changes: 2 additions & 2 deletions Source/WebCore/rendering/svg/RenderSVGBlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ bool RenderSVGBlock::needsHasSVGTransformFlags() const
}
#endif

void RenderSVGBlock::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumulatedOffset) const
void RenderSVGBlock::boundingRects(Vector<LayoutRect>& rects, const LayoutPoint& accumulatedOffset) const
{
#if ENABLE(LAYER_BASED_SVG_ENGINE)
if (document().settings().layerBasedSVGEngineEnabled()) {
rects.append(snappedIntRect(LayoutRect(accumulatedOffset, size())));
rects.append({ accumulatedOffset, size() });
return;
}
#else
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/rendering/svg/RenderSVGBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class RenderSVGBlock : public RenderBlockFlow {
void element() const = delete;
bool isRenderSVGBlock() const final { return true; }

void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset) const override;
void boundingRects(Vector<LayoutRect>&, const LayoutPoint& accumulatedOffset) const override;
void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const override;

#if ENABLE(LAYER_BASED_SVG_ENGINE)
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/rendering/svg/RenderSVGHiddenContainer.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class RenderSVGHiddenContainer : public RenderSVGContainer {
LayoutRect clippedOverflowRect(const RenderLayerModelObject*, VisibleRectContext) const final { return { }; }
std::optional<LayoutRect> computeVisibleRectInContainer(const LayoutRect& rect, const RenderLayerModelObject*, VisibleRectContext) const final { return std::make_optional(rect); }

void absoluteRects(Vector<IntRect>&, const LayoutPoint&) const final { }
void boundingRects(Vector<LayoutRect>&, const LayoutPoint&) const final { }
void absoluteQuads(Vector<FloatQuad>&, bool*) const final { }
void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint&, const RenderLayerModelObject* = nullptr) const final { }

Expand Down
4 changes: 2 additions & 2 deletions Source/WebCore/rendering/svg/RenderSVGModelObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ LayoutRect RenderSVGModelObject::outlineBoundsForRepaint(const RenderLayerModelO
return outlineBounds;
}

void RenderSVGModelObject::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumulatedOffset) const
void RenderSVGModelObject::boundingRects(Vector<LayoutRect>& rects, const LayoutPoint& accumulatedOffset) const
{
rects.append(snappedIntRect(accumulatedOffset, m_layoutRect.size()));
rects.append({ accumulatedOffset, m_layoutRect.size() });
}

void RenderSVGModelObject::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed) const
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/rendering/svg/RenderSVGModelObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class RenderSVGModelObject : public RenderLayerModelObject {
const RenderObject* pushMappingToContainer(const RenderLayerModelObject*, RenderGeometryMap&) const override;
LayoutSize offsetFromContainer(RenderElement&, const LayoutPoint&, bool* offsetDependsOnPoint = nullptr) const override;

void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset) const override;
void boundingRects(Vector<LayoutRect>&, const LayoutPoint& accumulatedOffset) const override;
void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const override;

void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer = 0) const override;
Expand Down
4 changes: 2 additions & 2 deletions Source/WebCore/rendering/svg/RenderSVGRoot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -634,9 +634,9 @@ LayoutRect RenderSVGRoot::overflowClipRect(const LayoutPoint& location, RenderFr
return clipRect;
}

void RenderSVGRoot::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumulatedOffset) const
void RenderSVGRoot::boundingRects(Vector<LayoutRect>& rects, const LayoutPoint& accumulatedOffset) const
{
rects.append(snappedIntRect(accumulatedOffset, borderBoxRect().size()));
rects.append({ accumulatedOffset, borderBoxRect().size() });
}

void RenderSVGRoot::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed) const
Expand Down
Loading

0 comments on commit 42d07b7

Please sign in to comment.