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

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

Issue 2329463004: ABANDONED CL: Changes needed to make things compile after running rewrite_to_chrome_style tool. (Closed)
Patch Set: More fixes - things build fine at this point. Created 3 years, 8 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 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 25 matching lines...) Expand all
36 #include "wtf/PtrUtil.h" 36 #include "wtf/PtrUtil.h"
37 #include "wtf/StdLibExtras.h" 37 #include "wtf/StdLibExtras.h"
38 #include "wtf/text/StringHash.h" 38 #include "wtf/text/StringHash.h"
39 39
40 namespace blink { 40 namespace blink {
41 41
42 using namespace WTF; 42 using namespace WTF;
43 using namespace Unicode; 43 using namespace Unicode;
44 using namespace XPath; 44 using namespace XPath;
45 45
46 Parser* Parser::currentParser = nullptr; 46 Parser* Parser::current_parser_ = nullptr;
47 47
48 enum XMLCat { NameStart, NameCont, NotPartOfName }; 48 enum XMLCat { NameStart, NameCont, NotPartOfName };
49 49
50 typedef HashMap<String, Step::Axis> AxisNamesMap; 50 typedef HashMap<String, Step::Axis> AxisNamesMap;
51 51
52 static XMLCat charCat(UChar aChar) { 52 static XMLCat charCat(UChar aChar) {
53 // might need to add some special cases from the XML spec. 53 // might need to add some special cases from the XML spec.
54 54
55 if (aChar == '_') 55 if (aChar == '_')
56 return NameStart; 56 return NameStart;
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 return true; 469 return true;
470 } 470 }
471 471
472 Expression* Parser::parseStatement(const String& statement, 472 Expression* Parser::parseStatement(const String& statement,
473 XPathNSResolver* resolver, 473 XPathNSResolver* resolver,
474 ExceptionState& exceptionState) { 474 ExceptionState& exceptionState) {
475 reset(statement); 475 reset(statement);
476 476
477 m_resolver = resolver; 477 m_resolver = resolver;
478 478
479 Parser* oldParser = currentParser; 479 Parser* oldParser = current_parser_;
480 currentParser = this; 480 current_parser_ = this;
481 int parseError = xpathyyparse(this); 481 int parseError = xpathyyparse(this);
482 currentParser = oldParser; 482 current_parser_ = oldParser;
483 483
484 if (parseError) { 484 if (parseError) {
485 m_strings.clear(); 485 m_strings.clear();
486 486
487 m_topExpr = nullptr; 487 m_topExpr = nullptr;
488 488
489 if (m_gotNamespaceError) 489 if (m_gotNamespaceError)
490 exceptionState.throwDOMException( 490 exceptionState.throwDOMException(
491 NamespaceError, 491 NamespaceError,
492 "The string '" + statement + "' contains unresolvable namespaces."); 492 "The string '" + statement + "' contains unresolvable namespaces.");
(...skipping 20 matching lines...) Expand all
513 513
514 void Parser::deleteString(String* s) { 514 void Parser::deleteString(String* s) {
515 if (!s) 515 if (!s)
516 return; 516 return;
517 517
518 DCHECK(m_strings.contains(s)); 518 DCHECK(m_strings.contains(s));
519 m_strings.erase(s); 519 m_strings.erase(s);
520 } 520 }
521 521
522 } // namespace blink 522 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698