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

Side by Side Diff: Source/WebCore/rendering/InlineIterator.h

Issue 8760017: Merge 101272 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/912/
Patch Set: Created 9 years 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 | « LayoutTests/fast/text/international/embed-bidi-style-in-isolate-crash-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:mergeinfo
Merged /trunk/WebCore/rendering/InlineIterator.h:r53455
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 Apple Inc. All right r eserved. 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010 Apple Inc. All right r eserved.
4 * Copyright (C) 2010 Google Inc. All rights reserved. 4 * Copyright (C) 2010 Google Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 return; 132 return;
133 } 133 }
134 if (unicodeBidi == Isolate) { 134 if (unicodeBidi == Isolate) {
135 observer->enterIsolate(); 135 observer->enterIsolate();
136 // Embedding/Override characters implied by dir= are handled when 136 // Embedding/Override characters implied by dir= are handled when
137 // we process the isolated span, not when laying out the "parent" run. 137 // we process the isolated span, not when laying out the "parent" run.
138 return; 138 return;
139 } 139 }
140 140
141 // FIXME: Should unicode-bidi: plaintext really be embedding override/embed characters here? 141 // FIXME: Should unicode-bidi: plaintext really be embedding override/embed characters here?
142 observer->embed(embedCharFromDirection(style->direction(), unicodeBidi), Fro mStyleOrDOM); 142 if (!observer->inIsolate())
143 observer->embed(embedCharFromDirection(style->direction(), unicodeBidi), FromStyleOrDOM);
143 } 144 }
144 145
145 template <class Observer> 146 template <class Observer>
146 static inline void notifyObserverWillExitObject(Observer* observer, RenderObject * object) 147 static inline void notifyObserverWillExitObject(Observer* observer, RenderObject * object)
147 { 148 {
148 if (!observer || !object || !object->isRenderInline()) 149 if (!observer || !object || !object->isRenderInline())
149 return; 150 return;
150 151
151 EUnicodeBidi unicodeBidi = object->style()->unicodeBidi(); 152 EUnicodeBidi unicodeBidi = object->style()->unicodeBidi();
152 if (unicodeBidi == UBNormal) 153 if (unicodeBidi == UBNormal)
153 return; // Nothing to do for unicode-bidi: normal 154 return; // Nothing to do for unicode-bidi: normal
154 if (unicodeBidi == Isolate) { 155 if (unicodeBidi == Isolate) {
155 observer->exitIsolate(); 156 observer->exitIsolate();
156 return; 157 return;
157 } 158 }
158 159
159 // Otherwise we pop any embed/override character we added when we opened thi s tag. 160 // Otherwise we pop any embed/override character we added when we opened thi s tag.
160 observer->embed(WTF::Unicode::PopDirectionalFormat, FromStyleOrDOM); 161 if (!observer->inIsolate())
162 observer->embed(WTF::Unicode::PopDirectionalFormat, FromStyleOrDOM);
161 } 163 }
162 164
163 static inline bool isIteratorTarget(RenderObject* object) 165 static inline bool isIteratorTarget(RenderObject* object)
164 { 166 {
165 ASSERT(object); // The iterator will of course return 0, but its not an expe cted argument to this function. 167 ASSERT(object); // The iterator will of course return 0, but its not an expe cted argument to this function.
166 return object->isText() || object->isFloating() || object->isPositioned() || object->isReplaced(); 168 return object->isText() || object->isFloating() || object->isPositioned() || object->isReplaced();
167 } 169 }
168 170
169 // This enum is only used for bidiNextShared() 171 // This enum is only used for bidiNextShared()
170 enum EmptyInlineBehavior { 172 enum EmptyInlineBehavior {
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 m_sor = m_eor; 500 m_sor = m_eor;
499 } 501 }
500 502
501 m_direction = WTF::Unicode::OtherNeutral; 503 m_direction = WTF::Unicode::OtherNeutral;
502 m_status.eor = WTF::Unicode::OtherNeutral; 504 m_status.eor = WTF::Unicode::OtherNeutral;
503 } 505 }
504 506
505 } 507 }
506 508
507 #endif // InlineIterator_h 509 #endif // InlineIterator_h
OLDNEW
« no previous file with comments | « LayoutTests/fast/text/international/embed-bidi-style-in-isolate-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698