Changeset 140370 in webkit
- Timestamp:
- Jan 21, 2013 4:31:57 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r140368 r140370 1 2013-01-21 Levi Weintraub <leviw@chromium.org> 2 3 Event target rects on the top level document shouldn't be clipped. 4 https://bugs.webkit.org/show_bug.cgi?id=107339 5 6 Reviewed by James Robinson. 7 8 Updating existing tests to cover this issue. 9 10 * platform/chromium-linux/platform/chromium/fast/events/touch/compositor-touch-hit-rects-expected.txt: 11 * platform/chromium/fast/events/touch/compositor-touch-hit-rects.html: 12 * platform/chromium/fast/events/touch/touch-hit-rects-in-iframe-expected.txt: 13 * platform/chromium/fast/events/touch/touch-hit-rects-in-iframe.html: 14 * platform/chromium/fast/events/touch/resources/frame-with-document-touch-handler.html: Added. 15 * platform/chromium/TestExpectations: 16 1 17 2013-01-21 Nico Weber <thakis@chromium.org> 2 18 -
trunk/LayoutTests/platform/chromium-linux/platform/chromium/fast/events/touch/compositor-touch-hit-rects-expected.txt
r139167 r140370 1 1 This tests verifies the hit test regions given to the compositor. It can only be run in DumpRenderTree. The outputted rects should cover the hit test regions of all the listed elements. 2 2 3 normalFlow[0]: (8, 72, 7 84, 10)4 absoluteChildContainer[0]: (8, 102, 7 84, 10)3 normalFlow[0]: (8, 72, 769, 10) 4 absoluteChildContainer[0]: (8, 102, 769, 10) 5 5 absoluteChildContainer[1]: (118, 300, 140, 10) 6 relativeChildContainer[0]: (8, 152, 7 84, 10)6 relativeChildContainer[0]: (8, 152, 769, 10) 7 7 relativeChildContainer[1]: (128, 352, 140, 10) 8 overhangingContainer[0]: (8, 202, 7 84, 10)8 overhangingContainer[0]: (8, 202, 769, 10) 9 9 overhangingContainer[1]: (8, 202, 110, 80) 10 transformedChildContainer[0]: (6 3, 240, 674, 34)11 transformedChildContainer[1]: (8, 252, 7 84, 10)10 transformedChildContainer[0]: (62, 241, 661, 32) 11 transformedChildContainer[1]: (8, 252, 769, 10) 12 12 continuation[0]: (108, 302, 100, 10) 13 13 inlineAbsoluteChildContainer[0]: (378, 300, 250, 10) 14 14 inlineAbsoluteChildContainer[1]: (108, 352, 270, 10) 15 document[0]: (0, 0, 785, 1024) 15 16 -
trunk/LayoutTests/platform/chromium/TestExpectations
r140368 r140370 3908 3908 webkit.org/b/98275 media/event-queue-crash.html [ Skip ] 3909 3909 3910 # Needs rebaselining on after webkit.org/b/107339 3911 webkit.org/b/107339 [ Mac Android Win ] platform/chromium/fast/events/touch/compositor-touch-hit-rects.html [ Pass Failure ] 3912 3910 3913 # Requires rebaselining after https://bugs.webkit.org/show_bug.cgi?id=11645 3911 3914 webkit.org/b/11645 [ Mac Android ] fast/table/025.html [ Failure ] -
trunk/LayoutTests/platform/chromium/fast/events/touch/compositor-touch-hit-rects.html
r138717 r140370 23 23 #tests { 24 24 font: 10px Ahem; 25 } 26 body { 27 height: 1000px; 25 28 } 26 29 </style> … … 77 80 } 78 81 79 function logRects(id) { 82 function testElementWithId(id) 83 { 80 84 element = document.getElementById(id); 81 85 element.addEventListener('touchstart', listener, false); 86 logRects(id); 87 element.removeEventListener('touchstart', listener, false); 88 } 89 90 function logRects(testName) { 91 82 92 rects = window.internals.touchEventTargetClientRects(document); 83 93 var sortedRects = new Array(); … … 86 96 sortedRects.sort(sortRects); 87 97 for (var i = 0; i < rects.length; ++i) 88 log(id + "[" + i + "]: (" + sortedRects[i].left + ", " + sortedRects[i].top + ", " + sortedRects[i].width + ", " + sortedRects[i].height + ")"); 89 element.removeEventListener('touchstart', listener, false); 98 log(testName + "[" + i + "]: (" + sortedRects[i].left + ", " + sortedRects[i].top + ", " + sortedRects[i].width + ", " + sortedRects[i].height + ")"); 90 99 } 91 100 … … 95 104 96 105 window.testRunner.dumpAsText(); 97 logRects("normalFlow"); 98 logRects("absoluteChildContainer"); 99 logRects("relativeChildContainer"); 100 logRects("overhangingContainer"); 101 logRects("transformedChildContainer"); 102 logRects("continuation"); 103 logRects("inlineAbsoluteChildContainer"); 106 testElementWithId("normalFlow"); 107 testElementWithId("absoluteChildContainer"); 108 testElementWithId("relativeChildContainer"); 109 testElementWithId("overhangingContainer"); 110 testElementWithId("transformedChildContainer"); 111 testElementWithId("continuation"); 112 testElementWithId("inlineAbsoluteChildContainer"); 113 114 document.addEventListener('touchstart', listener, false); 115 logRects("document"); 104 116 105 117 var testContainer = document.getElementById("tests"); -
trunk/LayoutTests/platform/chromium/fast/events/touch/touch-hit-rects-in-iframe-expected.txt
r139346 r140370 1 1 This test validates that touch hit tests rects are created in the coordinates of the outermost view, not their containing view. This test only works in DumpRenderTree. 2 [0]: (60, 110, 50, 50) 3 [1]: (420, 170, 50, 50) 2 [0]: (10, 50, 285, 135) 3 [1]: (60, 110, 50, 50) 4 [2]: (420, 170, 50, 50) 4 5 -
trunk/LayoutTests/platform/chromium/fast/events/touch/touch-hit-rects-in-iframe.html
r139346 r140370 24 24 <iframe id="iframe1" src="resources/frame-with-touch-handler.html"></iframe> 25 25 <iframe id="iframe2"></iframe> 26 <iframe id="iframe3" src="resources/frame-with-document-touch-handler.html"></iframe> 26 27 <script> 27 28 -
trunk/Source/WebCore/ChangeLog
r140366 r140370 1 2013-01-21 Levi Weintraub <leviw@chromium.org> 2 3 Event target rects on the top level document shouldn't be clipped. 4 https://bugs.webkit.org/show_bug.cgi?id=107339 5 6 Reviewed by James Robinson. 7 8 clippedOverflowRectForRepaint clips the top-level RenderView to the viewport, which 9 is wrong for generating event target rects, as the result will not extend to the bounds 10 of the document on pages that scroll. Changing the top-level view to use documentRect 11 instead. 12 13 Tests updated to cover bug: platform/chromium/fast/events/touch/touch-hit-rects-in-iframe.html 14 platform/chromium/fast/events/touch/compositor-touch-hit-rects.html 15 16 * page/scrolling/ScrollingCoordinator.cpp: 17 (WebCore::accumulateRendererTouchEventTargetRects): Use converToRootView instead of 18 a loop around convertToContaining view. This is not a change in behavior. 19 (WebCore::accumulateDocumentEventTargetRects): Switch to use documentRect instead of 20 clippedOverflowRectForRepaint for the top-level Document, and use converToRootView 21 to put rects in the coordinates of the top-level document. 22 1 23 2013-01-17 Andy Estes <aestes@apple.com> 2 24 -
trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp
r140229 r140370 189 189 // Convert to the top-level view's coordinates. 190 190 ASSERT(renderer->document()->view()); 191 for (ScrollView* view = renderer->document()->view(); view && view->parent(); view = view->parent()) 192 r = view->convertToContainingView(r); 191 r = renderer->document()->view()->convertToRootView(r); 193 192 194 193 if (!parentRect.contains(r)) { … … 217 216 if (touchTarget == document) { 218 217 if (RenderView* view = document->renderView()) { 219 IntRect r = enclosingIntRect(view->clippedOverflowRectForRepaint(0)); 220 if (!r.isEmpty()) 218 IntRect r; 219 if (touchTarget == document->topDocument()) 220 r = view->documentRect(); 221 else 222 r = enclosingIntRect(view->clippedOverflowRectForRepaint(0)); 223 224 if (!r.isEmpty()) { 225 ASSERT(view->document()->view()); 226 r = view->document()->view()->convertToRootView(r); 221 227 rects.append(r); 228 } 222 229 } 223 230 return;
Note: See TracChangeset
for help on using the changeset viewer.