Bug 148238

Summary: Default value for createNodeIterator() / createTreeWalker()'s whatToShow parameter should be 0xFFFFFFFF
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: DOMAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, benjamin, darin, koivisto, rniwa, sam
Priority: P2 Keywords: WebExposed
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
URL: https://dom.spec.whatwg.org/#document
Bug Depends on:    
Bug Blocks: 148257    
Attachments:
Description Flags
Patch
none
Patch none

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.