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

Side by Side Diff: third_party/WebKit/Source/core/xml/XPathPath.cpp

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 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 127
128 void LocationPath::evaluate(EvaluationContext& context, NodeSet& nodes) const 128 void LocationPath::evaluate(EvaluationContext& context, NodeSet& nodes) const
129 { 129 {
130 bool resultIsSorted = nodes.isSorted(); 130 bool resultIsSorted = nodes.isSorted();
131 131
132 for (unsigned i = 0; i < m_steps.size(); i++) { 132 for (unsigned i = 0; i < m_steps.size(); i++) {
133 Step* step = m_steps[i]; 133 Step* step = m_steps[i];
134 NodeSet* newNodes = NodeSet::create(); 134 NodeSet* newNodes = NodeSet::create();
135 WillBeHeapHashSet<RawPtrWillBeMember<Node>> newNodesSet; 135 WillBeHeapHashSet<RawPtrWillBeMember<Node>> newNodesSet;
136 136
137 bool needToCheckForDuplicateNodes = !nodes.subtreesAreDisjoint() || (ste p->axis() != Step::ChildAxis && step->axis() != Step::SelfAxis 137 bool needToCheckForDuplicateNodes = !nodes.subtreesAreDisjoint() || (ste p->getAxis() != Step::ChildAxis && step->getAxis() != Step::SelfAxis
138 && step->axis() != Step::DescendantAxis && step->axis() != Step::Des cendantOrSelfAxis && step->axis() != Step::AttributeAxis); 138 && step->getAxis() != Step::DescendantAxis && step->getAxis() != Ste p::DescendantOrSelfAxis && step->getAxis() != Step::AttributeAxis);
139 139
140 if (needToCheckForDuplicateNodes) 140 if (needToCheckForDuplicateNodes)
141 resultIsSorted = false; 141 resultIsSorted = false;
142 142
143 // This is a simplified check that can be improved to handle more cases. 143 // This is a simplified check that can be improved to handle more cases.
144 if (nodes.subtreesAreDisjoint() && (step->axis() == Step::ChildAxis || s tep->axis() == Step::SelfAxis)) 144 if (nodes.subtreesAreDisjoint() && (step->getAxis() == Step::ChildAxis | | step->getAxis() == Step::SelfAxis))
145 newNodes->markSubtreesDisjoint(true); 145 newNodes->markSubtreesDisjoint(true);
146 146
147 for (unsigned j = 0; j < nodes.size(); j++) { 147 for (unsigned j = 0; j < nodes.size(); j++) {
148 NodeSet* matches = NodeSet::create(); 148 NodeSet* matches = NodeSet::create();
149 step->evaluate(context, nodes[j], *matches); 149 step->evaluate(context, nodes[j], *matches);
150 150
151 if (!matches->isSorted()) 151 if (!matches->isSorted())
152 resultIsSorted = false; 152 resultIsSorted = false;
153 153
154 for (size_t nodeIndex = 0; nodeIndex < matches->size(); ++nodeIndex) { 154 for (size_t nodeIndex = 0; nodeIndex < matches->size(); ++nodeIndex) {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 209
210 NodeSet& nodes = v.modifiableNodeSet(context); 210 NodeSet& nodes = v.modifiableNodeSet(context);
211 m_path->evaluate(context, nodes); 211 m_path->evaluate(context, nodes);
212 212
213 return v; 213 return v;
214 } 214 }
215 215
216 } // namespace XPath 216 } // namespace XPath
217 217
218 } // namespace blink 218 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp ('k') | third_party/WebKit/Source/core/xml/XPathResult.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698