WebKit Bugzilla
Attachment 342996 Details for
Bug 186792
: Restrict Selection in contenteditable to the extent of that contenteditable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186792-20180618174356.patch (text/plain), 4.31 KB, created by
Megan Gardner
on 2018-06-18 17:43:57 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Megan Gardner
Created:
2018-06-18 17:43:57 PDT
Size:
4.31 KB
patch
obsolete
>Subversion Revision: 232780 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 852f833009f84fa46e6fda05ee41ab2299e0d5a7..2949d83a86ec682c12f119954996cd2a276e4fd9 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,19 @@ >+2018-06-18 Megan Gardner <megan_gardner@apple.com> >+ >+ Restrict Selection in contenteditable the extent of that contenteditable >+ https://bugs.webkit.org/show_bug.cgi?id=186792 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ My system currently will not allow me to run tests. I will add one when I can update. >+ >+ Expose the already existing funcitonality to restrict a selection to a single contentenditable. >+ >+ * page/EventHandler.cpp: >+ (WebCore::EventHandler::selectionExtentRespectingEditingBoundary): >+ (WebCore::selectionExtentRespectingEditingBoundary): Deleted. >+ * page/EventHandler.h: >+ > 2018-06-12 Ryosuke Niwa <rniwa@webkit.org> > > iOS WK1: Occasional crash in FrameView::setScrollPosition >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index a777d75e06dafa3f7df0f9b2911b6d753dae328f..991bde2ac3cd5da7734a6dc339033ed65b4d21f4 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,17 @@ >+2018-06-18 Megan Gardner <megan_gardner@apple.com> >+ >+ Restrict Selection in contenteditable the extent of that contenteditable >+ https://bugs.webkit.org/show_bug.cgi?id=186792 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ We have not been checking to make sure that when we make a selection that it is restricted to >+ a single content editable on iOS. There is functionality to esure this on mac, so it has been >+ exposed and utalized for restricting the extent of a selection. >+ >+ * WebProcess/WebPage/ios/WebPageIOS.mm: >+ (WebKit::WebPage::updateSelectionWithTouches): >+ > 2018-06-12 Brent Fulgham <bfulgham@apple.com> > > Turn CSS Spring Animations and Link Preload off by default for production builds. >diff --git a/Source/WebCore/page/EventHandler.cpp b/Source/WebCore/page/EventHandler.cpp >index a5bbf90434a5dd939adddd402d48e0357d0512bf..67597d93facd853a679a80691a9b493c4ebe405d 100644 >--- a/Source/WebCore/page/EventHandler.cpp >+++ b/Source/WebCore/page/EventHandler.cpp >@@ -904,7 +904,7 @@ void EventHandler::updateSelectionForMouseDrag() > updateSelectionForMouseDrag(result); > } > >-static VisiblePosition selectionExtentRespectingEditingBoundary(const VisibleSelection& selection, const LayoutPoint& localPoint, Node* targetNode) >+VisiblePosition EventHandler::selectionExtentRespectingEditingBoundary(const VisibleSelection& selection, const LayoutPoint& localPoint, Node* targetNode) > { > FloatPoint selectionEndPoint = localPoint; > Element* editableElement = selection.rootEditableElement(); >diff --git a/Source/WebCore/page/EventHandler.h b/Source/WebCore/page/EventHandler.h >index 2eec61d1e91f5f597e4cb8fcc6d658605e3662ec..fe96961a46c58f19facd86af461d713e84ec4377 100644 >--- a/Source/WebCore/page/EventHandler.h >+++ b/Source/WebCore/page/EventHandler.h >@@ -130,6 +130,7 @@ public: > void nodeWillBeRemoved(Node&); > > #if ENABLE(DRAG_SUPPORT) >+ WEBCORE_EXPORT VisiblePosition selectionExtentRespectingEditingBoundary(const VisibleSelection&, const LayoutPoint&, Node*); > void updateSelectionForMouseDrag(); > #endif > >diff --git a/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm b/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >index 8b5d37c4268cf0522d12f7b5eaaafa41df8b7140..c4991572d3d8191190bed80d2493ecd2f468dddd 100644 >--- a/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >+++ b/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >@@ -1335,6 +1335,9 @@ void WebPage::updateSelectionWithTouches(const IntPoint& point, uint32_t touches > break; > > case SelectionTouch::Moved: >+ HitTestResult result = m_page->mainFrame().eventHandler().hitTestResultAtPoint(point, HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::DisallowUserAgentShadowContent | HitTestRequest::AllowChildFrameContent); >+ VisiblePosition targetPosition = m_page->mainFrame().eventHandler().selectionExtentRespectingEditingBoundary(frame.selection().selection(), result.localPoint(), result.targetNode()); >+ position = targetPosition; > range = rangeForPosition(&frame, position, baseIsStart); > break; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186792
:
342996
|
343038
|
343065
|
343071
|
343107