Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 55dc29da9f7467101567baf29ce1936af2f88c00
https://github.com/WebKit/WebKit/commit/55dc29da9f7467101567baf29ce1936af2f88c00
Author: Simon Fraser <[email protected]>
Date: 2023-11-30 (Thu, 30 Nov 2023)
Changed paths:
M Source/WebCore/rendering/RenderBox.cpp
M Source/WebCore/rendering/RenderInline.cpp
M Source/WebCore/rendering/RenderLayerModelObject.cpp
M Source/WebCore/rendering/RenderObject.cpp
M Source/WebCore/rendering/RenderTableCell.cpp
M Source/WebCore/rendering/RenderView.cpp
Log Message:
-----------
Simplify the implementations of computeVisibleRectInContainer() slightly
https://bugs.webkit.org/show_bug.cgi?id=265560
rdar://118961487
Reviewed by Alan Baradlay.
RenderBox::computeVisibleRectInContainer() had some confusing logic that copied
adjustedRect.location()
into a `topLeft` variable, modified it, and then set it back on adjustedRect.
It's simpler, and will
help with future changes, to just modify adjustedRect's location directly.
It's made slightly more complex by the fact that we have to store
`locationOffset`, which can be modified
for integral-snapped widgets, across the transform case that computes a new
adjustedRect.
RenderInline::computeVisibleRectInContainer() and
RenderLayerModelObject::computeVisibleRectInSVGContainer()
copied the same pattern and can also be simplified.
Remove comments about "lightweight clipping rect that controls use" that are
probably no longer relevant.
* Source/WebCore/rendering/RenderBox.cpp:
(WebCore::RenderBox::computeVisibleRectInContainer const):
* Source/WebCore/rendering/RenderInline.cpp:
(WebCore::RenderInline::computeVisibleRectInContainer const):
* Source/WebCore/rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::computeVisibleRectInSVGContainer const):
* Source/WebCore/rendering/RenderObject.cpp:
(WebCore::RenderObject::computeVisibleRectInContainer const):
* Source/WebCore/rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::computeVisibleRectInContainer const):
* Source/WebCore/rendering/RenderView.cpp:
(WebCore::RenderView::computeVisibleRectInContainer const):
Canonical link: https://commits.webkit.org/271339@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes