Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f81df8d2f630e3d6c35c9b38ac56747055651a6b
https://github.com/WebKit/WebKit/commit/f81df8d2f630e3d6c35c9b38ac56747055651a6b
Author: Alan Baradlay <[email protected]>
Date: 2026-09-16 (Wed, 16 Sep 2026)
Changed paths:
M Source/WebCore/rendering/RenderBox.cpp
M Source/WebCore/rendering/RenderBoxModelObject.cpp
M Source/WebCore/rendering/RenderBoxModelObject.h
M Source/WebCore/rendering/RenderInline.cpp
M Source/WebCore/rendering/RenderInline.h
Log Message:
-----------
[cleanup] Move the shared part of offsetFromContainer() to
RenderBoxModelObject
https://bugs.webkit.org/show_bug.cgi?id=324069
<rdar://problem/187298750>
Reviewed by Antti Koivisto.
1. RenderBoxModelObject::offsetFromContainer() carries what both did.
The in-flow position offset, the container's scroll position and
offsetDependsOnPoint were written twice; RenderInline's version is gone.
2. RenderBox keeps the two terms that only a box has.
Its own location, which an inline box has none of, and the offset for an
out-of-flow box whose container is an inline box, which an inline box can never
be.
offsetDependsOnPoint now takes both terms either way: a block-flipped container
was reported only for an inline box, and over-reporting only costs
RenderGeometryMap a cached step.
* Source/WebCore/rendering/RenderBox.cpp:
(WebCore::RenderBox::offsetFromContainer const):
* Source/WebCore/rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::offsetFromContainer const):
* Source/WebCore/rendering/RenderBoxModelObject.h:
* Source/WebCore/rendering/RenderInline.cpp:
(WebCore::RenderInline::offsetFromContainer const): Deleted.
* Source/WebCore/rendering/RenderInline.h:
Canonical link: https://commits.webkit.org/321246@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications