Changeset 19175 in webkit
- Timestamp:
- Jan 26, 2007 6:13:39 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r19172 r19175 1 2007-01-26 Darin Adler <darin@apple.com> 2 3 Reviewed by Beth. 4 5 - updated test results for change to computed style 6 7 * editing/pasteboard/paste-table-002-expected.txt: 8 Updated for change to order of style properties. 9 10 * fast/css/computed-style-expected.txt: 11 Updated for change to order of style properties and to add new ones. 12 1 13 2007-01-26 Alice Liu <alice.liu@apple.com> 2 14 -
trunk/LayoutTests/editing/pasteboard/paste-table-002-expected.txt
r18403 r19175 18 18 foo bar 19 19 ghijk 20 <div id="test" class="editing"> <div>abcdef<span class="Apple-style-span" style="font-size: 16px; "><div style="font-size: 24px; text-align: center; "><table style=" -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 16px; text-align: auto; "><tbody style=""><tr style=""><td style="">foo</td><td style="">bar</td></tr></tbody></table>ghijk</div></span> </div> </div>20 <div id="test" class="editing"> <div>abcdef<span class="Apple-style-span" style="font-size: 16px; "><div style="font-size: 24px; text-align: center; "><table style="font-size: 16px; text-align: auto; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><tbody style=""><tr style=""><td style="">foo</td><td style="">bar</td></tr></tbody></table>ghijk</div></span> </div> </div> 21 21 -
trunk/LayoutTests/fast/css/computed-style-expected.txt
r18693 r19175 1 1 Attributes that are exposed in the CSS computed style object: 2 2 3 background-attachment: scroll; 3 4 background-color: rgba(0, 0, 0, 0); 4 5 background-image: none; 5 -webkit-background-size: auto auto;6 background-repeat: repeat;7 -webkit-background-composite: source-over;8 background-attachment: scroll;9 -webkit-background-clip: border;10 -webkit-background-origin: padding;11 6 background-position-x: auto; 12 7 background-position-y: auto; 8 background-repeat: repeat; 9 border-bottom-color: rgb(0, 0, 0); 10 border-bottom-style: none; 11 border-bottom-width: 0px; 13 12 border-collapse: separate; 14 -webkit-border-horizontal-spacing: 0px; 15 -webkit-border-vertical-spacing: 0px; 13 border-left-color: rgb(0, 0, 0); 14 border-left-style: none; 15 border-left-width: 0px; 16 border-right-color: rgb(0, 0, 0); 17 border-right-style: none; 18 border-right-width: 0px; 16 19 border-top-color: rgb(0, 0, 0); 17 border-right-color: rgb(0, 0, 0);18 border-bottom-color: rgb(0, 0, 0);19 border-left-color: rgb(0, 0, 0);20 20 border-top-style: none; 21 border-right-style: none;22 border-bottom-style: none;23 border-left-style: none;24 21 border-top-width: 0px; 25 border-right-width: 0px;26 border-bottom-width: 0px;27 border-left-width: 0px;28 22 bottom: auto; 29 -webkit-box-align: stretch; 30 -webkit-box-direction: normal; 31 -webkit-box-flex: 0; 32 -webkit-box-flex-group: 1; 33 -webkit-box-lines: single; 34 -webkit-box-ordinal-group: 1; 35 -webkit-box-orient: horizontal; 36 -webkit-box-pack: start; 37 -webkit-box-shadow: none; 23 box-sizing: border-box; 38 24 caption-side: top; 39 25 clear: none; 40 26 color: rgb(0, 0, 0); 41 -webkit-column-count: auto;42 -webkit-column-gap: normal;43 -webkit-column-rule-color: rgb(0, 0, 0);44 -webkit-column-rule-style: none;45 -webkit-column-rule-width: 0px;46 -webkit-column-break-before: auto;47 -webkit-column-break-after: auto;48 -webkit-column-break-inside: auto;49 -webkit-column-width: auto;50 27 cursor: auto; 51 -webkit-dashboard-region: null;52 28 direction: ltr; 53 29 display: block; … … 60 36 font-weight: normal; 61 37 height: 576px; 62 -webkit-highlight: none;63 38 left: auto; 64 39 letter-spacing: normal; 65 -webkit-line-break: normal;66 -webkit-line-clamp: none;67 40 line-height: normal; 68 41 list-style-image: none; 69 42 list-style-position: outside; 70 43 list-style-type: disc; 71 margin-top: 8px;72 margin-right: 8px;73 44 margin-bottom: 8px; 74 45 margin-left: 8px; 75 -webkit-marquee-direction: auto; 76 -webkit-marquee-increment: 6px; 77 -webkit-marquee-repetition: infinite; 78 -webkit-marquee-style: scroll; 46 margin-right: 8px; 47 margin-top: 8px; 79 48 max-height: none; 80 49 max-width: none; 81 50 min-height: 0px; 82 51 min-width: 0px; 83 -webkit-nbsp-mode: normal;84 52 opacity: 1; 85 53 orphans: 2; 86 54 outline-color: rgb(0, 0, 0); 87 55 outline-style: none; 56 outline-width: 0px; 88 57 overflow-x: visible; 89 58 overflow-y: visible; 90 padding-top: 0px;91 padding-right: 0px;92 59 padding-bottom: 0px; 93 60 padding-left: 0px; 61 padding-right: 0px; 62 padding-top: 0px; 94 63 page-break-after: auto; 95 64 page-break-before: auto; … … 101 70 text-align: auto; 102 71 text-decoration: none; 103 -webkit-text-decorations-in-effect: none;104 -webkit-text-fill-color: rgb(0, 0, 0);105 72 text-indent: 0px; 106 73 text-shadow: none; 107 -webkit-text-security: none;108 -webkit-text-stroke-color: rgb(0, 0, 0);109 -webkit-text-stroke-width: 0;110 74 text-transform: none; 111 75 top: auto; 112 76 unicode-bidi: normal; 113 -webkit-user-modify: read-only;114 77 vertical-align: baseline; 115 78 visibility: visible; … … 120 83 word-wrap: normal; 121 84 z-index: normal; 85 -webkit-appearance: none; 86 -webkit-background-clip: border; 87 -webkit-background-composite: source-over; 88 -webkit-background-origin: padding; 89 -webkit-background-size: auto auto; 90 -webkit-border-horizontal-spacing: 0px; 91 -webkit-border-vertical-spacing: 0px; 92 -webkit-box-align: stretch; 93 -webkit-box-direction: normal; 94 -webkit-box-flex: 0; 95 -webkit-box-flex-group: 1; 96 -webkit-box-lines: single; 97 -webkit-box-ordinal-group: 1; 98 -webkit-box-orient: horizontal; 99 -webkit-box-pack: start; 100 -webkit-box-shadow: none; 101 -webkit-column-break-after: auto; 102 -webkit-column-break-before: auto; 103 -webkit-column-break-inside: auto; 104 -webkit-column-count: auto; 105 -webkit-column-gap: normal; 106 -webkit-column-rule-color: rgb(0, 0, 0); 107 -webkit-column-rule-style: none; 108 -webkit-column-rule-width: 0px; 109 -webkit-column-width: auto; 110 -webkit-highlight: none; 111 -webkit-line-break: normal; 112 -webkit-line-clamp: none; 113 -webkit-margin-bottom-collapse: collapse; 114 -webkit-margin-top-collapse: collapse; 115 -webkit-marquee-direction: auto; 116 -webkit-marquee-increment: 6px; 117 -webkit-marquee-repetition: infinite; 118 -webkit-marquee-style: scroll; 119 -webkit-nbsp-mode: normal; 120 -webkit-rtl-ordering: logical; 121 -webkit-text-decorations-in-effect: none; 122 -webkit-text-fill-color: rgb(0, 0, 0); 123 -webkit-text-security: none; 124 -webkit-text-stroke-color: rgb(0, 0, 0); 125 -webkit-text-stroke-width: 0; 126 -webkit-user-drag: auto; 127 -webkit-user-modify: read-only; 128 -webkit-user-select: auto; 129 -webkit-dashboard-region: null; 122 130 123 131 Other attributes that the computed style class supports: -
trunk/WebCore/ChangeLog
r19174 r19175 1 2007-01-26 Darin Adler <darin@apple.com> 2 3 Reviewed by Beth. 4 5 - fix http://bugs.webkit.org/show_bug.cgi?id=12412 6 "unimplemented propertyID: 46" seen at dojotoolkit.org 7 8 Covered by fast/css/computed-style.html 9 10 * css/CSSPropertyNames.in: Sorted the file into two separate sections, one 11 for properties without the -webkit- prefix and another for properties with. 12 13 * css/makeprop: Generate a CSSPropertyID enum instead of a set of #defines. 14 Removed unused CSS_PROP_MIN and CSS_PROP_MAX. Renamed CSS_PROP_TOTAL to 15 numCSSProperties and changed it to a const int instead of #define. 16 Added a declaration of getPropertyName in the header. Changed the return 17 type of getPropertyName to const char* and the parameter type to CSSPropertyID. 18 19 * css/CSSComputedStyleDeclaration.cpp: Sort the lists of properties in 20 an easier to maintain order -- properties without a WebKit prefix first. 21 (WebCore::valueForLength): Changed return value to PassRefPtr. 22 (WebCore::valueForMaxLength): Ditto. 23 (WebCore::valueForBorderStyle): Ditto. 24 (WebCore::valueForTextAlign): Ditto. 25 (WebCore::valueForAppearance): Added. 26 (WebCore::valueForMarginCollapse): Added. 27 (WebCore::valueForShadow): Changed return value to PassRefPtr. 28 (WebCore::getPositionOffsetValue): Ditto. 29 (WebCore::currentColorOrValidColor): Ditto. 30 (WebCore::CSSComputedStyleDeclaration::cssText): Added cast since 31 getPropertyName now takes an enum value. 32 (WebCore::primitiveValueFromLength): Changed return value to PassRefPtr. 33 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 34 Added cast to CSSPropertyID so that gcc will detect missing enums in the 35 switch statement. Simplified the background-size and border-spacing 36 implementations so they don't have local variables. Added lots of cases 37 to the switch statement for unimplemented properties. Implemented the 38 outline-width, box-sizing, -webkit-appearance, -webkit-rtl-ordering, 39 -webkit-user-drag, and -webkit-user-select properties. 40 (WebCore::CSSComputedStyleDeclaration::item): Added cast since 41 getPropertyName now takes an enum value. 42 43 * css/CSSMutableStyleDeclaration.cpp: Removed declaration of getPropertyName. 44 (WebCore::CSSMutableStyleDeclaration::item): Added cast since 45 getPropertyName now takes an enum value. 46 47 * css/CSSProperty.cpp: Removed declaration of getPropertyName. 48 (WebCore::CSSProperty::cssText): Added cast since 49 getPropertyName now takes an enum value and returns a const char*. 50 51 * css/CSSStyleDeclaration.cpp: Removed declaration of getPropertyName. 52 (WebCore::CSSStyleDeclaration::getPropertyShorthand): Added cast since 53 getPropertyName now takes an enum value and returns a const char*. 54 1 55 2007-01-26 Alice Liu <alice.liu@apple.com> 2 56 -
trunk/WebCore/css/CSSComputedStyleDeclaration.cpp
r18850 r19175 2 2 * 3 3 * Copyright (C) 2004 Zack Rusin <zack@kde.org> 4 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. 5 5 * 6 6 * This library is free software; you can redistribute it and/or … … 36 36 #include "ShadowValue.h" 37 37 38 extern WebCore::String getPropertyName(unsigned short id);39 40 38 namespace WebCore { 41 39 42 40 // List of all properties we know how to compute, omitting shorthands. 43 41 static const int computedProperties[] = { 42 CSS_PROP_BACKGROUND_ATTACHMENT, 44 43 CSS_PROP_BACKGROUND_COLOR, 45 44 CSS_PROP_BACKGROUND_IMAGE, 46 CSS_PROP__WEBKIT_BACKGROUND_SIZE,47 CSS_PROP_BACKGROUND_REPEAT,48 CSS_PROP__WEBKIT_BACKGROUND_COMPOSITE,49 CSS_PROP_BACKGROUND_ATTACHMENT,50 CSS_PROP__WEBKIT_BACKGROUND_CLIP,51 CSS_PROP__WEBKIT_BACKGROUND_ORIGIN,52 45 CSS_PROP_BACKGROUND_POSITION_X, 53 46 CSS_PROP_BACKGROUND_POSITION_Y, 47 CSS_PROP_BACKGROUND_REPEAT, 48 CSS_PROP_BORDER_BOTTOM_COLOR, 49 CSS_PROP_BORDER_BOTTOM_STYLE, 50 CSS_PROP_BORDER_BOTTOM_WIDTH, 54 51 CSS_PROP_BORDER_COLLAPSE, 55 CSS_PROP__WEBKIT_BORDER_HORIZONTAL_SPACING, 56 CSS_PROP__WEBKIT_BORDER_VERTICAL_SPACING, 52 CSS_PROP_BORDER_LEFT_COLOR, 53 CSS_PROP_BORDER_LEFT_STYLE, 54 CSS_PROP_BORDER_LEFT_WIDTH, 55 CSS_PROP_BORDER_RIGHT_COLOR, 56 CSS_PROP_BORDER_RIGHT_STYLE, 57 CSS_PROP_BORDER_RIGHT_WIDTH, 57 58 CSS_PROP_BORDER_TOP_COLOR, 58 CSS_PROP_BORDER_RIGHT_COLOR,59 CSS_PROP_BORDER_BOTTOM_COLOR,60 CSS_PROP_BORDER_LEFT_COLOR,61 59 CSS_PROP_BORDER_TOP_STYLE, 62 CSS_PROP_BORDER_RIGHT_STYLE,63 CSS_PROP_BORDER_BOTTOM_STYLE,64 CSS_PROP_BORDER_LEFT_STYLE,65 60 CSS_PROP_BORDER_TOP_WIDTH, 66 CSS_PROP_BORDER_RIGHT_WIDTH,67 CSS_PROP_BORDER_BOTTOM_WIDTH,68 CSS_PROP_BORDER_LEFT_WIDTH,69 61 CSS_PROP_BOTTOM, 70 CSS_PROP__WEBKIT_BOX_ALIGN, 71 CSS_PROP__WEBKIT_BOX_DIRECTION, 72 CSS_PROP__WEBKIT_BOX_FLEX, 73 CSS_PROP__WEBKIT_BOX_FLEX_GROUP, 74 CSS_PROP__WEBKIT_BOX_LINES, 75 CSS_PROP__WEBKIT_BOX_ORDINAL_GROUP, 76 CSS_PROP__WEBKIT_BOX_ORIENT, 77 CSS_PROP__WEBKIT_BOX_PACK, 78 CSS_PROP__WEBKIT_BOX_SHADOW, 62 CSS_PROP_BOX_SIZING, 79 63 CSS_PROP_CAPTION_SIDE, 80 64 CSS_PROP_CLEAR, 81 65 CSS_PROP_COLOR, 82 CSS_PROP__WEBKIT_COLUMN_COUNT,83 CSS_PROP__WEBKIT_COLUMN_GAP,84 CSS_PROP__WEBKIT_COLUMN_RULE_COLOR,85 CSS_PROP__WEBKIT_COLUMN_RULE_STYLE,86 CSS_PROP__WEBKIT_COLUMN_RULE_WIDTH,87 CSS_PROP__WEBKIT_COLUMN_BREAK_BEFORE,88 CSS_PROP__WEBKIT_COLUMN_BREAK_AFTER,89 CSS_PROP__WEBKIT_COLUMN_BREAK_INSIDE,90 CSS_PROP__WEBKIT_COLUMN_WIDTH,91 66 CSS_PROP_CURSOR, 92 #if PLATFORM(MAC)93 CSS_PROP__WEBKIT_DASHBOARD_REGION,94 #endif95 67 CSS_PROP_DIRECTION, 96 68 CSS_PROP_DISPLAY, … … 103 75 CSS_PROP_FONT_WEIGHT, 104 76 CSS_PROP_HEIGHT, 105 CSS_PROP__WEBKIT_HIGHLIGHT,106 77 CSS_PROP_LEFT, 107 78 CSS_PROP_LETTER_SPACING, 108 CSS_PROP__WEBKIT_LINE_BREAK,109 CSS_PROP__WEBKIT_LINE_CLAMP,110 79 CSS_PROP_LINE_HEIGHT, 111 80 CSS_PROP_LIST_STYLE_IMAGE, 112 81 CSS_PROP_LIST_STYLE_POSITION, 113 82 CSS_PROP_LIST_STYLE_TYPE, 114 CSS_PROP_MARGIN_TOP,115 CSS_PROP_MARGIN_RIGHT,116 83 CSS_PROP_MARGIN_BOTTOM, 117 84 CSS_PROP_MARGIN_LEFT, 118 CSS_PROP__WEBKIT_MARQUEE_DIRECTION, 119 CSS_PROP__WEBKIT_MARQUEE_INCREMENT, 120 CSS_PROP__WEBKIT_MARQUEE_REPETITION, 121 CSS_PROP__WEBKIT_MARQUEE_STYLE, 85 CSS_PROP_MARGIN_RIGHT, 86 CSS_PROP_MARGIN_TOP, 122 87 CSS_PROP_MAX_HEIGHT, 123 88 CSS_PROP_MAX_WIDTH, 124 89 CSS_PROP_MIN_HEIGHT, 125 90 CSS_PROP_MIN_WIDTH, 126 CSS_PROP__WEBKIT_NBSP_MODE,127 91 CSS_PROP_OPACITY, 128 92 CSS_PROP_ORPHANS, 129 93 CSS_PROP_OUTLINE_COLOR, 130 94 CSS_PROP_OUTLINE_STYLE, 95 CSS_PROP_OUTLINE_WIDTH, 131 96 CSS_PROP_OVERFLOW_X, 132 97 CSS_PROP_OVERFLOW_Y, 133 CSS_PROP_PADDING_TOP,134 CSS_PROP_PADDING_RIGHT,135 98 CSS_PROP_PADDING_BOTTOM, 136 99 CSS_PROP_PADDING_LEFT, 100 CSS_PROP_PADDING_RIGHT, 101 CSS_PROP_PADDING_TOP, 137 102 CSS_PROP_PAGE_BREAK_AFTER, 138 103 CSS_PROP_PAGE_BREAK_BEFORE, … … 144 109 CSS_PROP_TEXT_ALIGN, 145 110 CSS_PROP_TEXT_DECORATION, 146 CSS_PROP__WEBKIT_TEXT_DECORATIONS_IN_EFFECT,147 CSS_PROP__WEBKIT_TEXT_FILL_COLOR,148 111 CSS_PROP_TEXT_INDENT, 149 112 CSS_PROP_TEXT_SHADOW, 150 CSS_PROP__WEBKIT_TEXT_SECURITY,151 CSS_PROP__WEBKIT_TEXT_STROKE_COLOR,152 CSS_PROP__WEBKIT_TEXT_STROKE_WIDTH,153 113 CSS_PROP_TEXT_TRANSFORM, 154 114 CSS_PROP_TOP, 155 115 CSS_PROP_UNICODE_BIDI, 156 CSS_PROP__WEBKIT_USER_MODIFY,157 116 CSS_PROP_VERTICAL_ALIGN, 158 117 CSS_PROP_VISIBILITY, … … 163 122 CSS_PROP_WORD_WRAP, 164 123 CSS_PROP_Z_INDEX, 124 125 CSS_PROP__WEBKIT_APPEARANCE, 126 CSS_PROP__WEBKIT_BACKGROUND_CLIP, 127 CSS_PROP__WEBKIT_BACKGROUND_COMPOSITE, 128 CSS_PROP__WEBKIT_BACKGROUND_ORIGIN, 129 CSS_PROP__WEBKIT_BACKGROUND_SIZE, 130 CSS_PROP__WEBKIT_BORDER_HORIZONTAL_SPACING, 131 CSS_PROP__WEBKIT_BORDER_VERTICAL_SPACING, 132 CSS_PROP__WEBKIT_BOX_ALIGN, 133 CSS_PROP__WEBKIT_BOX_DIRECTION, 134 CSS_PROP__WEBKIT_BOX_FLEX, 135 CSS_PROP__WEBKIT_BOX_FLEX_GROUP, 136 CSS_PROP__WEBKIT_BOX_LINES, 137 CSS_PROP__WEBKIT_BOX_ORDINAL_GROUP, 138 CSS_PROP__WEBKIT_BOX_ORIENT, 139 CSS_PROP__WEBKIT_BOX_PACK, 140 CSS_PROP__WEBKIT_BOX_SHADOW, 141 CSS_PROP__WEBKIT_COLUMN_BREAK_AFTER, 142 CSS_PROP__WEBKIT_COLUMN_BREAK_BEFORE, 143 CSS_PROP__WEBKIT_COLUMN_BREAK_INSIDE, 144 CSS_PROP__WEBKIT_COLUMN_COUNT, 145 CSS_PROP__WEBKIT_COLUMN_GAP, 146 CSS_PROP__WEBKIT_COLUMN_RULE_COLOR, 147 CSS_PROP__WEBKIT_COLUMN_RULE_STYLE, 148 CSS_PROP__WEBKIT_COLUMN_RULE_WIDTH, 149 CSS_PROP__WEBKIT_COLUMN_WIDTH, 150 CSS_PROP__WEBKIT_HIGHLIGHT, 151 CSS_PROP__WEBKIT_LINE_BREAK, 152 CSS_PROP__WEBKIT_LINE_CLAMP, 153 CSS_PROP__WEBKIT_MARGIN_BOTTOM_COLLAPSE, 154 CSS_PROP__WEBKIT_MARGIN_TOP_COLLAPSE, 155 CSS_PROP__WEBKIT_MARQUEE_DIRECTION, 156 CSS_PROP__WEBKIT_MARQUEE_INCREMENT, 157 CSS_PROP__WEBKIT_MARQUEE_REPETITION, 158 CSS_PROP__WEBKIT_MARQUEE_STYLE, 159 CSS_PROP__WEBKIT_NBSP_MODE, 160 CSS_PROP__WEBKIT_RTL_ORDERING, 161 CSS_PROP__WEBKIT_TEXT_DECORATIONS_IN_EFFECT, 162 CSS_PROP__WEBKIT_TEXT_FILL_COLOR, 163 CSS_PROP__WEBKIT_TEXT_SECURITY, 164 CSS_PROP__WEBKIT_TEXT_STROKE_COLOR, 165 CSS_PROP__WEBKIT_TEXT_STROKE_WIDTH, 166 CSS_PROP__WEBKIT_USER_DRAG, 167 CSS_PROP__WEBKIT_USER_MODIFY, 168 CSS_PROP__WEBKIT_USER_SELECT, 169 170 #if PLATFORM(MAC) 171 CSS_PROP__WEBKIT_DASHBOARD_REGION, 172 #endif 165 173 }; 166 174 167 175 const unsigned numComputedProperties = sizeof(computedProperties) / sizeof(computedProperties[0]); 168 176 169 static CSSValue*valueForLength(const Length& length)177 static PassRefPtr<CSSValue> valueForLength(const Length& length) 170 178 { 171 179 switch (length.type()) { … … 189 197 190 198 // Handles special value for "none". 191 static CSSValue*valueForMaxLength(const Length& length)199 static PassRefPtr<CSSValue> valueForMaxLength(const Length& length) 192 200 { 193 201 if (length.isFixed() && length.value() == undefinedLength) … … 196 204 } 197 205 198 static CSSValue*valueForBorderStyle(EBorderStyle style)206 static PassRefPtr<CSSValue> valueForBorderStyle(EBorderStyle style) 199 207 { 200 208 switch (style) { … … 224 232 } 225 233 226 static CSSValue*valueForTextAlign(ETextAlign align)234 static PassRefPtr<CSSValue> valueForTextAlign(ETextAlign align) 227 235 { 228 236 switch (align) { … … 248 256 } 249 257 250 static CSSValue* valueForShadow(const ShadowData* shadow) 258 static PassRefPtr<CSSValue> valueForAppearance(EAppearance appearance) 259 { 260 switch (appearance) { 261 case NoAppearance: 262 return new CSSPrimitiveValue(CSS_VAL_NONE); 263 case CheckboxAppearance: 264 return new CSSPrimitiveValue(CSS_VAL_CHECKBOX); 265 case RadioAppearance: 266 return new CSSPrimitiveValue(CSS_VAL_RADIO); 267 case PushButtonAppearance: 268 return new CSSPrimitiveValue(CSS_VAL_PUSH_BUTTON); 269 case SquareButtonAppearance: 270 return new CSSPrimitiveValue(CSS_VAL_SQUARE_BUTTON); 271 case ButtonAppearance: 272 return new CSSPrimitiveValue(CSS_VAL_BUTTON); 273 case ButtonBevelAppearance: 274 return new CSSPrimitiveValue(CSS_VAL_BUTTON_BEVEL); 275 case ListboxAppearance: 276 return new CSSPrimitiveValue(CSS_VAL_LISTBOX); 277 case ListItemAppearance: 278 return new CSSPrimitiveValue(CSS_VAL_LISTITEM); 279 case MenulistAppearance: 280 return new CSSPrimitiveValue(CSS_VAL_MENULIST); 281 case MenulistButtonAppearance: 282 return new CSSPrimitiveValue(CSS_VAL_MENULIST_BUTTON); 283 case MenulistTextAppearance: 284 return new CSSPrimitiveValue(CSS_VAL_MENULIST_TEXT); 285 case MenulistTextFieldAppearance: 286 return new CSSPrimitiveValue(CSS_VAL_MENULIST_TEXTFIELD); 287 case ScrollbarButtonUpAppearance: 288 return new CSSPrimitiveValue(CSS_VAL_SCROLLBARBUTTON_UP); 289 case ScrollbarButtonDownAppearance: 290 return new CSSPrimitiveValue(CSS_VAL_SCROLLBARBUTTON_DOWN); 291 case ScrollbarButtonLeftAppearance: 292 return new CSSPrimitiveValue(CSS_VAL_SCROLLBARBUTTON_LEFT); 293 case ScrollbarButtonRightAppearance: 294 return new CSSPrimitiveValue(CSS_VAL_SCROLLBARBUTTON_RIGHT); 295 case ScrollbarTrackHorizontalAppearance: 296 return new CSSPrimitiveValue(CSS_VAL_SCROLLBARTRACK_HORIZONTAL); 297 case ScrollbarTrackVerticalAppearance: 298 return new CSSPrimitiveValue(CSS_VAL_SCROLLBARTRACK_VERTICAL); 299 case ScrollbarThumbHorizontalAppearance: 300 return new CSSPrimitiveValue(CSS_VAL_SCROLLBARTHUMB_HORIZONTAL); 301 case ScrollbarThumbVerticalAppearance: 302 return new CSSPrimitiveValue(CSS_VAL_SCROLLBARTHUMB_VERTICAL); 303 case ScrollbarGripperHorizontalAppearance: 304 return new CSSPrimitiveValue(CSS_VAL_SCROLLBARGRIPPER_HORIZONTAL); 305 case ScrollbarGripperVerticalAppearance: 306 return new CSSPrimitiveValue(CSS_VAL_SCROLLBARGRIPPER_VERTICAL); 307 case SliderHorizontalAppearance: 308 return new CSSPrimitiveValue(CSS_VAL_SLIDER_HORIZONTAL); 309 case SliderVerticalAppearance: 310 return new CSSPrimitiveValue(CSS_VAL_SLIDER_VERTICAL); 311 case SliderThumbHorizontalAppearance: 312 return new CSSPrimitiveValue(CSS_VAL_SLIDERTHUMB_HORIZONTAL); 313 case SliderThumbVerticalAppearance: 314 return new CSSPrimitiveValue(CSS_VAL_SLIDERTHUMB_VERTICAL); 315 case CaretAppearance: 316 return new CSSPrimitiveValue(CSS_VAL_CARET); 317 case SearchFieldAppearance: 318 return new CSSPrimitiveValue(CSS_VAL_SEARCHFIELD); 319 case SearchFieldDecorationAppearance: 320 return new CSSPrimitiveValue(CSS_VAL_SEARCHFIELD_DECORATION); 321 case SearchFieldResultsDecorationAppearance: 322 return new CSSPrimitiveValue(CSS_VAL_SEARCHFIELD_RESULTS_DECORATION); 323 case SearchFieldResultsButtonAppearance: 324 return new CSSPrimitiveValue(CSS_VAL_SEARCHFIELD_RESULTS_BUTTON); 325 case SearchFieldCancelButtonAppearance: 326 return new CSSPrimitiveValue(CSS_VAL_SEARCHFIELD_CANCEL_BUTTON); 327 case TextFieldAppearance: 328 return new CSSPrimitiveValue(CSS_VAL_TEXTFIELD); 329 case TextAreaAppearance: 330 return new CSSPrimitiveValue(CSS_VAL_TEXTAREA); 331 } 332 ASSERT_NOT_REACHED(); 333 return 0; 334 } 335 336 static PassRefPtr<CSSValue> valueForMarginCollapse(EMarginCollapse collapse) 337 { 338 switch (collapse) { 339 case MCOLLAPSE: 340 return new CSSPrimitiveValue(CSS_VAL_COLLAPSE); 341 case MSEPARATE: 342 return new CSSPrimitiveValue(CSS_VAL_SEPARATE); 343 case MDISCARD: 344 return new CSSPrimitiveValue(CSS_VAL_DISCARD); 345 } 346 ASSERT_NOT_REACHED(); 347 return 0; 348 } 349 350 static PassRefPtr<CSSValue> valueForShadow(const ShadowData* shadow) 251 351 { 252 352 if (!shadow) … … 264 364 } 265 365 266 static CSSValue*getPositionOffsetValue(RenderObject* renderer, int propertyID)366 static PassRefPtr<CSSValue> getPositionOffsetValue(RenderObject* renderer, int propertyID) 267 367 { 268 368 if (!renderer) … … 303 403 } 304 404 305 static CSSPrimitiveValue*currentColorOrValidColor(RenderStyle* style, const Color& color)405 static PassRefPtr<CSSPrimitiveValue> currentColorOrValidColor(RenderStyle* style, const Color& color) 306 406 { 307 407 if (!color.isValid()) … … 326 426 if (i) 327 427 result += " "; 328 result += getPropertyName( computedProperties[i]);428 result += getPropertyName(static_cast<CSSPropertyID>(computedProperties[i])); 329 429 result += ": "; 330 430 result += getPropertyValue(computedProperties[i]); … … 352 452 } 353 453 354 CSSPrimitiveValue* primitiveValueFromLength(Length length, RenderObject* renderer, RenderStyle* style)454 PassRefPtr<CSSPrimitiveValue> primitiveValueFromLength(Length length) 355 455 { 356 456 String string; … … 390 490 return 0; 391 491 392 switch (propertyID) { 492 switch (static_cast<CSSPropertyID>(propertyID)) { 493 case CSS_PROP_INVALID: 494 break; 495 393 496 case CSS_PROP_BACKGROUND_COLOR: 394 497 return new CSSPrimitiveValue(style->backgroundColor().rgb()); … … 397 500 return new CSSPrimitiveValue(style->backgroundImage()->url(), CSSPrimitiveValue::CSS_URI); 398 501 return new CSSPrimitiveValue(CSS_VAL_NONE); 399 case CSS_PROP__WEBKIT_BACKGROUND_SIZE: { 400 Length widthLength = style->backgroundSize().width; 401 Length heightLength = style->backgroundSize().height; 402 CSSPrimitiveValue* bgWidth = primitiveValueFromLength(widthLength, renderer, style); 403 CSSPrimitiveValue* bgHeight = primitiveValueFromLength(heightLength, renderer, style); 404 Pair* pair = new Pair(bgWidth, bgHeight); 405 return new CSSPrimitiveValue(pair); 406 } 502 case CSS_PROP__WEBKIT_BACKGROUND_SIZE: 503 return new CSSPrimitiveValue(new Pair(primitiveValueFromLength(style->backgroundSize().width), 504 primitiveValueFromLength(style->backgroundSize().height))); 407 505 case CSS_PROP_BACKGROUND_REPEAT: 408 506 switch (style->backgroundRepeat()) { … … 488 586 case CSS_PROP_BACKGROUND_POSITION_Y: 489 587 return valueForLength(style->backgroundYPosition()); 588 case CSS_PROP__WEBKIT_BINDING: 490 589 #ifdef XBL_SUPPORT 491 case CSS_PROP__WEBKIT_BINDING: 492 // FIXME: unimplemented 493 break; 590 // FIXME: unimplemented 494 591 #endif 592 break; 495 593 case CSS_PROP_BORDER_COLLAPSE: 496 594 if (style->borderCollapse()) 497 595 return new CSSPrimitiveValue(CSS_VAL_COLLAPSE); 498 596 return new CSSPrimitiveValue(CSS_VAL_SEPARATE); 499 case CSS_PROP_BORDER_SPACING: { 500 String string(numberAsString(style->horizontalBorderSpacing()) + "px " + numberAsString(style->verticalBorderSpacing()) + "px"); 501 return new CSSPrimitiveValue(string, CSSPrimitiveValue::CSS_STRING); 502 } 597 case CSS_PROP_BORDER_SPACING: 598 return new CSSPrimitiveValue(numberAsString(style->horizontalBorderSpacing()) + "px " 599 + numberAsString(style->verticalBorderSpacing()) + "px", CSSPrimitiveValue::CSS_STRING); 503 600 case CSS_PROP__WEBKIT_BORDER_HORIZONTAL_SPACING: 504 601 return new CSSPrimitiveValue(style->horizontalBorderSpacing(), CSSPrimitiveValue::CSS_PX); … … 1077 1174 return valueForBorderStyle(style->outlineStyle()); 1078 1175 case CSS_PROP_OUTLINE_WIDTH: 1079 // FIXME: unimplemented 1080 break; 1176 return new CSSPrimitiveValue(style->outlineWidth(), CSSPrimitiveValue::CSS_PX); 1081 1177 case CSS_PROP_OVERFLOW: 1082 1178 case CSS_PROP_OVERFLOW_X: … … 1397 1493 return new CSSPrimitiveValue(CSS_VAL_NORMAL); 1398 1494 return new CSSPrimitiveValue(style->zIndex(), CSSPrimitiveValue::CSS_NUMBER); 1495 case CSS_PROP_BOX_SIZING: 1496 if (style->boxSizing() == CONTENT_BOX) 1497 new CSSPrimitiveValue(CSS_VAL_CONTENT_BOX); 1498 return new CSSPrimitiveValue(CSS_VAL_BORDER_BOX); 1399 1499 case CSS_PROP_BACKGROUND: 1400 1500 // FIXME: unimplemented … … 1470 1570 } 1471 1571 #endif 1572 case CSS_PROP__WEBKIT_APPEARANCE: 1573 return valueForAppearance(style->appearance()); 1574 case CSS_PROP__WEBKIT_BORDER_IMAGE: 1575 // FIXME: unimplemented 1576 break; 1577 case CSS_PROP__WEBKIT_BORDER_BOTTOM_LEFT_RADIUS: 1578 // FIXME: unimplemented 1579 break; 1580 case CSS_PROP__WEBKIT_BORDER_BOTTOM_RIGHT_RADIUS: 1581 // FIXME: unimplemented 1582 break; 1583 case CSS_PROP__WEBKIT_BORDER_RADIUS: 1584 // FIXME: unimplemented 1585 break; 1586 case CSS_PROP__WEBKIT_BORDER_TOP_LEFT_RADIUS: 1587 // FIXME: unimplemented 1588 break; 1589 case CSS_PROP__WEBKIT_BORDER_TOP_RIGHT_RADIUS: 1590 // FIXME: unimplemented 1591 break; 1592 case CSS_PROP__WEBKIT_COLUMN_RULE: 1593 // FIXME: unimplemented 1594 break; 1595 case CSS_PROP__WEBKIT_COLUMNS: 1596 // FIXME: unimplemented 1597 break; 1598 case CSS_PROP__WEBKIT_FONT_SIZE_DELTA: 1599 // Not a real style property -- used by the editing engine -- so has no computed value. 1600 break; 1601 case CSS_PROP__WEBKIT_MARGIN_BOTTOM_COLLAPSE: 1602 return valueForMarginCollapse(style->marginBottomCollapse()); 1603 case CSS_PROP__WEBKIT_MARGIN_COLLAPSE: 1604 // FIXME: unimplemented 1605 break; 1606 case CSS_PROP__WEBKIT_MARGIN_START: 1607 // FIXME: unimplemented 1608 break; 1609 case CSS_PROP__WEBKIT_MARGIN_TOP_COLLAPSE: 1610 return valueForMarginCollapse(style->marginTopCollapse()); 1611 case CSS_PROP__WEBKIT_PADDING_START: 1612 // FIXME: unimplemented 1613 break; 1614 case CSS_PROP__WEBKIT_RTL_ORDERING: 1615 if (style->visuallyOrdered()) 1616 return new CSSPrimitiveValue(CSS_VAL_VISUAL); 1617 return new CSSPrimitiveValue(CSS_VAL_LOGICAL); 1618 case CSS_PROP__WEBKIT_TEXT_STROKE: 1619 // FIXME: unimplemented 1620 break; 1621 case CSS_PROP__WEBKIT_USER_DRAG: 1622 switch (style->userDrag()) { 1623 case DRAG_AUTO: 1624 return new CSSPrimitiveValue(CSS_VAL_AUTO); 1625 case DRAG_NONE: 1626 return new CSSPrimitiveValue(CSS_VAL_NONE); 1627 case DRAG_ELEMENT: 1628 return new CSSPrimitiveValue(CSS_VAL_ELEMENT); 1629 } 1630 break; 1631 case CSS_PROP__WEBKIT_USER_SELECT: 1632 switch (style->userSelect()) { 1633 case SELECT_AUTO: 1634 return new CSSPrimitiveValue(CSS_VAL_AUTO); 1635 case SELECT_NONE: 1636 return new CSSPrimitiveValue(CSS_VAL_NONE); 1637 case SELECT_TEXT: 1638 return new CSSPrimitiveValue(CSS_VAL_TEXT); 1639 case SELECT_IGNORE: 1640 return new CSSPrimitiveValue(CSS_VAL_IGNORE); 1641 } 1642 break; 1643 case CSS_PROP_SCROLLBAR_3DLIGHT_COLOR: 1644 // FIXME: unimplemented 1645 break; 1646 case CSS_PROP_SCROLLBAR_ARROW_COLOR: 1647 // FIXME: unimplemented 1648 break; 1649 case CSS_PROP_SCROLLBAR_DARKSHADOW_COLOR: 1650 // FIXME: unimplemented 1651 break; 1652 case CSS_PROP_SCROLLBAR_FACE_COLOR: 1653 // FIXME: unimplemented 1654 break; 1655 case CSS_PROP_SCROLLBAR_HIGHLIGHT_COLOR: 1656 // FIXME: unimplemented 1657 break; 1658 case CSS_PROP_SCROLLBAR_SHADOW_COLOR: 1659 // FIXME: unimplemented 1660 break; 1661 case CSS_PROP_SCROLLBAR_TRACK_COLOR: 1662 // FIXME: unimplemented 1663 break; 1664 case CSS_PROP_TEXT_LINE_THROUGH: 1665 // FIXME: unimplemented 1666 break; 1667 case CSS_PROP_TEXT_LINE_THROUGH_COLOR: 1668 // FIXME: unimplemented 1669 break; 1670 case CSS_PROP_TEXT_LINE_THROUGH_MODE: 1671 // FIXME: unimplemented 1672 break; 1673 case CSS_PROP_TEXT_LINE_THROUGH_STYLE: 1674 // FIXME: unimplemented 1675 break; 1676 case CSS_PROP_TEXT_LINE_THROUGH_WIDTH: 1677 // FIXME: unimplemented 1678 break; 1679 case CSS_PROP_TEXT_OVERFLOW: 1680 // FIXME: unimplemented 1681 break; 1682 case CSS_PROP_TEXT_OVERLINE: 1683 // FIXME: unimplemented 1684 break; 1685 case CSS_PROP_TEXT_OVERLINE_COLOR: 1686 // FIXME: unimplemented 1687 break; 1688 case CSS_PROP_TEXT_OVERLINE_MODE: 1689 // FIXME: unimplemented 1690 break; 1691 case CSS_PROP_TEXT_OVERLINE_STYLE: 1692 // FIXME: unimplemented 1693 break; 1694 case CSS_PROP_TEXT_OVERLINE_WIDTH: 1695 // FIXME: unimplemented 1696 break; 1697 case CSS_PROP_TEXT_UNDERLINE: 1698 // FIXME: unimplemented 1699 break; 1700 case CSS_PROP_TEXT_UNDERLINE_COLOR: 1701 // FIXME: unimplemented 1702 break; 1703 case CSS_PROP_TEXT_UNDERLINE_MODE: 1704 // FIXME: unimplemented 1705 break; 1706 case CSS_PROP_TEXT_UNDERLINE_STYLE: 1707 // FIXME: unimplemented 1708 break; 1709 case CSS_PROP_TEXT_UNDERLINE_WIDTH: 1710 // FIXME: unimplemented 1711 break; 1472 1712 } 1473 1713 … … 1523 1763 return String(); 1524 1764 1525 return getPropertyName( computedProperties[i]);1765 return getPropertyName(static_cast<CSSPropertyID>(computedProperties[i])); 1526 1766 } 1527 1767 … … 1531 1771 const int inheritableProperties[] = { 1532 1772 CSS_PROP_BORDER_COLLAPSE, 1533 CSS_PROP__WEBKIT_BORDER_HORIZONTAL_SPACING,1534 CSS_PROP__WEBKIT_BORDER_VERTICAL_SPACING,1535 1773 CSS_PROP_COLOR, 1536 1774 CSS_PROP_FONT_FAMILY, … … 1541 1779 CSS_PROP_LETTER_SPACING, 1542 1780 CSS_PROP_LINE_HEIGHT, 1781 CSS_PROP_ORPHANS, 1543 1782 CSS_PROP_TEXT_ALIGN, 1783 CSS_PROP_TEXT_INDENT, 1784 CSS_PROP_TEXT_TRANSFORM, 1785 CSS_PROP_WHITE_SPACE, 1786 CSS_PROP_WIDOWS, 1787 CSS_PROP_WORD_SPACING, 1788 CSS_PROP__WEBKIT_BORDER_HORIZONTAL_SPACING, 1789 CSS_PROP__WEBKIT_BORDER_VERTICAL_SPACING, 1544 1790 CSS_PROP__WEBKIT_TEXT_DECORATIONS_IN_EFFECT, 1545 1791 CSS_PROP__WEBKIT_TEXT_FILL_COLOR, 1546 CSS_PROP_TEXT_INDENT,1547 1792 CSS_PROP__WEBKIT_TEXT_SIZE_ADJUST, 1548 1793 CSS_PROP__WEBKIT_TEXT_STROKE_COLOR, 1549 1794 CSS_PROP__WEBKIT_TEXT_STROKE_WIDTH, 1550 CSS_PROP_TEXT_TRANSFORM,1551 CSS_PROP_ORPHANS,1552 CSS_PROP_WHITE_SPACE,1553 CSS_PROP_WIDOWS,1554 CSS_PROP_WORD_SPACING,1555 1795 }; 1556 1796 -
trunk/WebCore/css/CSSMutableStyleDeclaration.cpp
r18850 r19175 34 34 #include "StyledElement.h" 35 35 36 // Not in any header, so just declare it here for now.37 WebCore::String getPropertyName(unsigned short id);38 39 36 namespace WebCore { 40 37 … … 536 533 if (i >= m_values.count()) 537 534 return String(); 538 return getPropertyName( m_values[i].id());535 return getPropertyName(static_cast<CSSPropertyID>(m_values[i].id())); 539 536 } 540 537 -
trunk/WebCore/css/CSSProperty.cpp
r18850 r19175 24 24 #include "CSSProperty.h" 25 25 26 #include "CSSPropertyNames.h" 26 27 #include "PlatformString.h" 27 28 // Not in any header, so just declare it here for now.29 WebCore::String getPropertyName(unsigned short id);30 28 31 29 namespace WebCore { … … 33 31 String CSSProperty::cssText() const 34 32 { 35 return getPropertyName(id()) + ": " + m_value->cssText() + (isImportant() ? " !important" : "") + "; ";33 return String(getPropertyName(static_cast<CSSPropertyID>(id()))) + ": " + m_value->cssText() + (isImportant() ? " !important" : "") + "; "; 36 34 } 37 35 -
trunk/WebCore/css/CSSPropertyNames.in
r18660 r19175 2 2 # CSS property names 3 3 # 4 # Some properties are used in khtml, but are not part of CSS. They are used to get4 # Some properties are used internally, but are not part of CSS. They are used to get 5 5 # HTML4 compatibilty in the rendering engine. 6 6 # … … 8 8 # http://msdn.microsoft.com/workshop/author/css/reference/attributes.asp 9 9 # 10 -webkit-appearance 10 11 background 11 12 background-attachment 12 -webkit-background-clip13 13 background-color 14 -webkit-background-composite15 14 background-image 16 -webkit-background-origin17 15 background-position 18 16 background-position-x 19 17 background-position-y 20 18 background-repeat 21 -webkit-background-size 22 -webkit-binding 19 border 20 border-bottom 21 border-bottom-color 22 border-bottom-style 23 border-bottom-width 23 24 border-collapse 24 -webkit-border-image 25 border-color 26 border-left 27 border-left-color 28 border-left-style 29 border-left-width 30 border-right 31 border-right-color 32 border-right-style 33 border-right-width 25 34 border-spacing 26 -webkit-border-horizontal-spacing 27 -webkit-border-vertical-spacing 28 -webkit-border-radius 29 -webkit-border-top-left-radius 30 -webkit-border-top-right-radius 31 -webkit-border-bottom-left-radius 32 -webkit-border-bottom-right-radius 35 border-style 36 border-top 33 37 border-top-color 34 border-right-color35 border-bottom-color36 border-left-color37 38 border-top-style 38 border-right-style39 border-bottom-style40 border-left-style41 39 border-top-width 42 border-right-width 43 border-bottom-width 44 border-left-width 40 border-width 45 41 bottom 46 -webkit-box-align47 -webkit-box-direction48 -webkit-box-flex49 -webkit-box-flex-group50 -webkit-box-lines51 -webkit-box-ordinal-group52 -webkit-box-orient53 -webkit-box-pack54 -webkit-box-shadow55 42 box-sizing 56 43 caption-side … … 58 45 clip 59 46 color 60 -webkit-column-break-after61 -webkit-column-break-before62 -webkit-column-break-inside63 -webkit-column-count64 -webkit-column-gap65 -webkit-column-rule-color66 -webkit-column-rule-style67 -webkit-column-rule-width68 -webkit-column-rule69 -webkit-column-width70 -webkit-columns71 47 content 72 48 counter-increment … … 77 53 empty-cells 78 54 float 55 font 79 56 font-family 80 57 font-size 81 -webkit-font-size-delta82 58 font-stretch 83 59 font-style … … 85 61 font-weight 86 62 height 87 -webkit-highlight88 63 left 89 64 letter-spacing 90 -webkit-line-clamp91 65 line-height 66 list-style 92 67 list-style-image 93 68 list-style-position 94 69 list-style-type 95 margin-top 96 margin-right 70 margin 97 71 margin-bottom 98 72 margin-left 99 -webkit-line-break 100 -webkit-margin-collapse 101 -webkit-margin-top-collapse 102 -webkit-margin-bottom-collapse 103 -webkit-margin-start 104 -webkit-marquee 105 -webkit-marquee-direction 106 -webkit-marquee-increment 107 -webkit-marquee-repetition 108 -webkit-marquee-speed 109 -webkit-marquee-style 110 -webkit-match-nearest-mail-blockquote-color 73 margin-right 74 margin-top 111 75 max-height 112 76 max-width 113 77 min-height 114 78 min-width 115 -webkit-nbsp-mode116 79 opacity 117 80 orphans 81 outline 118 82 outline-color 119 83 outline-offset … … 123 87 overflow-x 124 88 overflow-y 125 padding-top 126 padding-right 89 padding 127 90 padding-bottom 128 91 padding-left 129 -webkit-padding-start 92 padding-right 93 padding-top 130 94 page 131 95 page-break-after … … 134 98 position 135 99 quotes 100 resize 136 101 right 102 scrollbar-3dlight-color 103 scrollbar-arrow-color 104 scrollbar-darkshadow-color 105 scrollbar-face-color 106 scrollbar-highlight-color 107 scrollbar-shadow-color 108 scrollbar-track-color 137 109 size 138 110 table-layout 139 111 text-align 140 112 text-decoration 141 -webkit-text-fill-color142 113 text-indent 143 114 text-line-through … … 152 123 text-overline-style 153 124 text-overline-width 154 -webkit-text-security155 125 text-shadow 156 -webkit-text-stroke157 -webkit-text-stroke-color158 -webkit-text-stroke-width159 126 text-transform 160 127 text-underline … … 163 130 text-underline-style 164 131 text-underline-width 165 resize166 -webkit-text-size-adjust167 -webkit-dashboard-region168 132 top 169 133 unicode-bidi 170 -webkit-user-drag171 -webkit-user-modify172 -webkit-user-select173 134 vertical-align 174 135 visibility … … 176 137 widows 177 138 width 139 word-spacing 178 140 word-wrap 179 word-spacing180 141 z-index 181 background 182 border 183 border-color 184 border-style 185 border-top 186 border-right 187 border-bottom 188 border-left 189 border-width 190 font 191 list-style 192 margin 193 outline 194 padding 195 scrollbar-face-color 196 scrollbar-shadow-color 197 scrollbar-highlight-color 198 scrollbar-3dlight-color 199 scrollbar-darkshadow-color 200 scrollbar-track-color 201 scrollbar-arrow-color 142 143 -webkit-appearance 144 -webkit-background-clip 145 -webkit-background-composite 146 -webkit-background-origin 147 -webkit-background-size 148 -webkit-binding 149 -webkit-border-bottom-left-radius 150 -webkit-border-bottom-right-radius 151 -webkit-border-horizontal-spacing 152 -webkit-border-image 153 -webkit-border-radius 154 -webkit-border-top-left-radius 155 -webkit-border-top-right-radius 156 -webkit-border-vertical-spacing 157 -webkit-box-align 158 -webkit-box-direction 159 -webkit-box-flex 160 -webkit-box-flex-group 161 -webkit-box-lines 162 -webkit-box-ordinal-group 163 -webkit-box-orient 164 -webkit-box-pack 165 -webkit-box-shadow 166 -webkit-column-break-after 167 -webkit-column-break-before 168 -webkit-column-break-inside 169 -webkit-column-count 170 -webkit-column-gap 171 -webkit-column-rule 172 -webkit-column-rule-color 173 -webkit-column-rule-style 174 -webkit-column-rule-width 175 -webkit-column-width 176 -webkit-columns 177 -webkit-dashboard-region 178 -webkit-font-size-delta 179 -webkit-highlight 180 -webkit-line-break 181 -webkit-line-clamp 182 -webkit-margin-bottom-collapse 183 -webkit-margin-collapse 184 -webkit-margin-start 185 -webkit-margin-top-collapse 186 -webkit-marquee 187 -webkit-marquee-direction 188 -webkit-marquee-increment 189 -webkit-marquee-repetition 190 -webkit-marquee-speed 191 -webkit-marquee-style 192 -webkit-match-nearest-mail-blockquote-color 193 -webkit-nbsp-mode 194 -webkit-padding-start 195 -webkit-rtl-ordering 202 196 -webkit-text-decorations-in-effect 203 -webkit-rtl-ordering 197 -webkit-text-fill-color 198 -webkit-text-security 199 -webkit-text-size-adjust 200 -webkit-text-stroke 201 -webkit-text-stroke-color 202 -webkit-text-stroke-width 203 -webkit-user-drag 204 -webkit-user-modify 205 -webkit-user-select -
trunk/WebCore/css/CSSStyleDeclaration.cpp
r18850 r19175 30 30 #include "DeprecatedValueList.h" 31 31 #include "ksvgcssproperties.h" 32 33 // Not in any header, so just declare it here for now.34 WebCore::String getPropertyName(unsigned short id);35 32 36 33 namespace WebCore { … … 104 101 if (!shorthandID) 105 102 return String(); 106 return getPropertyName(s horthandID);103 return getPropertyName(static_cast<CSSPropertyID>(shorthandID)); 107 104 } 108 105 -
trunk/WebCore/css/makeprop
r16026 r19175 2 2 # 3 3 # Copyright (C) 1999 Waldo Bastian (bastian@kde.org) 4 # Copyright (C) 2007 Apple Inc. All rights reserved. 4 5 # 5 6 # This library is free software; you can redistribute it and/or … … 27 28 echo '%{' > CSSPropertyNames.gperf 28 29 echo '/* This file is automatically generated from CSSPropertyNames.in by makeprop, do not edit */' >> CSSPropertyNames.gperf 29 echo '/* Copyright 1999 W. Bastian */' >> CSSPropertyNames.gperf30 30 echo '#include "CSSPropertyNames.h"' >> CSSPropertyNames.gperf 31 31 echo '%}' >> CSSPropertyNames.gperf 32 32 echo 'struct props {' >> CSSPropertyNames.gperf 33 echo ' const char *name;' >> CSSPropertyNames.gperf33 echo ' const char* name;' >> CSSPropertyNames.gperf 34 34 echo ' int id;' >> CSSPropertyNames.gperf 35 35 echo '};' >> CSSPropertyNames.gperf … … 41 41 42 42 echo '/* This file is automatically generated from CSSPropertyNames.in by makeprop, do not edit */' > CSSPropertyNames.h 43 echo '/* Copyright 1998 W. Bastian */' >> CSSPropertyNames.h 44 echo '#ifndef CSSPROPERTIES_H' >> CSSPropertyNames.h 45 echo '#define CSSPROPERTIES_H' >> CSSPropertyNames.h 43 echo '' >> CSSPropertyNames.h 44 echo '#ifndef CSSPropertyNames_h' >> CSSPropertyNames.h 45 echo '#define CSSPropertyNames_h' >> CSSPropertyNames.h 46 echo '' >> CSSPropertyNames.h 46 47 48 echo 'enum CSSPropertyID {' >> CSSPropertyNames.h 47 49 cat CSSPropertyNames.strip | awk '{ \ 48 50 i=1; \ 49 print " #define CSS_PROP_INVALID 0"; \50 print "#define CSS_PROP_MIN 1"; \51 do { gsub("-", "_"); print "#define CSS_PROP_" toupper($0) " " i; i = i + 1 } while (getline); \51 print " CSS_PROP_INVALID = 0,"; \ 52 do { gsub("-", "_"); print " CSS_PROP_" toupper($0) " = " i ","; i = i + 1 } while (getline); \ 53 print "};"; \ 52 54 print ""; \ 53 print "#define CSS_PROP_MAX CSS_PROP_Z_INDEX"; \ 54 print "#define CSS_PROP_TOTAL " i \ 55 print "const int numCSSProperties = " i ";" \ 55 56 }' >> CSSPropertyNames.h 56 57 perl -e 'my $max = 0; while (<>) { chomp; $max = length if $max < length; } print "const size_t maxCSSPropertyNameLength = $max;\n"' < CSSPropertyNames.strip >> CSSPropertyNames.h 57 58 59 echo '' >> CSSPropertyNames.h 60 echo 'const char* getPropertyName(CSSPropertyID);' >> CSSPropertyNames.h 61 echo '' >> CSSPropertyNames.h 58 62 echo '#endif' >> CSSPropertyNames.h 59 63 … … 67 71 print " 0"; \ 68 72 print "};"; \ 69 print " String getPropertyName(unsigned shortid)"; \73 print "const char* getPropertyName(CSSPropertyID id)"; \ 70 74 print "{"; \ 71 print " if(id >= CSS_PROP_TOTAL || id == 0)"; \ 72 print " return String();";\ 73 print " else";\ 74 print " return String(propertyList[id]);"; \ 75 print " if (id >= numCSSProperties || id <= 0)"; \ 76 print " return 0;";\ 77 print " return propertyList[id];"; \ 75 78 print "}"; \ 76 79 print ""; \ -
trunk/WebKit/ChangeLog
r19167 r19175 1 2007-01-26 Darin Adler <darin@apple.com> 2 3 Reviewed by Beth. 4 5 * WebInspector/webInspector/inspector.js: Updated for new computed style properties. 6 1 7 2007-01-26 Kevin Decker <kdecker@apple.com> 2 8 -
trunk/WebKit/WebInspector/webInspector/inspector.js
r18693 r19175 35 35 // since we always want to display those. 36 36 var typicalStylePropertyValue = { 37 "-webkit-appearance": "none", 37 38 "-webkit-background-clip": "border", 38 39 "-webkit-background-composite": "source-over", … … 62 63 "-webkit-line-break": "normal", 63 64 "-webkit-line-clamp": "none", 65 "-webkit-margin-bottom-collapse": "collapse", 66 "-webkit-margin-top-collapse": "collapse", 64 67 "-webkit-marquee-direction": "auto", 65 68 "-webkit-marquee-increment": "6px", … … 67 70 "-webkit-marquee-style": "scroll", 68 71 "-webkit-nbsp-mode": "normal", 72 "-webkit-rtl-ordering": "logical", 69 73 "-webkit-text-decorations-in-effect": "none", 70 74 "-webkit-text-fill-color": "rgb(0, 0, 0)", … … 72 76 "-webkit-text-stroke-color": "rgb(0, 0, 0)", 73 77 "-webkit-text-stroke-width": "0", 78 "-webkit-user-drag": "auto", 74 79 "-webkit-user-modify": "read-only", 80 "-webkit-user-select": "auto", 75 81 "background-attachment": "scroll", 76 82 "background-color": "rgba(0, 0, 0, 0)", … … 93 99 "border-top-width": "0px", 94 100 "bottom": "auto", 101 "box-sizing": "border-box", 95 102 "caption-side": "top", 96 103 "clear": "none", … … 121 128 "outline-color": "rgb(0, 0, 0)", 122 129 "outline-style": "none", 130 "outline-width": "0px", 123 131 "overflow": "visible", 124 132 "overflow-x": "visible",
Note: See TracChangeset
for help on using the changeset viewer.