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

Side by Side Diff: ui/gfx/render_text_win.h

Issue 15746013: Fix cursor positioning regression from r201136. GetCursorPos() shouldn't assume (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « ui/gfx/render_text_unittest.cc ('k') | ui/gfx/render_text_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_GFX_RENDER_TEXT_WIN_H_ 5 #ifndef UI_GFX_RENDER_TEXT_WIN_H_
6 #define UI_GFX_RENDER_TEXT_WIN_H_ 6 #define UI_GFX_RENDER_TEXT_WIN_H_
7 7
8 #include <usp10.h> 8 #include <usp10.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 protected: 74 protected:
75 // Overridden from RenderText: 75 // Overridden from RenderText:
76 virtual SelectionModel AdjacentCharSelectionModel( 76 virtual SelectionModel AdjacentCharSelectionModel(
77 const SelectionModel& selection, 77 const SelectionModel& selection,
78 VisualCursorDirection direction) OVERRIDE; 78 VisualCursorDirection direction) OVERRIDE;
79 virtual SelectionModel AdjacentWordSelectionModel( 79 virtual SelectionModel AdjacentWordSelectionModel(
80 const SelectionModel& selection, 80 const SelectionModel& selection,
81 VisualCursorDirection direction) OVERRIDE; 81 VisualCursorDirection direction) OVERRIDE;
82 virtual void SetSelectionModel(const SelectionModel& model) OVERRIDE; 82 virtual void SetSelectionModel(const SelectionModel& model) OVERRIDE;
83 virtual void GetGlyphBounds(size_t index, 83 virtual ui::Range GetGlyphBounds(size_t index) OVERRIDE;
84 ui::Range* xspan,
85 int* height) OVERRIDE;
86 virtual std::vector<Rect> GetSubstringBounds(const ui::Range& range) OVERRIDE; 84 virtual std::vector<Rect> GetSubstringBounds(const ui::Range& range) OVERRIDE;
87 virtual size_t TextIndexToLayoutIndex(size_t index) const OVERRIDE; 85 virtual size_t TextIndexToLayoutIndex(size_t index) const OVERRIDE;
88 virtual size_t LayoutIndexToTextIndex(size_t index) const OVERRIDE; 86 virtual size_t LayoutIndexToTextIndex(size_t index) const OVERRIDE;
89 virtual bool IsCursorablePosition(size_t position) OVERRIDE; 87 virtual bool IsCursorablePosition(size_t position) OVERRIDE;
90 virtual void ResetLayout() OVERRIDE; 88 virtual void ResetLayout() OVERRIDE;
91 virtual void EnsureLayout() OVERRIDE; 89 virtual void EnsureLayout() OVERRIDE;
92 virtual void DrawVisualText(Canvas* canvas) OVERRIDE; 90 virtual void DrawVisualText(Canvas* canvas) OVERRIDE;
93 91
94 private: 92 private:
95 void ItemizeLogicalText(); 93 void ItemizeLogicalText();
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 scoped_ptr<int[]> logical_to_visual_; 133 scoped_ptr<int[]> logical_to_visual_;
136 134
137 bool needs_layout_; 135 bool needs_layout_;
138 136
139 DISALLOW_COPY_AND_ASSIGN(RenderTextWin); 137 DISALLOW_COPY_AND_ASSIGN(RenderTextWin);
140 }; 138 };
141 139
142 } // namespace gfx 140 } // namespace gfx
143 141
144 #endif // UI_GFX_RENDER_TEXT_WIN_H_ 142 #endif // UI_GFX_RENDER_TEXT_WIN_H_
OLDNEW
« no previous file with comments | « ui/gfx/render_text_unittest.cc ('k') | ui/gfx/render_text_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698