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

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

Issue 11535014: Replace StyleRange with BreakList; update RenderText, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update iteration and helpers; add tests; etc. Created 7 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 unified diff | Download patch | Annotate | Revision Log
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_LINUX_H_ 5 #ifndef UI_GFX_RENDER_TEXT_LINUX_H_
6 #define UI_GFX_RENDER_TEXT_LINUX_H_ 6 #define UI_GFX_RENDER_TEXT_LINUX_H_
7 7
8 #include <pango/pango.h> 8 #include <pango/pango.h>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 27 matching lines...) Expand all
38 int* height) OVERRIDE; 38 int* height) OVERRIDE;
39 virtual std::vector<Rect> GetSubstringBounds(const ui::Range& range) OVERRIDE; 39 virtual std::vector<Rect> GetSubstringBounds(const ui::Range& range) OVERRIDE;
40 virtual size_t TextIndexToLayoutIndex(size_t index) const OVERRIDE; 40 virtual size_t TextIndexToLayoutIndex(size_t index) const OVERRIDE;
41 virtual size_t LayoutIndexToTextIndex(size_t index) const OVERRIDE; 41 virtual size_t LayoutIndexToTextIndex(size_t index) const OVERRIDE;
42 virtual bool IsCursorablePosition(size_t position) OVERRIDE; 42 virtual bool IsCursorablePosition(size_t position) OVERRIDE;
43 virtual void ResetLayout() OVERRIDE; 43 virtual void ResetLayout() OVERRIDE;
44 virtual void EnsureLayout() OVERRIDE; 44 virtual void EnsureLayout() OVERRIDE;
45 virtual void DrawVisualText(Canvas* canvas) OVERRIDE; 45 virtual void DrawVisualText(Canvas* canvas) OVERRIDE;
46 46
47 private: 47 private:
48 friend class RenderTextTest;
49 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, PangoAttributes);
50
48 // Returns the run that contains the character attached to the caret in the 51 // Returns the run that contains the character attached to the caret in the
49 // given selection model. Return NULL if not found. 52 // given selection model. Return NULL if not found.
50 GSList* GetRunContainingCaret(const SelectionModel& caret) const; 53 GSList* GetRunContainingCaret(const SelectionModel& caret) const;
51 54
52 // Given a |run|, returns the SelectionModel that contains the logical first 55 // Given a |run|, returns the SelectionModel that contains the logical first
53 // or last caret position inside (not at a boundary of) the run. 56 // or last caret position inside (not at a boundary of) the run.
54 // The returned value represents a cursor/caret position without a selection. 57 // The returned value represents a cursor/caret position without a selection.
55 SelectionModel FirstSelectionModelInsideRun(const PangoItem* run); 58 SelectionModel FirstSelectionModelInsideRun(const PangoItem* run);
56 SelectionModel LastSelectionModelInsideRun(const PangoItem* run); 59 SelectionModel LastSelectionModelInsideRun(const PangoItem* run);
57 60
(...skipping 30 matching lines...) Expand all
88 const char* layout_text_; 91 const char* layout_text_;
89 // The text length. 92 // The text length.
90 size_t layout_text_len_; 93 size_t layout_text_len_;
91 94
92 DISALLOW_COPY_AND_ASSIGN(RenderTextLinux); 95 DISALLOW_COPY_AND_ASSIGN(RenderTextLinux);
93 }; 96 };
94 97
95 } // namespace gfx 98 } // namespace gfx
96 99
97 #endif // UI_GFX_RENDER_TEXT_LINUX_H_ 100 #endif // UI_GFX_RENDER_TEXT_LINUX_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698