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

Side by Side Diff: Source/core/xml/XPathGrammar.y

Issue 108543003: Consistently use AtomicString for namespaceURI / prefix (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years 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 2005 Frerich Raabe <raabe@kde.org> 2 * Copyright 2005 Frerich Raabe <raabe@kde.org>
3 * Copyright (C) 2006 Apple Inc. All rights reserved. 3 * Copyright (C) 2006 Apple Inc. All rights reserved.
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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 $$ = new Step(Step::ChildAxis, *$1, *$2); 185 $$ = new Step(Step::ChildAxis, *$1, *$2);
186 parser->deletePredicateVector($2); 186 parser->deletePredicateVector($2);
187 } else 187 } else
188 $$ = new Step(Step::ChildAxis, *$1); 188 $$ = new Step(Step::ChildAxis, *$1);
189 parser->deleteNodeTest($1); 189 parser->deleteNodeTest($1);
190 parser->registerParseNode($$); 190 parser->registerParseNode($$);
191 } 191 }
192 | 192 |
193 NAMETEST OptionalPredicateList 193 NAMETEST OptionalPredicateList
194 { 194 {
195 String localName; 195 AtomicString localName;
196 String namespaceURI; 196 AtomicString namespaceURI;
197 if (!parser->expandQName(*$1, localName, namespaceURI)) { 197 if (!parser->expandQName(*$1, localName, namespaceURI)) {
198 parser->m_gotNamespaceError = true; 198 parser->m_gotNamespaceError = true;
199 YYABORT; 199 YYABORT;
200 } 200 }
201 201
202 if ($2) { 202 if ($2) {
203 $$ = new Step(Step::ChildAxis, Step::NodeTest(Step::NodeTest::NameTe st, localName, namespaceURI), *$2); 203 $$ = new Step(Step::ChildAxis, Step::NodeTest(Step::NodeTest::NameTe st, localName, namespaceURI), *$2);
204 parser->deletePredicateVector($2); 204 parser->deletePredicateVector($2);
205 } else 205 } else
206 $$ = new Step(Step::ChildAxis, Step::NodeTest(Step::NodeTest::NameTe st, localName, namespaceURI)); 206 $$ = new Step(Step::ChildAxis, Step::NodeTest(Step::NodeTest::NameTe st, localName, namespaceURI));
207 parser->deleteString($1); 207 parser->deleteString($1);
208 parser->registerParseNode($$); 208 parser->registerParseNode($$);
209 } 209 }
210 | 210 |
211 AxisSpecifier NodeTest OptionalPredicateList 211 AxisSpecifier NodeTest OptionalPredicateList
212 { 212 {
213 if ($3) { 213 if ($3) {
214 $$ = new Step($1, *$2, *$3); 214 $$ = new Step($1, *$2, *$3);
215 parser->deletePredicateVector($3); 215 parser->deletePredicateVector($3);
216 } else 216 } else
217 $$ = new Step($1, *$2); 217 $$ = new Step($1, *$2);
218 parser->deleteNodeTest($2); 218 parser->deleteNodeTest($2);
219 parser->registerParseNode($$); 219 parser->registerParseNode($$);
220 } 220 }
221 | 221 |
222 AxisSpecifier NAMETEST OptionalPredicateList 222 AxisSpecifier NAMETEST OptionalPredicateList
223 { 223 {
224 String localName; 224 AtomicString localName;
225 String namespaceURI; 225 AtomicString namespaceURI;
226 if (!parser->expandQName(*$2, localName, namespaceURI)) { 226 if (!parser->expandQName(*$2, localName, namespaceURI)) {
227 parser->m_gotNamespaceError = true; 227 parser->m_gotNamespaceError = true;
228 YYABORT; 228 YYABORT;
229 } 229 }
230 230
231 if ($3) { 231 if ($3) {
232 $$ = new Step($1, Step::NodeTest(Step::NodeTest::NameTest, localName , namespaceURI), *$3); 232 $$ = new Step($1, Step::NodeTest(Step::NodeTest::NameTest, localName , namespaceURI), *$3);
233 parser->deletePredicateVector($3); 233 parser->deletePredicateVector($3);
234 } else 234 } else
235 $$ = new Step($1, Step::NodeTest(Step::NodeTest::NameTest, localName , namespaceURI)); 235 $$ = new Step($1, Step::NodeTest(Step::NodeTest::NameTest, localName , namespaceURI));
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 MINUS UnaryExpr 545 MINUS UnaryExpr
546 { 546 {
547 $$ = new Negative; 547 $$ = new Negative;
548 $$->addSubExpression(adoptPtr($2)); 548 $$->addSubExpression(adoptPtr($2));
549 parser->unregisterParseNode($2); 549 parser->unregisterParseNode($2);
550 parser->registerParseNode($$); 550 parser->registerParseNode($$);
551 } 551 }
552 ; 552 ;
553 553
554 %% 554 %%
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698