Changeset 215124 in webkit
- Timestamp:
- Apr 7, 2017 3:48:22 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r215122 r215124 1 2017-04-07 Zalan Bujtas <zalan@apple.com> 2 3 Simple line layout: FlowContents::segmentIndexForRunSlow skips empty runs. 4 https://bugs.webkit.org/show_bug.cgi?id=170552 5 6 Reviewed by Antti Koivisto. 7 8 * fast/text/simple-line-layout-hover-over-subsequent-linebreaks-expected.txt: Added. 9 * fast/text/simple-line-layout-hover-over-subsequent-linebreaks.html: Added. 10 1 11 2017-04-07 Ryan Haddad <ryanhaddad@apple.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r215123 r215124 1 2017-04-07 Zalan Bujtas <zalan@apple.com> 2 3 Simple line layout: FlowContents::segmentIndexForRunSlow skips empty runs. 4 https://bugs.webkit.org/show_bug.cgi?id=170552 5 6 Reviewed by Antti Koivisto. 7 8 The compare function passed to std::lower_bound completely misses empty runs. 9 10 Test: fast/text/simple-line-layout-hover-over-subsequent-linebreaks.html 11 12 * rendering/SimpleLineLayoutFlowContents.cpp: 13 (WebCore::SimpleLineLayout::FlowContents::segmentIndexForRunSlow): 14 1 15 2017-04-07 Chris Dumez <cdumez@apple.com> 2 16 -
trunk/Source/WebCore/rendering/SimpleLineLayoutFlowContents.cpp
r211738 r215124 69 69 unsigned FlowContents::segmentIndexForRunSlow(unsigned start, unsigned end) const 70 70 { 71 auto it = std::lower_bound(m_segments.begin(), m_segments.end(), start, [](const Segment& segment, unsigned start) { 72 return segment.end <= start; 71 auto isEmptyRange = start == end; 72 auto it = std::lower_bound(m_segments.begin(), m_segments.end(), start, [isEmptyRange](const Segment& segment, unsigned start) { 73 // FIXME: This always find the first empty run (.vs subsequent <br> elements) 74 return (isEmptyRange && segment.start == segment.end) ? segment.start < start : segment.end <= start; 73 75 }); 74 76 ASSERT(it != m_segments.end()); 75 ASSERT_UNUSED(end, end <= it->end); 76 auto index = it - m_segments.begin(); 77 m_lastSegmentIndex = index; 78 return index; 77 ASSERT(end <= it->end); 78 m_lastSegmentIndex = it - m_segments.begin(); 79 return m_lastSegmentIndex; 79 80 } 80 81 -
trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp
r215054 r215124 156 156 auto lineRect = *it; 157 157 lineRect.moveBy(accumulatedOffset); 158 auto& renderer = const_cast<RenderObject&>(it.renderer()); 158 159 if (!locationInContainer.intersects(lineRect)) 159 160 continue; 160 auto& renderer = const_cast<RenderObject&>(it.renderer());161 161 renderer.updateHitTestResult(result, locationInContainer.point() - toLayoutSize(accumulatedOffset)); 162 162 if (!result.addNodeToRectBasedTestResult(renderer.node(), request, locationInContainer, lineRect))
Note: See TracChangeset
for help on using the changeset viewer.