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

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

Issue 2389883005: reflow comments in core/xml* (Closed)
Patch Set: Created 4 years, 2 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. All rights reserved. 3 * Copyright (C) 2006, 2009 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 NotSupportedError, "The node provided is '" + contextNode->nodeName() + 69 NotSupportedError, "The node provided is '" + contextNode->nodeName() +
70 "', which is not a valid context node type."); 70 "', which is not a valid context node type.");
71 return nullptr; 71 return nullptr;
72 } 72 }
73 73
74 EvaluationContext evaluationContext(*contextNode); 74 EvaluationContext evaluationContext(*contextNode);
75 XPathResult* result = XPathResult::create( 75 XPathResult* result = XPathResult::create(
76 evaluationContext, m_topExpression->evaluate(evaluationContext)); 76 evaluationContext, m_topExpression->evaluate(evaluationContext));
77 77
78 if (evaluationContext.hadTypeConversionError) { 78 if (evaluationContext.hadTypeConversionError) {
79 // It is not specified what to do if type conversion fails while evaluating an expression. 79 // It is not specified what to do if type conversion fails while evaluating
80 // an expression.
80 exceptionState.throwDOMException( 81 exceptionState.throwDOMException(
81 SyntaxError, "Type conversion failed while evaluating the expression."); 82 SyntaxError, "Type conversion failed while evaluating the expression.");
82 return nullptr; 83 return nullptr;
83 } 84 }
84 85
85 if (type != XPathResult::kAnyType) { 86 if (type != XPathResult::kAnyType) {
86 result->convertTo(type, exceptionState); 87 result->convertTo(type, exceptionState);
87 if (exceptionState.hadException()) 88 if (exceptionState.hadException())
88 return nullptr; 89 return nullptr;
89 } 90 }
90 91
91 return result; 92 return result;
92 } 93 }
93 94
94 } // namespace blink 95 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698