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

Unified Diff: Source/web/WebLocalFrameImpl.cpp

Issue 1171733002: Adding a bunch of trace events for text selection. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@new_granularity_real
Patch Set: Created 5 years, 6 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/core/editing/FrameSelection.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebLocalFrameImpl.cpp
diff --git a/Source/web/WebLocalFrameImpl.cpp b/Source/web/WebLocalFrameImpl.cpp
index 9b43442836a2bf363f899ff4e9c97859032cbe12..353042c88979dfc6bdd2a99b5ee3818efe6e34a5 100644
--- a/Source/web/WebLocalFrameImpl.cpp
+++ b/Source/web/WebLocalFrameImpl.cpp
@@ -1262,11 +1262,13 @@ WebString WebLocalFrameImpl::selectionAsMarkup() const
void WebLocalFrameImpl::selectWordAroundPosition(LocalFrame* frame, VisiblePosition position)
{
+ TRACE_EVENT0("blink", "WebLocalFrameImpl::selectWordAroundPosition");
frame->selection().selectWordAroundPosition(position);
}
bool WebLocalFrameImpl::selectWordAroundCaret()
{
+ TRACE_EVENT0("blink", "WebLocalFrameImpl::selectWordAroundCaret");
FrameSelection& selection = frame()->selection();
if (selection.isNone() || selection.isRange())
return false;
@@ -1280,17 +1282,20 @@ void WebLocalFrameImpl::selectRange(const WebPoint& baseInViewport, const WebPoi
void WebLocalFrameImpl::selectRange(const WebRange& webRange)
{
+ TRACE_EVENT0("blink", "WebLocalFrameImpl::selectRange");
if (RefPtrWillBeRawPtr<Range> range = static_cast<PassRefPtrWillBeRawPtr<Range>>(webRange))
frame()->selection().setSelectedRange(range.get(), VP_DEFAULT_AFFINITY, FrameSelection::NonDirectional, NotUserTriggered);
}
void WebLocalFrameImpl::moveRangeSelectionExtent(const WebPoint& point)
{
+ TRACE_EVENT0("blink", "WebLocalFrameImpl::moveRangeSelectionExtent");
frame()->selection().moveRangeSelectionExtent(frame()->view()->viewportToContents(point));
}
void WebLocalFrameImpl::moveRangeSelection(const WebPoint& baseInViewport, const WebPoint& extentInViewport, WebFrame::TextGranularity granularity)
{
+ TRACE_EVENT0("blink", "WebLocalFrameImpl::moveRangeSelection");
blink::TextGranularity blinkGranularity = blink::CharacterGranularity;
if (granularity == WebFrame::WordGranularity)
blinkGranularity = blink::WordGranularity;
@@ -1302,6 +1307,7 @@ void WebLocalFrameImpl::moveRangeSelection(const WebPoint& baseInViewport, const
void WebLocalFrameImpl::moveCaretSelection(const WebPoint& pointInViewport)
{
+ TRACE_EVENT0("blink", "WebLocalFrameImpl::moveCaretSelection");
Element* editable = frame()->selection().rootEditableElement();
if (!editable)
return;
@@ -1312,11 +1318,13 @@ void WebLocalFrameImpl::moveCaretSelection(const WebPoint& pointInViewport)
bool WebLocalFrameImpl::setEditableSelectionOffsets(int start, int end)
{
+ TRACE_EVENT0("blink", "WebLocalFrameImpl::setEditableSelectionOffsets");
return frame()->inputMethodController().setEditableSelectionOffsets(PlainTextRange(start, end));
}
bool WebLocalFrameImpl::setCompositionFromExistingText(int compositionStart, int compositionEnd, const WebVector<WebCompositionUnderline>& underlines)
{
+ TRACE_EVENT0("blink", "WebLocalFrameImpl::setCompositionFromExistingText");
if (!frame()->editor().canEdit())
return false;
@@ -1333,6 +1341,7 @@ bool WebLocalFrameImpl::setCompositionFromExistingText(int compositionStart, int
void WebLocalFrameImpl::extendSelectionAndDelete(int before, int after)
{
+ TRACE_EVENT0("blink", "WebLocalFrameImpl::extendSelectionAndDelete");
if (WebPlugin* plugin = focusedPluginIfInputMethodSupported()) {
plugin->extendSelectionAndDelete(before, after);
return;
« no previous file with comments | « Source/core/editing/FrameSelection.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698