Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(289)

Unified Diff: Source/WebKit/chromium/src/WebFrameImpl.cpp

Issue 11931008: Merge 138893 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebKit/chromium/src/WebFrameImpl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebKit/chromium/src/WebFrameImpl.cpp
===================================================================
--- Source/WebKit/chromium/src/WebFrameImpl.cpp (revision 139812)
+++ Source/WebKit/chromium/src/WebFrameImpl.cpp (working copy)
@@ -1388,6 +1388,16 @@
frame()->selection()->setSelectedRange(range.get(), WebCore::VP_DEFAULT_AFFINITY, false);
}
+void WebFrameImpl::moveCaretSelectionTowardsWindowPoint(const WebPoint& point)
+{
+ Element* editable = frame()->selection()->rootEditableElement();
+ IntPoint contentsPoint = frame()->view()->windowToContents(IntPoint(point));
+ LayoutPoint localPoint(editable->convertFromPage(contentsPoint));
+ VisiblePosition position = editable->renderer()->positionForPoint(localPoint);
+ if (frame()->selection()->shouldChangeSelection(position))
+ frame()->selection()->moveTo(position, UserTriggered);
+}
+
VisiblePosition WebFrameImpl::visiblePositionForWindowPoint(const WebPoint& point)
{
HitTestRequest request = HitTestRequest::Move | HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::IgnoreClipping;
« no previous file with comments | « Source/WebKit/chromium/src/WebFrameImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698