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

Side by Side Diff: third_party/WebKit/Source/core/xml/XPathStep.h

Issue 1743863002: Rename enums/functions that collide in chromium style in core/svg,xml (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: get-names-10: rebase Created 4 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2005 Frerich Raabe <raabe@kde.org> 2 * Copyright (C) 2005 Frerich Raabe <raabe@kde.org>
3 * Copyright (C) 2006, 2009 Apple Inc. 3 * Copyright (C) 2006, 2009 Apple Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 NodeTest& operator=(const NodeTest& o) 69 NodeTest& operator=(const NodeTest& o)
70 { 70 {
71 m_kind = o.m_kind; 71 m_kind = o.m_kind;
72 m_data = o.m_data; 72 m_data = o.m_data;
73 m_namespaceURI = o.m_namespaceURI; 73 m_namespaceURI = o.m_namespaceURI;
74 ASSERT(o.m_mergedPredicates.isEmpty()); 74 ASSERT(o.m_mergedPredicates.isEmpty());
75 return *this; 75 return *this;
76 } 76 }
77 DEFINE_INLINE_TRACE() { visitor->trace(m_mergedPredicates); } 77 DEFINE_INLINE_TRACE() { visitor->trace(m_mergedPredicates); }
78 78
79 Kind kind() const { return m_kind; } 79 Kind getKind() const { return m_kind; }
80 const AtomicString& data() const { return m_data; } 80 const AtomicString& data() const { return m_data; }
81 const AtomicString& namespaceURI() const { return m_namespaceURI; } 81 const AtomicString& namespaceURI() const { return m_namespaceURI; }
82 HeapVector<Member<Predicate>>& mergedPredicates() { return m_mergedPredi cates; } 82 HeapVector<Member<Predicate>>& mergedPredicates() { return m_mergedPredi cates; }
83 const HeapVector<Member<Predicate>>& mergedPredicates() const { return m _mergedPredicates; } 83 const HeapVector<Member<Predicate>>& mergedPredicates() const { return m _mergedPredicates; }
84 84
85 private: 85 private:
86 Kind m_kind; 86 Kind m_kind;
87 AtomicString m_data; 87 AtomicString m_data;
88 AtomicString m_namespaceURI; 88 AtomicString m_namespaceURI;
89 89
90 // When possible, we merge some or all predicates with node test for bet ter performance. 90 // When possible, we merge some or all predicates with node test for bet ter performance.
91 HeapVector<Member<Predicate>> m_mergedPredicates; 91 HeapVector<Member<Predicate>> m_mergedPredicates;
92 }; 92 };
93 93
94 Step(Axis, const NodeTest&); 94 Step(Axis, const NodeTest&);
95 Step(Axis, const NodeTest&, HeapVector<Member<Predicate>>&); 95 Step(Axis, const NodeTest&, HeapVector<Member<Predicate>>&);
96 ~Step() override; 96 ~Step() override;
97 DECLARE_VIRTUAL_TRACE(); 97 DECLARE_VIRTUAL_TRACE();
98 98
99 void optimize(); 99 void optimize();
100 100
101 void evaluate(EvaluationContext&, Node* context, NodeSet&) const; 101 void evaluate(EvaluationContext&, Node* context, NodeSet&) const;
102 102
103 Axis axis() const { return m_axis; } 103 Axis getAxis() const { return m_axis; }
104 const NodeTest& nodeTest() const { return *m_nodeTest; } 104 const NodeTest& nodeTest() const { return *m_nodeTest; }
105 105
106 private: 106 private:
107 friend bool optimizeStepPair(Step*, Step*); 107 friend bool optimizeStepPair(Step*, Step*);
108 bool predicatesAreContextListInsensitive() const; 108 bool predicatesAreContextListInsensitive() const;
109 NodeTest& nodeTest() { return *m_nodeTest; } 109 NodeTest& nodeTest() { return *m_nodeTest; }
110 110
111 void parseNodeTest(const String&); 111 void parseNodeTest(const String&);
112 void nodesInAxis(EvaluationContext&, Node* context, NodeSet&) const; 112 void nodesInAxis(EvaluationContext&, Node* context, NodeSet&) const;
113 String namespaceFromNodetest(const String& nodeTest) const; 113 String namespaceFromNodetest(const String& nodeTest) const;
114 114
115 Axis m_axis; 115 Axis m_axis;
116 Member<NodeTest> m_nodeTest; 116 Member<NodeTest> m_nodeTest;
117 HeapVector<Member<Predicate>> m_predicates; 117 HeapVector<Member<Predicate>> m_predicates;
118 }; 118 };
119 119
120 bool optimizeStepPair(Step*, Step*); 120 bool optimizeStepPair(Step*, Step*);
121 121
122 } // namespace XPath 122 } // namespace XPath
123 123
124 } // namespace blink 124 } // namespace blink
125 125
126 #endif // XPathStep_h 126 #endif // XPathStep_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/xml/XPathResult.cpp ('k') | third_party/WebKit/Source/core/xml/XPathStep.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698