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

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

Issue 131593003: Fix bad cast to XPath::Filter in XPathGrammar.y (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/xml/XPathPath.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 if (dropSecondStep) { 178 if (dropSecondStep) {
179 delete m_steps[0]; 179 delete m_steps[0];
180 m_steps[0] = step; 180 m_steps[0] = step;
181 return; 181 return;
182 } 182 }
183 } 183 }
184 step->optimize(); 184 step->optimize();
185 m_steps.insert(0, step); 185 m_steps.insert(0, step);
186 } 186 }
187 187
188 Path::Path(Filter* filter, LocationPath* path) 188 Path::Path(Expression* filter, LocationPath* path)
189 : m_filter(filter) 189 : m_filter(filter)
190 , m_path(path) 190 , m_path(path)
191 { 191 {
192 setIsContextNodeSensitive(filter->isContextNodeSensitive()); 192 setIsContextNodeSensitive(filter->isContextNodeSensitive());
193 setIsContextPositionSensitive(filter->isContextPositionSensitive()); 193 setIsContextPositionSensitive(filter->isContextPositionSensitive());
194 setIsContextSizeSensitive(filter->isContextSizeSensitive()); 194 setIsContextSizeSensitive(filter->isContextSizeSensitive());
195 } 195 }
196 196
197 Path::~Path() 197 Path::~Path()
198 { 198 {
199 delete m_filter; 199 delete m_filter;
200 delete m_path; 200 delete m_path;
201 } 201 }
202 202
203 Value Path::evaluate() const 203 Value Path::evaluate() const
204 { 204 {
205 Value v = m_filter->evaluate(); 205 Value v = m_filter->evaluate();
206 206
207 NodeSet& nodes = v.modifiableNodeSet(); 207 NodeSet& nodes = v.modifiableNodeSet();
208 m_path->evaluate(nodes); 208 m_path->evaluate(nodes);
209 209
210 return v; 210 return v;
211 } 211 }
212 212
213 } 213 }
214 } 214 }
OLDNEW
« no previous file with comments | « Source/core/xml/XPathPath.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698