RESOLVED FIXED 142146
BreakingContext cleanup
https://bugs.webkit.org/show_bug.cgi?id=142146
Summary BreakingContext cleanup
Myles C. Maxfield
Reported 2015-03-01 09:03:29 PST
BreakingContext cleanup
Attachments
Patch (6.47 KB, patch)
2015-03-01 09:05 PST, Myles C. Maxfield
no flags
Patch (9.78 KB, patch)
2015-03-01 10:14 PST, Myles C. Maxfield
dino: review+
Myles C. Maxfield
Comment 1 2015-03-01 09:05:57 PST
Myles C. Maxfield
Comment 2 2015-03-01 10:14:34 PST
zalan
Comment 3 2015-03-01 10:20:10 PST
Comment on attachment 247631 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=247631&action=review > Source/WebCore/rendering/line/BreakingContextInlineHeaders.h:1052 > if (m_lineBreak == m_resolver.position()) { > if (!m_lineBreak.renderer() || !m_lineBreak.renderer()->isBR()) { > // we just add as much as possible > - if (m_blockStyle.whiteSpace() == PRE && !m_current.offset()) { > - m_lineBreak.moveTo(m_lastObject, m_lastObject->isText() ? m_lastObject->length() : 0); > - } else if (m_lineBreak.renderer()) { > + if (m_blockStyle.whiteSpace() == PRE && !m_current.offset()) > + commitLineBreakAtCurrentWidth(*m_lastObject, m_lastObject->isText() ? m_lastObject->length() : 0); > + else if (m_lineBreak.renderer()) { > // Don't ever break in the middle of a word if we can help it. > // There's no room at all. We just have to be on this line, > // even though we'll spill out. > - m_lineBreak.moveTo(m_current.renderer(), m_current.offset()); > + commitLineBreakAtCurrentWidth(*m_current.renderer(), m_current.offset()); So the extra m_width.commit() here (by calling commitLineBreakAtCurrentWidth()) does not change behavior?
Myles C. Maxfield
Comment 4 2015-03-01 18:10:15 PST
Comment on attachment 247631 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=247631&action=review >> Source/WebCore/rendering/line/BreakingContextInlineHeaders.h:1052 >> + commitLineBreakAtCurrentWidth(*m_current.renderer(), m_current.offset()); > > So the extra m_width.commit() here (by calling commitLineBreakAtCurrentWidth()) does not change behavior? No - this function only ever gets called at the very end of LineBreaker::nextLineBreak(), where the LineWidth immediately gets destroyed.
Myles C. Maxfield
Comment 5 2015-03-03 11:13:37 PST
Note You need to log in before you can comment on or make changes to this bug.