| Differences between
and this patch
- WebCore/ChangeLog +26 lines
Lines 1-3 WebCore/ChangeLog_sec1
1
2010-12-13  Luke Macpherson   <macpherson@chromium.org>
2
3
        Reviewed by NOBODY (OOPS!).
4
5
        Convert CSSStyleSelector::applyProperty to use function pointers
6
        https://bugs.webkit.org/show_bug.cgi?id=46592
7
8
        No new tests. (OOPS!)
9
10
        * WebCore.xcodeproj/project.pbxproj:
11
        * css/CSSStyleApplicator.cpp: Added.
12
        (WebCore::CSSStyleApplicator::mapFillAttachment):
13
        (WebCore::CSSStyleApplicator::mapFillClip):
14
        (WebCore::CSSStyleApplicator::mapFillComposite):
15
        (WebCore::CSSStyleApplicator::mapFillOrigin):
16
        (WebCore::CSSStyleApplicator::mapFillSize):
17
        (WebCore::CSSPropertyInvalid):
18
        (WebCore::CSSPropertyBorderCollapse):
19
        (WebCore::CSSStyleApplicator::~CSSStyleApplicator):
20
        (WebCore::CSSStyleApplicator::CSSStyleApplicator):
21
        * css/CSSStyleApplicator.h: Added.
22
        * css/CSSStyleSelector.cpp:
23
        (WebCore::CSSStyleSelector::applyProperty):
24
        (WebCore::CSSStyleSelector::mapFillComposite):
25
        (WebCore::CSSStyleSelector::mapFillSize):
26
1
2010-12-13  Eric Carlson  <eric.carlson@apple.com>
27
2010-12-13  Eric Carlson  <eric.carlson@apple.com>
2
28
3
        Reviewed by Antti Koivisto.
29
        Reviewed by Antti Koivisto.
- WebCore/WebCore.xcodeproj/project.pbxproj +8 lines
Lines 1602-1607 WebCore/WebCore.xcodeproj/project.pbxproj_sec1
1602
		7AFD4A8B1131C2760035B883 /* ScriptBreakpoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AFD4A8A1131C2760035B883 /* ScriptBreakpoint.h */; settings = {ATTRIBUTES = (Private, ); }; };
1602
		7AFD4A8B1131C2760035B883 /* ScriptBreakpoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AFD4A8A1131C2760035B883 /* ScriptBreakpoint.h */; settings = {ATTRIBUTES = (Private, ); }; };
1603
		7AFD4FF4113277B60035B883 /* ScriptDebugListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AFD4FF3113277B60035B883 /* ScriptDebugListener.h */; settings = {ATTRIBUTES = (Private, ); }; };
1603
		7AFD4FF4113277B60035B883 /* ScriptDebugListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AFD4FF3113277B60035B883 /* ScriptDebugListener.h */; settings = {ATTRIBUTES = (Private, ); }; };
1604
		7E33CD01127F340D00BE8F17 /* PurgePriority.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E33CD00127F340D00BE8F17 /* PurgePriority.h */; settings = {ATTRIBUTES = (Private, ); }; };
1604
		7E33CD01127F340D00BE8F17 /* PurgePriority.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E33CD00127F340D00BE8F17 /* PurgePriority.h */; settings = {ATTRIBUTES = (Private, ); }; };
1605
		802C0F4712B1A20800189B0C /* CSSStyleApplicator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 802C0F4512B1A20800189B0C /* CSSStyleApplicator.cpp */; };
1606
		802C0F4812B1A20800189B0C /* CSSStyleApplicator.h in Headers */ = {isa = PBXBuildFile; fileRef = 802C0F4612B1A20800189B0C /* CSSStyleApplicator.h */; };
1605
		81A7325E1210189B00FC0D9E /* IDBCursor.h in Headers */ = {isa = PBXBuildFile; fileRef = 81A7325D1210189B00FC0D9E /* IDBCursor.h */; };
1607
		81A7325E1210189B00FC0D9E /* IDBCursor.h in Headers */ = {isa = PBXBuildFile; fileRef = 81A7325D1210189B00FC0D9E /* IDBCursor.h */; };
1606
		81A73260121018A400FC0D9E /* IDBCursor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 81A7325F121018A400FC0D9E /* IDBCursor.cpp */; };
1608
		81A73260121018A400FC0D9E /* IDBCursor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 81A7325F121018A400FC0D9E /* IDBCursor.cpp */; };
1607
		81A73278121019E100FC0D9E /* IDBCursorBackendImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 81A73277121019E100FC0D9E /* IDBCursorBackendImpl.h */; };
1609
		81A73278121019E100FC0D9E /* IDBCursorBackendImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 81A73277121019E100FC0D9E /* IDBCursorBackendImpl.h */; };
Lines 7809-7814 WebCore/WebCore.xcodeproj/project.pbxproj_sec2
7809
		7AFD4A8A1131C2760035B883 /* ScriptBreakpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptBreakpoint.h; sourceTree = "<group>"; };
7811
		7AFD4A8A1131C2760035B883 /* ScriptBreakpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptBreakpoint.h; sourceTree = "<group>"; };
7810
		7AFD4FF3113277B60035B883 /* ScriptDebugListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptDebugListener.h; sourceTree = "<group>"; };
7812
		7AFD4FF3113277B60035B883 /* ScriptDebugListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptDebugListener.h; sourceTree = "<group>"; };
7811
		7E33CD00127F340D00BE8F17 /* PurgePriority.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PurgePriority.h; sourceTree = "<group>"; };
7813
		7E33CD00127F340D00BE8F17 /* PurgePriority.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PurgePriority.h; sourceTree = "<group>"; };
7814
		802C0F4512B1A20800189B0C /* CSSStyleApplicator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSStyleApplicator.cpp; sourceTree = "<group>"; };
7815
		802C0F4612B1A20800189B0C /* CSSStyleApplicator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSStyleApplicator.h; sourceTree = "<group>"; };
7812
		81A7325D1210189B00FC0D9E /* IDBCursor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBCursor.h; sourceTree = "<group>"; };
7816
		81A7325D1210189B00FC0D9E /* IDBCursor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBCursor.h; sourceTree = "<group>"; };
7813
		81A7325F121018A400FC0D9E /* IDBCursor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBCursor.cpp; sourceTree = "<group>"; };
7817
		81A7325F121018A400FC0D9E /* IDBCursor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBCursor.cpp; sourceTree = "<group>"; };
7814
		81A73277121019E100FC0D9E /* IDBCursorBackendImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBCursorBackendImpl.h; sourceTree = "<group>"; };
7818
		81A73277121019E100FC0D9E /* IDBCursorBackendImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBCursorBackendImpl.h; sourceTree = "<group>"; };
Lines 17815-17820 WebCore/WebCore.xcodeproj/project.pbxproj_sec3
17815
		F523D18402DE42E8018635CA /* css */ = {
17819
		F523D18402DE42E8018635CA /* css */ = {
17816
			isa = PBXGroup;
17820
			isa = PBXGroup;
17817
			children = (
17821
			children = (
17822
				802C0F4512B1A20800189B0C /* CSSStyleApplicator.cpp */,
17823
				802C0F4612B1A20800189B0C /* CSSStyleApplicator.h */,
17818
				93CA4C9C09DF93FA00DF8677 /* maketokenizer */,
17824
				93CA4C9C09DF93FA00DF8677 /* maketokenizer */,
17819
				A80E6CDA0A1989CA007FB8C5 /* Counter.h */,
17825
				A80E6CDA0A1989CA007FB8C5 /* Counter.h */,
17820
				930705C709E0C95F00B17FE4 /* Counter.idl */,
17826
				930705C709E0C95F00B17FE4 /* Counter.idl */,
Lines 21515-21520 WebCore/WebCore.xcodeproj/project.pbxproj_sec4
21515
				499B3EC5128CCC4700E726C2 /* PlatformCALayer.h in Headers */,
21521
				499B3EC5128CCC4700E726C2 /* PlatformCALayer.h in Headers */,
21516
				499B3ED7128CD31400E726C2 /* GraphicsLayerCA.h in Headers */,
21522
				499B3ED7128CD31400E726C2 /* GraphicsLayerCA.h in Headers */,
21517
				499B3EDD128DB50200E726C2 /* PlatformCAAnimation.h in Headers */,
21523
				499B3EDD128DB50200E726C2 /* PlatformCAAnimation.h in Headers */,
21524
				802C0F4812B1A20800189B0C /* CSSStyleApplicator.h in Headers */,
21518
			);
21525
			);
21519
			runOnlyForDeploymentPostprocessing = 0;
21526
			runOnlyForDeploymentPostprocessing = 0;
21520
		};
21527
		};
Lines 24102-24107 WebCore/WebCore.xcodeproj/project.pbxproj_sec5
24102
				499B3ED6128CD31400E726C2 /* GraphicsLayerCA.cpp in Sources */,
24109
				499B3ED6128CD31400E726C2 /* GraphicsLayerCA.cpp in Sources */,
24103
				4958782112A57DDF007238AC /* PlatformCAAnimationMac.mm in Sources */,
24110
				4958782112A57DDF007238AC /* PlatformCAAnimationMac.mm in Sources */,
24104
				4958782212A57DDF007238AC /* PlatformCALayerMac.mm in Sources */,
24111
				4958782212A57DDF007238AC /* PlatformCALayerMac.mm in Sources */,
24112
				802C0F4712B1A20800189B0C /* CSSStyleApplicator.cpp in Sources */,
24105
			);
24113
			);
24106
			runOnlyForDeploymentPostprocessing = 0;
24114
			runOnlyForDeploymentPostprocessing = 0;
24107
		};
24115
		};
- WebCore/css/CSSStyleApplicator.cpp +645 lines
Line 0 WebCore/css/CSSStyleApplicator.cpp_sec1
1
/*
2
 * CSSStyleApplicator.cpp
3
 *
4
 *  Created on: Dec 9, 2010
5
 *      Author: macpherson
6
 */
7
8
#include "config.h"
9
#include "RenderStyle.h"
10
#include "CSSPrimitiveValueMappings.h"
11
#include "CSSValueList.h"
12
#include "CSSStyleApplicator.h"
13
14
namespace WebCore {
15
16
#define DEFINE_INHERIT(Property) void CSSStyleApplicator::handleInherit##Property
17
18
#define DEFINE_INITIAL(Property) void CSSStyleApplicator::handleInitial##Property
19
20
#define DEFINE_VALUE(Property) void CSSStyleApplicator::handleValue##Property
21
22
#define DEFINE_HANDLE_INHERIT(Property, Setter, Getter) \
23
DEFINE_INHERIT(Property)(RenderStyle* style, RenderStyle* parentStyle) { \
24
    style->Setter(parentStyle->Getter()); \
25
}
26
27
#define DEFINE_HANDLE_INITIAL(Property, Setter, Getter) \
28
DEFINE_INITIAL(Property)(RenderStyle* style) { \
29
    style->Setter(RenderStyle::Getter()); \
30
}
31
32
#define DEFINE_HANDLE_VALUE(Property, Setter) \
33
DEFINE_VALUE(Property)(RenderStyle* style, RenderStyle*, CSSValue* value) { \
34
	if (value->isPrimitiveValue()) { \
35
	    CSSPrimitiveValue* p = static_cast<CSSPrimitiveValue*>(value); \
36
        style->Setter(*p); \
37
    } \
38
}
39
40
#define DEFINE_HANDLE_FILL_LAYER_INHERIT(Property, layerType, LayerType, prop, Prop) \
41
DEFINE_INHERIT(Property)(RenderStyle *style, RenderStyle *parentStyle) { \
42
    FillLayer* currChild = style->access##LayerType##Layers(); \
43
    FillLayer* prevChild = 0; \
44
    const FillLayer* currParent = parentStyle->layerType##Layers(); \
45
    while (currParent && currParent->is##Prop##Set()) { \
46
        if (!currChild) { \
47
            /* Need to make a new layer.*/ \
48
            currChild = new FillLayer(LayerType##FillLayer); \
49
            prevChild->setNext(currChild); \
50
        } \
51
        currChild->set##Prop(currParent->prop()); \
52
        prevChild = currChild; \
53
        currChild = prevChild->next(); \
54
        currParent = currParent->next(); \
55
    } \
56
    \
57
    while (currChild) { \
58
        /* Reset any remaining layers to not have the property set. */ \
59
        currChild->clear##Prop(); \
60
        currChild = currChild->next(); \
61
    } \
62
}
63
64
#define DEFINE_HANDLE_FILL_LAYER_INITIAL(Property, layerType, LayerType, prop, Prop) \
65
DEFINE_INITIAL(Property)(RenderStyle *style) { \
66
    FillLayer* currChild = style->access##LayerType##Layers(); \
67
    currChild->set##Prop(FillLayer::initialFill##Prop(LayerType##FillLayer)); \
68
    for (currChild = currChild->next(); currChild; currChild = currChild->next()) \
69
        currChild->clear##Prop(); \
70
}
71
72
#define DEFINE_HANDLE_FILL_LAYER_VALUE(Property, layerType, LayerType, prop, Prop) \
73
DEFINE_VALUE(Property)(RenderStyle *style, RenderStyle *rootElementStyle, CSSValue *value) { \
74
    FillLayer* currChild = style->access##LayerType##Layers(); \
75
    FillLayer* prevChild = 0; \
76
    if (value->isValueList()) { \
77
        /* Walk each value and put it into a layer, creating new layers as needed. */ \
78
        CSSValueList* valueList = static_cast<CSSValueList*>(value); \
79
        for (unsigned int i = 0; i < valueList->length(); i++) { \
80
            if (!currChild) { \
81
                /* Need to make a new layer to hold this value */ \
82
                currChild = new FillLayer(LayerType##FillLayer); \
83
                prevChild->setNext(currChild); \
84
            } \
85
            mapFill##Prop(style, rootElementStyle, currChild, valueList->itemWithoutBoundsCheck(i)); \
86
            prevChild = currChild; \
87
            currChild = currChild->next(); \
88
        } \
89
    } else { \
90
        mapFill##Prop(style, rootElementStyle, currChild, value); \
91
        currChild = currChild->next(); \
92
    } \
93
    while (currChild) { \
94
        /* Reset all remaining layers to not have the property set. */ \
95
        currChild->clear##Prop(); \
96
        currChild = currChild->next(); \
97
    } \
98
}
99
100
#define DEFINE_EQUIVALENT_PROPERTY(Property, Equivalent) \
101
DEFINE_INHERIT(Property)(RenderStyle *style, RenderStyle *parentStyle) {CSSStyleApplicator::handleInherit##Equivalent(style, parentStyle);} \
102
DEFINE_INITIAL(Property)(RenderStyle *style) {CSSStyleApplicator::handleInitial##Equivalent(style);} \
103
DEFINE_VALUE(Property)(RenderStyle *style, RenderStyle *rootElementStyle, CSSValue *value) {CSSStyleApplicator::handleValue##Equivalent(style, rootElementStyle, value);}
104
105
106
void CSSStyleApplicator::mapFillAttachment(RenderStyle*, RenderStyle*, FillLayer* layer, CSSValue* value)
107
{
108
	// XXX check that this is unreachable and then remove
109
    if (value->cssValueType() == CSSValue::CSS_INITIAL) {
110
        layer->setAttachment(FillLayer::initialFillAttachment(layer->type()));
111
        return;
112
    }
113
114
    if (!value->isPrimitiveValue())
115
        return;
116
117
    CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
118
    switch (primitiveValue->getIdent()) {
119
        case CSSValueFixed:
120
            layer->setAttachment(FixedBackgroundAttachment);
121
            break;
122
        case CSSValueScroll:
123
            layer->setAttachment(ScrollBackgroundAttachment);
124
            break;
125
        case CSSValueLocal:
126
            layer->setAttachment(LocalBackgroundAttachment);
127
            break;
128
        default:
129
            return;
130
    }
131
}
132
133
void CSSStyleApplicator::mapFillClip(RenderStyle*, RenderStyle*, FillLayer* layer, CSSValue* value)
134
{
135
	// XXX check that this is unreachable and then remove
136
    if (value->cssValueType() == CSSValue::CSS_INITIAL) {
137
        layer->setClip(FillLayer::initialFillClip(layer->type()));
138
        return;
139
    }
140
141
    if (!value->isPrimitiveValue())
142
        return;
143
144
    CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
145
    layer->setClip(*primitiveValue);
146
}
147
148
void CSSStyleApplicator::mapFillComposite(RenderStyle*, RenderStyle*, FillLayer* layer, CSSValue* value)
149
{
150
	// XXX check that this is unreachable and then remove
151
    if (value->cssValueType() == CSSValue::CSS_INITIAL) {
152
        layer->setComposite(FillLayer::initialFillComposite(layer->type()));
153
        return;
154
    }
155
156
    if (!value->isPrimitiveValue())
157
        return;
158
159
    CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
160
    layer->setComposite(*primitiveValue);
161
}
162
163
void CSSStyleApplicator::mapFillOrigin(RenderStyle*, RenderStyle*, FillLayer* layer, CSSValue* value)
164
{
165
    if (value->cssValueType() == CSSValue::CSS_INITIAL) {
166
        layer->setOrigin(FillLayer::initialFillOrigin(layer->type()));
167
        return;
168
    }
169
170
    if (!value->isPrimitiveValue())
171
        return;
172
173
    CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
174
    layer->setOrigin(*primitiveValue);
175
}
176
177
void CSSStyleApplicator::mapFillSize(RenderStyle *style, RenderStyle *rootElementStyle, FillLayer* layer, CSSValue* value)
178
{
179
    if (!value->isPrimitiveValue()) {
180
        layer->setSizeType(SizeNone);
181
        return;
182
    }
183
184
    CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
185
    if (primitiveValue->getIdent() == CSSValueContain)
186
        layer->setSizeType(Contain);
187
    else if (primitiveValue->getIdent() == CSSValueCover)
188
        layer->setSizeType(Cover);
189
    else
190
        layer->setSizeType(SizeLength);
191
192
    LengthSize b = FillLayer::initialFillSizeLength(layer->type());
193
194
    if (value->cssValueType() == CSSValue::CSS_INITIAL || primitiveValue->getIdent() == CSSValueContain
195
        || primitiveValue->getIdent() == CSSValueCover) {
196
        layer->setSizeLength(b);
197
        return;
198
    }
199
200
    Pair* pair = primitiveValue->getPairValue();
201
    if (!pair || !pair->first() || !pair->second())
202
        return;
203
204
    CSSPrimitiveValue* first = static_cast<CSSPrimitiveValue*>(pair->first());
205
    CSSPrimitiveValue* second = static_cast<CSSPrimitiveValue*>(pair->second());
206
207
    Length firstLength, secondLength;
208
    int firstType = first->primitiveType();
209
    int secondType = second->primitiveType();
210
211
    float zoomFactor = style->effectiveZoom();
212
213
    if (firstType == CSSPrimitiveValue::CSS_UNKNOWN)
214
        firstLength = Length(Auto);
215
    else if (CSSPrimitiveValue::isUnitTypeLength(firstType))
216
        firstLength = Length(first->computeLengthIntForLength(style, rootElementStyle, zoomFactor), Fixed);
217
    else if (firstType == CSSPrimitiveValue::CSS_PERCENTAGE)
218
        firstLength = Length(first->getDoubleValue(), Percent);
219
    else
220
        return;
221
222
    if (secondType == CSSPrimitiveValue::CSS_UNKNOWN)
223
        secondLength = Length(Auto);
224
    else if (CSSPrimitiveValue::isUnitTypeLength(secondType))
225
        secondLength = Length(second->computeLengthIntForLength(style, rootElementStyle, zoomFactor), Fixed);
226
    else if (secondType == CSSPrimitiveValue::CSS_PERCENTAGE)
227
        secondLength = Length(second->getDoubleValue(), Percent);
228
    else
229
        return;
230
231
    b.setWidth(firstLength);
232
    b.setHeight(secondLength);
233
    layer->setSizeLength(b);
234
}
235
236
// CSSPropertyInvalid
237
DEFINE_INHERIT(CSSPropertyInvalid)(RenderStyle*, RenderStyle*){}
238
DEFINE_INITIAL(CSSPropertyInvalid)(RenderStyle*){}
239
DEFINE_VALUE(CSSPropertyInvalid)(RenderStyle*, RenderStyle*, CSSValue*){}
240
241
// CSSPropertyColor
242
243
244
// CSSPropertyDirection
245
// CSSPropertyDisplay
246
// CSSPropertyFont
247
// CSSPropertyFontFamily
248
// CSSPropertyFontSize
249
// CSSPropertyFontStyle
250
// CSSPropertyFontVariant
251
// CSSPropertyFontWeight
252
// CSSPropertyTextRendering
253
// CSSPropertyWebkitFontSmoothing
254
// CSSPropertyWebkitTextSizeAdjust
255
// CSSPropertyWebkitWritingMode
256
// CSSPropertyZoom
257
// CSSPropertyLineHeight
258
// CSSPropertyBackground
259
// CSSPropertyBackgroundAttachment
260
DEFINE_HANDLE_FILL_LAYER_INHERIT(CSSPropertyBackgroundAttachment, background, Background, attachment, Attachment)
261
DEFINE_HANDLE_FILL_LAYER_INITIAL(CSSPropertyBackgroundAttachment, background, Background, attachment, Attachment)
262
DEFINE_HANDLE_FILL_LAYER_VALUE(CSSPropertyBackgroundAttachment, background, Background, attachment, Attachment)
263
264
// CSSPropertyBackgroundClip
265
DEFINE_HANDLE_FILL_LAYER_INHERIT(CSSPropertyBackgroundClip, background, Background, clip, Clip)
266
DEFINE_HANDLE_FILL_LAYER_INITIAL(CSSPropertyBackgroundClip, background, Background, clip, Clip)
267
DEFINE_HANDLE_FILL_LAYER_VALUE(CSSPropertyBackgroundClip, background, Background, clip, Clip)
268
269
// CSSPropertyBackgroundColor
270
// CSSPropertyBackgroundImage
271
// CSSPropertyBackgroundOrigin
272
DEFINE_HANDLE_FILL_LAYER_INHERIT(CSSPropertyBackgroundOrigin, background, Background, origin, Origin)
273
DEFINE_HANDLE_FILL_LAYER_INITIAL(CSSPropertyBackgroundOrigin, background, Background, origin, Origin)
274
DEFINE_HANDLE_FILL_LAYER_VALUE(CSSPropertyBackgroundOrigin, background, Background, origin, Origin)
275
276
// CSSPropertyBackgroundPosition
277
// CSSPropertyBackgroundPositionX
278
// CSSPropertyBackgroundPositionY
279
// CSSPropertyBackgroundRepeat
280
// CSSPropertyBackgroundRepeatX
281
// CSSPropertyBackgroundRepeatY
282
// CSSPropertyBackgroundSize
283
DEFINE_HANDLE_FILL_LAYER_INHERIT(CSSPropertyBackgroundSize, background, Background, size, Size)
284
DEFINE_HANDLE_FILL_LAYER_INITIAL(CSSPropertyBackgroundSize, background, Background, size, Size)
285
DEFINE_HANDLE_FILL_LAYER_VALUE(CSSPropertyBackgroundSize, background, Background, size, Size)
286
287
// CSSPropertyBorder
288
// CSSPropertyBorderBottom
289
// CSSPropertyBorderBottomColor
290
// CSSPropertyBorderBottomLeftRadius
291
// CSSPropertyBorderBottomRightRadius
292
// CSSPropertyBorderBottomStyle
293
// CSSPropertyBorderBottomWidth
294
// CSSPropertyBorderCollapse
295
DEFINE_HANDLE_INHERIT(CSSPropertyBorderCollapse, setBorderCollapse, borderCollapse)
296
DEFINE_HANDLE_INITIAL(CSSPropertyBorderCollapse, setBorderCollapse, initialBorderCollapse)
297
DEFINE_VALUE(CSSPropertyBorderCollapse)(RenderStyle* style, RenderStyle*, CSSValue* value) {
298
    if (value->isPrimitiveValue()) {
299
    	CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
300
        switch (primitiveValue->getIdent()) {
301
        case CSSValueCollapse:
302
            style->setBorderCollapse(true);
303
            break;
304
        case CSSValueSeparate:
305
            style->setBorderCollapse(false);
306
            break;
307
        }
308
    }
309
}
310
311
// CSSPropertyBorderColor
312
// CSSPropertyBorderLeft
313
// CSSPropertyBorderLeftColor
314
// CSSPropertyBorderLeftStyle
315
// CSSPropertyBorderLeftWidth
316
// CSSPropertyBorderRadius
317
// CSSPropertyBorderRight
318
// CSSPropertyBorderRightColor
319
// CSSPropertyBorderRightStyle
320
// CSSPropertyBorderRightWidth
321
// CSSPropertyBorderSpacing
322
// CSSPropertyBorderStyle
323
// CSSPropertyBorderTop
324
// CSSPropertyBorderTopColor
325
// CSSPropertyBorderTopLeftRadius
326
// CSSPropertyBorderTopRightRadius
327
// CSSPropertyBorderTopStyle
328
DEFINE_HANDLE_INHERIT(CSSPropertyBorderTopStyle, setBorderTopStyle, borderTopStyle)
329
DEFINE_HANDLE_INITIAL(CSSPropertyBorderTopStyle, setBorderTopStyle, initialBorderStyle)
330
DEFINE_HANDLE_VALUE(CSSPropertyBorderTopStyle, setBorderTopStyle)
331
332
// CSSPropertyBorderTopWidth
333
// CSSPropertyBorderWidth
334
// CSSPropertyBottom
335
// CSSPropertyBoxSizing
336
// CSSPropertyCaptionSide
337
// CSSPropertyClear
338
// CSSPropertyClip
339
// CSSPropertyContent
340
// CSSPropertyCounterIncrement
341
// CSSPropertyCounterReset
342
// CSSPropertyCursor
343
// CSSPropertyEmptyCells
344
// CSSPropertyFloat
345
// CSSPropertyFontStretch
346
// CSSPropertyHeight
347
// CSSPropertyLeft
348
// CSSPropertyLetterSpacing
349
// CSSPropertyListStyle
350
// CSSPropertyListStyleImage
351
// CSSPropertyListStylePosition
352
// CSSPropertyListStyleType
353
// CSSPropertyMargin
354
// CSSPropertyMarginBottom
355
// CSSPropertyMarginLeft
356
// CSSPropertyMarginRight
357
// CSSPropertyMarginTop
358
// CSSPropertyMaxHeight
359
// CSSPropertyMaxWidth
360
// CSSPropertyMinHeight
361
// CSSPropertyMinWidth
362
// CSSPropertyOpacity
363
// CSSPropertyOrphans
364
// CSSPropertyOutline
365
// CSSPropertyOutlineColor
366
// CSSPropertyOutlineOffset
367
// CSSPropertyOutlineStyle
368
// CSSPropertyOutlineWidth
369
// CSSPropertyOverflow
370
// CSSPropertyOverflowX
371
// CSSPropertyOverflowY
372
// CSSPropertyPadding
373
// CSSPropertyPaddingBottom
374
// CSSPropertyPaddingLeft
375
// CSSPropertyPaddingRight
376
// CSSPropertyPaddingTop
377
// CSSPropertyPage
378
// CSSPropertyPageBreakAfter
379
// CSSPropertyPageBreakBefore
380
// CSSPropertyPageBreakInside
381
// CSSPropertyPointerEvents
382
// CSSPropertyPosition
383
// CSSPropertyQuotes
384
// CSSPropertyResize
385
// CSSPropertyRight
386
// CSSPropertySize
387
// CSSPropertySrc
388
// CSSPropertySpeak
389
// CSSPropertyTableLayout
390
// CSSPropertyTextAlign
391
// CSSPropertyTextDecoration
392
// CSSPropertyTextIndent
393
// CSSPropertyTextLineThrough
394
// CSSPropertyTextLineThroughColor
395
// CSSPropertyTextLineThroughMode
396
// CSSPropertyTextLineThroughStyle
397
// CSSPropertyTextLineThroughWidth
398
// CSSPropertyTextOverflow
399
// CSSPropertyTextOverline
400
// CSSPropertyTextOverlineColor
401
// CSSPropertyTextOverlineMode
402
// CSSPropertyTextOverlineStyle
403
// CSSPropertyTextOverlineWidth
404
// CSSPropertyTextShadow
405
// CSSPropertyTextTransform
406
// CSSPropertyTextUnderline
407
// CSSPropertyTextUnderlineColor
408
// CSSPropertyTextUnderlineMode
409
// CSSPropertyTextUnderlineStyle
410
// CSSPropertyTextUnderlineWidth
411
// CSSPropertyTop
412
// CSSPropertyUnicodeBidi
413
// CSSPropertyUnicodeRange
414
// CSSPropertyVerticalAlign
415
// CSSPropertyVisibility
416
// CSSPropertyWhiteSpace
417
// CSSPropertyWidows
418
// CSSPropertyWidth
419
// CSSPropertyWordBreak
420
// CSSPropertyWordSpacing
421
// CSSPropertyWordWrap
422
// CSSPropertyZIndex
423
// CSSPropertyWebkitAnimation
424
// CSSPropertyWebkitAnimationDelay
425
// CSSPropertyWebkitAnimationDirection
426
// CSSPropertyWebkitAnimationDuration
427
// CSSPropertyWebkitAnimationFillMode
428
// CSSPropertyWebkitAnimationIterationCount
429
// CSSPropertyWebkitAnimationName
430
// CSSPropertyWebkitAnimationPlayState
431
// CSSPropertyWebkitAnimationTimingFunction
432
// CSSPropertyWebkitAppearance
433
// CSSPropertyWebkitBackfaceVisibility
434
// CSSPropertyWebkitBackgroundClip
435
DEFINE_EQUIVALENT_PROPERTY(CSSPropertyWebkitBackgroundClip, CSSPropertyBackgroundClip)
436
437
// CSSPropertyWebkitBackgroundComposite
438
DEFINE_HANDLE_FILL_LAYER_INHERIT(CSSPropertyWebkitBackgroundComposite, background, Background, composite, Composite)
439
DEFINE_HANDLE_FILL_LAYER_INITIAL(CSSPropertyWebkitBackgroundComposite, background, Background, composite, Composite)
440
DEFINE_HANDLE_FILL_LAYER_VALUE(CSSPropertyWebkitBackgroundComposite, background, Background, composite, Composite)
441
442
// CSSPropertyWebkitBackgroundOrigin
443
DEFINE_EQUIVALENT_PROPERTY(CSSPropertyWebkitBackgroundOrigin, CSSPropertyBackgroundOrigin)
444
445
// CSSPropertyWebkitBackgroundSize
446
DEFINE_EQUIVALENT_PROPERTY(CSSPropertyWebkitBackgroundSize, CSSPropertyBackgroundSize)
447
448
// CSSPropertyWebkitBorderAfter
449
// CSSPropertyWebkitBorderAfterColor
450
// CSSPropertyWebkitBorderAfterStyle
451
// CSSPropertyWebkitBorderAfterWidth
452
// CSSPropertyWebkitBorderBefore
453
// CSSPropertyWebkitBorderBeforeColor
454
// CSSPropertyWebkitBorderBeforeStyle
455
// CSSPropertyWebkitBorderBeforeWidth
456
// CSSPropertyWebkitBorderEnd
457
// CSSPropertyWebkitBorderEndColor
458
// CSSPropertyWebkitBorderEndStyle
459
// CSSPropertyWebkitBorderEndWidth
460
// CSSPropertyWebkitBorderFit
461
// CSSPropertyWebkitBorderHorizontalSpacing
462
// CSSPropertyWebkitBorderImage
463
// CSSPropertyWebkitBorderRadius
464
// CSSPropertyWebkitBorderStart
465
// CSSPropertyWebkitBorderStartColor
466
// CSSPropertyWebkitBorderStartStyle
467
// CSSPropertyWebkitBorderStartWidth
468
// CSSPropertyWebkitBorderVerticalSpacing
469
// CSSPropertyWebkitBoxAlign
470
// CSSPropertyWebkitBoxDirection
471
// CSSPropertyWebkitBoxFlex
472
// CSSPropertyWebkitBoxFlexGroup
473
// CSSPropertyWebkitBoxLines
474
// CSSPropertyWebkitBoxOrdinalGroup
475
// CSSPropertyWebkitBoxOrient
476
// CSSPropertyWebkitBoxPack
477
// CSSPropertyWebkitBoxReflect
478
// CSSPropertyWebkitBoxShadow
479
// CSSPropertyWebkitColorCorrection
480
// CSSPropertyWebkitColumnBreakAfter
481
// CSSPropertyWebkitColumnBreakBefore
482
// CSSPropertyWebkitColumnBreakInside
483
// CSSPropertyWebkitColumnCount
484
// CSSPropertyWebkitColumnGap
485
// CSSPropertyWebkitColumnRule
486
// CSSPropertyWebkitColumnRuleColor
487
// CSSPropertyWebkitColumnRuleStyle
488
// CSSPropertyWebkitColumnRuleWidth
489
// CSSPropertyWebkitColumnSpan
490
// CSSPropertyWebkitColumnWidth
491
// CSSPropertyWebkitColumns
492
// CSSPropertyWebkitFontSizeDelta
493
// CSSPropertyWebkitHighlight
494
// CSSPropertyWebkitHyphenateCharacter
495
// CSSPropertyWebkitHyphenateLocale
496
// CSSPropertyWebkitHyphens
497
// CSSPropertyWebkitLineBreak
498
// CSSPropertyWebkitLineClamp
499
// CSSPropertyWebkitLogicalWidth
500
// CSSPropertyWebkitLogicalHeight
501
// CSSPropertyWebkitMarginAfterCollapse
502
// CSSPropertyWebkitMarginBeforeCollapse
503
// CSSPropertyWebkitMarginBottomCollapse
504
// CSSPropertyWebkitMarginTopCollapse
505
// CSSPropertyWebkitMarginCollapse
506
// CSSPropertyWebkitMarginAfter
507
// CSSPropertyWebkitMarginBefore
508
// CSSPropertyWebkitMarginEnd
509
// CSSPropertyWebkitMarginStart
510
// CSSPropertyWebkitMarquee
511
// CSSPropertyWebkitMarqueeDirection
512
// CSSPropertyWebkitMarqueeIncrement
513
// CSSPropertyWebkitMarqueeRepetition
514
// CSSPropertyWebkitMarqueeSpeed
515
// CSSPropertyWebkitMarqueeStyle
516
// CSSPropertyWebkitMask
517
518
// CSSPropertyWebkitMaskAttachment
519
DEFINE_HANDLE_FILL_LAYER_INHERIT(CSSPropertyWebkitMaskAttachment, mask, Mask, attachment, Attachment)
520
DEFINE_HANDLE_FILL_LAYER_INITIAL(CSSPropertyWebkitMaskAttachment, mask, Mask, attachment, Attachment)
521
DEFINE_HANDLE_FILL_LAYER_VALUE(CSSPropertyWebkitMaskAttachment, mask, Mask, attachment, Attachment)
522
523
// CSSPropertyWebkitMaskBoxImage
524
525
// CSSPropertyWebkitMaskClip
526
DEFINE_HANDLE_FILL_LAYER_INHERIT(CSSPropertyWebkitMaskClip, mask, Mask, clip, Clip)
527
DEFINE_HANDLE_FILL_LAYER_INITIAL(CSSPropertyWebkitMaskClip, mask, Mask, clip, Clip)
528
DEFINE_HANDLE_FILL_LAYER_VALUE(CSSPropertyWebkitMaskClip, mask, Mask, clip, Clip)
529
530
// CSSPropertyWebkitMaskComposite
531
DEFINE_HANDLE_FILL_LAYER_INHERIT(CSSPropertyWebkitMaskComposite, mask, Mask, composite, Composite)
532
DEFINE_HANDLE_FILL_LAYER_INITIAL(CSSPropertyWebkitMaskComposite, mask, Mask, composite, Composite)
533
DEFINE_HANDLE_FILL_LAYER_VALUE(CSSPropertyWebkitMaskComposite, mask, Mask, composite, Composite)
534
535
// CSSPropertyWebkitMaskImage
536
537
// CSSPropertyWebkitMaskOrigin
538
DEFINE_HANDLE_FILL_LAYER_INHERIT(CSSPropertyWebkitMaskOrigin, mask, Mask, origin, Origin)
539
DEFINE_HANDLE_FILL_LAYER_INITIAL(CSSPropertyWebkitMaskOrigin, mask, Mask, origin, Origin)
540
DEFINE_HANDLE_FILL_LAYER_VALUE(CSSPropertyWebkitMaskOrigin, mask, Mask, origin, Origin)
541
542
// CSSPropertyWebkitMaskPosition
543
// CSSPropertyWebkitMaskPositionX
544
// CSSPropertyWebkitMaskPositionY
545
// CSSPropertyWebkitMaskRepeat
546
// CSSPropertyWebkitMaskRepeatX
547
// CSSPropertyWebkitMaskRepeatY
548
549
// CSSPropertyWebkitMaskSize
550
DEFINE_HANDLE_FILL_LAYER_INHERIT(CSSPropertyWebkitMaskSize, mask, Mask, size, Size)
551
DEFINE_HANDLE_FILL_LAYER_INITIAL(CSSPropertyWebkitMaskSize, mask, Mask, size, Size)
552
DEFINE_HANDLE_FILL_LAYER_VALUE(CSSPropertyWebkitMaskSize, mask, Mask, size, Size)
553
554
// CSSPropertyWebkitMatchNearestMailBlockquoteColor
555
// CSSPropertyWebkitMaxLogicalWidth
556
// CSSPropertyWebkitMaxLogicalHeight
557
// CSSPropertyWebkitMinLogicalWidth
558
// CSSPropertyWebkitMinLogicalHeight
559
// CSSPropertyWebkitNbspMode
560
// CSSPropertyWebkitPaddingAfter
561
// CSSPropertyWebkitPaddingBefore
562
// CSSPropertyWebkitPaddingEnd
563
// CSSPropertyWebkitPaddingStart
564
// CSSPropertyWebkitPerspective
565
// CSSPropertyWebkitPerspectiveOrigin
566
// CSSPropertyWebkitPerspectiveOriginX
567
// CSSPropertyWebkitPerspectiveOriginY
568
// CSSPropertyWebkitRtlOrdering
569
// CSSPropertyWebkitTextCombine
570
// CSSPropertyWebkitTextDecorationsInEffect
571
// CSSPropertyWebkitTextEmphasis
572
// CSSPropertyWebkitTextEmphasisColor
573
// CSSPropertyWebkitTextEmphasisPosition
574
// CSSPropertyWebkitTextEmphasisStyle
575
// CSSPropertyWebkitTextFillColor
576
// CSSPropertyWebkitTextSecurity
577
// CSSPropertyWebkitTextStroke
578
// CSSPropertyWebkitTextStrokeColor
579
// CSSPropertyWebkitTextStrokeWidth
580
// CSSPropertyWebkitTransform
581
// CSSPropertyWebkitTransformOrigin
582
// CSSPropertyWebkitTransformOriginX
583
// CSSPropertyWebkitTransformOriginY
584
// CSSPropertyWebkitTransformOriginZ
585
// CSSPropertyWebkitTransformStyle
586
// CSSPropertyWebkitTransition
587
// CSSPropertyWebkitTransitionDelay
588
// CSSPropertyWebkitTransitionDuration
589
// CSSPropertyWebkitTransitionProperty
590
// CSSPropertyWebkitTransitionTimingFunction
591
// CSSPropertyWebkitUserDrag
592
// CSSPropertyWebkitUserModify
593
// CSSPropertyWebkitUserSelect
594
// CSSPropertyClipPath
595
// CSSPropertyClipRule
596
// CSSPropertyMask
597
// CSSPropertyEnableBackground
598
// CSSPropertyFilter
599
// CSSPropertyFloodColor
600
// CSSPropertyFloodOpacity
601
// CSSPropertyLightingColor
602
// CSSPropertyStopColor
603
// CSSPropertyStopOpacity
604
// CSSPropertyColorInterpolation
605
// CSSPropertyColorInterpolationFilters
606
// CSSPropertyColorProfile
607
// CSSPropertyColorRendering
608
// CSSPropertyFill
609
// CSSPropertyFillOpacity
610
// CSSPropertyFillRule
611
// CSSPropertyImageRendering
612
// CSSPropertyMarker
613
// CSSPropertyMarkerEnd
614
// CSSPropertyMarkerMid
615
// CSSPropertyMarkerStart
616
// CSSPropertyShapeRendering
617
// CSSPropertyStroke
618
// CSSPropertyStrokeDasharray
619
// CSSPropertyStrokeDashoffset
620
// CSSPropertyStrokeLinecap
621
// CSSPropertyStrokeLinejoin
622
// CSSPropertyStrokeMiterlimit
623
// CSSPropertyStrokeOpacity
624
// CSSPropertyStrokeWidth
625
// CSSPropertyAlignmentBaseline
626
// CSSPropertyBaselineShift
627
// CSSPropertyDominantBaseline
628
// CSSPropertyGlyphOrientationHorizontal
629
// CSSPropertyGlyphOrientationVertical
630
// CSSPropertyKerning
631
// CSSPropertyTextAnchor
632
// CSSPropertyVectorEffect
633
// CSSPropertyWritingMode
634
// CSSPropertyWebkitSvgShadow
635
// CSSPropertyWebkitDashboardRegion
636
637
CSSStyleApplicator::~CSSStyleApplicator() {
638
	// TODO Auto-generated destructor stub
639
}
640
641
CSSStyleApplicator::CSSStyleApplicator() {
642
	// TODO Auto-generated constructor stub
643
}
644
645
}
- WebCore/css/CSSStyleApplicator.h +362 lines
Line 0 WebCore/css/CSSStyleApplicator.h_sec1
1
/*
2
 * CSSStyleApplicator.h
3
 *
4
 *  Created on: Dec 9, 2010
5
 *      Author: macpherson
6
 */
7
8
#ifndef CSSStyleApplicator_h_
9
#define CSSStyleApplicator_h_
10
11
namespace WebCore {
12
13
class CSSValue;
14
class FillLayer;
15
class RenderStyle;
16
17
#define DEFINE_PROTOTYPES(Property) \
18
static void handleInherit##Property(RenderStyle*, RenderStyle*); \
19
static void handleInitial##Property(RenderStyle*); \
20
static void handleValue##Property(RenderStyle*, RenderStyle*, CSSValue*);
21
22
class CSSStyleApplicator {
23
public:
24
    DEFINE_PROTOTYPES(CSSPropertyInvalid)
25
    DEFINE_PROTOTYPES(CSSPropertyColor)
26
    DEFINE_PROTOTYPES(CSSPropertyDirection)
27
    DEFINE_PROTOTYPES(CSSPropertyDisplay)
28
    DEFINE_PROTOTYPES(CSSPropertyFont)
29
    DEFINE_PROTOTYPES(CSSPropertyFontFamily)
30
    DEFINE_PROTOTYPES(CSSPropertyFontSize)
31
    DEFINE_PROTOTYPES(CSSPropertyFontStyle)
32
    DEFINE_PROTOTYPES(CSSPropertyFontVariant)
33
    DEFINE_PROTOTYPES(CSSPropertyFontWeight)
34
    DEFINE_PROTOTYPES(CSSPropertyTextRendering)
35
    DEFINE_PROTOTYPES(CSSPropertyWebkitFontSmoothing)
36
    DEFINE_PROTOTYPES(CSSPropertyWebkitTextSizeAdjust)
37
    DEFINE_PROTOTYPES(CSSPropertyWebkitWritingMode)
38
    DEFINE_PROTOTYPES(CSSPropertyZoom)
39
    DEFINE_PROTOTYPES(CSSPropertyLineHeight)
40
    DEFINE_PROTOTYPES(CSSPropertyBackground)
41
    DEFINE_PROTOTYPES(CSSPropertyBackgroundAttachment)
42
    DEFINE_PROTOTYPES(CSSPropertyBackgroundClip)
43
    DEFINE_PROTOTYPES(CSSPropertyBackgroundColor)
44
    DEFINE_PROTOTYPES(CSSPropertyBackgroundImage)
45
    DEFINE_PROTOTYPES(CSSPropertyBackgroundOrigin)
46
    DEFINE_PROTOTYPES(CSSPropertyBackgroundPosition)
47
    DEFINE_PROTOTYPES(CSSPropertyBackgroundPositionX)
48
    DEFINE_PROTOTYPES(CSSPropertyBackgroundPositionY)
49
    DEFINE_PROTOTYPES(CSSPropertyBackgroundRepeat)
50
    DEFINE_PROTOTYPES(CSSPropertyBackgroundRepeatX)
51
    DEFINE_PROTOTYPES(CSSPropertyBackgroundRepeatY)
52
    DEFINE_PROTOTYPES(CSSPropertyBackgroundSize)
53
    DEFINE_PROTOTYPES(CSSPropertyBorder)
54
    DEFINE_PROTOTYPES(CSSPropertyBorderBottom)
55
    DEFINE_PROTOTYPES(CSSPropertyBorderBottomColor)
56
    DEFINE_PROTOTYPES(CSSPropertyBorderBottomLeftRadius)
57
    DEFINE_PROTOTYPES(CSSPropertyBorderBottomRightRadius)
58
    DEFINE_PROTOTYPES(CSSPropertyBorderBottomStyle)
59
    DEFINE_PROTOTYPES(CSSPropertyBorderBottomWidth)
60
    DEFINE_PROTOTYPES(CSSPropertyBorderCollapse)
61
    DEFINE_PROTOTYPES(CSSPropertyBorderColor)
62
    DEFINE_PROTOTYPES(CSSPropertyBorderLeft)
63
    DEFINE_PROTOTYPES(CSSPropertyBorderLeftColor)
64
    DEFINE_PROTOTYPES(CSSPropertyBorderLeftStyle)
65
    DEFINE_PROTOTYPES(CSSPropertyBorderLeftWidth)
66
    DEFINE_PROTOTYPES(CSSPropertyBorderRadius)
67
    DEFINE_PROTOTYPES(CSSPropertyBorderRight)
68
    DEFINE_PROTOTYPES(CSSPropertyBorderRightColor)
69
    DEFINE_PROTOTYPES(CSSPropertyBorderRightStyle)
70
    DEFINE_PROTOTYPES(CSSPropertyBorderRightWidth)
71
    DEFINE_PROTOTYPES(CSSPropertyBorderSpacing)
72
    DEFINE_PROTOTYPES(CSSPropertyBorderStyle)
73
    DEFINE_PROTOTYPES(CSSPropertyBorderTop)
74
    DEFINE_PROTOTYPES(CSSPropertyBorderTopColor)
75
    DEFINE_PROTOTYPES(CSSPropertyBorderTopLeftRadius)
76
    DEFINE_PROTOTYPES(CSSPropertyBorderTopRightRadius)
77
    DEFINE_PROTOTYPES(CSSPropertyBorderTopStyle)
78
    DEFINE_PROTOTYPES(CSSPropertyBorderTopWidth)
79
    DEFINE_PROTOTYPES(CSSPropertyBorderWidth)
80
    DEFINE_PROTOTYPES(CSSPropertyBottom)
81
    DEFINE_PROTOTYPES(CSSPropertyBoxSizing)
82
    DEFINE_PROTOTYPES(CSSPropertyCaptionSide)
83
    DEFINE_PROTOTYPES(CSSPropertyClear)
84
    DEFINE_PROTOTYPES(CSSPropertyClip)
85
    DEFINE_PROTOTYPES(CSSPropertyContent)
86
    DEFINE_PROTOTYPES(CSSPropertyCounterIncrement)
87
    DEFINE_PROTOTYPES(CSSPropertyCounterReset)
88
    DEFINE_PROTOTYPES(CSSPropertyCursor)
89
    DEFINE_PROTOTYPES(CSSPropertyEmptyCells)
90
    DEFINE_PROTOTYPES(CSSPropertyFloat)
91
    DEFINE_PROTOTYPES(CSSPropertyFontStretch)
92
    DEFINE_PROTOTYPES(CSSPropertyHeight)
93
    DEFINE_PROTOTYPES(CSSPropertyLeft)
94
    DEFINE_PROTOTYPES(CSSPropertyLetterSpacing)
95
    DEFINE_PROTOTYPES(CSSPropertyListStyle)
96
    DEFINE_PROTOTYPES(CSSPropertyListStyleImage)
97
    DEFINE_PROTOTYPES(CSSPropertyListStylePosition)
98
    DEFINE_PROTOTYPES(CSSPropertyListStyleType)
99
    DEFINE_PROTOTYPES(CSSPropertyMargin)
100
    DEFINE_PROTOTYPES(CSSPropertyMarginBottom)
101
    DEFINE_PROTOTYPES(CSSPropertyMarginLeft)
102
    DEFINE_PROTOTYPES(CSSPropertyMarginRight)
103
    DEFINE_PROTOTYPES(CSSPropertyMarginTop)
104
    DEFINE_PROTOTYPES(CSSPropertyMaxHeight)
105
    DEFINE_PROTOTYPES(CSSPropertyMaxWidth)
106
    DEFINE_PROTOTYPES(CSSPropertyMinHeight)
107
    DEFINE_PROTOTYPES(CSSPropertyMinWidth)
108
    DEFINE_PROTOTYPES(CSSPropertyOpacity)
109
    DEFINE_PROTOTYPES(CSSPropertyOrphans)
110
    DEFINE_PROTOTYPES(CSSPropertyOutline)
111
    DEFINE_PROTOTYPES(CSSPropertyOutlineColor)
112
    DEFINE_PROTOTYPES(CSSPropertyOutlineOffset)
113
    DEFINE_PROTOTYPES(CSSPropertyOutlineStyle)
114
    DEFINE_PROTOTYPES(CSSPropertyOutlineWidth)
115
    DEFINE_PROTOTYPES(CSSPropertyOverflow)
116
    DEFINE_PROTOTYPES(CSSPropertyOverflowX)
117
    DEFINE_PROTOTYPES(CSSPropertyOverflowY)
118
    DEFINE_PROTOTYPES(CSSPropertyPadding)
119
    DEFINE_PROTOTYPES(CSSPropertyPaddingBottom)
120
    DEFINE_PROTOTYPES(CSSPropertyPaddingLeft)
121
    DEFINE_PROTOTYPES(CSSPropertyPaddingRight)
122
    DEFINE_PROTOTYPES(CSSPropertyPaddingTop)
123
    DEFINE_PROTOTYPES(CSSPropertyPage)
124
    DEFINE_PROTOTYPES(CSSPropertyPageBreakAfter)
125
    DEFINE_PROTOTYPES(CSSPropertyPageBreakBefore)
126
    DEFINE_PROTOTYPES(CSSPropertyPageBreakInside)
127
    DEFINE_PROTOTYPES(CSSPropertyPointerEvents)
128
    DEFINE_PROTOTYPES(CSSPropertyPosition)
129
    DEFINE_PROTOTYPES(CSSPropertyQuotes)
130
    DEFINE_PROTOTYPES(CSSPropertyResize)
131
    DEFINE_PROTOTYPES(CSSPropertyRight)
132
    DEFINE_PROTOTYPES(CSSPropertySize)
133
    DEFINE_PROTOTYPES(CSSPropertySrc)
134
    DEFINE_PROTOTYPES(CSSPropertySpeak)
135
    DEFINE_PROTOTYPES(CSSPropertyTableLayout)
136
    DEFINE_PROTOTYPES(CSSPropertyTextAlign)
137
    DEFINE_PROTOTYPES(CSSPropertyTextDecoration)
138
    DEFINE_PROTOTYPES(CSSPropertyTextIndent)
139
    DEFINE_PROTOTYPES(CSSPropertyTextLineThrough)
140
    DEFINE_PROTOTYPES(CSSPropertyTextLineThroughColor)
141
    DEFINE_PROTOTYPES(CSSPropertyTextLineThroughMode)
142
    DEFINE_PROTOTYPES(CSSPropertyTextLineThroughStyle)
143
    DEFINE_PROTOTYPES(CSSPropertyTextLineThroughWidth)
144
    DEFINE_PROTOTYPES(CSSPropertyTextOverflow)
145
    DEFINE_PROTOTYPES(CSSPropertyTextOverline)
146
    DEFINE_PROTOTYPES(CSSPropertyTextOverlineColor)
147
    DEFINE_PROTOTYPES(CSSPropertyTextOverlineMode)
148
    DEFINE_PROTOTYPES(CSSPropertyTextOverlineStyle)
149
    DEFINE_PROTOTYPES(CSSPropertyTextOverlineWidth)
150
    DEFINE_PROTOTYPES(CSSPropertyTextShadow)
151
    DEFINE_PROTOTYPES(CSSPropertyTextTransform)
152
    DEFINE_PROTOTYPES(CSSPropertyTextUnderline)
153
    DEFINE_PROTOTYPES(CSSPropertyTextUnderlineColor)
154
    DEFINE_PROTOTYPES(CSSPropertyTextUnderlineMode)
155
    DEFINE_PROTOTYPES(CSSPropertyTextUnderlineStyle)
156
    DEFINE_PROTOTYPES(CSSPropertyTextUnderlineWidth)
157
    DEFINE_PROTOTYPES(CSSPropertyTop)
158
    DEFINE_PROTOTYPES(CSSPropertyUnicodeBidi)
159
    DEFINE_PROTOTYPES(CSSPropertyUnicodeRange)
160
    DEFINE_PROTOTYPES(CSSPropertyVerticalAlign)
161
    DEFINE_PROTOTYPES(CSSPropertyVisibility)
162
    DEFINE_PROTOTYPES(CSSPropertyWhiteSpace)
163
    DEFINE_PROTOTYPES(CSSPropertyWidows)
164
    DEFINE_PROTOTYPES(CSSPropertyWidth)
165
    DEFINE_PROTOTYPES(CSSPropertyWordBreak)
166
    DEFINE_PROTOTYPES(CSSPropertyWordSpacing)
167
    DEFINE_PROTOTYPES(CSSPropertyWordWrap)
168
    DEFINE_PROTOTYPES(CSSPropertyZIndex)
169
    DEFINE_PROTOTYPES(CSSPropertyWebkitAnimation)
170
    DEFINE_PROTOTYPES(CSSPropertyWebkitAnimationDelay)
171
    DEFINE_PROTOTYPES(CSSPropertyWebkitAnimationDirection)
172
    DEFINE_PROTOTYPES(CSSPropertyWebkitAnimationDuration)
173
    DEFINE_PROTOTYPES(CSSPropertyWebkitAnimationFillMode)
174
    DEFINE_PROTOTYPES(CSSPropertyWebkitAnimationIterationCount)
175
    DEFINE_PROTOTYPES(CSSPropertyWebkitAnimationName)
176
    DEFINE_PROTOTYPES(CSSPropertyWebkitAnimationPlayState)
177
    DEFINE_PROTOTYPES(CSSPropertyWebkitAnimationTimingFunction)
178
    DEFINE_PROTOTYPES(CSSPropertyWebkitAppearance)
179
    DEFINE_PROTOTYPES(CSSPropertyWebkitBackfaceVisibility)
180
    DEFINE_PROTOTYPES(CSSPropertyWebkitBackgroundClip)
181
    DEFINE_PROTOTYPES(CSSPropertyWebkitBackgroundComposite)
182
    DEFINE_PROTOTYPES(CSSPropertyWebkitBackgroundOrigin)
183
    DEFINE_PROTOTYPES(CSSPropertyWebkitBackgroundSize)
184
    DEFINE_PROTOTYPES(CSSPropertyWebkitBorderAfter)
185
    DEFINE_PROTOTYPES(CSSPropertyWebkitBorderAfterColor)
186
    DEFINE_PROTOTYPES(CSSPropertyWebkitBorderAfterStyle)
187
    DEFINE_PROTOTYPES(CSSPropertyWebkitBorderAfterWidth)
188
    DEFINE_PROTOTYPES(CSSPropertyWebkitBorderBefore)
189
    DEFINE_PROTOTYPES(CSSPropertyWebkitBorderBeforeColor)
190
    DEFINE_PROTOTYPES(CSSPropertyWebkitBorderBeforeStyle)
191
    DEFINE_PROTOTYPES(CSSPropertyWebkitBorderBeforeWidth)
192
    DEFINE_PROTOTYPES(CSSPropertyWebkitBorderEnd)
193
    DEFINE_PROTOTYPES(CSSPropertyWebkitBorderEndColor)
194
    DEFINE_PROTOTYPES(CSSPropertyWebkitBorderEndStyle)
195
    DEFINE_PROTOTYPES(CSSPropertyWebkitBorderEndWidth)
196
    DEFINE_PROTOTYPES(CSSPropertyWebkitBorderFit)
197
    DEFINE_PROTOTYPES(CSSPropertyWebkitBorderHorizontalSpacing)
198
    DEFINE_PROTOTYPES(CSSPropertyWebkitBorderImage)
199
    DEFINE_PROTOTYPES(CSSPropertyWebkitBorderRadius)
200
    DEFINE_PROTOTYPES(CSSPropertyWebkitBorderStart)
201
    DEFINE_PROTOTYPES(CSSPropertyWebkitBorderStartColor)
202
    DEFINE_PROTOTYPES(CSSPropertyWebkitBorderStartStyle)
203
    DEFINE_PROTOTYPES(CSSPropertyWebkitBorderStartWidth)
204
    DEFINE_PROTOTYPES(CSSPropertyWebkitBorderVerticalSpacing)
205
    DEFINE_PROTOTYPES(CSSPropertyWebkitBoxAlign)
206
    DEFINE_PROTOTYPES(CSSPropertyWebkitBoxDirection)
207
    DEFINE_PROTOTYPES(CSSPropertyWebkitBoxFlex)
208
    DEFINE_PROTOTYPES(CSSPropertyWebkitBoxFlexGroup)
209
    DEFINE_PROTOTYPES(CSSPropertyWebkitBoxLines)
210
    DEFINE_PROTOTYPES(CSSPropertyWebkitBoxOrdinalGroup)
211
    DEFINE_PROTOTYPES(CSSPropertyWebkitBoxOrient)
212
    DEFINE_PROTOTYPES(CSSPropertyWebkitBoxPack)
213
    DEFINE_PROTOTYPES(CSSPropertyWebkitBoxReflect)
214
    DEFINE_PROTOTYPES(CSSPropertyWebkitBoxShadow)
215
    DEFINE_PROTOTYPES(CSSPropertyWebkitColorCorrection)
216
    DEFINE_PROTOTYPES(CSSPropertyWebkitColumnBreakAfter)
217
    DEFINE_PROTOTYPES(CSSPropertyWebkitColumnBreakBefore)
218
    DEFINE_PROTOTYPES(CSSPropertyWebkitColumnBreakInside)
219
    DEFINE_PROTOTYPES(CSSPropertyWebkitColumnCount)
220
    DEFINE_PROTOTYPES(CSSPropertyWebkitColumnGap)
221
    DEFINE_PROTOTYPES(CSSPropertyWebkitColumnRule)
222
    DEFINE_PROTOTYPES(CSSPropertyWebkitColumnRuleColor)
223
    DEFINE_PROTOTYPES(CSSPropertyWebkitColumnRuleStyle)
224
    DEFINE_PROTOTYPES(CSSPropertyWebkitColumnRuleWidth)
225
    DEFINE_PROTOTYPES(CSSPropertyWebkitColumnSpan)
226
    DEFINE_PROTOTYPES(CSSPropertyWebkitColumnWidth)
227
    DEFINE_PROTOTYPES(CSSPropertyWebkitColumns)
228
    DEFINE_PROTOTYPES(CSSPropertyWebkitFontSizeDelta)
229
    DEFINE_PROTOTYPES(CSSPropertyWebkitHighlight)
230
    DEFINE_PROTOTYPES(CSSPropertyWebkitHyphenateCharacter)
231
    DEFINE_PROTOTYPES(CSSPropertyWebkitHyphenateLocale)
232
    DEFINE_PROTOTYPES(CSSPropertyWebkitHyphens)
233
    DEFINE_PROTOTYPES(CSSPropertyWebkitLineBreak)
234
    DEFINE_PROTOTYPES(CSSPropertyWebkitLineClamp)
235
    DEFINE_PROTOTYPES(CSSPropertyWebkitLogicalWidth)
236
    DEFINE_PROTOTYPES(CSSPropertyWebkitLogicalHeight)
237
    DEFINE_PROTOTYPES(CSSPropertyWebkitMarginAfterCollapse)
238
    DEFINE_PROTOTYPES(CSSPropertyWebkitMarginBeforeCollapse)
239
    DEFINE_PROTOTYPES(CSSPropertyWebkitMarginBottomCollapse)
240
    DEFINE_PROTOTYPES(CSSPropertyWebkitMarginTopCollapse)
241
    DEFINE_PROTOTYPES(CSSPropertyWebkitMarginCollapse)
242
    DEFINE_PROTOTYPES(CSSPropertyWebkitMarginAfter)
243
    DEFINE_PROTOTYPES(CSSPropertyWebkitMarginBefore)
244
    DEFINE_PROTOTYPES(CSSPropertyWebkitMarginEnd)
245
    DEFINE_PROTOTYPES(CSSPropertyWebkitMarginStart)
246
    DEFINE_PROTOTYPES(CSSPropertyWebkitMarquee)
247
    DEFINE_PROTOTYPES(CSSPropertyWebkitMarqueeDirection)
248
    DEFINE_PROTOTYPES(CSSPropertyWebkitMarqueeIncrement)
249
    DEFINE_PROTOTYPES(CSSPropertyWebkitMarqueeRepetition)
250
    DEFINE_PROTOTYPES(CSSPropertyWebkitMarqueeSpeed)
251
    DEFINE_PROTOTYPES(CSSPropertyWebkitMarqueeStyle)
252
    DEFINE_PROTOTYPES(CSSPropertyWebkitMask)
253
    DEFINE_PROTOTYPES(CSSPropertyWebkitMaskAttachment)
254
    DEFINE_PROTOTYPES(CSSPropertyWebkitMaskBoxImage)
255
    DEFINE_PROTOTYPES(CSSPropertyWebkitMaskClip)
256
    DEFINE_PROTOTYPES(CSSPropertyWebkitMaskComposite)
257
    DEFINE_PROTOTYPES(CSSPropertyWebkitMaskImage)
258
    DEFINE_PROTOTYPES(CSSPropertyWebkitMaskOrigin)
259
    DEFINE_PROTOTYPES(CSSPropertyWebkitMaskPosition)
260
    DEFINE_PROTOTYPES(CSSPropertyWebkitMaskPositionX)
261
    DEFINE_PROTOTYPES(CSSPropertyWebkitMaskPositionY)
262
    DEFINE_PROTOTYPES(CSSPropertyWebkitMaskRepeat)
263
    DEFINE_PROTOTYPES(CSSPropertyWebkitMaskRepeatX)
264
    DEFINE_PROTOTYPES(CSSPropertyWebkitMaskRepeatY)
265
    DEFINE_PROTOTYPES(CSSPropertyWebkitMaskSize)
266
    DEFINE_PROTOTYPES(CSSPropertyWebkitMatchNearestMailBlockquoteColor)
267
    DEFINE_PROTOTYPES(CSSPropertyWebkitMaxLogicalWidth)
268
    DEFINE_PROTOTYPES(CSSPropertyWebkitMaxLogicalHeight)
269
    DEFINE_PROTOTYPES(CSSPropertyWebkitMinLogicalWidth)
270
    DEFINE_PROTOTYPES(CSSPropertyWebkitMinLogicalHeight)
271
    DEFINE_PROTOTYPES(CSSPropertyWebkitNbspMode)
272
    DEFINE_PROTOTYPES(CSSPropertyWebkitPaddingAfter)
273
    DEFINE_PROTOTYPES(CSSPropertyWebkitPaddingBefore)
274
    DEFINE_PROTOTYPES(CSSPropertyWebkitPaddingEnd)
275
    DEFINE_PROTOTYPES(CSSPropertyWebkitPaddingStart)
276
    DEFINE_PROTOTYPES(CSSPropertyWebkitPerspective)
277
    DEFINE_PROTOTYPES(CSSPropertyWebkitPerspectiveOrigin)
278
    DEFINE_PROTOTYPES(CSSPropertyWebkitPerspectiveOriginX)
279
    DEFINE_PROTOTYPES(CSSPropertyWebkitPerspectiveOriginY)
280
    DEFINE_PROTOTYPES(CSSPropertyWebkitRtlOrdering)
281
    DEFINE_PROTOTYPES(CSSPropertyWebkitTextCombine)
282
    DEFINE_PROTOTYPES(CSSPropertyWebkitTextDecorationsInEffect)
283
    DEFINE_PROTOTYPES(CSSPropertyWebkitTextEmphasis)
284
    DEFINE_PROTOTYPES(CSSPropertyWebkitTextEmphasisColor)
285
    DEFINE_PROTOTYPES(CSSPropertyWebkitTextEmphasisPosition)
286
    DEFINE_PROTOTYPES(CSSPropertyWebkitTextEmphasisStyle)
287
    DEFINE_PROTOTYPES(CSSPropertyWebkitTextFillColor)
288
    DEFINE_PROTOTYPES(CSSPropertyWebkitTextSecurity)
289
    DEFINE_PROTOTYPES(CSSPropertyWebkitTextStroke)
290
    DEFINE_PROTOTYPES(CSSPropertyWebkitTextStrokeColor)
291
    DEFINE_PROTOTYPES(CSSPropertyWebkitTextStrokeWidth)
292
    DEFINE_PROTOTYPES(CSSPropertyWebkitTransform)
293
    DEFINE_PROTOTYPES(CSSPropertyWebkitTransformOrigin)
294
    DEFINE_PROTOTYPES(CSSPropertyWebkitTransformOriginX)
295
    DEFINE_PROTOTYPES(CSSPropertyWebkitTransformOriginY)
296
    DEFINE_PROTOTYPES(CSSPropertyWebkitTransformOriginZ)
297
    DEFINE_PROTOTYPES(CSSPropertyWebkitTransformStyle)
298
    DEFINE_PROTOTYPES(CSSPropertyWebkitTransition)
299
    DEFINE_PROTOTYPES(CSSPropertyWebkitTransitionDelay)
300
    DEFINE_PROTOTYPES(CSSPropertyWebkitTransitionDuration)
301
    DEFINE_PROTOTYPES(CSSPropertyWebkitTransitionProperty)
302
    DEFINE_PROTOTYPES(CSSPropertyWebkitTransitionTimingFunction)
303
    DEFINE_PROTOTYPES(CSSPropertyWebkitUserDrag)
304
    DEFINE_PROTOTYPES(CSSPropertyWebkitUserModify)
305
    DEFINE_PROTOTYPES(CSSPropertyWebkitUserSelect)
306
    DEFINE_PROTOTYPES(CSSPropertyClipPath)
307
    DEFINE_PROTOTYPES(CSSPropertyClipRule)
308
    DEFINE_PROTOTYPES(CSSPropertyMask)
309
    DEFINE_PROTOTYPES(CSSPropertyEnableBackground)
310
    DEFINE_PROTOTYPES(CSSPropertyFilter)
311
    DEFINE_PROTOTYPES(CSSPropertyFloodColor)
312
    DEFINE_PROTOTYPES(CSSPropertyFloodOpacity)
313
    DEFINE_PROTOTYPES(CSSPropertyLightingColor)
314
    DEFINE_PROTOTYPES(CSSPropertyStopColor)
315
    DEFINE_PROTOTYPES(CSSPropertyStopOpacity)
316
    DEFINE_PROTOTYPES(CSSPropertyColorInterpolation)
317
    DEFINE_PROTOTYPES(CSSPropertyColorInterpolationFilters)
318
    DEFINE_PROTOTYPES(CSSPropertyColorProfile)
319
    DEFINE_PROTOTYPES(CSSPropertyColorRendering)
320
    DEFINE_PROTOTYPES(CSSPropertyFill)
321
    DEFINE_PROTOTYPES(CSSPropertyFillOpacity)
322
    DEFINE_PROTOTYPES(CSSPropertyFillRule)
323
    DEFINE_PROTOTYPES(CSSPropertyImageRendering)
324
    DEFINE_PROTOTYPES(CSSPropertyMarker)
325
    DEFINE_PROTOTYPES(CSSPropertyMarkerEnd)
326
    DEFINE_PROTOTYPES(CSSPropertyMarkerMid)
327
    DEFINE_PROTOTYPES(CSSPropertyMarkerStart)
328
    DEFINE_PROTOTYPES(CSSPropertyShapeRendering)
329
    DEFINE_PROTOTYPES(CSSPropertyStroke)
330
    DEFINE_PROTOTYPES(CSSPropertyStrokeDasharray)
331
    DEFINE_PROTOTYPES(CSSPropertyStrokeDashoffset)
332
    DEFINE_PROTOTYPES(CSSPropertyStrokeLinecap)
333
    DEFINE_PROTOTYPES(CSSPropertyStrokeLinejoin)
334
    DEFINE_PROTOTYPES(CSSPropertyStrokeMiterlimit)
335
    DEFINE_PROTOTYPES(CSSPropertyStrokeOpacity)
336
    DEFINE_PROTOTYPES(CSSPropertyStrokeWidth)
337
    DEFINE_PROTOTYPES(CSSPropertyAlignmentBaseline)
338
    DEFINE_PROTOTYPES(CSSPropertyBaselineShift)
339
    DEFINE_PROTOTYPES(CSSPropertyDominantBaseline)
340
    DEFINE_PROTOTYPES(CSSPropertyGlyphOrientationHorizontal)
341
    DEFINE_PROTOTYPES(CSSPropertyGlyphOrientationVertical)
342
    DEFINE_PROTOTYPES(CSSPropertyKerning)
343
    DEFINE_PROTOTYPES(CSSPropertyTextAnchor)
344
    DEFINE_PROTOTYPES(CSSPropertyVectorEffect)
345
    DEFINE_PROTOTYPES(CSSPropertyWritingMode)
346
    DEFINE_PROTOTYPES(CSSPropertyWebkitSvgShadow)
347
    DEFINE_PROTOTYPES(CSSPropertyWebkitDashboardRegion)
348
349
	virtual ~CSSStyleApplicator();
350
private:
351
	CSSStyleApplicator();
352
353
	static void mapFillAttachment(RenderStyle*, RenderStyle*, FillLayer* layer, CSSValue* value);
354
	static void mapFillClip(RenderStyle*, RenderStyle*, FillLayer* layer, CSSValue* value);
355
	static void mapFillComposite(RenderStyle*, RenderStyle*, FillLayer* layer, CSSValue* value);
356
	static void mapFillOrigin(RenderStyle*, RenderStyle*, FillLayer* layer, CSSValue* value);
357
	static void mapFillSize(RenderStyle*, RenderStyle*, FillLayer* layer, CSSValue* value);
358
};
359
360
}
361
362
#endif /* CSSStyleApplicator_h_ */
- WebCore/css/CSSStyleSelector.cpp -59 / +34 lines
Lines 40-45 WebCore/css/CSSStyleSelector.cpp_sec1
40
#include "CSSRuleList.h"
40
#include "CSSRuleList.h"
41
#include "CSSSelector.h"
41
#include "CSSSelector.h"
42
#include "CSSSelectorList.h"
42
#include "CSSSelectorList.h"
43
#include "CSSStyleApplicator.h"
43
#include "CSSStyleRule.h"
44
#include "CSSStyleRule.h"
44
#include "CSSStyleSheet.h"
45
#include "CSSStyleSheet.h"
45
#include "CSSTimingFunctionValue.h"
46
#include "CSSTimingFunctionValue.h"
Lines 3089-3152 void CSSStyleSelector::applyProperty(int WebCore/css/CSSStyleSelector.cpp_sec2
3089
        // Limit the properties that can be applied to only the ones honored by :visited.
3090
        // Limit the properties that can be applied to only the ones honored by :visited.
3090
        return;
3091
        return;
3091
    }
3092
    }
3092
    
3093
3094
#define HANDLE_CASE(Property) \
3095
case Property: \
3096
	if (isInherit) \
3097
        CSSStyleApplicator::handleInherit##Property(m_style.get(), m_parentStyle); \
3098
	else if (isInitial) \
3099
		CSSStyleApplicator::handleInitial##Property(m_style.get()); \
3100
	else \
3101
		CSSStyleApplicator::handleValue##Property(m_style.get(), m_rootElementStyle, value); \
3102
    return;
3103
3093
    // What follows is a list that maps the CSS properties into their corresponding front-end
3104
    // What follows is a list that maps the CSS properties into their corresponding front-end
3094
    // RenderStyle values.  Shorthands (e.g. border, background) occur in this list as well and
3105
    // RenderStyle values.  Shorthands (e.g. border, background) occur in this list as well and
3095
    // are only hit when mapping "inherit" or "initial" into front-end values.
3106
    // are only hit when mapping "inherit" or "initial" into front-end values.
3096
    CSSPropertyID property = static_cast<CSSPropertyID>(id);
3107
    CSSPropertyID property = static_cast<CSSPropertyID>(id);
3097
    switch (property) {
3108
    switch (property) {
3098
// ident only properties
3109
// ident only properties
3099
    case CSSPropertyBackgroundAttachment:
3110
    HANDLE_CASE(CSSPropertyBackgroundAttachment)
3100
        HANDLE_BACKGROUND_VALUE(attachment, Attachment, value)
3111
    HANDLE_CASE(CSSPropertyBackgroundClip)
3101
        return;
3112
    HANDLE_CASE(CSSPropertyWebkitBackgroundClip)
3102
    case CSSPropertyBackgroundClip:
3113
    HANDLE_CASE(CSSPropertyWebkitBackgroundComposite)
3103
    case CSSPropertyWebkitBackgroundClip:
3114
    HANDLE_CASE(CSSPropertyBackgroundOrigin)
3104
        HANDLE_BACKGROUND_VALUE(clip, Clip, value)
3115
    HANDLE_CASE(CSSPropertyWebkitBackgroundOrigin)
3105
        return;
3116
    HANDLE_CASE(CSSPropertyBackgroundSize)
3106
    case CSSPropertyWebkitBackgroundComposite:
3117
    HANDLE_CASE(CSSPropertyWebkitBackgroundSize)
3107
        HANDLE_BACKGROUND_VALUE(composite, Composite, value)
3118
    HANDLE_CASE(CSSPropertyWebkitMaskAttachment)
3108
        return;
3119
    HANDLE_CASE(CSSPropertyWebkitMaskClip)
3109
    case CSSPropertyBackgroundOrigin:
3120
    HANDLE_CASE(CSSPropertyWebkitMaskComposite)
3110
    case CSSPropertyWebkitBackgroundOrigin:
3121
    HANDLE_CASE(CSSPropertyWebkitMaskOrigin)
3111
        HANDLE_BACKGROUND_VALUE(origin, Origin, value)
3122
    HANDLE_CASE(CSSPropertyWebkitMaskSize)
3112
        return;
3123
    HANDLE_CASE(CSSPropertyBorderCollapse)
3113
    case CSSPropertyBackgroundSize:
3124
    HANDLE_CASE(CSSPropertyBorderTopStyle)
3114
    case CSSPropertyWebkitBackgroundSize:
3115
        HANDLE_BACKGROUND_VALUE(size, Size, value)
3116
        return;
3117
    case CSSPropertyWebkitMaskAttachment:
3118
        HANDLE_MASK_VALUE(attachment, Attachment, value)
3119
        return;
3120
    case CSSPropertyWebkitMaskClip:
3121
        HANDLE_MASK_VALUE(clip, Clip, value)
3122
        return;
3123
    case CSSPropertyWebkitMaskComposite:
3124
        HANDLE_MASK_VALUE(composite, Composite, value)
3125
        return;
3126
    case CSSPropertyWebkitMaskOrigin:
3127
        HANDLE_MASK_VALUE(origin, Origin, value)
3128
        return;
3129
    case CSSPropertyWebkitMaskSize:
3130
        HANDLE_MASK_VALUE(size, Size, value)
3131
        return;
3132
    case CSSPropertyBorderCollapse:
3133
        HANDLE_INHERIT_AND_INITIAL(borderCollapse, BorderCollapse)
3134
        if (!primitiveValue)
3135
            return;
3136
        switch (primitiveValue->getIdent()) {
3137
            case CSSValueCollapse:
3138
                m_style->setBorderCollapse(true);
3139
                break;
3140
            case CSSValueSeparate:
3141
                m_style->setBorderCollapse(false);
3142
                break;
3143
            default:
3144
                return;
3145
        }
3146
        return;
3147
    case CSSPropertyBorderTopStyle:
3148
        HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE_WITH_VALUE(borderTopStyle, BorderTopStyle, BorderStyle)
3149
        return;
3150
    case CSSPropertyBorderRightStyle:
3125
    case CSSPropertyBorderRightStyle:
3151
        HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE_WITH_VALUE(borderRightStyle, BorderRightStyle, BorderStyle)
3126
        HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE_WITH_VALUE(borderRightStyle, BorderRightStyle, BorderStyle)
3152
        return;
3127
        return;
Lines 5818-5824 void CSSStyleSelector::mapFillComposite( WebCore/css/CSSStyleSelector.cpp_sec3
5818
        layer->setComposite(FillLayer::initialFillComposite(layer->type()));
5793
        layer->setComposite(FillLayer::initialFillComposite(layer->type()));
5819
        return;
5794
        return;
5820
    }
5795
    }
5821
    
5796
5822
    if (!value->isPrimitiveValue())
5797
    if (!value->isPrimitiveValue())
5823
        return;
5798
        return;
5824
5799
Lines 5911-5919 void CSSStyleSelector::mapFillSize(CSSPr WebCore/css/CSSStyleSelector.cpp_sec4
5911
        layer->setSizeType(Cover);
5886
        layer->setSizeType(Cover);
5912
    else
5887
    else
5913
        layer->setSizeType(SizeLength);
5888
        layer->setSizeType(SizeLength);
5914
    
5889
5915
    LengthSize b = FillLayer::initialFillSizeLength(layer->type());
5890
    LengthSize b = FillLayer::initialFillSizeLength(layer->type());
5916
    
5891
5917
    if (value->cssValueType() == CSSValue::CSS_INITIAL || primitiveValue->getIdent() == CSSValueContain
5892
    if (value->cssValueType() == CSSValue::CSS_INITIAL || primitiveValue->getIdent() == CSSValueContain
5918
        || primitiveValue->getIdent() == CSSValueCover) {
5893
        || primitiveValue->getIdent() == CSSValueCover) {
5919
        layer->setSizeLength(b);
5894
        layer->setSizeLength(b);
Lines 5923-5936 void CSSStyleSelector::mapFillSize(CSSPr WebCore/css/CSSStyleSelector.cpp_sec5
5923
    Pair* pair = primitiveValue->getPairValue();
5898
    Pair* pair = primitiveValue->getPairValue();
5924
    if (!pair || !pair->first() || !pair->second())
5899
    if (!pair || !pair->first() || !pair->second())
5925
        return;
5900
        return;
5926
    
5901
5927
    CSSPrimitiveValue* first = static_cast<CSSPrimitiveValue*>(pair->first());
5902
    CSSPrimitiveValue* first = static_cast<CSSPrimitiveValue*>(pair->first());
5928
    CSSPrimitiveValue* second = static_cast<CSSPrimitiveValue*>(pair->second());
5903
    CSSPrimitiveValue* second = static_cast<CSSPrimitiveValue*>(pair->second());
5929
    
5904
5930
    Length firstLength, secondLength;
5905
    Length firstLength, secondLength;
5931
    int firstType = first->primitiveType();
5906
    int firstType = first->primitiveType();
5932
    int secondType = second->primitiveType();
5907
    int secondType = second->primitiveType();
5933
    
5908
5934
    float zoomFactor = m_style->effectiveZoom();
5909
    float zoomFactor = m_style->effectiveZoom();
5935
5910
5936
    if (firstType == CSSPrimitiveValue::CSS_UNKNOWN)
5911
    if (firstType == CSSPrimitiveValue::CSS_UNKNOWN)
Lines 5950-5956 void CSSStyleSelector::mapFillSize(CSSPr WebCore/css/CSSStyleSelector.cpp_sec6
5950
        secondLength = Length(second->getDoubleValue(), Percent);
5925
        secondLength = Length(second->getDoubleValue(), Percent);
5951
    else
5926
    else
5952
        return;
5927
        return;
5953
    
5928
5954
    b.setWidth(firstLength);
5929
    b.setWidth(firstLength);
5955
    b.setHeight(secondLength);
5930
    b.setHeight(secondLength);
5956
    layer->setSizeLength(b);
5931
    layer->setSizeLength(b);
- WebKit2/ChangeLog +10 lines
Lines 1-3 WebKit2/ChangeLog_sec1
1
2010-12-13  Luke Macpherson   <macpherson@chromium.org>
2
3
        Reviewed by NOBODY (OOPS!).
4
5
        Convert CSSStyleSelector::applyProperty to use function pointers
6
        https://bugs.webkit.org/show_bug.cgi?id=46592
7
8
        * PluginProcess/mac/PluginProcessMainMac.mm:
9
        (WebKit::PluginProcessMain):
10
1
2010-12-13  Brent Fulgham  <bfulgham@webkit.org>
11
2010-12-13  Brent Fulgham  <bfulgham@webkit.org>
2
12
3
        Unreviewed build fix after r73807.
13
        Unreviewed build fix after r73807.
- WebKit2/PluginProcess/mac/PluginProcessMainMac.mm -1 / +1 lines
Lines 74-80 int PluginProcessMain(const CommandLine& WebKit2/PluginProcess/mac/PluginProcessMainMac.mm_sec1
74
74
75
    // FIXME: It would be better to proxy set cursor calls over to the UI process instead of
75
    // FIXME: It would be better to proxy set cursor calls over to the UI process instead of
76
    // allowing plug-ins to change the mouse cursor at any time.
76
    // allowing plug-ins to change the mouse cursor at any time.
77
    WKEnableSettingCursorWhenInBackground();
77
    //WKEnableSettingCursorWhenInBackground();
78
78
79
    JSC::initializeThreading();
79
    JSC::initializeThreading();
80
    WTF::initializeMainThread();
80
    WTF::initializeMainThread();

Return to Bug 46592