OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) | 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) |
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) | 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) |
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All r
ights reserved. |
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 case CSSSelector::PseudoAfter: | 52 case CSSSelector::PseudoAfter: |
53 usesBeforeAfterRules = true; | 53 usesBeforeAfterRules = true; |
54 break; | 54 break; |
55 default: | 55 default: |
56 break; | 56 break; |
57 } | 57 } |
58 } | 58 } |
59 | 59 |
60 void RuleFeatureSet::add(const RuleFeatureSet& other) | 60 void RuleFeatureSet::add(const RuleFeatureSet& other) |
61 { | 61 { |
62 HashSet<AtomicStringImpl*>::const_iterator end = other.idsInRules.end(); | 62 HashSet<StringImpl*>::const_iterator end = other.idsInRules.end(); |
63 for (HashSet<AtomicStringImpl*>::const_iterator it = other.idsInRules.begin(
); it != end; ++it) | 63 for (HashSet<StringImpl*>::const_iterator it = other.idsInRules.begin(); it
!= end; ++it) |
64 idsInRules.add(*it); | 64 idsInRules.add(*it); |
65 end = other.classesInRules.end(); | 65 end = other.classesInRules.end(); |
66 for (HashSet<AtomicStringImpl*>::const_iterator it = other.classesInRules.be
gin(); it != end; ++it) | 66 for (HashSet<StringImpl*>::const_iterator it = other.classesInRules.begin();
it != end; ++it) |
67 classesInRules.add(*it); | 67 classesInRules.add(*it); |
68 end = other.attrsInRules.end(); | 68 end = other.attrsInRules.end(); |
69 for (HashSet<AtomicStringImpl*>::const_iterator it = other.attrsInRules.begi
n(); it != end; ++it) | 69 for (HashSet<StringImpl*>::const_iterator it = other.attrsInRules.begin(); i
t != end; ++it) |
70 attrsInRules.add(*it); | 70 attrsInRules.add(*it); |
71 siblingRules.append(other.siblingRules); | 71 siblingRules.append(other.siblingRules); |
72 uncommonAttributeRules.append(other.uncommonAttributeRules); | 72 uncommonAttributeRules.append(other.uncommonAttributeRules); |
73 usesFirstLineRules = usesFirstLineRules || other.usesFirstLineRules; | 73 usesFirstLineRules = usesFirstLineRules || other.usesFirstLineRules; |
74 usesBeforeAfterRules = usesBeforeAfterRules || other.usesBeforeAfterRules; | 74 usesBeforeAfterRules = usesBeforeAfterRules || other.usesBeforeAfterRules; |
75 } | 75 } |
76 | 76 |
77 void RuleFeatureSet::clear() | 77 void RuleFeatureSet::clear() |
78 { | 78 { |
79 idsInRules.clear(); | 79 idsInRules.clear(); |
80 classesInRules.clear(); | 80 classesInRules.clear(); |
81 attrsInRules.clear(); | 81 attrsInRules.clear(); |
82 siblingRules.clear(); | 82 siblingRules.clear(); |
83 uncommonAttributeRules.clear(); | 83 uncommonAttributeRules.clear(); |
84 usesFirstLineRules = false; | 84 usesFirstLineRules = false; |
85 usesBeforeAfterRules = false; | 85 usesBeforeAfterRules = false; |
86 } | 86 } |
87 | 87 |
88 void RuleFeatureSet::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const | 88 void RuleFeatureSet::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const |
89 { | 89 { |
90 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS); | 90 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS); |
91 info.addMember(idsInRules, "idsInRules"); | 91 info.addMember(idsInRules, "idsInRules"); |
92 info.addMember(classesInRules, "classesInRules"); | 92 info.addMember(classesInRules, "classesInRules"); |
93 info.addMember(attrsInRules, "attrsInRules"); | 93 info.addMember(attrsInRules, "attrsInRules"); |
94 info.addMember(siblingRules, "siblingRules"); | 94 info.addMember(siblingRules, "siblingRules"); |
95 info.addMember(uncommonAttributeRules, "uncommonAttributeRules"); | 95 info.addMember(uncommonAttributeRules, "uncommonAttributeRules"); |
96 } | 96 } |
97 | 97 |
98 } // namespace WebCore | 98 } // namespace WebCore |
OLD | NEW |