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

Unified Diff: Source/core/rendering/InlineIterator.h

Issue 46393003: BidiResolver should not append an isolated run if it is in a other line. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Proposed patch Created 7 years, 2 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 | « no previous file | Source/core/rendering/RenderBlockLineLayout.cpp » ('j') | Source/platform/text/BidiResolver.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | Source/core/rendering/RenderBlockLineLayout.cpp » ('j') | Source/platform/text/BidiResolver.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698