| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 for (const auto& selector : selectors) { | 152 for (const auto& selector : selectors) { |
| 153 CSSSelectorList selectorList = CSSParser::parseSelector( | 153 CSSSelectorList selectorList = CSSParser::parseSelector( |
| 154 CSSParserContext(UASheetMode, nullptr), nullptr, selector); | 154 CSSParserContext(UASheetMode, nullptr), nullptr, selector); |
| 155 if (!selectorList.isValid()) | 155 if (!selectorList.isValid()) |
| 156 continue; | 156 continue; |
| 157 | 157 |
| 158 // Only accept Compound Selectors, since they're cheaper to match. | 158 // Only accept Compound Selectors, since they're cheaper to match. |
| 159 if (!allCompound(selectorList)) | 159 if (!allCompound(selectorList)) |
| 160 continue; | 160 continue; |
| 161 | 161 |
| 162 m_watchedCallbackSelectors.append( | 162 m_watchedCallbackSelectors.push_back( |
| 163 StyleRule::create(std::move(selectorList), callbackPropertySet)); | 163 StyleRule::create(std::move(selectorList), callbackPropertySet)); |
| 164 } | 164 } |
| 165 document().styleEngine().watchedSelectorsChanged(); | 165 document().styleEngine().watchedSelectorsChanged(); |
| 166 } | 166 } |
| 167 | 167 |
| 168 DEFINE_TRACE(CSSSelectorWatch) { | 168 DEFINE_TRACE(CSSSelectorWatch) { |
| 169 visitor->trace(m_watchedCallbackSelectors); | 169 visitor->trace(m_watchedCallbackSelectors); |
| 170 visitor->trace(m_document); | 170 visitor->trace(m_document); |
| 171 Supplement<Document>::trace(visitor); | 171 Supplement<Document>::trace(visitor); |
| 172 } | 172 } |
| 173 | 173 |
| 174 } // namespace blink | 174 } // namespace blink |
| OLD | NEW |