Bug 148238 - Default value for createNodeIterator() / createTreeWalker()'s whatToShow parameter should be 0xFFFFFFFF
Summary: Default value for createNodeIterator() / createTreeWalker()'s whatToShow para...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL: https://dom.spec.whatwg.org/#document
Keywords: WebExposed
Depends on:
Blocks: 148257
  Show dependency treegraph
 
Reported: 2015-08-20 12:50 PDT by Chris Dumez
Modified: 2015-08-20 16:01 PDT (History)
6 users (show)

See Also:


Attachments
Patch (19.47 KB, patch)
2015-08-20 14:47 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (19.21 KB, patch)
2015-08-20 15:31 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 2015-08-20 12:50:29 PDT
Default value for createNodeIterator() / createTreeWalker()'s whatToShow parameter should be 0xFFFFFFFF not 0 as per the specification:
https://dom.spec.whatwg.org/#document

Chrome and Firefox conform to the specification.

Test suite:
http://w3c-test.org/dom/traversal/NodeIterator.html
http://w3c-test.org/dom/traversal/TreeWalker.html
Comment 1 Chris Dumez 2015-08-20 14:47:54 PDT
Created attachment 259501 [details]
Patch
Comment 2 Ryosuke Niwa 2015-08-20 15:28:43 PDT
Comment on attachment 259501 [details]
Patch

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

> Source/WebCore/dom/Document.idl:93
> +    [ObjCLegacyUnnamedParameters] NodeIterator createNodeIterator(Node root,
> +                                                   optional unsigned long whatToShow,
> +                                                   optional NodeFilter? filter,
> +                                                   optional boolean expandEntityReferences);
> +    [ObjCLegacyUnnamedParameters] TreeWalker createTreeWalker(Node root,
> +                                                   optional unsigned long whatToShow,
> +                                                   optional NodeFilter? filter,
> +                                                   optional boolean expandEntityReferences);

Can we use WebKit-style indentation (indent by 4 spaces)?
Comment 3 Chris Dumez 2015-08-20 15:31:30 PDT
Created attachment 259509 [details]
Patch
Comment 4 Chris Dumez 2015-08-20 15:32:17 PDT
Comment on attachment 259509 [details]
Patch

Clearing flags on attachment: 259509

Committed r188711: <http://trac.webkit.org/changeset/188711>
Comment 5 Chris Dumez 2015-08-20 15:32:21 PDT
All reviewed patches have been landed.  Closing bug.