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

Side by Side Diff: Source/core/editing/FrameSelection.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 unified diff | Download patch
« no previous file with comments | « no previous file | Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2008, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2008, 2009, 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 1922 matching lines...) Expand 10 before | Expand all | Expand 10 after
1933 1933
1934 if (strategyType == SelectionStrategy::Direction) 1934 if (strategyType == SelectionStrategy::Direction)
1935 m_granularityStrategy = adoptPtr(new DirectionGranularityStrategy()); 1935 m_granularityStrategy = adoptPtr(new DirectionGranularityStrategy());
1936 else 1936 else
1937 m_granularityStrategy = adoptPtr(new CharacterGranularityStrategy()); 1937 m_granularityStrategy = adoptPtr(new CharacterGranularityStrategy());
1938 return m_granularityStrategy.get(); 1938 return m_granularityStrategy.get();
1939 } 1939 }
1940 1940
1941 void FrameSelection::moveRangeSelectionExtent(const IntPoint& contentsPoint) 1941 void FrameSelection::moveRangeSelectionExtent(const IntPoint& contentsPoint)
1942 { 1942 {
1943 TRACE_EVENT0("blink", "FrameSelection::moveRangeSelectionExtent");
1944 if (isNone()) 1943 if (isNone())
1945 return; 1944 return;
1946 1945
1947 VisibleSelection newSelection = granularityStrategy()->updateExtent(contents Point, m_frame); 1946 VisibleSelection newSelection = granularityStrategy()->updateExtent(contents Point, m_frame);
1948 setSelection( 1947 setSelection(
1949 newSelection, 1948 newSelection,
1950 FrameSelection::CloseTyping | FrameSelection::ClearTypingStyle | FrameSe lection::DoNotClearStrategy | UserTriggered, 1949 FrameSelection::CloseTyping | FrameSelection::ClearTypingStyle | FrameSe lection::DoNotClearStrategy | UserTriggered,
1951 FrameSelection::AlignCursorOnScrollIfNeeded, 1950 FrameSelection::AlignCursorOnScrollIfNeeded,
1952 CharacterGranularity); 1951 CharacterGranularity);
1953 } 1952 }
(...skipping 20 matching lines...) Expand all
1974 1973
1975 void showTree(const blink::FrameSelection* sel) 1974 void showTree(const blink::FrameSelection* sel)
1976 { 1975 {
1977 if (sel) 1976 if (sel)
1978 sel->showTreeForThis(); 1977 sel->showTreeForThis();
1979 else 1978 else
1980 fprintf(stderr, "Cannot showTree for (nil) FrameSelection.\n"); 1979 fprintf(stderr, "Cannot showTree for (nil) FrameSelection.\n");
1981 } 1980 }
1982 1981
1983 #endif 1982 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698