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

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

Issue 1197723002: NodeFilter acceptNode return type changed to unsigned (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Change sign in the calls for NodeFIlter.acceptNode Created 5 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/NodeIteratorBase.h ('k') | Source/core/dom/TreeWalker.cpp » ('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 * Copyright (C) 2000 Frederik Holljen (frederik.holljen@hig.no) 3 * Copyright (C) 2000 Frederik Holljen (frederik.holljen@hig.no)
4 * Copyright (C) 2001 Peter Kelly (pmk@post.com) 4 * Copyright (C) 2001 Peter Kelly (pmk@post.com)
5 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2004, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2008 Apple Inc. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 22 matching lines...) Expand all
33 33
34 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(NodeIteratorBase); 34 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(NodeIteratorBase);
35 35
36 NodeIteratorBase::NodeIteratorBase(PassRefPtrWillBeRawPtr<Node> rootNode, unsign ed whatToShow, PassRefPtrWillBeRawPtr<NodeFilter> nodeFilter) 36 NodeIteratorBase::NodeIteratorBase(PassRefPtrWillBeRawPtr<Node> rootNode, unsign ed whatToShow, PassRefPtrWillBeRawPtr<NodeFilter> nodeFilter)
37 : m_root(rootNode) 37 : m_root(rootNode)
38 , m_whatToShow(whatToShow) 38 , m_whatToShow(whatToShow)
39 , m_filter(nodeFilter) 39 , m_filter(nodeFilter)
40 { 40 {
41 } 41 }
42 42
43 short NodeIteratorBase::acceptNode(Node* node, ExceptionState& exceptionState) c onst 43 unsigned NodeIteratorBase::acceptNode(Node* node, ExceptionState& exceptionState ) const
44 { 44 {
45 // The bit twiddling here is done to map DOM node types, which are given as integers from 45 // The bit twiddling here is done to map DOM node types, which are given as integers from
46 // 1 through 14, to whatToShow bit masks. 46 // 1 through 14, to whatToShow bit masks.
47 if (!(((1 << (node->nodeType() - 1)) & m_whatToShow))) 47 if (!(((1 << (node->nodeType() - 1)) & m_whatToShow)))
48 return NodeFilter::FILTER_SKIP; 48 return NodeFilter::FILTER_SKIP;
49 if (!m_filter) 49 if (!m_filter)
50 return NodeFilter::FILTER_ACCEPT; 50 return NodeFilter::FILTER_ACCEPT;
51 return m_filter->acceptNode(node, exceptionState); 51 return m_filter->acceptNode(node, exceptionState);
52 } 52 }
53 53
54 DEFINE_TRACE(NodeIteratorBase) 54 DEFINE_TRACE(NodeIteratorBase)
55 { 55 {
56 visitor->trace(m_root); 56 visitor->trace(m_root);
57 visitor->trace(m_filter); 57 visitor->trace(m_filter);
58 } 58 }
59 59
60 } // namespace blink 60 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/dom/NodeIteratorBase.h ('k') | Source/core/dom/TreeWalker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698