Make DOMImplementation::hasFeature() behave according to the latest specification: http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature Specifically, the function should now return true unconditionally for any non-SVG feature. This behavior is consistent with Firefox and since recently Blink. hasFeature() originally would report whether the user agent claimed to support a given DOM feature, but experience proved it was not nearly as reliable or granular as simply checking whether the desired interfaces, attributes, or methods existed. As such, it should no longer be used, but continues to exist (and simply returns true) so that old pages don't stop working. Corresponding Blink revision: https://src.chromium.org/viewvc/blink?revision=155050&view=revision
Created attachment 207825 [details] WIP patch
Comment on attachment 207825 [details] WIP patch Attachment 207825 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/1299609 New failing tests: svg/W3C-SVG-1.1-SE/types-dom-06-f.svg svg/W3C-SVG-1.1/struct-dom-03-b.svg
Created attachment 207829 [details] Archive of layout-test-results from webkit-ews-11 for mac-mountainlion-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: webkit-ews-11 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.4
Created attachment 207833 [details] Patch
Any feedback on this patch? It simplifies the code and makes us in line with the specification, Blink and Gecko.
Comment on attachment 207833 [details] Patch Seems sensible.
Comment on attachment 207833 [details] Patch Clearing flags on attachment: 207833 Committed r153901: <http://trac.webkit.org/changeset/153901>
All reviewed patches have been landed. Closing bug.
There is a big catch: since Webkit doesn't support DOM3 Wheel Events (Bug 94081), hasFeature('Event.wheel', '3.0') wheel return false positive on this. It's used wildly because MS IE doesn't have “onwheel” property, so checks like var hasWheel = Modernizr.hasEvent('wheel') || document.implementation.hasFeature('Event.wheel', '3.0'); like suggested in corresponding Modernzr bug (https://github.com/Modernizr/Modernizr/issues/985) will fail in Webkit.
(In reply to comment #9) > There is a big catch: since Webkit doesn't support DOM3 Wheel Events (Bug 94081), hasFeature('Event.wheel', '3.0') wheel return false positive on this. It's used wildly because MS IE doesn't have “onwheel” property, so checks like > > var hasWheel = Modernizr.hasEvent('wheel') || document.implementation.hasFeature('Event.wheel', '3.0'); > > like suggested in corresponding Modernzr bug (https://github.com/Modernizr/Modernizr/issues/985) will fail in Webkit. That does sound pretty bad. Perhaps we should special case this.
(In reply to comment #10) > (In reply to comment #9) > > There is a big catch: since Webkit doesn't support DOM3 Wheel Events (Bug 94081), hasFeature('Event.wheel', '3.0') wheel return false positive on this. It's used wildly because MS IE doesn't have “onwheel” property, so checks like > > > > var hasWheel = Modernizr.hasEvent('wheel') || document.implementation.hasFeature('Event.wheel', '3.0'); > > > > like suggested in corresponding Modernzr bug (https://github.com/Modernizr/Modernizr/issues/985) will fail in Webkit. > > That does sound pretty bad. Perhaps we should special case this. Or add support for the wheel event in WebKit? I landed a wheel event support in Blink yesterday. I can port the patch over to WebKit. Wheel event is standard (DOM level 3) and now supported by all major browsers (Chrome, IE, FF) except Safari/WebKit.
The wheel event support has been added in the bug 94081.