Changeset 79425 in webkit
- Timestamp:
- Feb 23, 2011 1:30:56 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r79423 r79425 1 2011-02-23 Dominic Mazzoni <dmazzoni@google.com> 2 3 Reviewed by Kenneth Russell. 4 5 Add a new test to make sure that a canvas can receive click events and 6 that hit testing is working correctly. 7 8 https://bugs.webkit.org/show_bug.cgi?id=54697 9 10 * canvas/canvas-mouse-events-expected.txt: Added. 11 * canvas/canvas-mouse-events.html: Added. 12 * platform/mac-wk2/Skipped: 13 * platform/qt-wk2/Skipped: 14 * platform/win-wk2/Skipped: 15 1 16 2011-02-23 MORITA Hajime <morrita@google.com> 2 17 -
trunk/LayoutTests/platform/mac-wk2/Skipped
r79239 r79425 61 61 svg/dynamic-updates/SVGFESpecularLightingElement-svgdom-specularExponent-prop.html 62 62 svg/dynamic-updates/SVGFESpecularLightingElement-svgdom-suraceScale-prop.html 63 canvas/canvas-mouse-events.html 63 64 fast/forms/file-input-hit-test.html 64 65 fast/repaint/slider-thumb-drag-release.html -
trunk/LayoutTests/platform/qt-wk2/Skipped
r77885 r79425 114 114 svg/dynamic-updates/SVGFEPointLightElement-svgdom-y-prop.html 115 115 svg/dynamic-updates/SVGFEPointLightElement-svgdom-z-prop.html 116 canvas/canvas-mouse-events.html 116 117 compositing/iframes/layout-on-compositing-change.html 117 118 editing/deleting/5390681-2.html -
trunk/LayoutTests/platform/win-wk2/Skipped
r76810 r79425 53 53 # WebKitTestRunner needs an implementation of eventSender 54 54 # <https://bugs.webkit.org/show_bug.cgi?id=42194> 55 canvas/canvas-mouse-events.html 55 56 platform/win/editing/selection/shift-page-up-down.html 56 57 platform/win/fast/events/alt-numpad.html -
trunk/Source/WebCore/ChangeLog
r79420 r79425 1 2011-02-23 Dominic Mazzoni <dmazzoni@google.com> 2 3 Reviewed by Kenneth Russell. 4 5 Add a hit test handler for canvas elements that handles clicks on the canvas but ignores children. 6 https://bugs.webkit.org/show_bug.cgi?id=54697 7 8 New test to prevent this from regressing in the future: canvas/canvas-mouse-events.html 9 10 * rendering/RenderHTMLCanvas.cpp: 11 (WebCore::RenderHTMLCanvas::nodeAtPoint): 12 1 13 2011-02-23 Patrick Gansterer <paroga@webkit.org> 2 14 -
trunk/Source/WebCore/rendering/RenderHTMLCanvas.cpp
r78789 r79425 103 103 } 104 104 105 bool RenderHTMLCanvas::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, int x , int y, int tx, int ty, HitTestAction action)105 bool RenderHTMLCanvas::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, int xPos, int yPos, int tx, int ty, HitTestAction action) 106 106 { 107 107 UNUSED_PARAM(request); 108 UNUSED_PARAM(result); 109 UNUSED_PARAM(x); 110 UNUSED_PARAM(y); 111 UNUSED_PARAM(tx); 112 UNUSED_PARAM(ty); 113 UNUSED_PARAM(action); 108 tx += x(); 109 ty += y(); 110 111 // Ignore children (accessible fallback content that might be focusable but not clickable) 112 // but do test our own bounds for a hit. 113 IntRect boundsRect = IntRect(tx, ty, width(), height()); 114 if (visibleToHitTesting() && action == HitTestForeground && boundsRect.intersects(result.rectForPoint(xPos, yPos))) { 115 updateHitTestResult(result, IntPoint(xPos - tx, yPos - ty)); 116 if (!result.addNodeToRectBasedTestResult(node(), xPos, yPos, boundsRect)) 117 return true; 118 } 119 114 120 return false; 115 121 }
Note: See TracChangeset
for help on using the changeset viewer.