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

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

Issue 1738613002: Rename enums/functions that collide in chromium style in core/dom/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@get-names-3
Patch Set: get-names-4: 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 EvaluationContext clonedContext = evaluationContext; 104 EvaluationContext clonedContext = evaluationContext;
105 // http://www.w3.org/TR/xpath/ 105 // http://www.w3.org/TR/xpath/
106 // Section 2, Location Paths: 106 // Section 2, Location Paths:
107 // "/ selects the document root (which is always the parent of the document element)" 107 // "/ selects the document root (which is always the parent of the document element)"
108 // "A / by itself selects the root node of the document containing the conte xt node." 108 // "A / by itself selects the root node of the document containing the conte xt node."
109 // In the case of a tree that is detached from the document, we violate 109 // In the case of a tree that is detached from the document, we violate
110 // the spec and treat / as the root node of the detached tree. 110 // the spec and treat / as the root node of the detached tree.
111 // This is for compatibility with Firefox, and also seems like a more 111 // This is for compatibility with Firefox, and also seems like a more
112 // logical treatment of where you would expect the "root" to be. 112 // logical treatment of where you would expect the "root" to be.
113 Node* context = evaluationContext.node.get(); 113 Node* context = evaluationContext.node.get();
114 if (m_absolute && context->nodeType() != Node::DOCUMENT_NODE) { 114 if (m_absolute && context->getNodeType() != Node::DOCUMENT_NODE) {
115 if (context->inDocument()) 115 if (context->inDocument())
116 context = context->ownerDocument(); 116 context = context->ownerDocument();
117 else 117 else
118 context = &NodeTraversal::highestAncestorOrSelf(*context); 118 context = &NodeTraversal::highestAncestorOrSelf(*context);
119 } 119 }
120 120
121 NodeSet* nodes = NodeSet::create(); 121 NodeSet* nodes = NodeSet::create();
122 nodes->append(context); 122 nodes->append(context);
123 evaluate(clonedContext, *nodes); 123 evaluate(clonedContext, *nodes);
124 124
(...skipping 84 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

Powered by Google App Engine
This is Rietveld 408576698