Changeset 205374 in webkit
- Timestamp:
- Sep 2, 2016 2:50:13 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r205373 r205374 1 2016-09-02 Zalan Bujtas <zalan@apple.com> 2 3 ASSERTION FAILED: !m_committedWidth in WebCore::LineWidth::fitBelowFloats 4 https://bugs.webkit.org/show_bug.cgi?id=149462 5 <rdar://problem/27710841> 6 7 Reviewed by David Hyatt. 8 9 * fast/text/assert-when-text-with-negative-margin-sibling-does-not-fit-expected.txt: Added. 10 * fast/text/assert-when-text-with-negative-margin-sibling-does-not-fit.html: Added. 11 1 12 2016-09-02 Myles C. Maxfield <mmaxfield@apple.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r205373 r205374 1 2016-09-02 Zalan Bujtas <zalan@apple.com> 2 3 ASSERTION FAILED: !m_committedWidth in WebCore::LineWidth::fitBelowFloats 4 https://bugs.webkit.org/show_bug.cgi?id=149462 5 <rdar://problem/27710841> 6 7 Reviewed by David Hyatt. 8 9 In certain cases (multiple spans on the same line with negativ marings), the LineWidth::m_committedWidth > 0 10 check is not sufficient to decide if some content has already been committed to the current line. 11 This patch adds a flag to indicate if we ever committed to the current line. 12 13 Test: fast/text/assert-when-text-with-negative-margin-sibling-does-not-fit.html 14 15 * rendering/line/BreakingContext.h: 16 (WebCore::BreakingContext::handleText): 17 * rendering/line/LineWidth.h: 18 (WebCore::LineWidth::hasCommitted): 19 1 20 2016-09-02 Myles C. Maxfield <mmaxfield@apple.com> 2 21 -
trunk/Source/WebCore/rendering/line/BreakingContext.h
r205282 r205374 582 582 } 583 583 if (downcast<RenderListMarker>(*m_current.renderer()).isInside()) 584 m_width.addUncommitted ReplacedWidth(replacedLogicalWidth);584 m_width.addUncommittedWidth(replacedLogicalWidth); 585 585 } else 586 m_width.addUncommitted ReplacedWidth(replacedLogicalWidth);586 m_width.addUncommittedWidth(replacedLogicalWidth); 587 587 if (is<RenderRubyRun>(*m_current.renderer())) { 588 588 m_width.applyOverhang(downcast<RenderRubyRun>(m_current.renderer()), m_lastObject, m_nextObject); … … 801 801 bool breakNBSP = m_autoWrap && m_currentStyle->nbspMode() == SPACE; 802 802 // Auto-wrapping text should wrap in the middle of a word only if it could not wrap before the word, 803 // which is only possible if the word is the first thing on the line , that is, if |w| is zero.803 // which is only possible if the word is the first thing on the line. 804 804 bool breakWords = m_currentStyle->breakWords() && ((m_autoWrap && !m_width.hasCommitted()) || m_currWS == PRE); 805 805 bool midWordBreak = false; -
trunk/Source/WebCore/rendering/line/LineWidth.cpp
r197462 r205374 38 38 LineWidth::LineWidth(RenderBlockFlow& block, bool isFirstLine, IndentTextOrNot shouldIndentText) 39 39 : m_block(block) 40 , m_uncommittedWidth(0)41 , m_committedWidth(0)42 , m_overhangWidth(0)43 , m_trailingWhitespaceWidth(0)44 , m_trailingCollapsedWhitespaceWidth(0)45 , m_left(0)46 , m_right(0)47 , m_availableWidth(0)48 40 , m_isFirstLine(isFirstLine) 49 41 , m_shouldIndentText(shouldIndentText) … … 137 129 m_committedWidth += m_uncommittedWidth; 138 130 m_uncommittedWidth = 0; 139 if (m_hasUncommittedReplaced) { 140 m_hasCommittedReplaced = true; 141 m_hasUncommittedReplaced = false; 142 } 131 m_hasCommitted = true; 143 132 } 144 133 -
trunk/Source/WebCore/rendering/line/LineWidth.h
r197464 r205374 60 60 float logicalLeftOffset() const { return m_left; } 61 61 62 bool hasCommitted() const { return m_ committedWidth > 0 || m_hasCommittedReplaced; }62 bool hasCommitted() const { return m_hasCommitted; } 63 63 64 64 void updateAvailableWidth(LayoutUnit minimumHeight = 0); … … 67 67 { 68 68 m_uncommittedWidth += delta; 69 }70 void addUncommittedReplacedWidth(float delta)71 {72 addUncommittedWidth(delta);73 m_hasUncommittedReplaced = true;74 69 } 75 70 void commit(); … … 90 85 91 86 RenderBlockFlow& m_block; 92 float m_uncommittedWidth; 93 float m_committedWidth; 94 float m_overhangWidth; // The amount by which |m_availableWidth| has been inflated to account for possible contraction due to ruby overhang. 95 float m_trailingWhitespaceWidth; 96 float m_trailingCollapsedWhitespaceWidth; 97 float m_left; 98 float m_right; 99 float m_availableWidth; 100 bool m_isFirstLine; 101 bool m_hasUncommittedReplaced { false }; 102 bool m_hasCommittedReplaced { false }; 87 float m_uncommittedWidth { 0 }; 88 float m_committedWidth { 0 }; 89 float m_overhangWidth { 0 }; // The amount by which |m_availableWidth| has been inflated to account for possible contraction due to ruby overhang. 90 float m_trailingWhitespaceWidth { 0 }; 91 float m_trailingCollapsedWhitespaceWidth { 0 }; 92 float m_left { 0 }; 93 float m_right { 0 }; 94 float m_availableWidth { 0 }; 95 bool m_isFirstLine { true }; 96 bool m_hasCommitted { false }; 103 97 IndentTextOrNot m_shouldIndentText; 104 98 };
Note: See TracChangeset
for help on using the changeset viewer.