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

Side by Side Diff: Source/core/css/resolver/StyleResolver.h

Issue 23851002: Have SelectorQuery constructor take a Document reference in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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/css/SelectorChecker.cpp ('k') | Source/core/dom/SelectorQuery.cpp » ('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 (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 #ifdef STYLE_STATS 357 #ifdef STYLE_STATS
358 static StyleSharingStats m_styleSharingStats; 358 static StyleSharingStats m_styleSharingStats;
359 #endif 359 #endif
360 }; 360 };
361 361
362 inline bool checkRegionSelector(const CSSSelector* regionSelector, Element* regi onElement) 362 inline bool checkRegionSelector(const CSSSelector* regionSelector, Element* regi onElement)
363 { 363 {
364 if (!regionSelector || !regionElement) 364 if (!regionSelector || !regionElement)
365 return false; 365 return false;
366 366
367 SelectorChecker selectorChecker(&regionElement->document(), SelectorChecker: :QueryingRules); 367 SelectorChecker selectorChecker(regionElement->document(), SelectorChecker:: QueryingRules);
368 for (const CSSSelector* s = regionSelector; s; s = CSSSelectorList::next(s)) { 368 for (const CSSSelector* s = regionSelector; s; s = CSSSelectorList::next(s)) {
369 SelectorChecker::SelectorCheckingContext selectorCheckingContext(s, regi onElement, SelectorChecker::VisitedMatchDisabled); 369 SelectorChecker::SelectorCheckingContext selectorCheckingContext(s, regi onElement, SelectorChecker::VisitedMatchDisabled);
370 PseudoId ignoreDynamicPseudo = NOPSEUDO; 370 PseudoId ignoreDynamicPseudo = NOPSEUDO;
371 if (selectorChecker.match(selectorCheckingContext, ignoreDynamicPseudo, DOMSiblingTraversalStrategy()) == SelectorChecker::SelectorMatches) 371 if (selectorChecker.match(selectorCheckingContext, ignoreDynamicPseudo, DOMSiblingTraversalStrategy()) == SelectorChecker::SelectorMatches)
372 return true; 372 return true;
373 } 373 }
374 return false; 374 return false;
375 } 375 }
376 376
377 } // namespace WebCore 377 } // namespace WebCore
378 378
379 #endif // StyleResolver_h 379 #endif // StyleResolver_h
OLDNEW
« no previous file with comments | « Source/core/css/SelectorChecker.cpp ('k') | Source/core/dom/SelectorQuery.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698