Diff
Modified: trunk/Source/WebCore/ChangeLog (279055 => 279056)
--- trunk/Source/WebCore/ChangeLog 2021-06-20 17:31:15 UTC (rev 279055)
+++ trunk/Source/WebCore/ChangeLog 2021-06-20 18:17:18 UTC (rev 279056)
@@ -1,3 +1,26 @@
+2021-06-20 Alan Bujtas <za...@apple.com>
+
+ Remove HitTestLocation(FloatPoint) c'tor
+ https://bugs.webkit.org/show_bug.cgi?id=227179
+
+ Reviewed by Sam Weinig.
+
+ FloatPoint are used to store pixed snapped coordinate values in the rendering code.
+ This is in preparation for supporting non-integral HitTestLocation intersect.
+
+ * rendering/HitTestLocation.cpp:
+ * rendering/HitTestLocation.h:
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::hitTestLayerByApplyingTransform):
+ * rendering/svg/RenderSVGContainer.cpp:
+ (WebCore::RenderSVGContainer::nodeAtFloatPoint):
+ * rendering/svg/RenderSVGForeignObject.cpp:
+ (WebCore::RenderSVGForeignObject::nodeAtFloatPoint):
+ * rendering/svg/RenderSVGImage.cpp:
+ (WebCore::RenderSVGImage::nodeAtFloatPoint):
+ * rendering/svg/RenderSVGShape.cpp:
+ (WebCore::RenderSVGShape::nodeAtFloatPoint):
+
2021-06-20 Darin Adler <da...@apple.com>
CSS counter style improvements for Armenian, Tamil, and some CJK styles
Modified: trunk/Source/WebCore/rendering/HitTestLocation.cpp (279055 => 279056)
--- trunk/Source/WebCore/rendering/HitTestLocation.cpp 2021-06-20 17:31:15 UTC (rev 279055)
+++ trunk/Source/WebCore/rendering/HitTestLocation.cpp 2021-06-20 18:17:18 UTC (rev 279056)
@@ -34,11 +34,6 @@
{
}
-HitTestLocation::HitTestLocation(const FloatPoint& point)
- : HitTestLocation::HitTestLocation { flooredLayoutPoint(point) }
-{
-}
-
HitTestLocation::HitTestLocation(const FloatPoint& point, const FloatQuad& quad)
: m_point { flooredLayoutPoint(point) }
, m_boundingBox { quad.enclosingBoundingBox() }
Modified: trunk/Source/WebCore/rendering/HitTestLocation.h (279055 => 279056)
--- trunk/Source/WebCore/rendering/HitTestLocation.h 2021-06-20 17:31:15 UTC (rev 279055)
+++ trunk/Source/WebCore/rendering/HitTestLocation.h 2021-06-20 18:17:18 UTC (rev 279056)
@@ -29,7 +29,6 @@
public:
WEBCORE_EXPORT HitTestLocation();
HitTestLocation(const LayoutPoint&);
- WEBCORE_EXPORT HitTestLocation(const FloatPoint&);
HitTestLocation(const FloatPoint&, const FloatQuad&);
HitTestLocation(const LayoutRect&);
Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (279055 => 279056)
--- trunk/Source/WebCore/rendering/RenderLayer.cpp 2021-06-20 17:31:15 UTC (rev 279055)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp 2021-06-20 18:17:18 UTC (rev 279056)
@@ -4277,7 +4277,7 @@
if (hitTestLocation.isRectBasedTest())
newHitTestLocation = HitTestLocation(localPoint, localPointQuad);
else
- newHitTestLocation = HitTestLocation(localPoint);
+ newHitTestLocation = HitTestLocation(flooredLayoutPoint(localPoint));
// Now do a hit test with the root layer shifted to be us.
return hitTestLayer(this, containerLayer, request, result, localHitTestRect, newHitTestLocation, true, newTransformState.ptr(), zOffset);
Modified: trunk/Source/WebCore/rendering/svg/RenderSVGContainer.cpp (279055 => 279056)
--- trunk/Source/WebCore/rendering/svg/RenderSVGContainer.cpp 2021-06-20 17:31:15 UTC (rev 279055)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGContainer.cpp 2021-06-20 18:17:18 UTC (rev 279056)
@@ -171,7 +171,7 @@
for (RenderObject* child = lastChild(); child; child = child->previousSibling()) {
if (child->nodeAtFloatPoint(request, result, localPoint, hitTestAction)) {
updateHitTestResult(result, LayoutPoint(localPoint));
- if (result.addNodeToListBasedTestResult(child->node(), request, localPoint) == HitTestProgress::Stop)
+ if (result.addNodeToListBasedTestResult(child->node(), request, flooredLayoutPoint(localPoint)) == HitTestProgress::Stop)
return true;
}
}
@@ -179,7 +179,7 @@
// Accessibility wants to return SVG containers, if appropriate.
if (request.type() & HitTestRequest::Type::AccessibilityHitTest && m_objectBoundingBox.contains(localPoint)) {
updateHitTestResult(result, LayoutPoint(localPoint));
- if (result.addNodeToListBasedTestResult(nodeForHitTest(), request, localPoint) == HitTestProgress::Stop)
+ if (result.addNodeToListBasedTestResult(nodeForHitTest(), request, flooredLayoutPoint(localPoint)) == HitTestProgress::Stop)
return true;
}
Modified: trunk/Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp (279055 => 279056)
--- trunk/Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp 2021-06-20 17:31:15 UTC (rev 279055)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp 2021-06-20 18:17:18 UTC (rev 279056)
@@ -192,7 +192,7 @@
return false;
// FOs establish a stacking context, so we need to hit-test all layers.
- HitTestLocation hitTestLocation(localPoint);
+ HitTestLocation hitTestLocation(flooredLayoutPoint(localPoint));
return RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoint(), HitTestForeground)
|| RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoint(), HitTestFloat)
|| RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoint(), HitTestChildBlockBackgrounds);
Modified: trunk/Source/WebCore/rendering/svg/RenderSVGImage.cpp (279055 => 279056)
--- trunk/Source/WebCore/rendering/svg/RenderSVGImage.cpp 2021-06-20 17:31:15 UTC (rev 279055)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGImage.cpp 2021-06-20 18:17:18 UTC (rev 279056)
@@ -231,7 +231,7 @@
if (hitRules.canHitFill) {
if (m_objectBoundingBox.contains(localPoint)) {
updateHitTestResult(result, LayoutPoint(localPoint));
- if (result.addNodeToListBasedTestResult(nodeForHitTest(), request, localPoint) == HitTestProgress::Stop)
+ if (result.addNodeToListBasedTestResult(nodeForHitTest(), request, flooredLayoutPoint(localPoint)) == HitTestProgress::Stop)
return true;
}
}
Modified: trunk/Source/WebCore/rendering/svg/RenderSVGShape.cpp (279055 => 279056)
--- trunk/Source/WebCore/rendering/svg/RenderSVGShape.cpp 2021-06-20 17:31:15 UTC (rev 279055)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGShape.cpp 2021-06-20 18:17:18 UTC (rev 279056)
@@ -364,7 +364,7 @@
|| (hitRules.canHitFill && (svgStyle.hasFill() || !hitRules.requireFill) && fillContains(localPoint, hitRules.requireFill, fillRule))
|| (hitRules.canHitBoundingBox && objectBoundingBox().contains(localPoint))) {
updateHitTestResult(result, LayoutPoint(localPoint));
- if (result.addNodeToListBasedTestResult(nodeForHitTest(), request, localPoint) == HitTestProgress::Stop)
+ if (result.addNodeToListBasedTestResult(nodeForHitTest(), request, flooredLayoutPoint(localPoint)) == HitTestProgress::Stop)
return true;
}
}