[iOS] Remove redundant uses of USE(UIKIT_EDITING)
https://bugs.webkit.org/show_bug.cgi?id=202717
Reviewed by Anders Carlsson.
Source/WebCore:
* page/ios/FrameIOS.mm:
(WebCore::Frame::qualifyingNodeAtViewportLocation):
(WebCore::Frame::approximateNodeAtViewportLocationLegacy):
Source/WebKitLegacy/ios:
* WebCoreSupport/WebVisiblePosition.mm:
(-[DOMNode startPosition]):
(-[DOMNode endPosition]):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@250913 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 57ff316..cc11cc3 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,14 @@
+2019-10-09 Andy Estes <aestes@apple.com>
+
+ [iOS] Remove redundant uses of USE(UIKIT_EDITING)
+ https://bugs.webkit.org/show_bug.cgi?id=202717
+
+ Reviewed by Anders Carlsson.
+
+ * page/ios/FrameIOS.mm:
+ (WebCore::Frame::qualifyingNodeAtViewportLocation):
+ (WebCore::Frame::approximateNodeAtViewportLocationLegacy):
+
2019-10-09 Chris Dumez <cdumez@apple.com>
[iOS] REGRESSION (r250398) Layout Test fast/history/page-cache-element-state-focused.html is failing
diff --git a/Source/WebCore/page/ios/FrameIOS.mm b/Source/WebCore/page/ios/FrameIOS.mm
index 5bf2b6ce..83c6057 100644
--- a/Source/WebCore/page/ios/FrameIOS.mm
+++ b/Source/WebCore/page/ios/FrameIOS.mm
@@ -268,10 +268,6 @@
Node* Frame::qualifyingNodeAtViewportLocation(const FloatPoint& viewportLocation, FloatPoint& adjustedViewportLocation, const NodeQualifier& nodeQualifierFunction, ShouldApproximate shouldApproximate, ShouldFindRootEditableElement shouldFindRootEditableElement)
{
-#if !USE(UIKIT_EDITING)
- UNUSED_PARAM(shouldFindRootEditableElement);
-#endif
-
adjustedViewportLocation = viewportLocation;
IntPoint testCenter;
@@ -285,7 +281,6 @@
// the qualifier function, which typically checks if the node responds to a particular event type.
Node* approximateNode = nodeQualifierFunction(candidateInfo, 0, 0);
-#if USE(UIKIT_EDITING)
if (shouldFindRootEditableElement == ShouldFindRootEditableElement::Yes && approximateNode && approximateNode->isContentEditable()) {
// If we are in editable content, we look for the root editable element.
approximateNode = approximateNode->rootEditableElement();
@@ -293,8 +288,6 @@
if (approximateNode)
shouldApproximate = ShouldApproximate::No;
}
-#endif
-
float scale = page() ? page()->pageScaleFactor() : 1;
float ppiFactor = screenPPIFactor();
@@ -370,13 +363,11 @@
if (approximateNode) {
IntPoint p = m_view->contentsToWindow(bestPoint);
adjustedViewportLocation = p;
-#if USE(UIKIT_EDITING)
if (shouldFindRootEditableElement == ShouldFindRootEditableElement::Yes && approximateNode->isContentEditable()) {
// When in editable content, look for the root editable node again,
// since this could be the node found with the approximation.
approximateNode = approximateNode->rootEditableElement();
}
-#endif
}
return approximateNode;
@@ -410,11 +401,9 @@
for (; node && node != terminationNode; node = node->parentInComposedTree()) {
// We only accept pointer nodes before reaching the body tag.
if (node->hasTagName(HTMLNames::bodyTag)) {
-#if USE(UIKIT_EDITING)
// Make sure we cover the case of an empty editable body.
if (!pointerCursorNode && node->isContentEditable())
pointerCursorNode = node;
-#endif
bodyHasBeenReached = true;
pointerCursorStillValid = false;
}
diff --git a/Source/WebKitLegacy/ios/ChangeLog b/Source/WebKitLegacy/ios/ChangeLog
index c70d407..0789903 100644
--- a/Source/WebKitLegacy/ios/ChangeLog
+++ b/Source/WebKitLegacy/ios/ChangeLog
@@ -1,3 +1,14 @@
+2019-10-09 Andy Estes <aestes@apple.com>
+
+ [iOS] Remove redundant uses of USE(UIKIT_EDITING)
+ https://bugs.webkit.org/show_bug.cgi?id=202717
+
+ Reviewed by Anders Carlsson.
+
+ * WebCoreSupport/WebVisiblePosition.mm:
+ (-[DOMNode startPosition]):
+ (-[DOMNode endPosition]):
+
2019-08-23 Chris Dumez <cdumez@apple.com>
[geolocation] Rename interfaces and remove [NoInterfaceObject]
diff --git a/Source/WebKitLegacy/ios/WebCoreSupport/WebVisiblePosition.mm b/Source/WebKitLegacy/ios/WebCoreSupport/WebVisiblePosition.mm
index 8591177..6828aa6 100644
--- a/Source/WebKitLegacy/ios/WebCoreSupport/WebVisiblePosition.mm
+++ b/Source/WebKitLegacy/ios/WebCoreSupport/WebVisiblePosition.mm
@@ -540,7 +540,6 @@
- (WebVisiblePosition *)startPosition
{
-#if USE(UIKIT_EDITING)
// When in editable content, we need to calculate the startPosition from the beginning of the
// editable area.
Node* node = core(self);
@@ -548,13 +547,11 @@
VisiblePosition vp(createLegacyEditingPosition(node, 0), VP_DEFAULT_AFFINITY);
return [WebVisiblePosition _wrapVisiblePosition:startOfEditableContent(vp)];
}
-#endif
return [[self rangeOfContents] startPosition];
}
- (WebVisiblePosition *)endPosition
{
-#if USE(UIKIT_EDITING)
// When in editable content, we need to calculate the endPosition from the end of the
// editable area.
Node* node = core(self);
@@ -562,7 +559,6 @@
VisiblePosition vp(createLegacyEditingPosition(node, 0), VP_DEFAULT_AFFINITY);
return [WebVisiblePosition _wrapVisiblePosition:endOfEditableContent(vp)];
}
-#endif
return [[self rangeOfContents] endPosition];
}