Changeset 19175 in webkit


Ignore:
Timestamp:
Jan 26, 2007 6:13:39 PM (17 years ago)
Author:
weinig
Message:

LayoutTests:

Reviewed by Beth.

  • updated test results for change to computed style
  • editing/pasteboard/paste-table-002-expected.txt: Updated for change to order of style properties.
  • fast/css/computed-style-expected.txt: Updated for change to order of style properties and to add new ones.

WebCore:

Reviewed by Beth.

Covered by fast/css/computed-style.html

  • css/CSSPropertyNames.in: Sorted the file into two separate sections, one for properties without the -webkit- prefix and another for properties with.
  • css/makeprop: Generate a CSSPropertyID enum instead of a set of #defines. Removed unused CSS_PROP_MIN and CSS_PROP_MAX. Renamed CSS_PROP_TOTAL to numCSSProperties and changed it to a const int instead of #define. Added a declaration of getPropertyName in the header. Changed the return type of getPropertyName to const char* and the parameter type to CSSPropertyID.
  • css/CSSComputedStyleDeclaration.cpp: Sort the lists of properties in an easier to maintain order -- properties without a WebKit prefix first. (WebCore::valueForLength): Changed return value to PassRefPtr. (WebCore::valueForMaxLength): Ditto. (WebCore::valueForBorderStyle): Ditto. (WebCore::valueForTextAlign): Ditto. (WebCore::valueForAppearance): Added. (WebCore::valueForMarginCollapse): Added. (WebCore::valueForShadow): Changed return value to PassRefPtr. (WebCore::getPositionOffsetValue): Ditto. (WebCore::currentColorOrValidColor): Ditto. (WebCore::CSSComputedStyleDeclaration::cssText): Added cast since getPropertyName now takes an enum value. (WebCore::primitiveValueFromLength): Changed return value to PassRefPtr. (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Added cast to CSSPropertyID so that gcc will detect missing enums in the switch statement. Simplified the background-size and border-spacing implementations so they don't have local variables. Added lots of cases to the switch statement for unimplemented properties. Implemented the outline-width, box-sizing, -webkit-appearance, -webkit-rtl-ordering, -webkit-user-drag, and -webkit-user-select properties. (WebCore::CSSComputedStyleDeclaration::item): Added cast since getPropertyName now takes an enum value.
  • css/CSSMutableStyleDeclaration.cpp: Removed declaration of getPropertyName. (WebCore::CSSMutableStyleDeclaration::item): Added cast since getPropertyName now takes an enum value.
  • css/CSSProperty.cpp: Removed declaration of getPropertyName. (WebCore::CSSProperty::cssText): Added cast since getPropertyName now takes an enum value and returns a const char*.
  • css/CSSStyleDeclaration.cpp: Removed declaration of getPropertyName. (WebCore::CSSStyleDeclaration::getPropertyShorthand): Added cast since getPropertyName now takes an enum value and returns a const char*.

WebKit:

Reviewed by Beth.

  • WebInspector/webInspector/inspector.js: Updated for new computed style properties.
Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r19172 r19175  
     12007-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
    1132007-01-26  Alice Liu  <alice.liu@apple.com>
    214
  • trunk/LayoutTests/editing/pasteboard/paste-table-002-expected.txt

    r18403 r19175  
    1818foo     bar
    1919ghijk
    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>
    2121
  • trunk/LayoutTests/fast/css/computed-style-expected.txt

    r18693 r19175  
    11Attributes that are exposed in the CSS computed style object:
    22
     3background-attachment: scroll;
    34background-color: rgba(0, 0, 0, 0);
    45background-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;
    116background-position-x: auto;
    127background-position-y: auto;
     8background-repeat: repeat;
     9border-bottom-color: rgb(0, 0, 0);
     10border-bottom-style: none;
     11border-bottom-width: 0px;
    1312border-collapse: separate;
    14 -webkit-border-horizontal-spacing: 0px;
    15 -webkit-border-vertical-spacing: 0px;
     13border-left-color: rgb(0, 0, 0);
     14border-left-style: none;
     15border-left-width: 0px;
     16border-right-color: rgb(0, 0, 0);
     17border-right-style: none;
     18border-right-width: 0px;
    1619border-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);
    2020border-top-style: none;
    21 border-right-style: none;
    22 border-bottom-style: none;
    23 border-left-style: none;
    2421border-top-width: 0px;
    25 border-right-width: 0px;
    26 border-bottom-width: 0px;
    27 border-left-width: 0px;
    2822bottom: 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;
     23box-sizing: border-box;
    3824caption-side: top;
    3925clear: none;
    4026color: 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;
    5027cursor: auto;
    51 -webkit-dashboard-region: null;
    5228direction: ltr;
    5329display: block;
     
    6036font-weight: normal;
    6137height: 576px;
    62 -webkit-highlight: none;
    6338left: auto;
    6439letter-spacing: normal;
    65 -webkit-line-break: normal;
    66 -webkit-line-clamp: none;
    6740line-height: normal;
    6841list-style-image: none;
    6942list-style-position: outside;
    7043list-style-type: disc;
    71 margin-top: 8px;
    72 margin-right: 8px;
    7344margin-bottom: 8px;
    7445margin-left: 8px;
    75 -webkit-marquee-direction: auto;
    76 -webkit-marquee-increment: 6px;
    77 -webkit-marquee-repetition: infinite;
    78 -webkit-marquee-style: scroll;
     46margin-right: 8px;
     47margin-top: 8px;
    7948max-height: none;
    8049max-width: none;
    8150min-height: 0px;
    8251min-width: 0px;
    83 -webkit-nbsp-mode: normal;
    8452opacity: 1;
    8553orphans: 2;
    8654outline-color: rgb(0, 0, 0);
    8755outline-style: none;
     56outline-width: 0px;
    8857overflow-x: visible;
    8958overflow-y: visible;
    90 padding-top: 0px;
    91 padding-right: 0px;
    9259padding-bottom: 0px;
    9360padding-left: 0px;
     61padding-right: 0px;
     62padding-top: 0px;
    9463page-break-after: auto;
    9564page-break-before: auto;
     
    10170text-align: auto;
    10271text-decoration: none;
    103 -webkit-text-decorations-in-effect: none;
    104 -webkit-text-fill-color: rgb(0, 0, 0);
    10572text-indent: 0px;
    10673text-shadow: none;
    107 -webkit-text-security: none;
    108 -webkit-text-stroke-color: rgb(0, 0, 0);
    109 -webkit-text-stroke-width: 0;
    11074text-transform: none;
    11175top: auto;
    11276unicode-bidi: normal;
    113 -webkit-user-modify: read-only;
    11477vertical-align: baseline;
    11578visibility: visible;
     
    12083word-wrap: normal;
    12184z-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;
    122130
    123131Other attributes that the computed style class supports:
  • trunk/WebCore/ChangeLog

    r19174 r19175  
     12007-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
    1552007-01-26  Alice Liu  <alice.liu@apple.com>
    256
  • trunk/WebCore/css/CSSComputedStyleDeclaration.cpp

    r18850 r19175  
    22 *
    33 * 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.
    55 *
    66 * This library is free software; you can redistribute it and/or
     
    3636#include "ShadowValue.h"
    3737
    38 extern WebCore::String getPropertyName(unsigned short id);
    39 
    4038namespace WebCore {
    4139
    4240// List of all properties we know how to compute, omitting shorthands.
    4341static const int computedProperties[] = {
     42    CSS_PROP_BACKGROUND_ATTACHMENT,
    4443    CSS_PROP_BACKGROUND_COLOR,
    4544    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,
    5245    CSS_PROP_BACKGROUND_POSITION_X,
    5346    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,
    5451    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,
    5758    CSS_PROP_BORDER_TOP_COLOR,
    58     CSS_PROP_BORDER_RIGHT_COLOR,
    59     CSS_PROP_BORDER_BOTTOM_COLOR,
    60     CSS_PROP_BORDER_LEFT_COLOR,
    6159    CSS_PROP_BORDER_TOP_STYLE,
    62     CSS_PROP_BORDER_RIGHT_STYLE,
    63     CSS_PROP_BORDER_BOTTOM_STYLE,
    64     CSS_PROP_BORDER_LEFT_STYLE,
    6560    CSS_PROP_BORDER_TOP_WIDTH,
    66     CSS_PROP_BORDER_RIGHT_WIDTH,
    67     CSS_PROP_BORDER_BOTTOM_WIDTH,
    68     CSS_PROP_BORDER_LEFT_WIDTH,
    6961    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,
    7963    CSS_PROP_CAPTION_SIDE,
    8064    CSS_PROP_CLEAR,
    8165    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,
    9166    CSS_PROP_CURSOR,
    92 #if PLATFORM(MAC)
    93     CSS_PROP__WEBKIT_DASHBOARD_REGION,
    94 #endif
    9567    CSS_PROP_DIRECTION,
    9668    CSS_PROP_DISPLAY,
     
    10375    CSS_PROP_FONT_WEIGHT,
    10476    CSS_PROP_HEIGHT,
    105     CSS_PROP__WEBKIT_HIGHLIGHT,
    10677    CSS_PROP_LEFT,
    10778    CSS_PROP_LETTER_SPACING,
    108     CSS_PROP__WEBKIT_LINE_BREAK,
    109     CSS_PROP__WEBKIT_LINE_CLAMP,
    11079    CSS_PROP_LINE_HEIGHT,
    11180    CSS_PROP_LIST_STYLE_IMAGE,
    11281    CSS_PROP_LIST_STYLE_POSITION,
    11382    CSS_PROP_LIST_STYLE_TYPE,
    114     CSS_PROP_MARGIN_TOP,
    115     CSS_PROP_MARGIN_RIGHT,
    11683    CSS_PROP_MARGIN_BOTTOM,
    11784    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,
    12287    CSS_PROP_MAX_HEIGHT,
    12388    CSS_PROP_MAX_WIDTH,
    12489    CSS_PROP_MIN_HEIGHT,
    12590    CSS_PROP_MIN_WIDTH,
    126     CSS_PROP__WEBKIT_NBSP_MODE,
    12791    CSS_PROP_OPACITY,
    12892    CSS_PROP_ORPHANS,
    12993    CSS_PROP_OUTLINE_COLOR,
    13094    CSS_PROP_OUTLINE_STYLE,
     95    CSS_PROP_OUTLINE_WIDTH,
    13196    CSS_PROP_OVERFLOW_X,
    13297    CSS_PROP_OVERFLOW_Y,
    133     CSS_PROP_PADDING_TOP,
    134     CSS_PROP_PADDING_RIGHT,
    13598    CSS_PROP_PADDING_BOTTOM,
    13699    CSS_PROP_PADDING_LEFT,
     100    CSS_PROP_PADDING_RIGHT,
     101    CSS_PROP_PADDING_TOP,
    137102    CSS_PROP_PAGE_BREAK_AFTER,
    138103    CSS_PROP_PAGE_BREAK_BEFORE,
     
    144109    CSS_PROP_TEXT_ALIGN,
    145110    CSS_PROP_TEXT_DECORATION,
    146     CSS_PROP__WEBKIT_TEXT_DECORATIONS_IN_EFFECT,
    147     CSS_PROP__WEBKIT_TEXT_FILL_COLOR,
    148111    CSS_PROP_TEXT_INDENT,
    149112    CSS_PROP_TEXT_SHADOW,
    150     CSS_PROP__WEBKIT_TEXT_SECURITY,
    151     CSS_PROP__WEBKIT_TEXT_STROKE_COLOR,
    152     CSS_PROP__WEBKIT_TEXT_STROKE_WIDTH,
    153113    CSS_PROP_TEXT_TRANSFORM,
    154114    CSS_PROP_TOP,
    155115    CSS_PROP_UNICODE_BIDI,
    156     CSS_PROP__WEBKIT_USER_MODIFY,
    157116    CSS_PROP_VERTICAL_ALIGN,
    158117    CSS_PROP_VISIBILITY,
     
    163122    CSS_PROP_WORD_WRAP,
    164123    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
    165173};
    166174
    167175const unsigned numComputedProperties = sizeof(computedProperties) / sizeof(computedProperties[0]);
    168176
    169 static CSSValue* valueForLength(const Length& length)
     177static PassRefPtr<CSSValue> valueForLength(const Length& length)
    170178{
    171179    switch (length.type()) {
     
    189197
    190198// Handles special value for "none".
    191 static CSSValue* valueForMaxLength(const Length& length)
     199static PassRefPtr<CSSValue> valueForMaxLength(const Length& length)
    192200{
    193201    if (length.isFixed() && length.value() == undefinedLength)
     
    196204}
    197205
    198 static CSSValue* valueForBorderStyle(EBorderStyle style)
     206static PassRefPtr<CSSValue> valueForBorderStyle(EBorderStyle style)
    199207{
    200208    switch (style) {
     
    224232}
    225233
    226 static CSSValue* valueForTextAlign(ETextAlign align)
     234static PassRefPtr<CSSValue> valueForTextAlign(ETextAlign align)
    227235{
    228236    switch (align) {
     
    248256}
    249257
    250 static CSSValue* valueForShadow(const ShadowData* shadow)
     258static 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
     336static 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
     350static PassRefPtr<CSSValue> valueForShadow(const ShadowData* shadow)
    251351{
    252352    if (!shadow)
     
    264364}
    265365
    266 static CSSValue* getPositionOffsetValue(RenderObject* renderer, int propertyID)
     366static PassRefPtr<CSSValue> getPositionOffsetValue(RenderObject* renderer, int propertyID)
    267367{
    268368    if (!renderer)
     
    303403}
    304404
    305 static CSSPrimitiveValue* currentColorOrValidColor(RenderStyle* style, const Color& color)
     405static PassRefPtr<CSSPrimitiveValue> currentColorOrValidColor(RenderStyle* style, const Color& color)
    306406{
    307407    if (!color.isValid())
     
    326426        if (i)
    327427            result += " ";
    328         result += getPropertyName(computedProperties[i]);
     428        result += getPropertyName(static_cast<CSSPropertyID>(computedProperties[i]));
    329429        result += ": ";
    330430        result += getPropertyValue(computedProperties[i]);
     
    352452}
    353453
    354 CSSPrimitiveValue* primitiveValueFromLength(Length length, RenderObject* renderer, RenderStyle* style)
     454PassRefPtr<CSSPrimitiveValue> primitiveValueFromLength(Length length)
    355455{
    356456    String string;
     
    390490        return 0;
    391491
    392     switch (propertyID) {
     492    switch (static_cast<CSSPropertyID>(propertyID)) {
     493        case CSS_PROP_INVALID:
     494            break;
     495
    393496        case CSS_PROP_BACKGROUND_COLOR:
    394497            return new CSSPrimitiveValue(style->backgroundColor().rgb());
     
    397500                return new CSSPrimitiveValue(style->backgroundImage()->url(), CSSPrimitiveValue::CSS_URI);
    398501            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)));
    407505        case CSS_PROP_BACKGROUND_REPEAT:
    408506            switch (style->backgroundRepeat()) {
     
    488586        case CSS_PROP_BACKGROUND_POSITION_Y:
    489587            return valueForLength(style->backgroundYPosition());
     588        case CSS_PROP__WEBKIT_BINDING:
    490589#ifdef XBL_SUPPORT
    491         case CSS_PROP__WEBKIT_BINDING:
    492             // FIXME: unimplemented
    493             break;
     590            // FIXME: unimplemented
    494591#endif
     592            break;
    495593        case CSS_PROP_BORDER_COLLAPSE:
    496594            if (style->borderCollapse())
    497595                return new CSSPrimitiveValue(CSS_VAL_COLLAPSE);
    498596            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);
    503600        case CSS_PROP__WEBKIT_BORDER_HORIZONTAL_SPACING:
    504601            return new CSSPrimitiveValue(style->horizontalBorderSpacing(), CSSPrimitiveValue::CSS_PX);
     
    10771174            return valueForBorderStyle(style->outlineStyle());
    10781175        case CSS_PROP_OUTLINE_WIDTH:
    1079             // FIXME: unimplemented
    1080             break;
     1176            return new CSSPrimitiveValue(style->outlineWidth(), CSSPrimitiveValue::CSS_PX);
    10811177        case CSS_PROP_OVERFLOW:
    10821178        case CSS_PROP_OVERFLOW_X:
     
    13971493                return new CSSPrimitiveValue(CSS_VAL_NORMAL);
    13981494            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);
    13991499        case CSS_PROP_BACKGROUND:
    14001500            // FIXME: unimplemented
     
    14701570        }
    14711571#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;
    14721712    }
    14731713
     
    15231763        return String();
    15241764
    1525     return getPropertyName(computedProperties[i]);
     1765    return getPropertyName(static_cast<CSSPropertyID>(computedProperties[i]));
    15261766}
    15271767
     
    15311771const int inheritableProperties[] = {
    15321772    CSS_PROP_BORDER_COLLAPSE,
    1533     CSS_PROP__WEBKIT_BORDER_HORIZONTAL_SPACING,
    1534     CSS_PROP__WEBKIT_BORDER_VERTICAL_SPACING,
    15351773    CSS_PROP_COLOR,
    15361774    CSS_PROP_FONT_FAMILY,
     
    15411779    CSS_PROP_LETTER_SPACING,
    15421780    CSS_PROP_LINE_HEIGHT,
     1781    CSS_PROP_ORPHANS,
    15431782    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,
    15441790    CSS_PROP__WEBKIT_TEXT_DECORATIONS_IN_EFFECT,
    15451791    CSS_PROP__WEBKIT_TEXT_FILL_COLOR,
    1546     CSS_PROP_TEXT_INDENT,
    15471792    CSS_PROP__WEBKIT_TEXT_SIZE_ADJUST,
    15481793    CSS_PROP__WEBKIT_TEXT_STROKE_COLOR,
    15491794    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,
    15551795};
    15561796
  • trunk/WebCore/css/CSSMutableStyleDeclaration.cpp

    r18850 r19175  
    3434#include "StyledElement.h"
    3535
    36 // Not in any header, so just declare it here for now.
    37 WebCore::String getPropertyName(unsigned short id);
    38 
    3936namespace WebCore {
    4037
     
    536533    if (i >= m_values.count())
    537534       return String();
    538     return getPropertyName(m_values[i].id());
     535    return getPropertyName(static_cast<CSSPropertyID>(m_values[i].id()));
    539536}
    540537
  • trunk/WebCore/css/CSSProperty.cpp

    r18850 r19175  
    2424#include "CSSProperty.h"
    2525
     26#include "CSSPropertyNames.h"
    2627#include "PlatformString.h"
    27 
    28 // Not in any header, so just declare it here for now.
    29 WebCore::String getPropertyName(unsigned short id);
    3028
    3129namespace WebCore {
     
    3331String CSSProperty::cssText() const
    3432{
    35     return getPropertyName(id()) + ": " + m_value->cssText() + (isImportant() ? " !important" : "") + "; ";
     33    return String(getPropertyName(static_cast<CSSPropertyID>(id()))) + ": " + m_value->cssText() + (isImportant() ? " !important" : "") + "; ";
    3634}
    3735
  • trunk/WebCore/css/CSSPropertyNames.in

    r18660 r19175  
    22# CSS property names
    33#
    4 # Some properties are used in khtml, but are not part of CSS. They are used to get
     4# Some properties are used internally, but are not part of CSS. They are used to get
    55# HTML4 compatibilty in the rendering engine.
    66#
     
    88# http://msdn.microsoft.com/workshop/author/css/reference/attributes.asp
    99#
    10 -webkit-appearance
     10
     11background
    1112background-attachment
    12 -webkit-background-clip
    1313background-color
    14 -webkit-background-composite
    1514background-image
    16 -webkit-background-origin
    1715background-position
    1816background-position-x
    1917background-position-y
    2018background-repeat
    21 -webkit-background-size
    22 -webkit-binding
     19border
     20border-bottom
     21border-bottom-color
     22border-bottom-style
     23border-bottom-width
    2324border-collapse
    24 -webkit-border-image
     25border-color
     26border-left
     27border-left-color
     28border-left-style
     29border-left-width
     30border-right
     31border-right-color
     32border-right-style
     33border-right-width
    2534border-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
     35border-style
     36border-top
    3337border-top-color
    34 border-right-color
    35 border-bottom-color
    36 border-left-color
    3738border-top-style
    38 border-right-style
    39 border-bottom-style
    40 border-left-style
    4139border-top-width
    42 border-right-width
    43 border-bottom-width
    44 border-left-width
     40border-width
    4541bottom
    46 -webkit-box-align
    47 -webkit-box-direction
    48 -webkit-box-flex
    49 -webkit-box-flex-group
    50 -webkit-box-lines
    51 -webkit-box-ordinal-group
    52 -webkit-box-orient
    53 -webkit-box-pack
    54 -webkit-box-shadow
    5542box-sizing
    5643caption-side
     
    5845clip
    5946color
    60 -webkit-column-break-after
    61 -webkit-column-break-before
    62 -webkit-column-break-inside
    63 -webkit-column-count
    64 -webkit-column-gap
    65 -webkit-column-rule-color
    66 -webkit-column-rule-style
    67 -webkit-column-rule-width
    68 -webkit-column-rule
    69 -webkit-column-width
    70 -webkit-columns
    7147content
    7248counter-increment
     
    7753empty-cells
    7854float
     55font
    7956font-family
    8057font-size
    81 -webkit-font-size-delta
    8258font-stretch
    8359font-style
     
    8561font-weight
    8662height
    87 -webkit-highlight
    8863left
    8964letter-spacing
    90 -webkit-line-clamp
    9165line-height
     66list-style
    9267list-style-image
    9368list-style-position
    9469list-style-type
    95 margin-top
    96 margin-right
     70margin
    9771margin-bottom
    9872margin-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
     73margin-right
     74margin-top
    11175max-height
    11276max-width
    11377min-height
    11478min-width
    115 -webkit-nbsp-mode
    11679opacity
    11780orphans
     81outline
    11882outline-color
    11983outline-offset
     
    12387overflow-x
    12488overflow-y
    125 padding-top
    126 padding-right
     89padding
    12790padding-bottom
    12891padding-left
    129 -webkit-padding-start
     92padding-right
     93padding-top
    13094page
    13195page-break-after
     
    13498position
    13599quotes
     100resize
    136101right
     102scrollbar-3dlight-color
     103scrollbar-arrow-color
     104scrollbar-darkshadow-color
     105scrollbar-face-color
     106scrollbar-highlight-color
     107scrollbar-shadow-color
     108scrollbar-track-color
    137109size
    138110table-layout
    139111text-align
    140112text-decoration
    141 -webkit-text-fill-color
    142113text-indent
    143114text-line-through
     
    152123text-overline-style
    153124text-overline-width
    154 -webkit-text-security
    155125text-shadow
    156 -webkit-text-stroke
    157 -webkit-text-stroke-color
    158 -webkit-text-stroke-width
    159126text-transform
    160127text-underline
     
    163130text-underline-style
    164131text-underline-width
    165 resize
    166 -webkit-text-size-adjust
    167 -webkit-dashboard-region
    168132top
    169133unicode-bidi
    170 -webkit-user-drag
    171 -webkit-user-modify
    172 -webkit-user-select
    173134vertical-align
    174135visibility
     
    176137widows
    177138width
     139word-spacing
    178140word-wrap
    179 word-spacing
    180141z-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
    202196-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  
    3030#include "DeprecatedValueList.h"
    3131#include "ksvgcssproperties.h"
    32 
    33 // Not in any header, so just declare it here for now.
    34 WebCore::String getPropertyName(unsigned short id);
    3532
    3633namespace WebCore {
     
    104101    if (!shorthandID)
    105102        return String();
    106     return getPropertyName(shorthandID);
     103    return getPropertyName(static_cast<CSSPropertyID>(shorthandID));
    107104}
    108105
  • trunk/WebCore/css/makeprop

    r16026 r19175  
    22#
    33#   Copyright (C) 1999 Waldo Bastian (bastian@kde.org)
     4#   Copyright (C) 2007 Apple Inc. All rights reserved.
    45#
    56#   This library is free software; you can redistribute it and/or
     
    2728echo '%{' > CSSPropertyNames.gperf
    2829echo '/* This file is automatically generated from CSSPropertyNames.in by makeprop, do not edit */' >> CSSPropertyNames.gperf
    29 echo '/* Copyright 1999 W. Bastian */' >> CSSPropertyNames.gperf
    3030echo '#include "CSSPropertyNames.h"' >> CSSPropertyNames.gperf
    3131echo '%}' >> CSSPropertyNames.gperf
    3232echo 'struct props {' >> CSSPropertyNames.gperf
    33 echo '    const char *name;' >> CSSPropertyNames.gperf
     33echo '    const char* name;' >> CSSPropertyNames.gperf
    3434echo '    int id;' >> CSSPropertyNames.gperf
    3535echo '};' >> CSSPropertyNames.gperf
     
    4141
    4242echo '/* 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
     43echo '' >> CSSPropertyNames.h
     44echo '#ifndef CSSPropertyNames_h' >> CSSPropertyNames.h
     45echo '#define CSSPropertyNames_h' >> CSSPropertyNames.h
     46echo '' >> CSSPropertyNames.h
    4647
     48echo 'enum CSSPropertyID {' >> CSSPropertyNames.h
    4749cat CSSPropertyNames.strip | awk '{ \
    4850i=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); \
     51print "    CSS_PROP_INVALID = 0,"; \
     52do { gsub("-", "_"); print "    CSS_PROP_" toupper($0) " = " i ","; i = i + 1 } while (getline); \
     53print "};"; \
    5254print ""; \
    53 print "#define CSS_PROP_MAX CSS_PROP_Z_INDEX"; \
    54 print "#define CSS_PROP_TOTAL " i \
     55print "const int numCSSProperties = " i ";" \
    5556}' >> CSSPropertyNames.h
    5657perl -e 'my $max = 0; while (<>) { chomp; $max = length if $max < length; } print "const size_t maxCSSPropertyNameLength = $max;\n"' < CSSPropertyNames.strip >> CSSPropertyNames.h
    5758
     59echo '' >> CSSPropertyNames.h
     60echo 'const char* getPropertyName(CSSPropertyID);' >> CSSPropertyNames.h
     61echo '' >> CSSPropertyNames.h
    5862echo '#endif' >> CSSPropertyNames.h
    5963
     
    6771print "    0"; \
    6872print "};"; \
    69 print "String getPropertyName(unsigned short id)"; \
     73print "const char* getPropertyName(CSSPropertyID id)"; \
    7074print "{"; \
    71 print "    if(id >= CSS_PROP_TOTAL || id == 0)"; \
    72 print "      return String();";\
    73 print "    else";\
    74 print "      return String(propertyList[id]);"; \
     75print "    if (id >= numCSSProperties || id <= 0)"; \
     76print "        return 0;";\
     77print "    return propertyList[id];"; \
    7578print "}"; \
    7679print ""; \
  • trunk/WebKit/ChangeLog

    r19167 r19175  
     12007-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
    172007-01-26  Kevin Decker <kdecker@apple.com>
    28
  • trunk/WebKit/WebInspector/webInspector/inspector.js

    r18693 r19175  
    3535// since we always want to display those.
    3636var typicalStylePropertyValue = {
     37    "-webkit-appearance": "none",
    3738    "-webkit-background-clip": "border",
    3839    "-webkit-background-composite": "source-over",
     
    6263    "-webkit-line-break": "normal",
    6364    "-webkit-line-clamp": "none",
     65    "-webkit-margin-bottom-collapse": "collapse",
     66    "-webkit-margin-top-collapse": "collapse",
    6467    "-webkit-marquee-direction": "auto",
    6568    "-webkit-marquee-increment": "6px",
     
    6770    "-webkit-marquee-style": "scroll",
    6871    "-webkit-nbsp-mode": "normal",
     72    "-webkit-rtl-ordering": "logical",
    6973    "-webkit-text-decorations-in-effect": "none",
    7074    "-webkit-text-fill-color": "rgb(0, 0, 0)",
     
    7276    "-webkit-text-stroke-color": "rgb(0, 0, 0)",
    7377    "-webkit-text-stroke-width": "0",
     78    "-webkit-user-drag": "auto",
    7479    "-webkit-user-modify": "read-only",
     80    "-webkit-user-select": "auto",
    7581    "background-attachment": "scroll",
    7682    "background-color": "rgba(0, 0, 0, 0)",
     
    9399    "border-top-width": "0px",
    94100    "bottom": "auto",
     101    "box-sizing": "border-box",
    95102    "caption-side": "top",
    96103    "clear": "none",
     
    121128    "outline-color": "rgb(0, 0, 0)",
    122129    "outline-style": "none",
     130    "outline-width": "0px",
    123131    "overflow": "visible",
    124132    "overflow-x": "visible",
Note: See TracChangeset for help on using the changeset viewer.