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

Unified Diff: Source/core/rendering/RenderBlockLineLayout.cpp

Issue 23456046: Implement unicode bidi P2 and P3 rules in BidiResolver (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 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 | « Source/core/rendering/InlineIterator.h ('k') | Source/wtf/text/StringImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBlockLineLayout.cpp
diff --git a/Source/core/rendering/RenderBlockLineLayout.cpp b/Source/core/rendering/RenderBlockLineLayout.cpp
index acf41172647deff8aeea17f8b7c88903e8db00e4..0dbb213e2f4e9596eb35e83f5fdcbcad4c23c0b2 100644
--- a/Source/core/rendering/RenderBlockLineLayout.cpp
+++ b/Source/core/rendering/RenderBlockLineLayout.cpp
@@ -240,25 +240,9 @@ static TextDirection determinePlaintextDirectionality(RenderObject* root, Render
{
InlineIterator iter(root, firstRenderObjectForDirectionalityDetermination(root, current), pos);
InlineBidiResolver observer;
- observer.setPositionIgnoringNestedIsolates(iter);
observer.setStatus(BidiStatus(root->style()->direction(), isOverride(root->style()->unicodeBidi())));
- while (!iter.atEnd()) {
- if (observer.inIsolate()) {
- iter.increment(&observer, InlineIterator::FastIncrementInIsolatedRenderer);
- continue;
- }
- if (iter.atParagraphSeparator())
- break;
- if (UChar current = iter.current()) {
- Direction charDirection = direction(current);
- if (charDirection == LeftToRight)
- return LTR;
- if (charDirection == RightToLeft || charDirection == RightToLeftArabic)
- return RTL;
- }
- iter.increment(&observer);
- }
- return LTR;
+ observer.setPositionIgnoringNestedIsolates(iter);
+ return observer.determineParagraphDirectionality();
}
static void checkMidpoints(LineMidpointState& lineMidpointState, InlineIterator& lBreak)
« no previous file with comments | « Source/core/rendering/InlineIterator.h ('k') | Source/wtf/text/StringImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698