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

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

Issue 2348143003: MacViews: Implement Force Touch/Mac dictionary lookup for Textfields. (Closed)
Patch Set: Address nits. Created 4 years, 2 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
« no previous file with comments | « ui/gfx/render_text.cc ('k') | ui/gfx/render_text_harfbuzz.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_HARFBUZZ_H_ 5 #ifndef UI_GFX_RENDER_TEXT_HARFBUZZ_H_
6 #define UI_GFX_RENDER_TEXT_HARFBUZZ_H_ 6 #define UI_GFX_RENDER_TEXT_HARFBUZZ_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 void EnsureLayoutRunList(); 233 void EnsureLayoutRunList();
234 234
235 // ICU grapheme iterator for the layout text. Can be NULL in case of an error. 235 // ICU grapheme iterator for the layout text. Can be NULL in case of an error.
236 base::i18n::BreakIterator* GetGraphemeIterator(); 236 base::i18n::BreakIterator* GetGraphemeIterator();
237 237
238 // Returns the current run list, |display_run_list_| if the text is 238 // Returns the current run list, |display_run_list_| if the text is
239 // elided, or |layout_run_list_| otherwise. 239 // elided, or |layout_run_list_| otherwise.
240 internal::TextRunList* GetRunList(); 240 internal::TextRunList* GetRunList();
241 const internal::TextRunList* GetRunList() const; 241 const internal::TextRunList* GetRunList() const;
242 242
243 // RenderText:
244 bool GetDecoratedTextForRange(const Range& range,
245 DecoratedText* decorated_text) override;
246
243 // Text run list for |layout_text_| and |display_text_|. 247 // Text run list for |layout_text_| and |display_text_|.
244 // |display_run_list_| is created only when the text is elided. 248 // |display_run_list_| is created only when the text is elided.
245 internal::TextRunList layout_run_list_; 249 internal::TextRunList layout_run_list_;
246 std::unique_ptr<internal::TextRunList> display_run_list_; 250 std::unique_ptr<internal::TextRunList> display_run_list_;
247 251
248 bool update_layout_run_list_ : 1; 252 bool update_layout_run_list_ : 1;
249 bool update_display_run_list_ : 1; 253 bool update_display_run_list_ : 1;
250 bool update_grapheme_iterator_ : 1; 254 bool update_grapheme_iterator_ : 1;
251 bool update_display_text_ : 1; 255 bool update_display_text_ : 1;
252 256
253 // ICU grapheme iterator for the layout text. Use GetGraphemeIterator() 257 // ICU grapheme iterator for the layout text. Use GetGraphemeIterator()
254 // to access the iterator. 258 // to access the iterator.
255 std::unique_ptr<base::i18n::BreakIterator> grapheme_iterator_; 259 std::unique_ptr<base::i18n::BreakIterator> grapheme_iterator_;
256 260
257 // The total size of the layouted text. 261 // The total size of the layouted text.
258 SizeF total_size_; 262 SizeF total_size_;
259 263
260 // Fixed width of glyphs. This should only be set in test environments. 264 // Fixed width of glyphs. This should only be set in test environments.
261 float glyph_width_for_test_; 265 float glyph_width_for_test_;
262 266
263 DISALLOW_COPY_AND_ASSIGN(RenderTextHarfBuzz); 267 DISALLOW_COPY_AND_ASSIGN(RenderTextHarfBuzz);
264 }; 268 };
265 269
266 } // namespace gfx 270 } // namespace gfx
267 271
268 #endif // UI_GFX_RENDER_TEXT_HARFBUZZ_H_ 272 #endif // UI_GFX_RENDER_TEXT_HARFBUZZ_H_
OLDNEW
« no previous file with comments | « ui/gfx/render_text.cc ('k') | ui/gfx/render_text_harfbuzz.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698