Creating an SVG image with padding (ie <svg style = "padding:10px" etc.) causes onclick/onmousedown/onmouseover etc events to stop working. The image still displays properly, but mouse events do not register.
Peter, can you add a simple test case to this bug please?
Created attachment 57555 [details] A simple SVG image with a rectangle - alert box appears on click. Works as expected
Created attachment 57556 [details] Same image as before - but style="padding:100px;" added to the SVG element. Rectangle no longer responds to click.
Added test case
Created attachment 115086 [details] Fix SVG hit testing when padding is present and add associated test
Comment on attachment 115086 [details] Fix SVG hit testing when padding is present and add associated test View in context: https://bugs.webkit.org/attachment.cgi?id=115086&action=review Looks great to me, please update the comment and land manually, or reuploaded it and I'll set the flags again. > Source/WebCore/rendering/svg/RenderSVGRoot.cpp:431 > // Note: For now, we're ignoring hits to border and padding for <svg> This comment is invalid now, no?
(In reply to comment #6) > (From update of attachment 115086 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=115086&action=review > > Looks great to me, please update the comment and land manually, or reuploaded it and I'll set the flags again. > > > Source/WebCore/rendering/svg/RenderSVGRoot.cpp:431 > > // Note: For now, we're ignoring hits to border and padding for <svg> > > This comment is invalid now, no? I think it's still valid, it was just implemented wrong. We still do ignore mouse movements on the padding and borders of a SVG element, but now the positioning is correct so we don't account for the padding twice.
Comment on attachment 115086 [details] Fix SVG hit testing when padding is present and add associated test Fair enough, cq+ then.
Comment on attachment 115086 [details] Fix SVG hit testing when padding is present and add associated test Clearing flags on attachment: 115086 Committed r100280: <http://trac.webkit.org/changeset/100280>
All reviewed patches have been landed. Closing bug.