Bug 160059 - Make parameters mandatory for attribute-related API on Element
Summary: Make parameters mandatory for attribute-related API on 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-07-21 16:15 PDT by Chris Dumez
Modified: 2016-07-21 19:22 PDT (History)
7 users (show)

See Also:


Attachments
Patch (35.93 KB, patch)
2016-07-21 16:50 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews105 for mac-yosemite-wk2 (1.11 MB, application/zip)
2016-07-21 17:39 PDT, Build Bot
no flags Details
Patch (36.83 KB, patch)
2016-07-21 18:24 PDT, 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-07-21 16:15:40 PDT
Make parameters mandatory for attribute-related API on Element to match the specification:
- https://dom.spec.whatwg.org/#element

Firefox and Chrome agree with the specification. Calling this API without the parameters does not make much sense, especially considering WebKit uses the string "undefined" when the parameter is omitted.
Comment 1 Chris Dumez 2016-07-21 16:50:59 PDT
Created attachment 284283 [details]
Patch
Comment 2 Ryosuke Niwa 2016-07-21 17:06:29 PDT
Comment on attachment 284283 [details]
Patch

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

> Source/WebCore/dom/Element.idl:39
> +    Attr getAttributeNode(DOMString name);

Why isn't this `Attr?` as in the spec?
Comment 3 Build Bot 2016-07-21 17:39:11 PDT
Comment on attachment 284283 [details]
Patch

Attachment 284283 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/1728927

New failing tests:
fast/dom/HTMLAnchorElement/anchor-nodownload-set.html
Comment 4 Build Bot 2016-07-21 17:39:15 PDT
Created attachment 284290 [details]
Archive of layout-test-results from ews105 for mac-yosemite-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews105  Port: mac-yosemite-wk2  Platform: Mac OS X 10.10.5
Comment 5 Chris Dumez 2016-07-21 17:49:29 PDT
Comment on attachment 284283 [details]
Patch

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

>> Source/WebCore/dom/Element.idl:39
>> +    Attr getAttributeNode(DOMString name);
> 
> Why isn't this `Attr?` as in the spec?

It has no effect but I will fix for clarity and to match the spec.
Comment 6 Chris Dumez 2016-07-21 18:24:19 PDT
Created attachment 284296 [details]
Patch
Comment 7 Chris Dumez 2016-07-21 19:22:24 PDT
Comment on attachment 284296 [details]
Patch

Clearing flags on attachment: 284296

Committed r203546: <http://trac.webkit.org/changeset/203546>
Comment 8 Chris Dumez 2016-07-21 19:22:32 PDT
All reviewed patches have been landed.  Closing bug.