Changeset 223553 in webkit
- Timestamp:
- Oct 17, 2017 10:13:56 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r223552 r223553 1 2017-10-17 Daniel Bates <dabates@apple.com> 2 3 ASSERTION FAILED: m_truncation != cFullTruncation in InlineTextBox::clampedOffset() 4 https://bugs.webkit.org/show_bug.cgi?id=178322 5 6 Reviewed by Darin Adler. 7 8 Add a test to ensure that clicking on the ellipsis in a truncated text run does not 9 cause an assertion failure in a debug build. 10 11 * fast/text/click-ellipsis-assertion-failure-expected.txt: Added. 12 * fast/text/click-ellipsis-assertion-failure.html: Added. 13 1 14 2017-10-17 Daniel Bates <dabates@apple.com> 2 15 -
trunk/Source/WebCore/ChangeLog
r223552 r223553 1 2017-10-17 Daniel Bates <dabates@apple.com> 2 3 ASSERTION FAILED: m_truncation != cFullTruncation in InlineTextBox::clampedOffset() 4 https://bugs.webkit.org/show_bug.cgi?id=178322 5 6 Reviewed by Darin Adler. 7 8 It is acceptable for InlineTextBox::clampedOffset() to be called for a fully truncated box, 9 say a person clicks on the ellipsis in a truncated text run. Restore the behavior prior to 10 r223259 and return the clamped offset. 11 12 Test: fast/text/click-ellipsis-assertion-failure.html 13 14 * rendering/InlineTextBox.cpp: 15 (WebCore::InlineTextBox::clampedOffset const): 16 1 17 2017-10-17 Daniel Bates <dabates@apple.com> 2 18 -
trunk/Source/WebCore/rendering/InlineTextBox.cpp
r223552 r223553 592 592 unsigned InlineTextBox::clampedOffset(unsigned x) const 593 593 { 594 ASSERT(m_truncation != cFullTruncation);595 594 unsigned offset = std::max(std::min(x, m_start + m_len), m_start) - m_start; 595 if (m_truncation == cFullTruncation) 596 return offset; 596 597 if (m_truncation != cNoTruncation) 597 598 offset = std::min<unsigned>(offset, m_truncation);
Note: See TracChangeset
for help on using the changeset viewer.