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

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: restore FIXME Created 6 years, 5 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 { 1546 {
1547 // FIXME: Probably this should be handled within the bindings layer and Type Error should be thrown. 1547 // FIXME: Probably this should be handled within the bindings layer and Type Error should be thrown.
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 {
1557 if (!root) { 1548 if (!root) {
1558 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::a rgumentNullOrIncorrectType(1, "Node")); 1549 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::a rgumentNullOrIncorrectType(1, "Node"));
1559 return nullptr; 1550 return nullptr;
1560 } 1551 }
1561 // FIXME: It might be a good idea to emit a warning if |whatToShow| contains a bit that is not defined in 1552 // FIXME: It might be a good idea to emit a warning if |whatToShow| contains a bit that is not defined in
1562 // NodeFilter. 1553 // 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); 1554 return NodeIterator::create(root, whatToShow, filter);
1574 } 1555 }
1575 1556
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) 1557 PassRefPtrWillBeRawPtr<TreeWalker> Document::createTreeWalker(Node* root, unsign ed whatToShow, PassRefPtrWillBeRawPtr<NodeFilter> filter, ExceptionState& except ionState)
1595 { 1558 {
1559 // FIXME: Probably this should be handled within the bindings layer and Type Error should be thrown.
1596 if (!root) { 1560 if (!root) {
1597 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::a rgumentNullOrIncorrectType(1, "Node")); 1561 exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::a rgumentNullOrIncorrectType(1, "Node"));
1598 return nullptr; 1562 return nullptr;
1599 } 1563 }
1600 return TreeWalker::create(root, whatToShow, filter); 1564 return TreeWalker::create(root, whatToShow, filter);
1601 } 1565 }
1602 1566
1603 bool Document::needsRenderTreeUpdate() const 1567 bool Document::needsRenderTreeUpdate() const
1604 { 1568 {
1605 if (!isActive() || !view()) 1569 if (!isActive() || !view())
(...skipping 4265 matching lines...) Expand 10 before | Expand all | Expand 10 after
5871 visitor->trace(m_compositorPendingAnimations); 5835 visitor->trace(m_compositorPendingAnimations);
5872 visitor->trace(m_contextDocument); 5836 visitor->trace(m_contextDocument);
5873 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this); 5837 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this);
5874 DocumentSupplementable::trace(visitor); 5838 DocumentSupplementable::trace(visitor);
5875 TreeScope::trace(visitor); 5839 TreeScope::trace(visitor);
5876 ContainerNode::trace(visitor); 5840 ContainerNode::trace(visitor);
5877 ExecutionContext::trace(visitor); 5841 ExecutionContext::trace(visitor);
5878 } 5842 }
5879 5843
5880 } // namespace WebCore 5844 } // 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