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

Side by Side Diff: Source/core/rendering/BidiRunForLine.cpp

Issue 737333002: Ignore pos argument if the first render object is not the current one. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Style fix Created 6 years, 1 month 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/bdi-get-direction-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')
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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 current = next; 77 current = next;
78 } 78 }
79 79
80 return current; 80 return current;
81 } 81 }
82 82
83 TextDirection determinePlaintextDirectionality(RenderObject* root, 83 TextDirection determinePlaintextDirectionality(RenderObject* root,
84 RenderObject* current = 0, unsigned pos = 0) 84 RenderObject* current = 0, unsigned pos = 0)
85 { 85 {
86 InlineIterator iter(root, 86 RenderObject* firstRenderObject = firstRenderObjectForDirectionalityDetermin ation(root, current);
87 firstRenderObjectForDirectionalityDetermination(root, current), pos); 87 InlineIterator iter(root, firstRenderObject, firstRenderObject == current ? pos : 0);
88 InlineBidiResolver observer; 88 InlineBidiResolver observer;
89 observer.setStatus(BidiStatus(root->style()->direction(), 89 observer.setStatus(BidiStatus(root->style()->direction(),
90 isOverride(root->style()->unicodeBidi()))); 90 isOverride(root->style()->unicodeBidi())));
91 observer.setPositionIgnoringNestedIsolates(iter); 91 observer.setPositionIgnoringNestedIsolates(iter);
92 return observer.determineParagraphDirectionality(); 92 return observer.determineParagraphDirectionality();
93 } 93 }
94 94
95 // FIXME: This should be a BidiStatus constructor or create method. 95 // FIXME: This should be a BidiStatus constructor or create method.
96 static inline BidiStatus statusWithDirection(TextDirection textDirection, 96 static inline BidiStatus statusWithDirection(TextDirection textDirection,
97 bool isOverride) 97 bool isOverride)
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 isolatedResolver.isolatedRuns()); 206 isolatedResolver.isolatedRuns());
207 currentRoot = isolatedInline; 207 currentRoot = isolatedInline;
208 restoreIsolatedMidpointStates(topResolver, isolatedResolver); 208 restoreIsolatedMidpointStates(topResolver, isolatedResolver);
209 } 209 }
210 } 210 }
211 } 211 }
212 212
213 } // namespace blink 213 } // namespace blink
214 214
215 #endif // BidiRunForLine_h 215 #endif // BidiRunForLine_h
OLDNEW
« no previous file with comments | « LayoutTests/fast/text/bdi-get-direction-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698