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

Side by Side Diff: third_party/WebKit/Source/core/dom/SelectorQuery.cpp

Issue 1444173002: third_party/WebKit: fix typos found in comments (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CL Description change, Typo patch apply to upstream master. Created 5 years 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) 2011, 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2011, 2013 Apple Inc. All rights reserved.
3 * Copyright (C) 2014 Samsung Electronics. All rights reserved. 3 * Copyright (C) 2014 Samsung Electronics. 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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 // If returns true, traversalRoots has the elements that may match the selector query. 240 // If returns true, traversalRoots has the elements that may match the selector query.
241 // 241 //
242 // If returns false, traversalRoots has the rootNode parameter or descendants of rootNode representing 242 // If returns false, traversalRoots has the rootNode parameter or descendants of rootNode representing
243 // the subtree for which we can limit the querySelector traversal. 243 // the subtree for which we can limit the querySelector traversal.
244 // 244 //
245 // The travseralRoots may be empty, regardless of the returned bool value, if th is method finds that the selectors won't 245 // The travseralRoots may be empty, regardless of the returned bool value, if th is method finds that the selectors won't
246 // match any element. 246 // match any element.
247 template <typename SelectorQueryTrait> 247 template <typename SelectorQueryTrait>
248 void SelectorDataList::findTraverseRootsAndExecute(ContainerNode& rootNode, type name SelectorQueryTrait::OutputType& output) const 248 void SelectorDataList::findTraverseRootsAndExecute(ContainerNode& rootNode, type name SelectorQueryTrait::OutputType& output) const
249 { 249 {
250 // We need to return the matches in document order. To use id lookup while t here is possiblity of multiple matches 250 // We need to return the matches in document order. To use id lookup while t here is possibility of multiple matches
251 // we would need to sort the results. For now, just traverse the document in that case. 251 // we would need to sort the results. For now, just traverse the document in that case.
252 ASSERT(m_selectors.size() == 1); 252 ASSERT(m_selectors.size() == 1);
253 253
254 bool isRightmostSelector = true; 254 bool isRightmostSelector = true;
255 bool startFromParent = false; 255 bool startFromParent = false;
256 256
257 for (const CSSSelector* selector = m_selectors[0]; selector; selector = sele ctor->tagHistory()) { 257 for (const CSSSelector* selector = m_selectors[0]; selector; selector = sele ctor->tagHistory()) {
258 if (selector->match() == CSSSelector::Id && !rootNode.document().contain sMultipleElementsWithId(selector->value())) { 258 if (selector->match() == CSSSelector::Id && !rootNode.document().contain sMultipleElementsWithId(selector->value())) {
259 Element* element = rootNode.treeScope().getElementById(selector->val ue()); 259 Element* element = rootNode.treeScope().getElementById(selector->val ue());
260 ContainerNode* adjustedNode = &rootNode; 260 ContainerNode* adjustedNode = &rootNode;
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 568
569 return m_entries.add(selectors, SelectorQuery::adopt(selectorList)).storedVa lue->value.get(); 569 return m_entries.add(selectors, SelectorQuery::adopt(selectorList)).storedVa lue->value.get();
570 } 570 }
571 571
572 void SelectorQueryCache::invalidate() 572 void SelectorQueryCache::invalidate()
573 { 573 {
574 m_entries.clear(); 574 m_entries.clear();
575 } 575 }
576 576
577 } 577 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/resolver/SharedStyleFinder.cpp ('k') | third_party/WebKit/Source/core/dom/Text.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698