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

Unified Diff: ui/gfx/render_text.cc

Issue 2688883002: Revert [MacViews] Implemented text context menu (Closed)
Patch Set: Created 3 years, 10 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 | « ui/gfx/render_text.h ('k') | ui/gfx/render_text_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/render_text.cc
diff --git a/ui/gfx/render_text.cc b/ui/gfx/render_text.cc
index 629fb60a670e6c0819d9413a8dba924b3249297f..41e7cf44cb6d6fc293974d3370eddee68110ac01 100644
--- a/ui/gfx/render_text.cc
+++ b/ui/gfx/render_text.cc
@@ -1032,10 +1032,9 @@ Vector2d RenderText::GetLineOffset(size_t line_number) {
return offset;
}
-bool RenderText::GetDecoratedWordAndBaselineAtPoint(
- const Point& point,
- DecoratedText* decorated_word,
- Point* baseline_point) {
+bool RenderText::GetDecoratedWordAtPoint(const Point& point,
+ DecoratedText* decorated_word,
+ Point* baseline_point) {
if (obscured())
return false;
@@ -1050,19 +1049,9 @@ bool RenderText::GetDecoratedWordAndBaselineAtPoint(
DCHECK(!word_range.is_reversed());
DCHECK(!word_range.is_empty());
- return GetDecoratedTextAndBaselineForRange(word_range, decorated_word,
- baseline_point);
-}
-
-bool RenderText::GetDecoratedTextAndBaselineForRange(
- const Range& word_range,
- DecoratedText* decorated_text,
- Point* baseline_point) {
- EnsureLayout();
-
const std::vector<Rect> word_bounds = GetSubstringBounds(word_range);
if (word_bounds.empty() ||
- !GetDecoratedTextForRange(word_range, decorated_text)) {
+ !GetDecoratedTextForRange(word_range, decorated_word)) {
return false;
}
« no previous file with comments | « ui/gfx/render_text.h ('k') | ui/gfx/render_text_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698