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) 2012 Google Inc. All rights reserved. | 4 * Copyright (C) 2012 Google Inc. All rights reserved. |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
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 19 matching lines...) Expand all Loading... |
30 #include "CSSStyleRule.h" | 30 #include "CSSStyleRule.h" |
31 #include "CSSStyleSheet.h" | 31 #include "CSSStyleSheet.h" |
32 #include "ContentDistributor.h" | 32 #include "ContentDistributor.h" |
33 #include "ContextFeatures.h" | 33 #include "ContextFeatures.h" |
34 #include "ElementShadow.h" | 34 #include "ElementShadow.h" |
35 #include "HTMLNames.h" | 35 #include "HTMLNames.h" |
36 #include "HTMLStyleElement.h" | 36 #include "HTMLStyleElement.h" |
37 #include "RuleFeature.h" | 37 #include "RuleFeature.h" |
38 #include "RuleSet.h" | 38 #include "RuleSet.h" |
39 #include "ShadowRoot.h" | 39 #include "ShadowRoot.h" |
40 #include "WebCoreMemoryInstrumentation.h" | |
41 #include <wtf/MemoryInstrumentationHashMap.h> | |
42 #include <wtf/MemoryInstrumentationHashSet.h> | |
43 #include <wtf/MemoryInstrumentationVector.h> | |
44 | 40 |
45 namespace WebCore { | 41 namespace WebCore { |
46 | 42 |
47 StyleScopeResolver::StyleScopeResolver() | 43 StyleScopeResolver::StyleScopeResolver() |
48 : m_stackParent(0) | 44 : m_stackParent(0) |
49 , m_stackParentBoundsIndex(0) | 45 , m_stackParentBoundsIndex(0) |
50 { | 46 { |
51 } | 47 } |
52 | 48 |
53 StyleScopeResolver::~StyleScopeResolver() | 49 StyleScopeResolver::~StyleScopeResolver() |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 // applied to the element or not. So we can quickly exit this method | 225 // applied to the element or not. So we can quickly exit this method |
230 // by using the flag. | 226 // by using the flag. |
231 for (ShadowRoot* shadowRoot = shadow->youngestShadowRoot(); shadowRoot; shad
owRoot = shadowRoot->olderShadowRoot()) { | 227 for (ShadowRoot* shadowRoot = shadow->youngestShadowRoot(); shadowRoot; shad
owRoot = shadowRoot->olderShadowRoot()) { |
232 if (RuleSet* ruleSet = atHostRuleSetFor(shadowRoot)) | 228 if (RuleSet* ruleSet = atHostRuleSetFor(shadowRoot)) |
233 matchedRules.append(ruleSet); | 229 matchedRules.append(ruleSet); |
234 if (!ScopeContentDistribution::hasShadowElement(shadowRoot)) | 230 if (!ScopeContentDistribution::hasShadowElement(shadowRoot)) |
235 break; | 231 break; |
236 } | 232 } |
237 } | 233 } |
238 | 234 |
239 void StyleScopeResolver::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) c
onst | |
240 { | |
241 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS); | |
242 info.addMember(m_authorStyles, "authorStyles"); | |
243 info.addMember(m_stack, "stack"); | |
244 info.addMember(m_atHostRules, "atHostRules"); | |
245 info.addMember(m_stackParent, "stackParent"); | |
246 } | |
247 | |
248 } | 235 } |
249 | 236 |
OLD | NEW |