Bug 24252

Summary: Assert when hit testing a 3d transform that is null
Product: WebKit Reporter: Dean Jackson <dino>
Component: CSSAssignee: Dean Jackson <dino>
Status: RESOLVED FIXED    
Severity: Normal CC: cmarrin, f.tomalty, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
fix for crash simon.fraser: review+

Dean Jackson
Reported 2009-02-27 15:19:50 PST
WebCore::TransformationMatrix::isInvertible() bombs out if you hit test a transform that doesn't exist.
Attachments
fix for crash (3.92 KB, patch)
2009-02-27 16:49 PST, Dean Jackson
simon.fraser: review+
Dean Jackson
Comment 1 2009-02-27 16:49:19 PST
Created attachment 28108 [details] fix for crash
Simon Fraser (smfr)
Comment 2 2009-02-27 16:54:50 PST
Comment on attachment 28108 [details] fix for crash > diff --git a/LayoutTests/transforms/no_transform_hit_testing-expected.txt b/LayoutTests/transforms/no_transform_hit_testing-expected.txt > new file mode 100644 > index 0000000..57ff5af > --- /dev/null > +++ b/LayoutTests/transforms/no_transform_hit_testing-expected.txt > @@ -0,0 +1,5 @@ > +Testing hittest on a layer with null transform > + > +https://bugs.webkit.org/show_bug.cgi?id=24252 > + > +transformed elementdid not crash Make that "Did not crash, to test PASSED" > diff --git a/LayoutTests/transforms/no_transform_hit_testing.html b/LayoutTests/transforms/no_transform_hit_testing.html > + <script type="text/javascript" charset="utf-8"> > + if (window.layoutTestController) { > + layoutTestController.dumpAsText(); > + layoutTestController.waitUntilDone(); I don't think this needs to wait if you run the test from onload. Also, I don't think it needs to be a text test. > + function runTest() > + { > + if (window.layoutTestController) { > + eventSender.mouseMoveTo(100, 50); > + eventSender.mouseDown(); > + eventSender.mouseUp(); > + eventSender.mouseDown(); > + eventSender.mouseUp(); Just call document.elementFromPoint(...) so it works in Safari too. > diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog > index 9c59011..1a22d7a 100644 > --- a/WebCore/ChangeLog > +++ b/WebCore/ChangeLog > @@ -1,3 +1,16 @@ > +2009-02-27 Dean Jackson <dino@apple.com> > + > + Reviewed by NOBODY (OOPS!). > + > + Fix asserting when hit testing an element that > + has no transform. > + https://bugs.webkit.org/show_bug.cgi?id=24252 I think this needs to explain the crash. Something like: "renderer()->hasTransform() returns true for elements with perspective, but no transform, so test for transform when hit testing". r=me wit those changes.
Dean Jackson
Comment 3 2009-02-27 17:08:17 PST
New test used elementFromPoint and will work outside of test system Committed r41309 M WebCore/ChangeLog M WebCore/rendering/RenderLayer.cpp M LayoutTests/ChangeLog A LayoutTests/transforms/no_transform_hit_testing.html next commit adds the file I forgot :(
Dean Jackson
Comment 4 2009-02-27 17:13:38 PST
Committed r41311 A LayoutTests/platform/mac/transforms/no_transform_hit_testing-expected.checksum A LayoutTests/platform/mac/transforms/no_transform_hit_testing-expected.png M LayoutTests/ChangeLog
Simon Fraser (smfr)
Comment 5 2009-03-01 20:03:56 PST
*** Bug 24277 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.