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

Side by Side Diff: Source/core/xml/XPathParser.cpp

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 Maksim Orlovich <maksim@kde.org> 2 * Copyright 2005 Maksim Orlovich <maksim@kde.org>
3 * Copyright (C) 2006 Apple Computer, Inc. 3 * Copyright (C) 2006 Apple Computer, 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 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 case NUMBER: 440 case NUMBER:
441 case NAMETEST: 441 case NAMETEST:
442 yylval->str = new String(tok.str); 442 yylval->str = new String(tok.str);
443 registerString(yylval->str); 443 registerString(yylval->str);
444 break; 444 break;
445 } 445 }
446 446
447 return tok.type; 447 return tok.type;
448 } 448 }
449 449
450 bool Parser::expandQName(const String& qName, String& localName, String& namespa ceURI) 450 bool Parser::expandQName(const String& qName, AtomicString& localName, AtomicStr ing& namespaceURI)
451 { 451 {
452 size_t colon = qName.find(':'); 452 size_t colon = qName.find(':');
453 if (colon != kNotFound) { 453 if (colon != kNotFound) {
454 if (!m_resolver) 454 if (!m_resolver)
455 return false; 455 return false;
456 namespaceURI = m_resolver->lookupNamespaceURI(qName.left(colon)); 456 namespaceURI = m_resolver->lookupNamespaceURI(qName.left(colon));
457 if (namespaceURI.isNull()) 457 if (namespaceURI.isNull())
458 return false; 458 return false;
459 localName = qName.substring(colon + 1); 459 localName = AtomicString(qName.substring(colon + 1));
460 } else 460 } else {
461 localName = qName; 461 localName = AtomicString(qName);
462 }
462 463
463 return true; 464 return true;
464 } 465 }
465 466
466 Expression* Parser::parseStatement(const String& statement, PassRefPtr<XPathNSRe solver> resolver, ExceptionState& exceptionState) 467 Expression* Parser::parseStatement(const String& statement, PassRefPtr<XPathNSRe solver> resolver, ExceptionState& exceptionState)
467 { 468 {
468 reset(statement); 469 reset(statement);
469 470
470 m_resolver = resolver; 471 m_resolver = resolver;
471 472
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 { 616 {
616 if (t == 0) 617 if (t == 0)
617 return; 618 return;
618 619
619 ASSERT(m_nodeTests.contains(t)); 620 ASSERT(m_nodeTests.contains(t));
620 621
621 m_nodeTests.remove(t); 622 m_nodeTests.remove(t);
622 delete t; 623 delete t;
623 } 624 }
624 625
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698