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

Side by Side Diff: third_party/WebKit/Source/core/layout/BidiRunForLine.cpp

Issue 2625553005: Changed EUnicodeBidi to an enum class and renamed its members (Closed)
Patch Set: Created 3 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
4 * All right reserved. 4 * All right reserved.
5 * Copyright (C) 2010 Google Inc. All rights reserved. 5 * Copyright (C) 2010 Google Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 highestContainingIsolateWithinRoot(startObj, currentRoot); 135 highestContainingIsolateWithinRoot(startObj, currentRoot);
136 ASSERT(isolatedInline); 136 ASSERT(isolatedInline);
137 137
138 InlineBidiResolver isolatedResolver; 138 InlineBidiResolver isolatedResolver;
139 LineMidpointState& isolatedLineMidpointState = 139 LineMidpointState& isolatedLineMidpointState =
140 isolatedResolver.midpointState(); 140 isolatedResolver.midpointState();
141 isolatedLineMidpointState = 141 isolatedLineMidpointState =
142 topResolver.midpointStateForIsolatedRun(isolatedRun.runToReplace); 142 topResolver.midpointStateForIsolatedRun(isolatedRun.runToReplace);
143 EUnicodeBidi unicodeBidi = isolatedInline.style()->unicodeBidi(); 143 EUnicodeBidi unicodeBidi = isolatedInline.style()->unicodeBidi();
144 TextDirection direction; 144 TextDirection direction;
145 if (unicodeBidi == Plaintext) { 145 if (unicodeBidi == EUnicodeBidi::kPlaintext) {
146 direction = determinePlaintextDirectionality( 146 direction = determinePlaintextDirectionality(
147 isolatedInline, isNewUBAParagraph ? startObj : 0); 147 isolatedInline, isNewUBAParagraph ? startObj : 0);
148 } else { 148 } else {
149 ASSERT(unicodeBidi == Isolate || unicodeBidi == IsolateOverride); 149 DCHECK(unicodeBidi == EUnicodeBidi::kIsolate ||
150 unicodeBidi == EUnicodeBidi::kIsolateOverride);
150 direction = isolatedInline.style()->direction(); 151 direction = isolatedInline.style()->direction();
151 } 152 }
152 isolatedResolver.setStatus(BidiStatus::createForIsolate( 153 isolatedResolver.setStatus(BidiStatus::createForIsolate(
153 direction, isOverride(unicodeBidi), isolatedRun.level)); 154 direction, isOverride(unicodeBidi), isolatedRun.level));
154 155
155 setupResolverToResumeInIsolate(isolatedResolver, isolatedInline, startObj); 156 setupResolverToResumeInIsolate(isolatedResolver, isolatedInline, startObj);
156 157
157 // The starting position is the beginning of the first run within the 158 // The starting position is the beginning of the first run within the
158 // isolate that was identified during the earlier call to 159 // isolate that was identified during the earlier call to
159 // createBidiRunsForLine. This can be but is not necessarily the first 160 // createBidiRunsForLine. This can be but is not necessarily the first
(...skipping 23 matching lines...) Expand all
183 topResolver.setMidpointStateForIsolatedRun( 184 topResolver.setMidpointStateForIsolatedRun(
184 runWithContext.runToReplace, 185 runWithContext.runToReplace,
185 isolatedResolver.midpointStateForIsolatedRun( 186 isolatedResolver.midpointStateForIsolatedRun(
186 runWithContext.runToReplace)); 187 runWithContext.runToReplace));
187 topResolver.isolatedRuns().push_back(runWithContext); 188 topResolver.isolatedRuns().push_back(runWithContext);
188 } 189 }
189 } 190 }
190 } 191 }
191 192
192 } // namespace blink 193 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/VisibleUnits.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698