Initialize keyboard events before passing plugins. This causes a crash if not initialized.
Created attachment 65720 [details] Patch to initialize keyboard event This patch initializes keyboard event in windowless plugins
Comment on attachment 65720 [details] Patch to initialize keyboard event LGTM.
Comment on attachment 65720 [details] Patch to initialize keyboard event Rejecting patch 65720 from commit-queue. Failed to run "[u'git', u'svn', u'dcommit']" exit_code: 1 Committing to http://svn.webkit.org/repository/webkit/trunk ... M WebCore/ChangeLog M WebCore/plugins/gtk/PluginViewGtk.cpp A repository hook failed: MERGE request failed on '/repository/webkit/trunk': Commit blocked by pre-commit hook (exit code 1) with output: svnlook: Can't write to stream: Broken pipe The following ChangeLog files contain OOPS: trunk/WebCore/ChangeLog Please don't ever say "OOPS" in a ChangeLog file. at /usr/local/git/libexec/git-core/git-svn line 572 Full output: http://queues.webkit.org/results/3866052
Comment on attachment 65720 [details] Patch to initialize keyboard event The queue only replaces the OOPS in the Reviewed by line. You should explain what new tests your adding or why testing is impossible/impractical.
Created attachment 66009 [details] Patch to initialize keyboard event - Modified changelog This is the same patch with the ChangeLog modified to explain why no new tests were needed. This is a trivial fix. This is done to support https://bugs.webkit.org/show_bug.cgi?id=44613 It just initializes keyboard event.This patch should be applied first else it might cause a crash when bug #44613 patch is applied.
Please review this and provide comments.
Comment on attachment 66009 [details] Patch to initialize keyboard event - Modified changelog LGTM.
Comment on attachment 66009 [details] Patch to initialize keyboard event - Modified changelog Clearing flags on attachment: 66009 Committed r66723: <http://trac.webkit.org/changeset/66723>
All reviewed patches have been landed. Closing bug.
+ No new tests needed since this is a trivial fix. I don't see how one follows from another. Any patch that changes observable behavior needs a test.
(In reply to comment #10) > + No new tests needed since this is a trivial fix. > > I don't see how one follows from another. Any patch that changes observable behavior needs a test. This is correct, and now and in the past I have hold patches that were useful and needed of going into WebKit(GTK+) because they lacked the necessary tests. In this case the patch seems so obviously correct and trivial that I don't think we need to do this. I believe this is routinely done by everyone, and far more complicated patches have been landed without tests in WebKit by every single person commenting on this bug. If we are going to enforce this rule absolutely everywhere then let's do it, but please let's not enforce it randomly and without reason.
I support Alexey's request. Changes are universally required to have tests. We make occasional exceptions where testing is impossible/impractical. Any change you see landing w/o tests, please comment in the bug and remind folks of this requirement. In particularly if there is no keyboard event testing for plugins, that's a huge hole which should be easy to plug. We have a test plugin in DRT for just this purpose. We also have the ability to synthesize key events in DRT. This change should be very testable.
In further defense of testing: I've had numerous discussions with other webkit engineers over the years, where we've agreed that the tests are the most important part of our codebase. It's very difficult (impossible) to write a web engine that works w/o testing. However any monkey can eventually write a decent web engine by making all our tests pass. I'm constantly fixing old bugs, in old code, where if the person had simply written a test when they made the change, we would have better understood, and never regressed the behavior in the first place.
I don't disagree with anything of what you have said, but I think this is one of those exceptional cases where to hold off the patch until the test is written is impractical given that it's an obviously correct one-liner that fixes a bug. In any case, if anyone disagrees strongly with that judgment feel free to revert the patch.
Just checked, there's already a test for windowless plugins & key events, plugins/keyboard-events.html, skipped in GTK+. With this patch and the patch from https://bugs.webkit.org/show_bug.cgi?id=44613 we at least receive the events themselves, although there seems to still be a couple of bugs wrt the focus event and the keycodes received. We'll iterate the other patch until those are gone.