Chromium Code Reviews| Index: Source/core/rendering/InlineIterator.h |
| diff --git a/Source/core/rendering/InlineIterator.h b/Source/core/rendering/InlineIterator.h |
| index 0bc1128112afca67cc84d3e0d8fcb2d40f040d59..4b638732358110ec3bc6b5d101ab425cb137dcfa 100644 |
| --- a/Source/core/rendering/InlineIterator.h |
| +++ b/Source/core/rendering/InlineIterator.h |
| @@ -421,7 +421,7 @@ inline void InlineBidiResolver::increment() |
| } |
| template <> |
| -inline bool InlineBidiResolver::isEndOfParagraph(const InlineIterator& end) |
| +inline bool InlineBidiResolver::isEndOfLine(const InlineIterator& end) |
| { |
| bool inEndOfParagraph = m_current == end || m_current.atEnd() || (inIsolate() && m_current.m_obj == end.m_obj); |
|
leviw_travelin_and_unemployed
2013/10/30 17:44:37
This seems pretty weird. isEndOfLine returning "in
|
| if (inIsolate() && inEndOfParagraph) { |
| @@ -589,7 +589,7 @@ inline void InlineBidiResolver::appendRun() |
| IsolateTracker isolateTracker(numberOfIsolateAncestors(m_sor)); |
| int start = m_sor.m_pos; |
| RenderObject* obj = m_sor.m_obj; |
| - while (obj && obj != m_eor.m_obj && obj != endOfLine.m_obj) { |
| + while (obj && obj != m_eor.m_obj && obj != m_runAtEndOfLine.m_obj) { |
| if (isolateTracker.inIsolate()) |
| isolateTracker.addFakeRunIfNecessary(obj, start, obj->length(), *this); |
| else |
| @@ -598,11 +598,12 @@ inline void InlineBidiResolver::appendRun() |
| start = 0; |
| obj = bidiNextSkippingEmptyInlines(m_sor.root(), obj, &isolateTracker); |
| } |
| - if (obj) { |
| + bool isEndOfLine = obj == m_endOfLine.m_obj && !m_endOfLine.m_pos; |
| + if (obj && !isEndOfLine) { |
| unsigned pos = obj == m_eor.m_obj ? m_eor.m_pos : INT_MAX; |
| - if (obj == endOfLine.m_obj && endOfLine.m_pos <= pos) { |
| + if (obj == m_runAtEndOfLine.m_obj && m_runAtEndOfLine.m_pos <= pos) { |
| m_reachedEndOfLine = true; |
| - pos = endOfLine.m_pos; |
| + pos = m_runAtEndOfLine.m_pos; |
| } |
| // It's OK to add runs for zero-length RenderObjects, just don't make the run larger than it should be |
| int end = obj->length() ? pos + 1 : 0; |