Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: third_party/WebKit/Source/core/style/ComputedStyle.h

Issue 2008263002: Remove unnecessary includes from ComputedStyle.h and from its includes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
11 * version 2 of the License, or (at your option) any later version. 11 * version 2 of the License, or (at your option) any later version.
12 * 12 *
13 * This library is distributed in the hope that it will be useful, 13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details. 16 * Library General Public License for more details.
17 * 17 *
18 * You should have received a copy of the GNU Library General Public License 18 * You should have received a copy of the GNU Library General Public License
19 * along with this library; see the file COPYING.LIB. If not, write to 19 * along with this library; see the file COPYING.LIB. If not, write to
20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
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/animation/css/CSSAnimationData.h"
31 #include "core/animation/css/CSSTransitionData.h"
32 #include "core/css/CSSPrimitiveValue.h" 30 #include "core/css/CSSPrimitiveValue.h"
33 #include "core/style/BorderValue.h" 31 #include "core/style/BorderValue.h"
34 #include "core/style/CounterDirectives.h" 32 #include "core/style/CounterDirectives.h"
35 #include "core/style/DataRef.h" 33 #include "core/style/DataRef.h"
36 #include "core/style/ComputedStyleConstants.h" 34 #include "core/style/ComputedStyleConstants.h"
37 #include "core/style/LineClampValue.h" 35 #include "core/style/LineClampValue.h"
38 #include "core/style/NinePieceImage.h" 36 #include "core/style/NinePieceImage.h"
39 #include "core/style/OutlineValue.h"
40 #include "core/style/SVGComputedStyle.h" 37 #include "core/style/SVGComputedStyle.h"
41 #include "core/style/ShapeValue.h"
42 #include "core/style/StyleBackgroundData.h" 38 #include "core/style/StyleBackgroundData.h"
43 #include "core/style/StyleBoxData.h" 39 #include "core/style/StyleBoxData.h"
44 #include "core/style/StyleContentAlignmentData.h" 40 #include "core/style/StyleContentAlignmentData.h"
45 #include "core/style/StyleDeprecatedFlexibleBoxData.h" 41 #include "core/style/StyleDeprecatedFlexibleBoxData.h"
46 #include "core/style/StyleDifference.h" 42 #include "core/style/StyleDifference.h"
47 #include "core/style/StyleFilterData.h" 43 #include "core/style/StyleFilterData.h"
48 #include "core/style/StyleFlexibleBoxData.h" 44 #include "core/style/StyleFlexibleBoxData.h"
49 #include "core/style/StyleGridData.h" 45 #include "core/style/StyleGridData.h"
50 #include "core/style/StyleGridItemData.h" 46 #include "core/style/StyleGridItemData.h"
51 #include "core/style/StyleInheritedData.h" 47 #include "core/style/StyleInheritedData.h"
52 #include "core/style/StyleMotionRotation.h" 48 #include "core/style/StyleMotionRotation.h"
53 #include "core/style/StyleMultiColData.h" 49 #include "core/style/StyleMultiColData.h"
54 #include "core/style/StyleRareInheritedData.h" 50 #include "core/style/StyleRareInheritedData.h"
55 #include "core/style/StyleRareNonInheritedData.h" 51 #include "core/style/StyleRareNonInheritedData.h"
56 #include "core/style/StyleReflection.h" 52 #include "core/style/StyleReflection.h"
57 #include "core/style/StyleScrollSnapData.h"
58 #include "core/style/StyleSelfAlignmentData.h" 53 #include "core/style/StyleSelfAlignmentData.h"
59 #include "core/style/StyleSurroundData.h" 54 #include "core/style/StyleSurroundData.h"
60 #include "core/style/StyleTransformData.h" 55 #include "core/style/StyleTransformData.h"
61 #include "core/style/StyleVisualData.h" 56 #include "core/style/StyleVisualData.h"
62 #include "core/style/StyleWillChangeData.h" 57 #include "core/style/StyleWillChangeData.h"
63 #include "core/style/TransformOrigin.h" 58 #include "core/style/TransformOrigin.h"
64 #include "platform/Length.h" 59 #include "platform/Length.h"
65 #include "platform/LengthBox.h" 60 #include "platform/LengthBox.h"
66 #include "platform/LengthPoint.h" 61 #include "platform/LengthPoint.h"
67 #include "platform/LengthSize.h" 62 #include "platform/LengthSize.h"
68 #include "platform/ThemeTypes.h" 63 #include "platform/ThemeTypes.h"
69 #include "platform/fonts/FontBaseline.h"
70 #include "platform/fonts/FontDescription.h" 64 #include "platform/fonts/FontDescription.h"
71 #include "platform/geometry/FloatRoundedRect.h" 65 #include "platform/geometry/FloatRoundedRect.h"
72 #include "platform/geometry/LayoutRectOutsets.h" 66 #include "platform/geometry/LayoutRectOutsets.h"
73 #include "platform/graphics/Color.h" 67 #include "platform/graphics/Color.h"
74 #include "platform/graphics/GraphicsTypes.h"
75 #include "platform/scroll/ScrollableArea.h" 68 #include "platform/scroll/ScrollableArea.h"
76 #include "platform/text/TextDirection.h" 69 #include "platform/text/TextDirection.h"
77 #include "platform/text/TextRun.h"
78 #include "platform/text/UnicodeBidi.h" 70 #include "platform/text/UnicodeBidi.h"
79 #include "platform/transforms/TransformOperations.h" 71 #include "platform/transforms/TransformOperations.h"
80 #include "wtf/Forward.h" 72 #include "wtf/Forward.h"
81 #include "wtf/LeakAnnotations.h" 73 #include "wtf/LeakAnnotations.h"
82 #include "wtf/OwnPtr.h" 74 #include "wtf/OwnPtr.h"
83 #include "wtf/RefCounted.h" 75 #include "wtf/RefCounted.h"
84 #include "wtf/StdLibExtras.h"
85 #include "wtf/Vector.h" 76 #include "wtf/Vector.h"
86 77
87 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); }
88 79
89 #define SET_VAR(group, variable, value) \ 80 #define SET_VAR(group, variable, value) \
90 if (!compareEqual(group->variable, value)) \ 81 if (!compareEqual(group->variable, value)) \
91 group.access()->variable = value 82 group.access()->variable = value
92 83
93 #define SET_NESTED_VAR(group, base, variable, value) \ 84 #define SET_NESTED_VAR(group, base, variable, value) \
94 if (!compareEqual(group->base->variable, value)) \ 85 if (!compareEqual(group->base->variable, value)) \
95 group.access()->base.access()->variable = value 86 group.access()->base.access()->variable = value
96 87
97 #define SET_VAR_WITH_SETTER(group, getter, setter, value) \ 88 #define SET_VAR_WITH_SETTER(group, getter, setter, value) \
98 if (!compareEqual(group->getter(), value)) \ 89 if (!compareEqual(group->getter(), value)) \
99 group.access()->setter(value) 90 group.access()->setter(value)
100 91
101 #define SET_BORDERVALUE_COLOR(group, variable, value) \ 92 #define SET_BORDERVALUE_COLOR(group, variable, value) \
102 if (!compareEqual(group->variable.color(), value)) \ 93 if (!compareEqual(group->variable.color(), value)) \
103 group.access()->variable.setColor(value) 94 group.access()->variable.setColor(value)
104 95
105 namespace blink { 96 namespace blink {
106 97
107 using std::max; 98 using std::max;
108 99
109 class FilterOperations; 100 class FilterOperations;
110 101
111 class AppliedTextDecoration; 102 class AppliedTextDecoration;
112 class BorderData; 103 class BorderData;
113 struct BorderEdge; 104 struct BorderEdge;
105 class CSSAnimationData;
106 class CSSTransitionData;
114 class CSSVariableData; 107 class CSSVariableData;
115 class Font; 108 class Font;
116 class FontMetrics; 109 class FontMetrics;
117 class RotateTransformOperation; 110 class RotateTransformOperation;
118 class ScaleTransformOperation; 111 class ScaleTransformOperation;
119 class ShadowList; 112 class ShadowList;
113 class ShapeValue;
120 class StyleImage; 114 class StyleImage;
121 class StyleInheritedData; 115 class StyleInheritedData;
122 class StylePath; 116 class StylePath;
123 class StyleResolver; 117 class StyleResolver;
124 class TransformationMatrix; 118 class TransformationMatrix;
125 class TranslateTransformOperation; 119 class TranslateTransformOperation;
126 120
127 class ContentData; 121 class ContentData;
128 122
129 typedef Vector<RefPtr<ComputedStyle>, 4> PseudoStyleCache; 123 typedef Vector<RefPtr<ComputedStyle>, 4> PseudoStyleCache;
(...skipping 1912 matching lines...) Expand 10 before | Expand all | Expand 10 after
2042 } 2036 }
2043 2037
2044 inline bool ComputedStyle::hasPseudoElementStyle() const 2038 inline bool ComputedStyle::hasPseudoElementStyle() const
2045 { 2039 {
2046 return noninherited_flags.pseudoBits & ElementPseudoIdMask; 2040 return noninherited_flags.pseudoBits & ElementPseudoIdMask;
2047 } 2041 }
2048 2042
2049 } // namespace blink 2043 } // namespace blink
2050 2044
2051 #endif // ComputedStyle_h 2045 #endif // ComputedStyle_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.cpp ('k') | third_party/WebKit/Source/core/style/ComputedStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698