| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #include "config.h" | 26 #include "config.h" |
| 27 #include "core/dom/SelectorQuery.h" | 27 #include "core/dom/SelectorQuery.h" |
| 28 | 28 |
| 29 #include "core/css/CSSParser.h" | 29 #include "core/css/CSSParser.h" |
| 30 #include "core/css/CSSSelectorList.h" | 30 #include "core/css/CSSSelectorList.h" |
| 31 #include "core/css/SelectorChecker.h" | 31 #include "core/css/SelectorChecker.h" |
| 32 #include "core/css/SelectorCheckerFastPath.h" | 32 #include "core/css/SelectorCheckerFastPath.h" |
| 33 #include "core/css/SiblingTraversalStrategies.h" | 33 #include "core/css/SiblingTraversalStrategies.h" |
| 34 #include "core/dom/Document.h" | 34 #include "core/dom/Document.h" |
| 35 #include "core/dom/StaticNodeList.h" | 35 #include "core/dom/StaticNodeList.h" |
| 36 #include "core/dom/StyledElement.h" | |
| 37 | 36 |
| 38 namespace WebCore { | 37 namespace WebCore { |
| 39 | 38 |
| 40 void SelectorDataList::initialize(const CSSSelectorList& selectorList) | 39 void SelectorDataList::initialize(const CSSSelectorList& selectorList) |
| 41 { | 40 { |
| 42 ASSERT(m_selectors.isEmpty()); | 41 ASSERT(m_selectors.isEmpty()); |
| 43 | 42 |
| 44 unsigned selectorCount = 0; | 43 unsigned selectorCount = 0; |
| 45 for (const CSSSelector* selector = selectorList.first(); selector; selector
= CSSSelectorList::next(selector)) | 44 for (const CSSSelector* selector = selectorList.first(); selector; selector
= CSSSelectorList::next(selector)) |
| 46 selectorCount++; | 45 selectorCount++; |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 m_entries.add(selectors, selectorQuery.release()); | 242 m_entries.add(selectors, selectorQuery.release()); |
| 244 return rawSelectorQuery; | 243 return rawSelectorQuery; |
| 245 } | 244 } |
| 246 | 245 |
| 247 void SelectorQueryCache::invalidate() | 246 void SelectorQueryCache::invalidate() |
| 248 { | 247 { |
| 249 m_entries.clear(); | 248 m_entries.clear(); |
| 250 } | 249 } |
| 251 | 250 |
| 252 } | 251 } |
| OLD | NEW |