Title: [256552] branches/safari-609.1.17.0-branch/Source
- Revision
- 256552
- Author
- [email protected]
- Date
- 2020-02-13 14:52:43 -0800 (Thu, 13 Feb 2020)
Log Message
Cherry-pick r256005. rdar://problem/59299335
macCatalyst: Unnecessary I-beam over images in editable areas
https://bugs.webkit.org/show_bug.cgi?id=207370
<rdar://problem/59235429>
Reviewed by Wenson Hsieh.
Source/WebCore:
* dom/Position.h:
Source/WebKit:
* Shared/ios/InteractionInformationAtPosition.h:
* Shared/ios/InteractionInformationAtPosition.mm:
(WebKit::InteractionInformationAtPosition::encode const):
(WebKit::InteractionInformationAtPosition::decode):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::populateCaretContext):
Add a bit indicating whether the forced I-beam for editable contexts
should be used or not, based on whether it is adjacent to (or immediately
over) a replaced element.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256005 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-609.1.17.0-branch/Source/WebCore/ChangeLog (256551 => 256552)
--- branches/safari-609.1.17.0-branch/Source/WebCore/ChangeLog 2020-02-13 22:52:39 UTC (rev 256551)
+++ branches/safari-609.1.17.0-branch/Source/WebCore/ChangeLog 2020-02-13 22:52:43 UTC (rev 256552)
@@ -1,3 +1,42 @@
+2020-02-13 Russell Epstein <[email protected]>
+
+ Cherry-pick r256005. rdar://problem/59299335
+
+ macCatalyst: Unnecessary I-beam over images in editable areas
+ https://bugs.webkit.org/show_bug.cgi?id=207370
+ <rdar://problem/59235429>
+
+ Reviewed by Wenson Hsieh.
+
+ Source/WebCore:
+
+ * dom/Position.h:
+
+ Source/WebKit:
+
+ * Shared/ios/InteractionInformationAtPosition.h:
+ * Shared/ios/InteractionInformationAtPosition.mm:
+ (WebKit::InteractionInformationAtPosition::encode const):
+ (WebKit::InteractionInformationAtPosition::decode):
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::populateCaretContext):
+ Add a bit indicating whether the forced I-beam for editable contexts
+ should be used or not, based on whether it is adjacent to (or immediately
+ over) a replaced element.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256005 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2020-02-06 Tim Horton <[email protected]>
+
+ macCatalyst: Unnecessary I-beam over images in editable areas
+ https://bugs.webkit.org/show_bug.cgi?id=207370
+ <rdar://problem/59235429>
+
+ Reviewed by Wenson Hsieh.
+
+ * dom/Position.h:
+
2020-02-11 Russell Epstein <[email protected]>
Cherry-pick r256230. rdar://problem/59335800
Modified: branches/safari-609.1.17.0-branch/Source/WebCore/dom/Position.h (256551 => 256552)
--- branches/safari-609.1.17.0-branch/Source/WebCore/dom/Position.h 2020-02-13 22:52:39 UTC (rev 256551)
+++ branches/safari-609.1.17.0-branch/Source/WebCore/dom/Position.h 2020-02-13 22:52:43 UTC (rev 256552)
@@ -106,8 +106,8 @@
RefPtr<Node> firstNode() const;
// These are convenience methods which are smart about whether the position is neighbor anchored or parent anchored
- Node* computeNodeBeforePosition() const;
- Node* computeNodeAfterPosition() const;
+ WEBCORE_EXPORT Node* computeNodeBeforePosition() const;
+ WEBCORE_EXPORT Node* computeNodeAfterPosition() const;
Node* anchorNode() const { return m_anchorNode.get(); }
Modified: branches/safari-609.1.17.0-branch/Source/WebKit/ChangeLog (256551 => 256552)
--- branches/safari-609.1.17.0-branch/Source/WebKit/ChangeLog 2020-02-13 22:52:39 UTC (rev 256551)
+++ branches/safari-609.1.17.0-branch/Source/WebKit/ChangeLog 2020-02-13 22:52:43 UTC (rev 256552)
@@ -1,5 +1,52 @@
2020-02-13 Russell Epstein <[email protected]>
+ Cherry-pick r256005. rdar://problem/59299335
+
+ macCatalyst: Unnecessary I-beam over images in editable areas
+ https://bugs.webkit.org/show_bug.cgi?id=207370
+ <rdar://problem/59235429>
+
+ Reviewed by Wenson Hsieh.
+
+ Source/WebCore:
+
+ * dom/Position.h:
+
+ Source/WebKit:
+
+ * Shared/ios/InteractionInformationAtPosition.h:
+ * Shared/ios/InteractionInformationAtPosition.mm:
+ (WebKit::InteractionInformationAtPosition::encode const):
+ (WebKit::InteractionInformationAtPosition::decode):
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::populateCaretContext):
+ Add a bit indicating whether the forced I-beam for editable contexts
+ should be used or not, based on whether it is adjacent to (or immediately
+ over) a replaced element.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256005 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2020-02-06 Tim Horton <[email protected]>
+
+ macCatalyst: Unnecessary I-beam over images in editable areas
+ https://bugs.webkit.org/show_bug.cgi?id=207370
+ <rdar://problem/59235429>
+
+ Reviewed by Wenson Hsieh.
+
+ * Shared/ios/InteractionInformationAtPosition.h:
+ * Shared/ios/InteractionInformationAtPosition.mm:
+ (WebKit::InteractionInformationAtPosition::encode const):
+ (WebKit::InteractionInformationAtPosition::decode):
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::populateCaretContext):
+ Add a bit indicating whether the forced I-beam for editable contexts
+ should be used or not, based on whether it is adjacent to (or immediately
+ over) a replaced element.
+
+2020-02-13 Russell Epstein <[email protected]>
+
Cherry-pick r256000. rdar://problem/59299326
WebPage::rangeForGranularityAtPoint always returns null in the case of CharacterGranularity
Modified: branches/safari-609.1.17.0-branch/Source/WebKit/Shared/ios/InteractionInformationAtPosition.h (256551 => 256552)
--- branches/safari-609.1.17.0-branch/Source/WebKit/Shared/ios/InteractionInformationAtPosition.h 2020-02-13 22:52:39 UTC (rev 256551)
+++ branches/safari-609.1.17.0-branch/Source/WebKit/Shared/ios/InteractionInformationAtPosition.h 2020-02-13 22:52:43 UTC (rev 256552)
@@ -69,6 +69,7 @@
#if ENABLE(DATALIST_ELEMENT)
bool preventTextInteraction { false };
#endif
+ bool shouldNotUseIBeamInEditableContent { false };
WebCore::FloatPoint adjustedPointForNodeRespondingToClickEvents;
URL url;
URL imageURL;
Modified: branches/safari-609.1.17.0-branch/Source/WebKit/Shared/ios/InteractionInformationAtPosition.mm (256551 => 256552)
--- branches/safari-609.1.17.0-branch/Source/WebKit/Shared/ios/InteractionInformationAtPosition.mm 2020-02-13 22:52:39 UTC (rev 256551)
+++ branches/safari-609.1.17.0-branch/Source/WebKit/Shared/ios/InteractionInformationAtPosition.mm 2020-02-13 22:52:43 UTC (rev 256552)
@@ -85,6 +85,7 @@
#if ENABLE(DATALIST_ELEMENT)
encoder << preventTextInteraction;
#endif
+ encoder << shouldNotUseIBeamInEditableContent;
encoder << elementContext;
}
@@ -201,6 +202,9 @@
return false;
#endif
+ if (!decoder.decode(result.shouldNotUseIBeamInEditableContent))
+ return false;
+
if (!decoder.decode(result.elementContext))
return false;
Modified: branches/safari-609.1.17.0-branch/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm (256551 => 256552)
--- branches/safari-609.1.17.0-branch/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm 2020-02-13 22:52:39 UTC (rev 256551)
+++ branches/safari-609.1.17.0-branch/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm 2020-02-13 22:52:43 UTC (rev 256552)
@@ -2836,6 +2836,18 @@
info.lineCaretExtent.setY(request.point.y() - info.lineCaretExtent.height() / 2);
info.caretHeight = info.lineCaretExtent.height();
}
+
+ auto nodeShouldNotUseIBeam = ^(Node* node) {
+ if (!node)
+ return false;
+ RenderObject *renderer = node->renderer();
+ if (!renderer)
+ return false;
+ return is<RenderReplaced>(*renderer);
+ };
+
+ const auto& deepPosition = position.deepEquivalent();
+ info.shouldNotUseIBeamInEditableContent = nodeShouldNotUseIBeam(node) || nodeShouldNotUseIBeam(deepPosition.computeNodeBeforePosition()) || nodeShouldNotUseIBeam(deepPosition.computeNodeAfterPosition());
}
InteractionInformationAtPosition WebPage::positionInformation(const InteractionInformationRequest& request)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes