OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef ActiveStyleSheets_h |
| 6 #define ActiveStyleSheets_h |
| 7 |
| 8 #include "platform/heap/HeapAllocator.h" |
| 9 |
| 10 namespace blink { |
| 11 |
| 12 class CSSStyleSheet; |
| 13 class RuleSet; |
| 14 class StyleEngine; |
| 15 class TreeScope; |
| 16 |
| 17 using ActiveStyleSheet = std::pair<Member<CSSStyleSheet>, Member<RuleSet>>; |
| 18 using ActiveStyleSheetVector = HeapVector<ActiveStyleSheet>; |
| 19 |
| 20 enum ActiveSheetsChange { |
| 21 NoActiveSheetsChanged, // Nothing changed. |
| 22 ActiveSheetsChanged, // Sheets were added and/or inserted. |
| 23 ActiveSheetsAppended // Only additions, and all appended. |
| 24 }; |
| 25 |
| 26 ActiveSheetsChange compareActiveStyleSheets( |
| 27 const ActiveStyleSheetVector& oldStyleSheets, |
| 28 const ActiveStyleSheetVector& newStyleSheets, |
| 29 HeapVector<Member<RuleSet>>& changedRuleSets); |
| 30 |
| 31 void applyRuleSetChanges(StyleEngine&, TreeScope&, |
| 32 const ActiveStyleSheetVector& oldStyleSheets, |
| 33 const ActiveStyleSheetVector& newStyleSheets); |
| 34 |
| 35 } // namespace blink |
| 36 |
| 37 #endif // ActiveStyleSheets_h |
OLD | NEW |