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 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 public: | 83 public: |
84 CSSPropertyValue(CSSPropertyID property, CSSValue* value) | 84 CSSPropertyValue(CSSPropertyID property, CSSValue* value) |
85 : property(property), value(value) { } | 85 : property(property), value(value) { } |
86 // Stores value=propertySet.getPropertyCSSValue(id).get(). | 86 // Stores value=propertySet.getPropertyCSSValue(id).get(). |
87 CSSPropertyValue(CSSPropertyID, const StylePropertySet&); | 87 CSSPropertyValue(CSSPropertyID, const StylePropertySet&); |
88 CSSPropertyID property; | 88 CSSPropertyID property; |
89 RawPtrWillBeMember<CSSValue> value; | 89 RawPtrWillBeMember<CSSValue> value; |
90 }; | 90 }; |
91 | 91 |
92 // This class selects a RenderStyle for a given element based on a collection of
stylesheets. | 92 // This class selects a RenderStyle for a given element based on a collection of
stylesheets. |
93 class StyleResolver FINAL : public NoBaseWillBeGarbageCollectedFinalized<StyleRe
solver> { | 93 class StyleResolver final : public NoBaseWillBeGarbageCollectedFinalized<StyleRe
solver> { |
94 WTF_MAKE_NONCOPYABLE(StyleResolver); WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED
; | 94 WTF_MAKE_NONCOPYABLE(StyleResolver); WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED
; |
95 public: | 95 public: |
96 explicit StyleResolver(Document&); | 96 explicit StyleResolver(Document&); |
97 virtual ~StyleResolver(); | 97 virtual ~StyleResolver(); |
98 | 98 |
99 // FIXME: StyleResolver should not be keeping tree-walk state. | 99 // FIXME: StyleResolver should not be keeping tree-walk state. |
100 // These should move to some global tree-walk state, or should be contained
in a | 100 // These should move to some global tree-walk state, or should be contained
in a |
101 // TreeWalkContext or similar which is passed in to StyleResolver methods wh
en available. | 101 // TreeWalkContext or similar which is passed in to StyleResolver methods wh
en available. |
102 // Using these during tree walk will allow style selector to optimize child
and descendant selector lookups. | 102 // Using these during tree walk will allow style selector to optimize child
and descendant selector lookups. |
103 void pushParentElement(Element&); | 103 void pushParentElement(Element&); |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 OwnPtr<StyleResolverStats> m_styleResolverStatsTotals; | 304 OwnPtr<StyleResolverStats> m_styleResolverStatsTotals; |
305 unsigned m_styleResolverStatsSequence; | 305 unsigned m_styleResolverStatsSequence; |
306 | 306 |
307 // Use only for Internals::updateStyleAndReturnAffectedElementCount. | 307 // Use only for Internals::updateStyleAndReturnAffectedElementCount. |
308 unsigned m_accessCount; | 308 unsigned m_accessCount; |
309 }; | 309 }; |
310 | 310 |
311 } // namespace blink | 311 } // namespace blink |
312 | 312 |
313 #endif // StyleResolver_h | 313 #endif // StyleResolver_h |
OLD | NEW |