Title: [293880] trunk/Source/WebCore
- Revision
- 293880
- Author
- [email protected]
- Date
- 2022-05-05 21:10:27 -0700 (Thu, 05 May 2022)
Log Message
Reduce the number of calls to canContainFixedPositionObjects()
https://bugs.webkit.org/show_bug.cgi?id=240150
Reviewed by Alan Bujtas.
canContainFixedPositionObjects() isn't super cheap, so only call it when we need to remove
the IsFixed bit.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::mapLocalToContainer const):
(WebCore::RenderBox::mapAbsoluteToLocalPoint const):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::mapLocalToContainer const):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (293879 => 293880)
--- trunk/Source/WebCore/ChangeLog 2022-05-06 02:34:31 UTC (rev 293879)
+++ trunk/Source/WebCore/ChangeLog 2022-05-06 04:10:27 UTC (rev 293880)
@@ -1,3 +1,19 @@
+2022-05-05 Simon Fraser <[email protected]>
+
+ Reduce the number of calls to canContainFixedPositionObjects()
+ https://bugs.webkit.org/show_bug.cgi?id=240150
+
+ Reviewed by Alan Bujtas.
+
+ canContainFixedPositionObjects() isn't super cheap, so only call it when we need to remove
+ the IsFixed bit.
+
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::mapLocalToContainer const):
+ (WebCore::RenderBox::mapAbsoluteToLocalPoint const):
+ * rendering/svg/RenderSVGRoot.cpp:
+ (WebCore::RenderSVGRoot::mapLocalToContainer const):
+
2022-05-05 Chris Dumez <[email protected]>
Identifier::string() should return an AtomString
Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (293879 => 293880)
--- trunk/Source/WebCore/rendering/RenderBox.cpp 2022-05-06 02:34:31 UTC (rev 293879)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp 2022-05-06 04:10:27 UTC (rev 293880)
@@ -2322,7 +2322,7 @@
// and may itself also be fixed position. So propagate 'fixed' up only if this box is fixed position.
if (isFixedPos)
mode.add(IsFixed);
- else if (canContainFixedPositionObjects())
+ else if (mode.contains(IsFixed) && canContainFixedPositionObjects())
mode.remove(IsFixed);
if (wasFixed)
@@ -2396,7 +2396,7 @@
bool isFixedPos = isFixedPositioned();
if (isFixedPos)
mode.add(IsFixed);
- else if (canContainFixedPositionObjects()) {
+ else if (mode.contains(IsFixed) && canContainFixedPositionObjects()) {
// If this box has a transform, it acts as a fixed position container for fixed descendants,
// and may itself also be fixed position. So propagate 'fixed' up only if this box is fixed position.
mode.remove(IsFixed);
Modified: trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp (293879 => 293880)
--- trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp 2022-05-06 02:34:31 UTC (rev 293879)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp 2022-05-06 04:10:27 UTC (rev 293880)
@@ -519,7 +519,7 @@
// and may itself also be fixed position. So propagate 'fixed' up only if this box is fixed position.
if (isFixedPos)
mode.add(IsFixed);
- else if (canContainFixedPositionObjects())
+ else if (mode.contains(IsFixed) && canContainFixedPositionObjects())
mode.remove(IsFixed);
if (wasFixed)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes