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

Unified Diff: Source/platform/text/BidiResolver.h

Issue 104813005: Explicitly set text direction for TextRuns (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use BidiResolver in RenderText Created 6 years, 11 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: Source/platform/text/BidiResolver.h
diff --git a/Source/platform/text/BidiResolver.h b/Source/platform/text/BidiResolver.h
index 68aeec1027e7aaab2495df8329bc239e00806de1..c25705290ccf60d1af212d8729d572a7b74c10d4 100644
--- a/Source/platform/text/BidiResolver.h
+++ b/Source/platform/text/BidiResolver.h
@@ -219,7 +219,7 @@ public:
void embed(WTF::Unicode::Direction, BidiEmbeddingSource);
bool commitExplicitEmbedding();
- void createBidiRunsForLine(const Iterator& end, VisualDirectionOverride = NoVisualOverride, bool hardLineBreak = false);
+ void createBidiRunsForLine(const Iterator& end, VisualDirectionOverride = NoVisualOverride, bool hardLineBreak = false, bool reorderRuns = true);
leviw_travelin_and_unemployed 2014/01/09 00:49:54 Boolean params make me sad. It'd be great if we co
BidiRunList<Run>& runs() { return m_runs; }
@@ -635,7 +635,7 @@ TextDirection BidiResolver<Iterator, Run>::determineParagraphDirectionality(bool
}
template <class Iterator, class Run>
-void BidiResolver<Iterator, Run>::createBidiRunsForLine(const Iterator& end, VisualDirectionOverride override, bool hardLineBreak)
+void BidiResolver<Iterator, Run>::createBidiRunsForLine(const Iterator& end, VisualDirectionOverride override, bool hardLineBreak, bool reorderRuns)
{
using namespace WTF::Unicode;
@@ -1034,7 +1034,8 @@ void BidiResolver<Iterator, Run>::createBidiRunsForLine(const Iterator& end, Vis
}
m_runs.setLogicallyLastRun(m_runs.lastRun());
- reorderRunsFromLevels();
+ if (reorderRuns)
+ reorderRunsFromLevels();
m_endOfRunAtEndOfLine = Iterator();
m_endOfLine = Iterator();

Powered by Google App Engine
This is Rietveld 408576698