RESOLVED FIXED Bug 179600
More is<> and downcast<>, less static_cast<>
https://bugs.webkit.org/show_bug.cgi?id=179600
Summary More is<> and downcast<>, less static_cast<>
Darin Adler
Reported 2017-11-12 16:18:00 PST
More is<> and downcast<>, less static_cast<>
Attachments
Patch (76.97 KB, patch)
2017-11-12 16:50 PST, Darin Adler
no flags
Patch (76.36 KB, patch)
2017-11-12 18:14 PST, Darin Adler
no flags
Patch (76.37 KB, patch)
2017-11-12 18:39 PST, Darin Adler
no flags
Archive of layout-test-results from ews113 for mac-elcapitan (3.07 MB, application/zip)
2017-11-12 20:06 PST, Build Bot
no flags
Patch (76.50 KB, patch)
2017-11-12 21:24 PST, Darin Adler
no flags
Patch (76.50 KB, patch)
2017-11-12 21:41 PST, Darin Adler
no flags
Darin Adler
Comment 1 2017-11-12 16:50:56 PST Comment hidden (obsolete)
Chris Dumez
Comment 2 2017-11-12 18:10:51 PST
Seems to break GTK build.
Darin Adler
Comment 3 2017-11-12 18:14:24 PST Comment hidden (obsolete)
Darin Adler
Comment 4 2017-11-12 18:15:11 PST
New one should compile in GTK. Ready for review, I think.
Darin Adler
Comment 5 2017-11-12 18:39:21 PST
Chris Dumez
Comment 6 2017-11-12 19:04:48 PST
GTK bubble still red.
Chris Dumez
Comment 7 2017-11-12 19:21:55 PST
Comment on attachment 326738 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=326738&action=review r=me with comment. Please make sure GTK builds before landing. > Source/WebCore/html/HTMLFormElement.cpp:671 > + if (!event || !is<Element>(event->target())) Doesn’t this change behavior? If the target is a Text node that is a descendant of an HTMLFormControlElement, then we will return nullptr instead of the control ancestor. Or I am missing something? > Source/WebCore/html/HTMLFormElement.cpp:673 > + return lineageOfType<HTMLFormControlElement>(downcast<Element>(*event->target())).first(); I discussed this Antti and he agreed with should have a lineageOfType overload that takes in a Node.
Build Bot
Comment 8 2017-11-12 20:06:08 PST
Comment on attachment 326738 [details] Patch Attachment 326738 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/5205827 New failing tests: fast/canvas/webgl/webgl2-runtime-flag.html fast/canvas/webgl/getBufferSubData-webgl1.html
Build Bot
Comment 9 2017-11-12 20:06:09 PST Comment hidden (obsolete)
Darin Adler
Comment 10 2017-11-12 21:16:44 PST
Comment on attachment 326738 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=326738&action=review >> Source/WebCore/html/HTMLFormElement.cpp:671 >> + if (!event || !is<Element>(event->target())) > > Doesn’t this change behavior? If the target is a Text node that is a descendant of an HTMLFormControlElement, then we will return nullptr instead of the control ancestor. Or I am missing something? Mostly event targets can’t be text nodes. They target the element, not the text node. But I can’t verify this easily, and so I will rewrite to start with the node instead. Easy to do that with the parentElement function for now, while waiting for lineageOfType.
Darin Adler
Comment 11 2017-11-12 21:20:38 PST
OK, so four things to resolve before landing: 1) Crashing WebGL tests due to a mistake in HTMLCanvasElement::createContextWebGL. I fixed that. 2) Compiling on GTK failing because I used nil instead of nullptr. I fixed that. 3) Node vs. Element in findSubmitElement. Fixing that now. 4) Crash in svg/animations/svgtransform-animation-discrete.html test; seems unlikely to be due to my changes. Will test and see what I can learn.
Darin Adler
Comment 12 2017-11-12 21:24:42 PST
Darin Adler
Comment 13 2017-11-12 21:25:16 PST
Uploaded a patch that probably fixes 1-3, testing locally for 4 soon.
Darin Adler
Comment 14 2017-11-12 21:41:21 PST
Darin Adler
Comment 15 2017-11-12 22:12:17 PST
Radar WebKit Bug Importer
Comment 16 2017-11-15 09:34:17 PST
Note You need to log in before you can comment on or make changes to this bug.