| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
| 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 * Boston, MA 02110-1301, USA. | 21 * Boston, MA 02110-1301, USA. |
| 22 * | 22 * |
| 23 */ | 23 */ |
| 24 | 24 |
| 25 #ifndef ComputedStyle_h | 25 #ifndef ComputedStyle_h |
| 26 #define ComputedStyle_h | 26 #define ComputedStyle_h |
| 27 | 27 |
| 28 #include "core/CSSPropertyNames.h" | 28 #include "core/CSSPropertyNames.h" |
| 29 #include "core/CoreExport.h" | 29 #include "core/CoreExport.h" |
| 30 #include "core/style/BorderValue.h" | 30 #include "core/style/BorderValue.h" |
| 31 #include "core/style/ComputedStyleConstants.h" |
| 31 #include "core/style/CounterDirectives.h" | 32 #include "core/style/CounterDirectives.h" |
| 32 #include "core/style/DataRef.h" | 33 #include "core/style/DataRef.h" |
| 33 #include "core/style/ComputedStyleConstants.h" | |
| 34 #include "core/style/LineClampValue.h" | 34 #include "core/style/LineClampValue.h" |
| 35 #include "core/style/NinePieceImage.h" | 35 #include "core/style/NinePieceImage.h" |
| 36 #include "core/style/SVGComputedStyle.h" | 36 #include "core/style/SVGComputedStyle.h" |
| 37 #include "core/style/StyleBackgroundData.h" | 37 #include "core/style/StyleBackgroundData.h" |
| 38 #include "core/style/StyleBoxData.h" | 38 #include "core/style/StyleBoxData.h" |
| 39 #include "core/style/StyleContentAlignmentData.h" | 39 #include "core/style/StyleContentAlignmentData.h" |
| 40 #include "core/style/StyleDeprecatedFlexibleBoxData.h" | 40 #include "core/style/StyleDeprecatedFlexibleBoxData.h" |
| 41 #include "core/style/StyleDifference.h" | 41 #include "core/style/StyleDifference.h" |
| 42 #include "core/style/StyleFilterData.h" | 42 #include "core/style/StyleFilterData.h" |
| 43 #include "core/style/StyleFlexibleBoxData.h" | 43 #include "core/style/StyleFlexibleBoxData.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 64 #include "platform/fonts/FontDescription.h" | 64 #include "platform/fonts/FontDescription.h" |
| 65 #include "platform/geometry/FloatRoundedRect.h" | 65 #include "platform/geometry/FloatRoundedRect.h" |
| 66 #include "platform/geometry/LayoutRectOutsets.h" | 66 #include "platform/geometry/LayoutRectOutsets.h" |
| 67 #include "platform/graphics/Color.h" | 67 #include "platform/graphics/Color.h" |
| 68 #include "platform/scroll/ScrollTypes.h" | 68 #include "platform/scroll/ScrollTypes.h" |
| 69 #include "platform/text/TextDirection.h" | 69 #include "platform/text/TextDirection.h" |
| 70 #include "platform/text/UnicodeBidi.h" | 70 #include "platform/text/UnicodeBidi.h" |
| 71 #include "platform/transforms/TransformOperations.h" | 71 #include "platform/transforms/TransformOperations.h" |
| 72 #include "wtf/Forward.h" | 72 #include "wtf/Forward.h" |
| 73 #include "wtf/LeakAnnotations.h" | 73 #include "wtf/LeakAnnotations.h" |
| 74 #include "wtf/OwnPtr.h" | |
| 75 #include "wtf/RefCounted.h" | 74 #include "wtf/RefCounted.h" |
| 76 #include "wtf/Vector.h" | 75 #include "wtf/Vector.h" |
| 76 #include <memory> |
| 77 | 77 |
| 78 template<typename T, typename U> inline bool compareEqual(const T& t, const U& u
) { return t == static_cast<T>(u); } | 78 template<typename T, typename U> inline bool compareEqual(const T& t, const U& u
) { return t == static_cast<T>(u); } |
| 79 | 79 |
| 80 #define SET_VAR(group, variable, value) \ | 80 #define SET_VAR(group, variable, value) \ |
| 81 if (!compareEqual(group->variable, value)) \ | 81 if (!compareEqual(group->variable, value)) \ |
| 82 group.access()->variable = value | 82 group.access()->variable = value |
| 83 | 83 |
| 84 #define SET_NESTED_VAR(group, base, variable, value) \ | 84 #define SET_NESTED_VAR(group, base, variable, value) \ |
| 85 if (!compareEqual(group->base->variable, value)) \ | 85 if (!compareEqual(group->base->variable, value)) \ |
| 86 group.access()->base.access()->variable = value | 86 group.access()->base.access()->variable = value |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 DataRef<StyleVisualData> visual; | 146 DataRef<StyleVisualData> visual; |
| 147 DataRef<StyleBackgroundData> m_background; | 147 DataRef<StyleBackgroundData> m_background; |
| 148 DataRef<StyleSurroundData> surround; | 148 DataRef<StyleSurroundData> surround; |
| 149 DataRef<StyleRareNonInheritedData> rareNonInheritedData; | 149 DataRef<StyleRareNonInheritedData> rareNonInheritedData; |
| 150 | 150 |
| 151 // inherited attributes | 151 // inherited attributes |
| 152 DataRef<StyleRareInheritedData> rareInheritedData; | 152 DataRef<StyleRareInheritedData> rareInheritedData; |
| 153 DataRef<StyleInheritedData> inherited; | 153 DataRef<StyleInheritedData> inherited; |
| 154 | 154 |
| 155 // list of associated pseudo styles | 155 // list of associated pseudo styles |
| 156 OwnPtr<PseudoStyleCache> m_cachedPseudoStyles; | 156 std::unique_ptr<PseudoStyleCache> m_cachedPseudoStyles; |
| 157 | 157 |
| 158 DataRef<SVGComputedStyle> m_svgStyle; | 158 DataRef<SVGComputedStyle> m_svgStyle; |
| 159 | 159 |
| 160 // !START SYNC!: Keep this in sync with the copy constructor in ComputedStyle.cp
p and implicitlyInherited() in StyleResolver.cpp | 160 // !START SYNC!: Keep this in sync with the copy constructor in ComputedStyle.cp
p and implicitlyInherited() in StyleResolver.cpp |
| 161 | 161 |
| 162 // inherit | 162 // inherit |
| 163 struct InheritedFlags { | 163 struct InheritedFlags { |
| 164 bool operator==(const InheritedFlags& other) const | 164 bool operator==(const InheritedFlags& other) const |
| 165 { | 165 { |
| 166 return (_empty_cells == other._empty_cells) | 166 return (_empty_cells == other._empty_cells) |
| (...skipping 1858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2025 } | 2025 } |
| 2026 | 2026 |
| 2027 inline bool ComputedStyle::hasPseudoElementStyle() const | 2027 inline bool ComputedStyle::hasPseudoElementStyle() const |
| 2028 { | 2028 { |
| 2029 return noninherited_flags.pseudoBits & ElementPseudoIdMask; | 2029 return noninherited_flags.pseudoBits & ElementPseudoIdMask; |
| 2030 } | 2030 } |
| 2031 | 2031 |
| 2032 } // namespace blink | 2032 } // namespace blink |
| 2033 | 2033 |
| 2034 #endif // ComputedStyle_h | 2034 #endif // ComputedStyle_h |
| OLD | NEW |