Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e4c3acdb3aa1c8465d5490b5f0ab3c73e82393ce
https://github.com/WebKit/WebKit/commit/e4c3acdb3aa1c8465d5490b5f0ab3c73e82393ce
Author: Chris Dumez <[email protected]>
Date: 2026-04-06 (Mon, 06 Apr 2026)
Changed paths:
M Source/WebCore/rendering/RenderBox.cpp
M Source/WebCore/rendering/RenderBoxInlines.h
Log Message:
-----------
Avoid redundant scrollbar size computation in
RenderBox::contentBoxLogicalHeight/Width
https://bugs.webkit.org/show_bug.cgi?id=311545
Reviewed by Alan Baradlay.
The contentBoxLogicalHeight(LayoutUnit) and contentBoxLogicalWidth(LayoutUnit)
overloads called scrollbarLogicalHeight()/scrollbarLogicalWidth() twice when
scrollbar-gutter: stable both-edges was set. Each call goes through a
CheckedPtr chain (layer() -> scrollableArea()) and several style property
checks that the compiler cannot easily elide. Cache the result in a local.
Also remove unused shapeMargin and oldShapeMargin locals in
updateShapeOutsideInfoAfterStyleChange as a drive-by cleanup.
* Source/WebCore/rendering/RenderBox.cpp:
(WebCore::RenderBox::updateShapeOutsideInfoAfterStyleChange):
* Source/WebCore/rendering/RenderBoxInlines.h:
(WebCore::RenderBox::contentBoxLogicalHeight const):
(WebCore::RenderBox::contentBoxLogicalWidth const):
Canonical link: https://commits.webkit.org/310627@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications