OLD | NEW |
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 * Copyright (C) 2013 Google Inc. All rights reserved. | 4 * Copyright (C) 2013 Google Inc. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 26 matching lines...) Expand all Loading... |
37 class StyleRule; | 37 class StyleRule; |
38 class StyleSheetContents; | 38 class StyleSheetContents; |
39 | 39 |
40 class InspectorCSSOMWrappers { | 40 class InspectorCSSOMWrappers { |
41 public: | 41 public: |
42 // WARNING. This will construct CSSOM wrappers for all style rules and cache
them in a map for significant memory cost. | 42 // WARNING. This will construct CSSOM wrappers for all style rules and cache
them in a map for significant memory cost. |
43 // It is here to support inspector. Don't use for any regular engine functio
ns. | 43 // It is here to support inspector. Don't use for any regular engine functio
ns. |
44 CSSStyleRule* getWrapperForRuleInSheets(StyleRule*, DocumentStyleSheetCollec
tion*); | 44 CSSStyleRule* getWrapperForRuleInSheets(StyleRule*, DocumentStyleSheetCollec
tion*); |
45 void collectFromStyleSheetIfNeeded(CSSStyleSheet*); | 45 void collectFromStyleSheetIfNeeded(CSSStyleSheet*); |
46 | 46 |
47 void reportMemoryUsage(MemoryObjectInfo*) const; | |
48 | |
49 private: | 47 private: |
50 template <class ListType> | 48 template <class ListType> |
51 void collect(ListType*); | 49 void collect(ListType*); |
52 | 50 |
53 void collectFromStyleSheetContents(HashSet<RefPtr<CSSStyleSheet> >& sheetWra
pperSet, StyleSheetContents*); | 51 void collectFromStyleSheetContents(HashSet<RefPtr<CSSStyleSheet> >& sheetWra
pperSet, StyleSheetContents*); |
54 void collectFromStyleSheets(const Vector<RefPtr<CSSStyleSheet> >&); | 52 void collectFromStyleSheets(const Vector<RefPtr<CSSStyleSheet> >&); |
55 void collectFromDocumentStyleSheetCollection(DocumentStyleSheetCollection*); | 53 void collectFromDocumentStyleSheetCollection(DocumentStyleSheetCollection*); |
56 | 54 |
57 HashMap<StyleRule*, RefPtr<CSSStyleRule> > m_styleRuleToCSSOMWrapperMap; | 55 HashMap<StyleRule*, RefPtr<CSSStyleRule> > m_styleRuleToCSSOMWrapperMap; |
58 HashSet<RefPtr<CSSStyleSheet> > m_styleSheetCSSOMWrapperSet; | 56 HashSet<RefPtr<CSSStyleSheet> > m_styleSheetCSSOMWrapperSet; |
59 }; | 57 }; |
60 | 58 |
61 } // namespace WebCore | 59 } // namespace WebCore |
62 | 60 |
63 #endif // InspectorCSSOMWrappers_h | 61 #endif // InspectorCSSOMWrappers_h |
OLD | NEW |