Summary: | BreakingContext cleanup | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Myles C. Maxfield <mmaxfield> | ||||||
Component: | New Bugs | Assignee: | Myles C. Maxfield <mmaxfield> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | commit-queue, dino, esprehn+autocc, glenn, jonlee, kondapallykalyan, simon.fraser, thorton, zalan | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Myles C. Maxfield
2015-03-01 09:03:29 PST
Created attachment 247631 [details]
Patch
Created attachment 247634 [details]
Patch
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? 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. Committed r180944: <http://trac.webkit.org/changeset/180944> |