Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(299)

Side by Side Diff: Source/core/dom/Document.cpp

Issue 342403007: Use IDL argument default values in Document.idl (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/dom/Document.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 1524 matching lines...) Expand 10 before | Expand all | Expand 10 after
1535 Settings* Document::settings() const 1535 Settings* Document::settings() const
1536 { 1536 {
1537 return m_frame ? m_frame->settings() : 0; 1537 return m_frame ? m_frame->settings() : 0;
1538 } 1538 }
1539 1539
1540 PassRefPtrWillBeRawPtr<Range> Document::createRange() 1540 PassRefPtrWillBeRawPtr<Range> Document::createRange()
1541 { 1541 {
1542 return Range::create(*this); 1542 return Range::create(*this);
1543 } 1543 }
1544 1544
1545 PassRefPtrWillBeRawPtr<NodeIterator> Document::createNodeIterator(Node* root, Ex ceptionState& exceptionState) 1545 PassRefPtrWillBeRawPtr<NodeIterator> Document::createNodeIterator(Node* root, un signed whatToShow, PassRefPtrWillBeRawPtr<NodeFilter> filter, ExceptionState& ex ceptionState)
1546 {
1547 // FIXME: Probably this should be handled within the bindings layer and Type Error 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
1548 if (!root) {
1549 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::a rgumentNullOrIncorrectType(1, "Node"));
1550 return nullptr;
1551 }
1552 return NodeIterator::create(root, NodeFilter::SHOW_ALL, nullptr);
1553 }
1554
1555 PassRefPtrWillBeRawPtr<NodeIterator> Document::createNodeIterator(Node* root, un signed whatToShow, ExceptionState& exceptionState)
1556 { 1546 {
1557 if (!root) { 1547 if (!root) {
1558 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::a rgumentNullOrIncorrectType(1, "Node")); 1548 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::a rgumentNullOrIncorrectType(1, "Node"));
1559 return nullptr; 1549 return nullptr;
1560 } 1550 }
1561 // FIXME: It might be a good idea to emit a warning if |whatToShow| contains a bit that is not defined in 1551 // FIXME: It might be a good idea to emit a warning if |whatToShow| contains a bit that is not defined in
1562 // NodeFilter. 1552 // NodeFilter.
1563 return NodeIterator::create(root, whatToShow, nullptr);
1564 }
1565
1566 PassRefPtrWillBeRawPtr<NodeIterator> Document::createNodeIterator(Node* root, un signed whatToShow, PassRefPtrWillBeRawPtr<NodeFilter> filter, ExceptionState& ex ceptionState)
1567 {
1568 if (!root) {
1569 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::a rgumentNullOrIncorrectType(1, "Node"));
1570 return nullptr;
1571 }
1572 // FIXME: Ditto.
1573 return NodeIterator::create(root, whatToShow, filter); 1553 return NodeIterator::create(root, whatToShow, filter);
1574 } 1554 }
1575 1555
1576 PassRefPtrWillBeRawPtr<TreeWalker> Document::createTreeWalker(Node* root, Except ionState& exceptionState)
1577 {
1578 if (!root) {
1579 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::a rgumentNullOrIncorrectType(1, "Node"));
1580 return nullptr;
1581 }
1582 return TreeWalker::create(root, NodeFilter::SHOW_ALL, nullptr);
1583 }
1584
1585 PassRefPtrWillBeRawPtr<TreeWalker> Document::createTreeWalker(Node* root, unsign ed whatToShow, ExceptionState& exceptionState)
1586 {
1587 if (!root) {
1588 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::a rgumentNullOrIncorrectType(1, "Node"));
1589 return nullptr;
1590 }
1591 return TreeWalker::create(root, whatToShow, nullptr);
1592 }
1593
1594 PassRefPtrWillBeRawPtr<TreeWalker> Document::createTreeWalker(Node* root, unsign ed whatToShow, PassRefPtrWillBeRawPtr<NodeFilter> filter, ExceptionState& except ionState) 1556 PassRefPtrWillBeRawPtr<TreeWalker> Document::createTreeWalker(Node* root, unsign ed whatToShow, PassRefPtrWillBeRawPtr<NodeFilter> filter, ExceptionState& except ionState)
1595 { 1557 {
1596 if (!root) { 1558 if (!root) {
1597 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::a rgumentNullOrIncorrectType(1, "Node")); 1559 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::a rgumentNullOrIncorrectType(1, "Node"));
1598 return nullptr; 1560 return nullptr;
1599 } 1561 }
1600 return TreeWalker::create(root, whatToShow, filter); 1562 return TreeWalker::create(root, whatToShow, filter);
1601 } 1563 }
1602 1564
1603 bool Document::needsRenderTreeUpdate() const 1565 bool Document::needsRenderTreeUpdate() const
(...skipping 4267 matching lines...) Expand 10 before | Expand all | Expand 10 after
5871 visitor->trace(m_compositorPendingAnimations); 5833 visitor->trace(m_compositorPendingAnimations);
5872 visitor->trace(m_contextDocument); 5834 visitor->trace(m_contextDocument);
5873 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this); 5835 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this);
5874 DocumentSupplementable::trace(visitor); 5836 DocumentSupplementable::trace(visitor);
5875 TreeScope::trace(visitor); 5837 TreeScope::trace(visitor);
5876 ContainerNode::trace(visitor); 5838 ContainerNode::trace(visitor);
5877 ExecutionContext::trace(visitor); 5839 ExecutionContext::trace(visitor);
5878 } 5840 }
5879 5841
5880 } // namespace WebCore 5842 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/dom/Document.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698