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

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

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 | « no previous file | Source/core/xml/XPathPath.h » ('j') | 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 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 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 LocationPath 422 LocationPath
423 { 423 {
424 $$ = $1; 424 $$ = $1;
425 } 425 }
426 | 426 |
427 FilterExpr 427 FilterExpr
428 | 428 |
429 FilterExpr '/' RelativeLocationPath 429 FilterExpr '/' RelativeLocationPath
430 { 430 {
431 $3->setAbsolute(true); 431 $3->setAbsolute(true);
432 $$ = new Path(static_cast<Filter*>($1), $3); 432 $$ = new Path($1, $3);
433 parser->unregisterParseNode($1); 433 parser->unregisterParseNode($1);
434 parser->unregisterParseNode($3); 434 parser->unregisterParseNode($3);
435 parser->registerParseNode($$); 435 parser->registerParseNode($$);
436 } 436 }
437 | 437 |
438 FilterExpr DescendantOrSelf RelativeLocationPath 438 FilterExpr DescendantOrSelf RelativeLocationPath
439 { 439 {
440 $3->insertFirstStep($2); 440 $3->insertFirstStep($2);
441 $3->setAbsolute(true); 441 $3->setAbsolute(true);
442 $$ = new Path(static_cast<Filter*>($1), $3); 442 $$ = new Path($1, $3);
443 parser->unregisterParseNode($1); 443 parser->unregisterParseNode($1);
444 parser->unregisterParseNode($2); 444 parser->unregisterParseNode($2);
445 parser->unregisterParseNode($3); 445 parser->unregisterParseNode($3);
446 parser->registerParseNode($$); 446 parser->registerParseNode($$);
447 } 447 }
448 ; 448 ;
449 449
450 FilterExpr: 450 FilterExpr:
451 PrimaryExpr 451 PrimaryExpr
452 | 452 |
(...skipping 92 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
« no previous file with comments | « no previous file | Source/core/xml/XPathPath.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698