It should be possible to dispatch events on documents that do not have a browsing context (e.g. Documents created using DOMImplementation.createHTMLDocument()). Gecko and Blink both allow this but WebKit does not.
Created attachment 289953 [details] WIP patch
Attachment 289953 [details] did not pass style-queue: ERROR: Source/WebCore/dom/Document.cpp:4123: Should have a space between // and comment [whitespace/comments] [4] Total errors found: 1 in 8 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 289959 [details] WIP patch
Comment on attachment 289959 [details] WIP patch Attachment 289959 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/2155594 Number of test failures exceeded the failure limit.
Created attachment 289973 [details] Archive of layout-test-results from ews117 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews117 Port: mac-yosemite Platform: Mac OS X 10.10.5
Created attachment 289978 [details] WIP patch
Created attachment 289982 [details] WIP patch
Duplicate of bug 26147?
Comment on attachment 289982 [details] WIP patch Attachment 289982 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/2156208 Number of test failures exceeded the failure limit.
Created attachment 289991 [details] Archive of layout-test-results from ews114 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews114 Port: mac-yosemite Platform: Mac OS X 10.10.5
Created attachment 289995 [details] Patch
*** Bug 26147 has been marked as a duplicate of this bug. ***
Comment on attachment 289995 [details] Patch Clearing flags on attachment: 289995 Committed r206462: <http://trac.webkit.org/changeset/206462>
All reviewed patches have been landed. Closing bug.