Bug 155216 - focus() / blur() should be on HTMLElement / SVGElement, not Element
Summary: focus() / blur() should be on HTMLElement / SVGElement, not Element
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: WebExposed
Depends on:
Blocks:
 
Reported: 2016-03-08 21:34 PST by Chris Dumez
Modified: 2016-03-09 12:55 PST (History)
4 users (show)

See Also:


Attachments
Patch (4.79 KB, patch)
2016-03-08 21:37 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews121 for ios-simulator-wk2 (813.90 KB, application/zip)
2016-03-09 00:53 PST, Build Bot
no flags Details
Patch (6.36 KB, patch)
2016-03-09 12:02 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2016-03-08 21:34:56 PST
focus() / blur() should be on HTMLElement / SVGElement, not Element:
- https://html.spec.whatwg.org/multipage/dom.html#htmlelement
- https://www.w3.org/TR/SVG2/types.html#InterfaceSVGElement

Chrome and Firefox match the specification.
Comment 1 Chris Dumez 2016-03-08 21:37:58 PST
Created attachment 273389 [details]
Patch
Comment 2 Ryosuke Niwa 2016-03-08 23:11:01 PST
Comment on attachment 273389 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=273389&action=review

> Source/WebCore/ChangeLog:8
> +        focus() / blur() should be on HTMLElement / SVGElement, not Element:

How about MathML elements?
Comment 3 Build Bot 2016-03-09 00:53:49 PST
Comment on attachment 273389 [details]
Patch

Attachment 273389 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/946025

New failing tests:
imported/w3c/web-platform-tests/html/dom/interfaces.html
Comment 4 Build Bot 2016-03-09 00:53:52 PST
Created attachment 273409 [details]
Archive of layout-test-results from ews121 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews121  Port: ios-simulator-wk2  Platform: Mac OS X 10.10.5
Comment 5 Darin Adler 2016-03-09 08:46:00 PST
Comment on attachment 273389 [details]
Patch

I guess this is OK, but it seems kind of weak; sort of old fashioned. I suppose there are a lot of things on HTMLElement that are useful on MathML and SVG elements and it’s a little strange that we do this by putting the functions separately on each of those classes. I wonder what the concept is for the future about accommodating new types of elements in that won’t support these operations.
Comment 6 Chris Dumez 2016-03-09 09:14:08 PST
(In reply to comment #2)
> Comment on attachment 273389 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=273389&action=review
> 
> > Source/WebCore/ChangeLog:8
> > +        focus() / blur() should be on HTMLElement / SVGElement, not Element:
> 
> How about MathML elements?

I cannot find any IDL files for MathMLElements.
Comment 7 Chris Dumez 2016-03-09 09:21:03 PST
(In reply to comment #2)
> Comment on attachment 273389 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=273389&action=review
> 
> > Source/WebCore/ChangeLog:8
> > +        focus() / blur() should be on HTMLElement / SVGElement, not Element:
> 
> How about MathML elements?

So, the specification does not seem to indicate that MathMLElement has either focus() or blur():
https://www.w3.org/TR/MathML2/appendixd.html

I have checked that in Firefox and Chrome, MathMLElement does not have focus() / blur() either.
Comment 8 Chris Dumez 2016-03-09 12:02:12 PST
Created attachment 273451 [details]
Patch
Comment 9 WebKit Commit Bot 2016-03-09 12:55:17 PST
Comment on attachment 273451 [details]
Patch

Clearing flags on attachment: 273451

Committed r197875: <http://trac.webkit.org/changeset/197875>
Comment 10 WebKit Commit Bot 2016-03-09 12:55:21 PST
All reviewed patches have been landed.  Closing bug.