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

Unified Diff: ui/gfx/render_text_win.h

Issue 9390022: Simplify handling of BiDi cursor movement (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make set_selection_start private, fix accidental inclusion of local hacks Created 8 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
Index: ui/gfx/render_text_win.h
diff --git a/ui/gfx/render_text_win.h b/ui/gfx/render_text_win.h
index 8df7fa770c5273466d9a896861bbc14a2d65ffd6..5722ec9859b02b47e0ca37ddcc9257468343d910 100644
--- a/ui/gfx/render_text_win.h
+++ b/ui/gfx/render_text_win.h
@@ -65,10 +65,8 @@ class RenderTextWin : public RenderText {
// Overridden from RenderText:
virtual base::i18n::TextDirection GetTextDirection() OVERRIDE;
- virtual int GetStringWidth() OVERRIDE;
+ virtual Size GetStringSize() OVERRIDE;
virtual SelectionModel FindCursorPosition(const Point& point) OVERRIDE;
- virtual Rect GetCursorBounds(const SelectionModel& selection,
- bool insert_mode) OVERRIDE;
protected:
// Overridden from RenderText:
@@ -78,9 +76,10 @@ class RenderTextWin : public RenderText {
virtual SelectionModel AdjacentWordSelectionModel(
const SelectionModel& selection,
VisualCursorDirection direction) OVERRIDE;
- virtual SelectionModel EdgeSelectionModel(
- VisualCursorDirection direction) OVERRIDE;
- virtual std::vector<Rect> GetSubstringBounds(size_t from, size_t to) OVERRIDE;
+ virtual void GetGlyphBounds(size_t index,
+ ui::Range* xspan,
+ int* height) OVERRIDE;
+ virtual std::vector<Rect> GetSubstringBounds(ui::Range range) OVERRIDE;
virtual void SetSelectionModel(const SelectionModel& model) OVERRIDE;
virtual bool IsCursorablePosition(size_t position) OVERRIDE;
virtual void UpdateLayout() OVERRIDE;
@@ -97,7 +96,7 @@ class RenderTextWin : public RenderText {
// Return the run index that contains the argument; or the length of the
// |runs_| vector if argument exceeds the text length or width.
- size_t GetRunContainingPosition(size_t position) const;
+ size_t GetRunContainingCaret(const SelectionModel& caret) const;
size_t GetRunContainingPoint(const Point& point) const;
// Given a |run|, returns the SelectionModel that contains the logical first

Powered by Google App Engine
This is Rietveld 408576698