WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 119329
Make DOMImplementation::hasFeature() behave according to specification
https://bugs.webkit.org/show_bug.cgi?id=119329
Summary
Make DOMImplementation::hasFeature() behave according to specification
Chris Dumez
Reported
2013-07-31 01:29:16 PDT
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
Attachments
WIP patch
(60.90 KB, patch)
2013-07-31 03:20 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from webkit-ews-11 for mac-mountainlion-wk2
(1.80 MB, application/zip)
2013-07-31 04:00 PDT
,
Build Bot
no flags
Details
Patch
(80.35 KB, patch)
2013-07-31 04:22 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2013-07-31 03:20:24 PDT
Created
attachment 207825
[details]
WIP patch
Build Bot
Comment 2
2013-07-31 04:00:56 PDT
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
Build Bot
Comment 3
2013-07-31 04:00:59 PDT
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
Chris Dumez
Comment 4
2013-07-31 04:22:19 PDT
Created
attachment 207833
[details]
Patch
Chris Dumez
Comment 5
2013-08-09 00:40:13 PDT
Any feedback on this patch? It simplifies the code and makes us in line with the specification, Blink and Gecko.
Ryosuke Niwa
Comment 6
2013-08-09 10:06:43 PDT
Comment on
attachment 207833
[details]
Patch Seems sensible.
WebKit Commit Bot
Comment 7
2013-08-09 10:29:56 PDT
Comment on
attachment 207833
[details]
Patch Clearing flags on attachment: 207833 Committed
r153901
: <
http://trac.webkit.org/changeset/153901
>
WebKit Commit Bot
Comment 8
2013-08-09 10:30:00 PDT
All reviewed patches have been landed. Closing bug.
Lev Solntsev
Comment 9
2013-08-14 12:48:51 PDT
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.
Ryosuke Niwa
Comment 10
2013-08-20 17:48:40 PDT
(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.
Chris Dumez
Comment 11
2013-08-20 22:46:56 PDT
(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.
Ryosuke Niwa
Comment 12
2013-08-28 14:31:35 PDT
The wheel event support has been added in the
bug 94081
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug