Changeset 112077 in webkit
- Timestamp:
- Mar 26, 2012 4:56:53 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r112076 r112077 1 2012-03-26 Allan Sandfeld Jensen <allan.jensen@nokia.com> 2 3 [Qt] Assert in GestureTapHighlighter. 4 https://bugs.webkit.org/show_bug.cgi?id=82187 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 Adjust the boundaries of the center-rect before performing the intersection test, 9 since adjusting the boundary may cause a new intersection. 10 11 * page/GestureTapHighlighter.cpp: 12 1 13 2012-03-26 Antti Koivisto <antti@apple.com> 2 14 -
trunk/Source/WebCore/page/GestureTapHighlighter.cpp
r111243 r112077 96 96 inline void shiftXEdgesToContainIfStrikes(LayoutRect& rect, const LayoutRect& other) 97 97 { 98 if (rect.isEmpty()) 99 return; 98 100 LayoutUnit leftSide = rect.x(); 99 101 LayoutUnit rightSide = rect.maxX(); … … 157 159 // Add the first box, but merge it with the center boxes if it intersects. 158 160 if (rects.size() && !rects.first().isEmpty()) { 161 // Adjust center boxes to boundary of first 162 if (drawableRects.size()) 163 shiftXEdgesToContainIfStrikes(drawableRects.last(), rects.first()); 159 164 if (drawableRects.size() && drawableRects.last().intersects(rects.first())) 160 165 drawableRects.last().unite(rects.first()); … … 165 170 // Add the last box, but merge it with the center boxes if it intersects. 166 171 if (rects.size() > 1 && !rects.last().isEmpty()) { 172 // Adjust center boxes to boundary of last 173 if (drawableRects.size()) 174 shiftXEdgesToContainIfStrikes(drawableRects.last(), rects.last()); 167 175 if (drawableRects.size() && drawableRects.last().intersects(rects.last())) 168 176 drawableRects.last().unite(rects.last()); … … 171 179 } 172 180 173 // Adjust middle to boundaries of first and last.174 if (drawableRects.size() == 3) {175 LayoutRect& middle = drawableRects.at(1);176 shiftXEdgesToContainIfStrikes(middle, drawableRects.at(0));177 shiftXEdgesToContainIfStrikes(middle, drawableRects.at(2));178 }179 180 181 for (size_t i = 0; i < drawableRects.size(); ++i) { 181 182 LayoutRect prev = i ? drawableRects.at(i - 1) : LayoutRect();
Note: See TracChangeset
for help on using the changeset viewer.