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

Unified Diff: ui/gfx/render_text_linux.h

Issue 9390022: Simplify handling of BiDi cursor movement (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix merge breakage Created 8 years, 9 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.cc ('k') | ui/gfx/render_text_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/render_text_linux.h
diff --git a/ui/gfx/render_text_linux.h b/ui/gfx/render_text_linux.h
index ca4d6cda349b4b6d89036d16691e9a80ca9845ea..c2c667b3edde96f9c36737194095f1e53f535395 100644
--- a/ui/gfx/render_text_linux.h
+++ b/ui/gfx/render_text_linux.h
@@ -21,10 +21,8 @@ class RenderTextLinux : 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& position,
- bool insert_mode) OVERRIDE;
protected:
// Overridden from RenderText:
@@ -34,9 +32,10 @@ class RenderTextLinux : 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;
@@ -48,8 +47,9 @@ class RenderTextLinux : public RenderText {
size_t index,
LogicalCursorDirection direction) OVERRIDE;
- // Returns the run that contains |position|. Return NULL if not found.
- GSList* GetRunContainingPosition(size_t position) const;
+ // Returns the run that contains the character attached to the caret in the
+ // given selection model. Return NULL if not found.
+ GSList* GetRunContainingCaret(const SelectionModel& caret) const;
// Given a |run|, returns the SelectionModel that contains the logical first
// or last caret position inside (not at a boundary of) the run.
@@ -73,9 +73,9 @@ class RenderTextLinux : public RenderText {
size_t TextIndexToLayoutIndex(size_t index) const;
size_t LayoutIndexToTextIndex(size_t index) const;
- // Calculate the visual bounds containing the logical substring within |from|
- // to |to|.
- std::vector<Rect> CalculateSubstringBounds(size_t from, size_t to);
+ // Calculate the visual bounds containing the logical substring within the
+ // given range.
+ std::vector<Rect> CalculateSubstringBounds(ui::Range range);
// Get the visual bounds of the logical selection.
std::vector<Rect> GetSelectionBounds();
« no previous file with comments | « ui/gfx/render_text.cc ('k') | ui/gfx/render_text_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698