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

Unified Diff: ui/gfx/render_text_harfbuzz.h

Issue 1070223004: Stop combining text runs which are connected by 'COMMON' blocks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 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 side-by-side diff with in-line comments
Download patch
Index: ui/gfx/render_text_harfbuzz.h
diff --git a/ui/gfx/render_text_harfbuzz.h b/ui/gfx/render_text_harfbuzz.h
index 6d8fa8d962a13e7067e0d2f759cf8f9dbdb89916..e24770c9c3e86306e3aa2a2c1c829acfa4f894fa 100644
--- a/ui/gfx/render_text_harfbuzz.h
+++ b/ui/gfx/render_text_harfbuzz.h
@@ -115,6 +115,10 @@ class TextRunList {
// Do not use this when multiline is enabled.
float width() const { return width_; }
+ // Get the run applicable to |position| (at or preceeding |position|).
+ typedef ScopedVector<TextRunHarfBuzz>::const_iterator TextRunHarfBuzzIter;
+ TextRunHarfBuzzIter GetRunAt(size_t position) const;
+
private:
// Text runs in logical order.
ScopedVector<TextRunHarfBuzz> runs_;
@@ -168,6 +172,7 @@ class GFX_EXPORT RenderTextHarfBuzz : public RenderText {
FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_HorizontalAlignment);
FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_NormalWidth);
FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_WordWrapBehavior);
+ FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_LineBreakerBehavior);
FRIEND_TEST_ALL_PREFIXES(RenderTextTest, HarfBuzz_RunDirection);
FRIEND_TEST_ALL_PREFIXES(RenderTextTest, HarfBuzz_HorizontalPositions);
FRIEND_TEST_ALL_PREFIXES(RenderTextTest,

Powered by Google App Engine
This is Rietveld 408576698