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

Unified Diff: Source/WebCore/rendering/RenderBlockLineLayout.cpp

Issue 14150014: Merge 147660 "Source/WebCore: InlineIterator needs to be updated..." (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/1453/
Patch Set: Created 7 years, 8 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 | « LayoutTests/fast/text/international/combine-at-line-break-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/rendering/RenderBlockLineLayout.cpp
===================================================================
--- Source/WebCore/rendering/RenderBlockLineLayout.cpp (revision 148870)
+++ Source/WebCore/rendering/RenderBlockLineLayout.cpp (working copy)
@@ -2611,6 +2611,11 @@
#endif
}
+static inline bool iteratorIsBeyondEndOfRenderCombineText(const InlineIterator& iter, RenderCombineText* renderer)
+{
+ return iter.m_obj == renderer && iter.m_pos >= renderer->textLength();
+}
+
InlineIterator RenderBlock::LineBreaker::nextSegmentBreak(InlineBidiResolver& resolver, LineInfo& lineInfo, RenderTextInfo& renderTextInfo, FloatingObject* lastFloatFromPreviousLine, unsigned consecutiveHyphenatedLines, WordMeasurements& wordMeasurements)
{
reset();
@@ -2830,8 +2835,16 @@
bool isSVGText = t->isSVGInlineText();
#endif
- if (t->style()->hasTextCombine() && current.m_obj->isCombineText() && !toRenderCombineText(current.m_obj)->isCombined())
- toRenderCombineText(current.m_obj)->combineText();
+ if (t->style()->hasTextCombine() && current.m_obj->isCombineText() && !toRenderCombineText(current.m_obj)->isCombined()) {
+ RenderCombineText* combineRenderer = toRenderCombineText(current.m_obj);
+ combineRenderer->combineText();
+ // The length of the renderer's text may have changed. Increment stale iterator positions
+ if (iteratorIsBeyondEndOfRenderCombineText(lBreak, combineRenderer)) {
+ ASSERT(iteratorIsBeyondEndOfRenderCombineText(resolver.position(), combineRenderer));
+ lBreak.increment();
+ resolver.increment();
+ }
+ }
RenderStyle* style = t->style(lineInfo.isFirstLine());
const Font& f = style->font();
« no previous file with comments | « LayoutTests/fast/text/international/combine-at-line-break-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698