Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 1b45cf7a512b9d9c4a6871ba093e02389df02448
https://github.com/WebKit/WebKit/commit/1b45cf7a512b9d9c4a6871ba093e02389df02448
Author: Alan Baradlay <[email protected]>
Date: 2026-09-15 (Tue, 15 Sep 2026)
Changed paths:
M Source/WebCore/rendering/RenderBox.cpp
M Source/WebCore/rendering/RenderBox.h
M Source/WebCore/rendering/RenderBoxModelObject.cpp
M Source/WebCore/rendering/RenderBoxModelObject.h
M Source/WebCore/rendering/RenderInline.cpp
M Source/WebCore/rendering/RenderInline.h
M Source/WebCore/rendering/RenderLineBreak.h
M Source/WebCore/style/AnchorPositionEvaluator.cpp
Log Message:
-----------
[cleanup] offsetLeft() and offsetTop() are the first fragment's border box
location
https://bugs.webkit.org/show_bug.cgi?id=324045
<rdar://problem/187283770>
Reviewed by Antti Koivisto.
https://drafts.csswg.org/cssom-view/#dom-htmlelement-offsettop defines
offsetTop as the top border edge of "the first box associated with the
element", and notes that "An inline element that consists of multiple line
boxes will only have its first box considered", so a box reports its own border
box and an inline box reports its first line box.
* Source/WebCore/rendering/RenderBox.cpp:
(WebCore::RenderBox::offsetLeft const): Deleted.
(WebCore::RenderBox::offsetTop const): Deleted.
* Source/WebCore/rendering/RenderBox.h:
* Source/WebCore/rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent const):
(WebCore::RenderBoxModelObject::firstFragmentBorderBoxRect const):
(WebCore::RenderBoxModelObject::offsetLeft const):
(WebCore::RenderBoxModelObject::offsetTop const):
* Source/WebCore/rendering/RenderBoxModelObject.h:
* Source/WebCore/rendering/RenderInline.cpp:
(WebCore::RenderInline::offsetLeft const): Deleted.
(WebCore::RenderInline::offsetTop const): Deleted.
(WebCore::RenderInline::firstInlineBoxTopLeft const): Deleted.
* Source/WebCore/rendering/RenderInline.h:
* Source/WebCore/rendering/RenderLineBreak.h:
* Source/WebCore/style/AnchorPositionEvaluator.cpp:
(WebCore::Style::boxBoundingBoxInContainer):
Canonical link: https://commits.webkit.org/321164@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications