Chromium Code Reviews| Index: Source/core/dom/Document.cpp |
| diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp |
| index c7721f54129348c388f9fabf555b86db65f77764..27a46b4251ad8097d9d5fe2dbfd8006edcaa291d 100644 |
| --- a/Source/core/dom/Document.cpp |
| +++ b/Source/core/dom/Document.cpp |
| @@ -1542,17 +1542,7 @@ PassRefPtrWillBeRawPtr<Range> Document::createRange() |
| return Range::create(*this); |
| } |
| -PassRefPtrWillBeRawPtr<NodeIterator> Document::createNodeIterator(Node* root, ExceptionState& exceptionState) |
| -{ |
| - // FIXME: Probably this should be handled within the bindings layer and TypeError should be thrown. |
|
haraken
2014/06/25 15:40:57
Shall we leave this FIXME (and address it in a fol
Jens Widell
2014/06/25 15:52:48
Yes, we certainly should leave the FIXME. Sorry ab
|
| - if (!root) { |
| - exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::argumentNullOrIncorrectType(1, "Node")); |
| - return nullptr; |
| - } |
| - return NodeIterator::create(root, NodeFilter::SHOW_ALL, nullptr); |
| -} |
| - |
| -PassRefPtrWillBeRawPtr<NodeIterator> Document::createNodeIterator(Node* root, unsigned whatToShow, ExceptionState& exceptionState) |
| +PassRefPtrWillBeRawPtr<NodeIterator> Document::createNodeIterator(Node* root, unsigned whatToShow, PassRefPtrWillBeRawPtr<NodeFilter> filter, ExceptionState& exceptionState) |
| { |
| if (!root) { |
| exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::argumentNullOrIncorrectType(1, "Node")); |
| @@ -1560,37 +1550,9 @@ PassRefPtrWillBeRawPtr<NodeIterator> Document::createNodeIterator(Node* root, un |
| } |
| // FIXME: It might be a good idea to emit a warning if |whatToShow| contains a bit that is not defined in |
| // NodeFilter. |
| - return NodeIterator::create(root, whatToShow, nullptr); |
| -} |
| - |
| -PassRefPtrWillBeRawPtr<NodeIterator> Document::createNodeIterator(Node* root, unsigned whatToShow, PassRefPtrWillBeRawPtr<NodeFilter> filter, ExceptionState& exceptionState) |
| -{ |
| - if (!root) { |
| - exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::argumentNullOrIncorrectType(1, "Node")); |
| - return nullptr; |
| - } |
| - // FIXME: Ditto. |
| return NodeIterator::create(root, whatToShow, filter); |
| } |
| -PassRefPtrWillBeRawPtr<TreeWalker> Document::createTreeWalker(Node* root, ExceptionState& exceptionState) |
| -{ |
| - if (!root) { |
| - exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::argumentNullOrIncorrectType(1, "Node")); |
| - return nullptr; |
| - } |
| - return TreeWalker::create(root, NodeFilter::SHOW_ALL, nullptr); |
| -} |
| - |
| -PassRefPtrWillBeRawPtr<TreeWalker> Document::createTreeWalker(Node* root, unsigned whatToShow, ExceptionState& exceptionState) |
| -{ |
| - if (!root) { |
| - exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::argumentNullOrIncorrectType(1, "Node")); |
| - return nullptr; |
| - } |
| - return TreeWalker::create(root, whatToShow, nullptr); |
| -} |
| - |
| PassRefPtrWillBeRawPtr<TreeWalker> Document::createTreeWalker(Node* root, unsigned whatToShow, PassRefPtrWillBeRawPtr<NodeFilter> filter, ExceptionState& exceptionState) |
| { |
| if (!root) { |