| Differences between
and this patch
- Source/WebCore/ChangeLog +71 lines
Lines 1-3 Source/WebCore/ChangeLog_sec1
1
2012-02-07  Joe Thomas  <joethomas@motorola.com>
2
3
        Implement vw/vh/vmin (viewport sizes) from CSS 3 Values and Units
4
        https://bugs.webkit.org/show_bug.cgi?id=27160
5
6
        The specification related to this implementation is located at http://dev.w3.org/csswg/css3-values/#viewport-relative-lengths.
7
        vw/vh/vmin are implemented as primitive length units. Added the parsing logic for these new units and creation of primitive values.
8
9
        Added a new Length type called "RelativeViewport" for viewport-relative lengths and included the support for fetching the value of these 
10
        relative length units based on the current viewport size.
11
12
        Reviewed by NOBODY (OOPS!).
13
14
        Test: css3/css3-relative-viewport-lengths.html
15
16
        * css/CSSGrammar.y: Added vw/vh/vmin support.
17
        * css/CSSParser.cpp: Parsing of relative units and creation of CSSPrimitiveValue.
18
        (WebCore::CSSParser::validUnit): Added vw/vh/vmin to the valid units.
19
        (WebCore::CSSParser::createPrimitiveNumericValue): Added vw/vh/vmin as valid primitive units.
20
        (WebCore::unitFromString):
21
        (WebCore::CSSParser::parseValidPrimitive): Creation of CSSPrimitiveValue for vw/vh/vmin.
22
        (WebCore::CSSParser::detectNumberToken): Parsing the vw/vh/vmin tokens.
23
        * css/CSSPrimitiveValue.cpp:
24
        (WebCore::isValidCSSUnitTypeForDoubleConversion): Added support for vw/vh/vmin.
25
        (WebCore::unitCategory): Ditto.
26
        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
27
        (WebCore::CSSPrimitiveValue::canonicalUnitTypeForCategory): Added support for vw/vh/vmin.
28
        (WebCore::CSSPrimitiveValue::customCssText): Ditto.
29
        * css/CSSPrimitiveValue.h:
30
        (WebCore::CSSPrimitiveValue::isRelativeViewportLength): Checks whether the primitive values is Relative viewport Lengths.
31
        * css/CSSPrimitiveValue.idl: Added support for vw/vh/vmin.
32
        * css/CSSStyleApplyProperty.cpp:
33
        (WebCore::ApplyPropertyLength::applyValue): Applying relative viewport length units to the specific CSS property.
34
        (WebCore::ApplyPropertyFontSize::applyValue): Ditto.
35
        (WebCore::ApplyPropertyLineHeight::applyValue): Ditto.
36
        (WebCore::ApplyPropertyVerticalAlign::applyValue): Ditto.
37
        * css/CSSStyleSelector.cpp:
38
        (WebCore::convertToLength): Modified the function arguments to include CSSStyleSelector instead of its members. Added support for viewport-relative lengths.
39
        (WebCore::convertToIntLength): Ditto.
40
        (WebCore::convertToFloatLength): Ditto.
41
        (WebCore::createGridTrackBreadth): Added support relative viewport units.
42
        (WebCore::CSSStyleSelector::applyProperty): Modified the convertToLength function call.
43
        (WebCore::CSSStyleSelector::mapFillSize): Ditto.
44
        (WebCore::CSSStyleSelector::mapFillXPosition): Ditto.
45
        (WebCore::CSSStyleSelector::mapFillYPosition): Ditto.
46
        (WebCore::CSSStyleSelector::createTransformOperations): Modified the function arguments to include CSSStyleSelector instead of its members.
47
        (WebCore::CSSStyleSelector::createFilterOperations):
48
        (WebCore::RelativeviewportLength): Function to create the Length structure for the relative-viewport unit types.
49
        (WebCore):
50
        * css/CSSStyleSelector.h: New function RelativeviewportLength() added.
51
        (CSSStyleSelector):
52
        (WebCore):
53
        * css/WebKitCSSMatrix.cpp:
54
        (WebCore::WebKitCSSMatrix::setMatrixValue): Modified the functions arguments for createTransformOperations.
55
        * platform/Length.h:
56
        (WebCore::Length::Length): New LengthType RelativeViewport added.
57
        (Length): New overloaded constructor for viewport relative lengths.
58
        (WebCore::Length::operator==): Modified to include RelativeViewport sub-type.
59
        (WebCore::Length::calcValue): Added RelativeViewport Length type.
60
        (WebCore::Length::calcMinValue): Ditto.
61
        (WebCore::Length::calcFloatValue): Ditto.
62
        (WebCore::Length::relativeViewportLengthType): To find out the sub-type.
63
        (WebCore::Length::isRelativeViewport): To check the Length is of type RelativeViewport.
64
        (WebCore::Length::relativeViewportLengthValue): To get the relative value.
65
        (WebCore::Length::getIntValue): Modified to support RelativeViewport.
66
        (WebCore::Length::getFloatValue): Ditto.
67
        (WebCore::Length::getViewportLengthValue): To find the value based on the current viewport size.
68
        (WebCore::Length::viewportSize): To find out current viewport size.
69
        * rendering/RenderBox.cpp:
70
        (WebCore::RenderBox::computeLogicalHeightUsing): Added RelativeViewport lengths to the Height calculation.
71
1
2012-02-07  David Barton  <dbarton@mathscribe.com>
72
2012-02-07  David Barton  <dbarton@mathscribe.com>
2
73
3
        Remove extraneous MathML code before bug 52444 fix
74
        Remove extraneous MathML code before bug 52444 fix
- Source/WebCore/css/CSSGrammar.y -1 / +7 lines
Lines 100-106 static int cssyylex(YYSTYPE* yylval, voi Source/WebCore/css/CSSGrammar.y_sec1
100
100
101
%}
101
%}
102
102
103
%expect 55
103
%expect 58
104
104
105
%nonassoc LOWEST_PREC
105
%nonassoc LOWEST_PREC
106
106
Lines 189-194 static int cssyylex(YYSTYPE* yylval, voi Source/WebCore/css/CSSGrammar.y_sec2
189
%token <number> PERCENTAGE
189
%token <number> PERCENTAGE
190
%token <number> FLOATTOKEN
190
%token <number> FLOATTOKEN
191
%token <number> INTEGER
191
%token <number> INTEGER
192
%token <number> VW
193
%token <number> VH
194
%token <number> VMIN
192
195
193
%token <string> URI
196
%token <string> URI
194
%token <string> FUNCTION
197
%token <string> FUNCTION
Lines 1470-1475 unary_term: Source/WebCore/css/CSSGrammar.y_sec3
1470
      if (Document* doc = p->findDocument())
1473
      if (Document* doc = p->findDocument())
1471
          doc->setUsesRemUnits(true);
1474
          doc->setUsesRemUnits(true);
1472
  }
1475
  }
1476
  | VW maybe_space { $$.id = 0; $$.fValue = $1; $$.unit = CSSPrimitiveValue::CSS_VW; }
1477
  | VH maybe_space { $$.id = 0; $$.fValue = $1; $$.unit = CSSPrimitiveValue::CSS_VH; }
1478
  | VMIN maybe_space { $$.id = 0; $$.fValue = $1; $$.unit = CSSPrimitiveValue::CSS_VMIN; }
1473
  ;
1479
  ;
1474
1480
1475
function:
1481
function:
- Source/WebCore/css/CSSParser.cpp -1 / +23 lines
Lines 773-778 bool CSSParser::validUnit(CSSParserValue Source/WebCore/css/CSSParser.cpp_sec1
773
    case CSSPrimitiveValue::CSS_IN:
773
    case CSSPrimitiveValue::CSS_IN:
774
    case CSSPrimitiveValue::CSS_PT:
774
    case CSSPrimitiveValue::CSS_PT:
775
    case CSSPrimitiveValue::CSS_PC:
775
    case CSSPrimitiveValue::CSS_PC:
776
    case CSSPrimitiveValue::CSS_VW:
777
    case CSSPrimitiveValue::CSS_VH:
778
    case CSSPrimitiveValue::CSS_VMIN:
776
        b = (unitflags & FLength);
779
        b = (unitflags & FLength);
777
        break;
780
        break;
778
    case CSSPrimitiveValue::CSS_MS:
781
    case CSSPrimitiveValue::CSS_MS:
Lines 807-813 inline PassRefPtr<CSSPrimitiveValue> CSS Source/WebCore/css/CSSParser.cpp_sec2
807
    }
810
    }
808
               
811
               
809
    ASSERT((value->unit >= CSSPrimitiveValue::CSS_NUMBER && value->unit <= CSSPrimitiveValue::CSS_KHZ)
812
    ASSERT((value->unit >= CSSPrimitiveValue::CSS_NUMBER && value->unit <= CSSPrimitiveValue::CSS_KHZ)
810
           || (value->unit >= CSSPrimitiveValue::CSS_TURN && value->unit <= CSSPrimitiveValue::CSS_REMS));
813
           || (value->unit >= CSSPrimitiveValue::CSS_TURN && value->unit <= CSSPrimitiveValue::CSS_REMS)
814
           || (value->unit >= CSSPrimitiveValue::CSS_VW && value->unit <= CSSPrimitiveValue::CSS_VMIN));
811
    return cssValuePool()->createValue(value->fValue, static_cast<CSSPrimitiveValue::UnitTypes>(value->unit));
815
    return cssValuePool()->createValue(value->fValue, static_cast<CSSPrimitiveValue::UnitTypes>(value->unit));
812
}
816
}
813
817
Lines 856-861 static int unitFromString(CSSParserValue Source/WebCore/css/CSSParser.cpp_sec3
856
        return CSSPrimitiveValue::CSS_HZ;
860
        return CSSPrimitiveValue::CSS_HZ;
857
    if (equal(value->string, "kHz"))
861
    if (equal(value->string, "kHz"))
858
        return CSSPrimitiveValue::CSS_KHZ;
862
        return CSSPrimitiveValue::CSS_KHZ;
863
    if (equal(value->string, "vw"))
864
        return CSSPrimitiveValue::CSS_VW;
865
    if (equal(value->string, "vh"))
866
        return CSSPrimitiveValue::CSS_VH;
867
    if (equal(value->string, "vmin"))
868
        return CSSPrimitiveValue::CSS_VMIN;
859
869
860
    return 0;
870
    return 0;
861
}
871
}
Lines 901-906 inline PassRefPtr<CSSPrimitiveValue> CSS Source/WebCore/css/CSSParser.cpp_sec4
901
        return createPrimitiveNumericValue(value);
911
        return createPrimitiveNumericValue(value);
902
    if (value->unit >= CSSPrimitiveValue::CSS_TURN && value->unit <= CSSPrimitiveValue::CSS_REMS)
912
    if (value->unit >= CSSPrimitiveValue::CSS_TURN && value->unit <= CSSPrimitiveValue::CSS_REMS)
903
        return createPrimitiveNumericValue(value);
913
        return createPrimitiveNumericValue(value);
914
    if (value->unit >= CSSPrimitiveValue::CSS_VW && value->unit <= CSSPrimitiveValue::CSS_VMIN)
915
        return createPrimitiveNumericValue(value);
904
    if (value->unit >= CSSParserValue::Q_EMS)
916
    if (value->unit >= CSSParserValue::Q_EMS)
905
        return CSSPrimitiveValue::createAllowingMarginQuirk(value->fValue, CSSPrimitiveValue::CSS_EMS);
917
        return CSSPrimitiveValue::createAllowingMarginQuirk(value->fValue, CSSPrimitiveValue::CSS_EMS);
906
    if (isCalculation(value))
918
    if (isCalculation(value))
Lines 8038-8043 inline void CSSParser::detectNumberToken Source/WebCore/css/CSSParser.cpp_sec5
8038
                && isASCIIAlphaCaselessEqual(type[2], 'r') && isASCIIAlphaCaselessEqual(type[3], 'n'))
8050
                && isASCIIAlphaCaselessEqual(type[2], 'r') && isASCIIAlphaCaselessEqual(type[3], 'n'))
8039
            m_token = TURNS;
8051
            m_token = TURNS;
8040
        return;
8052
        return;
8053
    case 'v':
8054
        if (length == 2) {
8055
            if (isASCIIAlphaCaselessEqual(type[1], 'w'))
8056
                m_token = VW;
8057
            else if (isASCIIAlphaCaselessEqual(type[1], 'h'))
8058
                m_token = VH;
8059
        } else if (length == 4 && isASCIIAlphaCaselessEqual(type[1], 'm')
8060
                && isASCIIAlphaCaselessEqual(type[2], 'i') && isASCIIAlphaCaselessEqual(type[3], 'n'))
8061
            m_token = VMIN;
8062
        return;
8041
8063
8042
    default:
8064
    default:
8043
        if (type[0] == '_' && length == 5 && type[1] == '_' && isASCIIAlphaCaselessEqual(type[2], 'q')
8065
        if (type[0] == '_' && length == 5 && type[1] == '_' && isASCIIAlphaCaselessEqual(type[2], 'q')
- Source/WebCore/css/CSSPrimitiveValue.cpp +37 lines
Lines 72-77 static inline bool isValidCSSUnitTypeFor Source/WebCore/css/CSSPrimitiveValue.cpp_sec1
72
    case CSSPrimitiveValue:: CSS_REMS:
72
    case CSSPrimitiveValue:: CSS_REMS:
73
    case CSSPrimitiveValue:: CSS_S:
73
    case CSSPrimitiveValue:: CSS_S:
74
    case CSSPrimitiveValue:: CSS_TURN:
74
    case CSSPrimitiveValue:: CSS_TURN:
75
    case CSSPrimitiveValue:: CSS_VW:
76
    case CSSPrimitiveValue:: CSS_VH:
77
    case CSSPrimitiveValue:: CSS_VMIN:
75
        return true;
78
        return true;
76
    case CSSPrimitiveValue:: CSS_ATTR:
79
    case CSSPrimitiveValue:: CSS_ATTR:
77
    case CSSPrimitiveValue:: CSS_COUNTER:
80
    case CSSPrimitiveValue:: CSS_COUNTER:
Lines 125-130 static CSSPrimitiveValue::UnitCategory u Source/WebCore/css/CSSPrimitiveValue.cpp_sec2
125
    case CSSPrimitiveValue::CSS_HZ:
128
    case CSSPrimitiveValue::CSS_HZ:
126
    case CSSPrimitiveValue::CSS_KHZ:
129
    case CSSPrimitiveValue::CSS_KHZ:
127
        return CSSPrimitiveValue::UFrequency;
130
        return CSSPrimitiveValue::UFrequency;
131
    case CSSPrimitiveValue::CSS_VW:
132
    case CSSPrimitiveValue::CSS_VH:
133
    case CSSPrimitiveValue::CSS_VMIN:
134
        return CSSPrimitiveValue::URelativeViewportLength;
128
    default:
135
    default:
129
        return CSSPrimitiveValue::UOther;
136
        return CSSPrimitiveValue::UOther;
130
    }
137
    }
Lines 240-245 CSSPrimitiveValue::CSSPrimitiveValue(con Source/WebCore/css/CSSPrimitiveValue.cpp_sec3
240
            ASSERT(isfinite(length.percent()));
247
            ASSERT(isfinite(length.percent()));
241
            m_value.num = length.percent();
248
            m_value.num = length.percent();
242
            break;
249
            break;
250
        case RelativeViewport:
251
            switch (length.relativeViewportLengthType()) {
252
            case ViewportWidth:
253
                m_primitiveUnitType = CSS_VW;
254
                m_value.num = length.relativeViewportLengthValue();
255
                break;
256
            case ViewportHeight:
257
                m_primitiveUnitType = CSS_VH;
258
                m_value.num = length.relativeViewportLengthValue();
259
                break;
260
            case ViewportMin:
261
                m_primitiveUnitType = CSS_VMIN;
262
                m_value.num = length.relativeViewportLengthValue();
263
                break;
264
            case UndefinedViewportLength:
265
                ASSERT_NOT_REACHED();
266
                break;
267
            }
268
            break;
243
        case Relative:
269
        case Relative:
244
        case Undefined:
270
        case Undefined:
245
            ASSERT_NOT_REACHED();
271
            ASSERT_NOT_REACHED();
Lines 545-550 CSSPrimitiveValue::UnitTypes CSSPrimitiv Source/WebCore/css/CSSPrimitiveValue.cpp_sec4
545
        return CSS_DEG;
571
        return CSS_DEG;
546
    case UFrequency:
572
    case UFrequency:
547
        return CSS_HZ;
573
        return CSS_HZ;
574
    case URelativeViewportLength:
575
        return CSS_UNKNOWN; // Cannot convert between numbers and relative lengths.
548
    default:
576
    default:
549
        return CSS_UNKNOWN;
577
        return CSS_UNKNOWN;
550
    }
578
    }
Lines 961-966 String CSSPrimitiveValue::customCssText( Source/WebCore/css/CSSPrimitiveValue.cpp_sec5
961
        case CSS_SHAPE:
989
        case CSS_SHAPE:
962
            text = m_value.shape->cssText();
990
            text = m_value.shape->cssText();
963
            break;
991
            break;
992
        case CSS_VW:
993
            text = formatNumber(m_value.num) + "vw";
994
            break;
995
        case CSS_VH:
996
            text = formatNumber(m_value.num) + "vh";
997
            break;
998
        case CSS_VMIN:
999
            text = formatNumber(m_value.num) + "vmin";
1000
            break;
964
    }
1001
    }
965
1002
966
    ASSERT(!cssTextCache().contains(this));
1003
    ASSERT(!cssTextCache().contains(this));
- Source/WebCore/css/CSSPrimitiveValue.h -2 / +7 lines
Lines 79-84 public: Source/WebCore/css/CSSPrimitiveValue.h_sec1
79
        CSS_COUNTER = 23,
79
        CSS_COUNTER = 23,
80
        CSS_RECT = 24,
80
        CSS_RECT = 24,
81
        CSS_RGBCOLOR = 25,
81
        CSS_RGBCOLOR = 25,
82
        // from CSS Values and Units. Relative viewport width and height
83
        CSS_VW = 26,
84
        CSS_VH = 27,
85
        CSS_VMIN = 28,
82
        CSS_PAIR = 100, // We envision this being exposed as a means of getting computed style values for pairs (border-spacing/radius, background-position, etc.)
86
        CSS_PAIR = 100, // We envision this being exposed as a means of getting computed style values for pairs (border-spacing/radius, background-position, etc.)
83
        CSS_DASHBOARD_REGION = 101, // FIXME: Dashboard region should not be a primitive value.
87
        CSS_DASHBOARD_REGION = 101, // FIXME: Dashboard region should not be a primitive value.
84
        CSS_UNICODE_RANGE = 102,
88
        CSS_UNICODE_RANGE = 102,
Lines 113-119 public: Source/WebCore/css/CSSPrimitiveValue.h_sec2
113
        UAngle,
117
        UAngle,
114
        UTime,
118
        UTime,
115
        UFrequency,
119
        UFrequency,
116
        UOther
120
        UOther,
121
        URelativeViewportLength
117
    };
122
    };
118
123
119
    bool isAngle() const
124
    bool isAngle() const
Lines 145-151 public: Source/WebCore/css/CSSPrimitiveValue.h_sec3
145
    bool isString() const { return m_primitiveUnitType == CSS_STRING; }
150
    bool isString() const { return m_primitiveUnitType == CSS_STRING; }
146
    bool isTime() const { return m_primitiveUnitType == CSS_S || m_primitiveUnitType == CSS_MS; }
151
    bool isTime() const { return m_primitiveUnitType == CSS_S || m_primitiveUnitType == CSS_MS; }
147
    bool isURI() const { return m_primitiveUnitType == CSS_URI; }
152
    bool isURI() const { return m_primitiveUnitType == CSS_URI; }
148
153
    bool isRelativeViewportLength() const { return m_primitiveUnitType >= CSS_VW && m_primitiveUnitType <= CSS_VMIN; }
149
154
150
    static PassRefPtr<CSSPrimitiveValue> createIdentifier(int identifier) { return adoptRef(new CSSPrimitiveValue(identifier)); }
155
    static PassRefPtr<CSSPrimitiveValue> createIdentifier(int identifier) { return adoptRef(new CSSPrimitiveValue(identifier)); }
151
    static PassRefPtr<CSSPrimitiveValue> createColor(unsigned rgbValue) { return adoptRef(new CSSPrimitiveValue(rgbValue)); }
156
    static PassRefPtr<CSSPrimitiveValue> createColor(unsigned rgbValue) { return adoptRef(new CSSPrimitiveValue(rgbValue)); }
- Source/WebCore/css/CSSPrimitiveValue.idl -1 / +4 lines
Lines 48-54 module css { Source/WebCore/css/CSSPrimitiveValue.idl_sec1
48
        const unsigned short CSS_COUNTER    = 23;
48
        const unsigned short CSS_COUNTER    = 23;
49
        const unsigned short CSS_RECT       = 24;
49
        const unsigned short CSS_RECT       = 24;
50
        const unsigned short CSS_RGBCOLOR   = 25;
50
        const unsigned short CSS_RGBCOLOR   = 25;
51
51
        const unsigned short CSS_VW         = 26;
52
        const unsigned short CSS_VH         = 27;
53
        const unsigned short CSS_VMIN       = 28;
54
        
52
        readonly attribute unsigned short primitiveType;
55
        readonly attribute unsigned short primitiveType;
53
56
54
        [ObjCLegacyUnnamedParameters] void setFloatValue(in [Optional=CallWithDefaultValue] unsigned short unitType,
57
        [ObjCLegacyUnnamedParameters] void setFloatValue(in [Optional=CallWithDefaultValue] unsigned short unitType,
- Source/WebCore/css/CSSStyleApplyProperty.cpp +8 lines
Lines 389-394 public: Source/WebCore/css/CSSStyleApplyProperty.cpp_sec1
389
                setValue(selector->style(), length);
389
                setValue(selector->style(), length);
390
            } else if (primitiveValue->isPercentage())
390
            } else if (primitiveValue->isPercentage())
391
                setValue(selector->style(), Length(primitiveValue->getDoubleValue(), Percent));
391
                setValue(selector->style(), Length(primitiveValue->getDoubleValue(), Percent));
392
            else if (primitiveValue->isRelativeViewportLength())
393
                setValue(selector->style(), RelativeviewportLength(primitiveValue, selector->document()));
392
        }
394
        }
393
    }
395
    }
394
396
Lines 728-733 public: Source/WebCore/css/CSSStyleApplyProperty.cpp_sec2
728
                size = primitiveValue->computeLength<float>(selector->parentStyle(), selector->rootElementStyle(), 1.0, true);
730
                size = primitiveValue->computeLength<float>(selector->parentStyle(), selector->rootElementStyle(), 1.0, true);
729
            else if (primitiveValue->isPercentage())
731
            else if (primitiveValue->isPercentage())
730
                size = (primitiveValue->getFloatValue() * parentSize) / 100.0f;
732
                size = (primitiveValue->getFloatValue() * parentSize) / 100.0f;
733
            else if (primitiveValue->isRelativeViewportLength())
734
                size = RelativeviewportLength(primitiveValue, selector->document()).value();
731
            else
735
            else
732
                return;
736
                return;
733
        }
737
        }
Lines 1161-1166 public: Source/WebCore/css/CSSStyleApplyProperty.cpp_sec3
1161
        } else if (primitiveValue->isNumber()) {
1165
        } else if (primitiveValue->isNumber()) {
1162
            // FIXME: number and percentage values should produce the same type of Length (ie. Fixed or Percent).
1166
            // FIXME: number and percentage values should produce the same type of Length (ie. Fixed or Percent).
1163
            lineHeight = Length(primitiveValue->getDoubleValue() * 100.0, Percent);
1167
            lineHeight = Length(primitiveValue->getDoubleValue() * 100.0, Percent);
1168
        } else if (primitiveValue->isRelativeViewportLength()) {
1169
            lineHeight = RelativeviewportLength(primitiveValue, selector->document());
1164
        } else
1170
        } else
1165
            return;
1171
            return;
1166
        selector->style()->setLineHeight(lineHeight);
1172
        selector->style()->setLineHeight(lineHeight);
Lines 1519-1524 public: Source/WebCore/css/CSSStyleApplyProperty.cpp_sec4
1519
            length = primitiveValue->computeLength<Length>(selector->style(), selector->rootElementStyle(), selector->style()->effectiveZoom());
1525
            length = primitiveValue->computeLength<Length>(selector->style(), selector->rootElementStyle(), selector->style()->effectiveZoom());
1520
        else if (primitiveValue->isPercentage())
1526
        else if (primitiveValue->isPercentage())
1521
            length = Length(primitiveValue->getDoubleValue(), Percent);
1527
            length = Length(primitiveValue->getDoubleValue(), Percent);
1528
        else if (primitiveValue->isRelativeViewportLength())
1529
            length = RelativeviewportLength(primitiveValue, selector->document());
1522
1530
1523
        selector->style()->setVerticalAlignLength(length);
1531
        selector->style()->setVerticalAlignLength(length);
1524
    }
1532
    }
- Source/WebCore/css/CSSStyleSelector.cpp -25 / +60 lines
Lines 2376-2382 void RuleSet::shrinkToFit() Source/WebCore/css/CSSStyleSelector.cpp_sec1
2376
// -------------------------------------------------------------------------------------
2376
// -------------------------------------------------------------------------------------
2377
// this is mostly boring stuff on how to apply a certain rule to the renderstyle...
2377
// this is mostly boring stuff on how to apply a certain rule to the renderstyle...
2378
2378
2379
static Length convertToLength(CSSPrimitiveValue* primitiveValue, RenderStyle* style, RenderStyle* rootStyle, bool toFloat, double multiplier = 1, bool *ok = 0)
2379
static Length convertToLength(CSSPrimitiveValue* primitiveValue, CSSStyleSelector* styleSelector, bool toFloat, double multiplier = 1, bool *ok = 0)
2380
{
2380
{
2381
    // This function is tolerant of a null style value. The only place style is used is in
2381
    // This function is tolerant of a null style value. The only place style is used is in
2382
    // length measurements, like 'ems' and 'px'. And in those cases style is only used
2382
    // length measurements, like 'ems' and 'px'. And in those cases style is only used
Lines 2386-2417 static Length convertToLength(CSSPrimiti Source/WebCore/css/CSSStyleSelector.cpp_sec2
2386
        if (ok)
2386
        if (ok)
2387
            *ok = false;
2387
            *ok = false;
2388
    } else {
2388
    } else {
2389
        if (!style && primitiveValue->isFontRelativeLength()) {
2389
        if (!styleSelector->style() && primitiveValue->isFontRelativeLength()) {
2390
            if (ok)
2390
            if (ok)
2391
                *ok = false;
2391
                *ok = false;
2392
        } else if (primitiveValue->isLength()) {
2392
        } else if (primitiveValue->isLength()) {
2393
            if (toFloat)
2393
            if (toFloat)
2394
                l = Length(primitiveValue->computeLength<double>(style, rootStyle, multiplier), Fixed);
2394
                l = Length(primitiveValue->computeLength<double>(styleSelector->style(), styleSelector->rootElementStyle(), multiplier), Fixed);
2395
            else
2395
            else
2396
                l = primitiveValue->computeLength<Length>(style, rootStyle, multiplier);
2396
                l = primitiveValue->computeLength<Length>(styleSelector->style(), styleSelector->rootElementStyle(), multiplier);
2397
        } else if (primitiveValue->isPercentage())
2397
        } else if (primitiveValue->isPercentage())
2398
            l = Length(primitiveValue->getDoubleValue(), Percent);
2398
            l = Length(primitiveValue->getDoubleValue(), Percent);
2399
        else if (primitiveValue->isNumber())
2399
        else if (primitiveValue->isNumber())
2400
            l = Length(primitiveValue->getDoubleValue() * 100.0, Percent);
2400
            l = Length(primitiveValue->getDoubleValue() * 100.0, Percent);
2401
        else if (primitiveValue->isRelativeViewportLength())
2402
            l = RelativeviewportLength(primitiveValue, styleSelector->document());
2401
        else if (ok)
2403
        else if (ok)
2402
            *ok = false;
2404
            *ok = false;
2403
    }
2405
    }
2404
    return l;
2406
    return l;
2405
}
2407
}
2406
2408
2407
static Length convertToIntLength(CSSPrimitiveValue* primitiveValue, RenderStyle* style, RenderStyle* rootStyle, double multiplier = 1, bool *ok = 0)
2409
static Length convertToIntLength(CSSPrimitiveValue* primitiveValue, CSSStyleSelector* styleSelector, double multiplier = 1, bool *ok = 0)
2408
{
2410
{
2409
    return convertToLength(primitiveValue, style, rootStyle, false, multiplier, ok);
2411
    return convertToLength(primitiveValue, styleSelector, false, multiplier, ok);
2410
}
2412
}
2411
2413
2412
static Length convertToFloatLength(CSSPrimitiveValue* primitiveValue, RenderStyle* style, RenderStyle* rootStyle, double multiplier = 1, bool *ok = 0)
2414
static Length convertToFloatLength(CSSPrimitiveValue* primitiveValue, CSSStyleSelector* styleSelector, double multiplier = 1, bool *ok = 0)
2413
{
2415
{
2414
    return convertToLength(primitiveValue, style, rootStyle, true, multiplier, ok);
2416
    return convertToLength(primitiveValue, styleSelector, true, multiplier, ok);
2415
}
2417
}
2416
2418
2417
static inline bool isInsideRegionRule(StylePropertySet* styleDeclaration)
2419
static inline bool isInsideRegionRule(StylePropertySet* styleDeclaration)
Lines 2823-2828 static bool createGridTrackBreadth(CSSPr Source/WebCore/css/CSSStyleSelector.cpp_sec3
2823
        length = Length(primitiveValue->getDoubleValue(), Percent);
2825
        length = Length(primitiveValue->getDoubleValue(), Percent);
2824
        return true;
2826
        return true;
2825
    }
2827
    }
2828
    
2829
    if (primitiveValue->isRelativeViewportLength()) {
2830
        length = RelativeviewportLength(primitiveValue, selector->document());
2831
        return true;
2832
    }
2826
2833
2827
    return false;
2834
    return false;
2828
}
2835
}
Lines 3464-3470 void CSSStyleSelector::applyProperty(int Source/WebCore/css/CSSStyleSelector.cpp_sec4
3464
            }
3471
            }
3465
        } else {
3472
        } else {
3466
            bool ok = true;
3473
            bool ok = true;
3467
            Length marqueeLength = convertToIntLength(primitiveValue, style(), m_rootElementStyle, 1, &ok);
3474
            Length marqueeLength = convertToIntLength(primitiveValue, this, 1, &ok);
3468
            if (ok)
3475
            if (ok)
3469
                m_style->setMarqueeIncrement(marqueeLength);
3476
                m_style->setMarqueeIncrement(marqueeLength);
3470
        }
3477
        }
Lines 3550-3559 void CSSStyleSelector::applyProperty(int Source/WebCore/css/CSSStyleSelector.cpp_sec5
3550
3557
3551
        DashboardRegion *first = region;
3558
        DashboardRegion *first = region;
3552
        while (region) {
3559
        while (region) {
3553
            Length top = convertToIntLength(region->top(), style(), m_rootElementStyle);
3560
            Length top = convertToIntLength(region->top(), this);
3554
            Length right = convertToIntLength(region->right(), style(), m_rootElementStyle);
3561
            Length right = convertToIntLength(region->right(), this);
3555
            Length bottom = convertToIntLength(region->bottom(), style(), m_rootElementStyle);
3562
            Length bottom = convertToIntLength(region->bottom(), this);
3556
            Length left = convertToIntLength(region->left(), style(), m_rootElementStyle);
3563
            Length left = convertToIntLength(region->left(), this);
3557
            if (region->m_isCircle)
3564
            if (region->m_isCircle)
3558
                m_style->setDashboardRegion(StyleDashboardRegion::Circle, region->m_label, top, right, bottom, left, region == first ? false : true);
3565
                m_style->setDashboardRegion(StyleDashboardRegion::Circle, region->m_label, top, right, bottom, left, region == first ? false : true);
3559
            else if (region->m_isRectangle)
3566
            else if (region->m_isRectangle)
Lines 3594-3600 void CSSStyleSelector::applyProperty(int Source/WebCore/css/CSSStyleSelector.cpp_sec6
3594
    case CSSPropertyWebkitTransform: {
3601
    case CSSPropertyWebkitTransform: {
3595
        HANDLE_INHERIT_AND_INITIAL(transform, Transform);
3602
        HANDLE_INHERIT_AND_INITIAL(transform, Transform);
3596
        TransformOperations operations;
3603
        TransformOperations operations;
3597
        createTransformOperations(value, style(), m_rootElementStyle, operations);
3604
        createTransformOperations(value, this, operations);
3598
        m_style->setTransform(operations);
3605
        m_style->setTransform(operations);
3599
        return;
3606
        return;
3600
    }
3607
    }
Lines 4198-4203 void CSSStyleSelector::mapFillSize(CSSPr Source/WebCore/css/CSSStyleSelector.cpp_sec7
4198
        firstLength = first->computeLength<Length>(style(), m_rootElementStyle, zoomFactor);
4205
        firstLength = first->computeLength<Length>(style(), m_rootElementStyle, zoomFactor);
4199
    else if (first->isPercentage())
4206
    else if (first->isPercentage())
4200
        firstLength = Length(first->getDoubleValue(), Percent);
4207
        firstLength = Length(first->getDoubleValue(), Percent);
4208
    else if (first->isRelativeViewportLength())
4209
        firstLength = RelativeviewportLength(first, document());
4201
    else
4210
    else
4202
        return;
4211
        return;
4203
4212
Lines 4207-4212 void CSSStyleSelector::mapFillSize(CSSPr Source/WebCore/css/CSSStyleSelector.cpp_sec8
4207
        secondLength = second->computeLength<Length>(style(), m_rootElementStyle, zoomFactor);
4216
        secondLength = second->computeLength<Length>(style(), m_rootElementStyle, zoomFactor);
4208
    else if (second->isPercentage())
4217
    else if (second->isPercentage())
4209
        secondLength = Length(second->getDoubleValue(), Percent);
4218
        secondLength = Length(second->getDoubleValue(), Percent);
4219
    else if (second->isRelativeViewportLength())
4220
        secondLength = RelativeviewportLength(second, document());
4210
    else
4221
    else
4211
        return;
4222
        return;
4212
4223
Lines 4233-4238 void CSSStyleSelector::mapFillXPosition( Source/WebCore/css/CSSStyleSelector.cpp_sec9
4233
        l = primitiveValue->computeLength<Length>(style(), m_rootElementStyle, zoomFactor);
4244
        l = primitiveValue->computeLength<Length>(style(), m_rootElementStyle, zoomFactor);
4234
    else if (primitiveValue->isPercentage())
4245
    else if (primitiveValue->isPercentage())
4235
        l = Length(primitiveValue->getDoubleValue(), Percent);
4246
        l = Length(primitiveValue->getDoubleValue(), Percent);
4247
    else if (primitiveValue->isRelativeViewportLength())
4248
        l = RelativeviewportLength(primitiveValue, document());
4236
    else
4249
    else
4237
        return;
4250
        return;
4238
    layer->setXPosition(l);
4251
    layer->setXPosition(l);
Lines 4256-4261 void CSSStyleSelector::mapFillYPosition( Source/WebCore/css/CSSStyleSelector.cpp_sec10
4256
        l = primitiveValue->computeLength<Length>(style(), m_rootElementStyle, zoomFactor);
4269
        l = primitiveValue->computeLength<Length>(style(), m_rootElementStyle, zoomFactor);
4257
    else if (primitiveValue->isPercentage())
4270
    else if (primitiveValue->isPercentage())
4258
        l = Length(primitiveValue->getDoubleValue(), Percent);
4271
        l = Length(primitiveValue->getDoubleValue(), Percent);
4272
    else if (primitiveValue->isRelativeViewportLength())
4273
        l = RelativeviewportLength(primitiveValue, document());
4259
    else
4274
    else
4260
        return;
4275
        return;
4261
    layer->setYPosition(l);
4276
    layer->setYPosition(l);
Lines 4950-4962 static TransformOperation::OperationType Source/WebCore/css/CSSStyleSelector.cpp_sec11
4950
    return TransformOperation::NONE;
4965
    return TransformOperation::NONE;
4951
}
4966
}
4952
4967
4953
bool CSSStyleSelector::createTransformOperations(CSSValue* inValue, RenderStyle* style, RenderStyle* rootStyle, TransformOperations& outOperations)
4968
bool CSSStyleSelector::createTransformOperations(CSSValue* inValue, CSSStyleSelector* styleSelector, TransformOperations& outOperations)
4954
{
4969
{
4955
    if (!inValue || !inValue->isValueList()) {
4970
    if (!inValue || !inValue->isValueList()) {
4956
        outOperations.clear();
4971
        outOperations.clear();
4957
        return false;
4972
        return false;
4958
    }
4973
    }
4959
4974
4975
    RenderStyle* style = styleSelector ? styleSelector->style() : 0;
4960
    float zoomFactor = style ? style->effectiveZoom() : 1;
4976
    float zoomFactor = style ? style->effectiveZoom() : 1;
4961
    TransformOperations operations;
4977
    TransformOperations operations;
4962
    for (CSSValueListIterator i = inValue; i.hasMore(); i.advance()) {
4978
    for (CSSValueListIterator i = inValue; i.hasMore(); i.advance()) {
Lines 5034-5046 bool CSSStyleSelector::createTransformOp Source/WebCore/css/CSSStyleSelector.cpp_sec12
5034
                Length tx = Length(0, Fixed);
5050
                Length tx = Length(0, Fixed);
5035
                Length ty = Length(0, Fixed);
5051
                Length ty = Length(0, Fixed);
5036
                if (transformValue->operationType() == WebKitCSSTransformValue::TranslateYTransformOperation)
5052
                if (transformValue->operationType() == WebKitCSSTransformValue::TranslateYTransformOperation)
5037
                    ty = convertToFloatLength(firstValue, style, rootStyle, zoomFactor, &ok);
5053
                    ty = convertToFloatLength(firstValue, styleSelector, zoomFactor, &ok);
5038
                else {
5054
                else {
5039
                    tx = convertToFloatLength(firstValue, style, rootStyle, zoomFactor, &ok);
5055
                    tx = convertToFloatLength(firstValue, styleSelector, zoomFactor, &ok);
5040
                    if (transformValue->operationType() != WebKitCSSTransformValue::TranslateXTransformOperation) {
5056
                    if (transformValue->operationType() != WebKitCSSTransformValue::TranslateXTransformOperation) {
5041
                        if (transformValue->length() > 1) {
5057
                        if (transformValue->length() > 1) {
5042
                            CSSPrimitiveValue* secondValue = static_cast<CSSPrimitiveValue*>(transformValue->itemWithoutBoundsCheck(1));
5058
                            CSSPrimitiveValue* secondValue = static_cast<CSSPrimitiveValue*>(transformValue->itemWithoutBoundsCheck(1));
5043
                            ty = convertToFloatLength(secondValue, style, rootStyle, zoomFactor, &ok);
5059
                            ty = convertToFloatLength(secondValue, styleSelector, zoomFactor, &ok);
5044
                        }
5060
                        }
5045
                    }
5061
                    }
5046
                }
5062
                }
Lines 5058-5076 bool CSSStyleSelector::createTransformOp Source/WebCore/css/CSSStyleSelector.cpp_sec13
5058
                Length ty = Length(0, Fixed);
5074
                Length ty = Length(0, Fixed);
5059
                Length tz = Length(0, Fixed);
5075
                Length tz = Length(0, Fixed);
5060
                if (transformValue->operationType() == WebKitCSSTransformValue::TranslateZTransformOperation)
5076
                if (transformValue->operationType() == WebKitCSSTransformValue::TranslateZTransformOperation)
5061
                    tz = convertToFloatLength(firstValue, style, rootStyle, zoomFactor, &ok);
5077
                    tz = convertToFloatLength(firstValue, styleSelector, zoomFactor, &ok);
5062
                else if (transformValue->operationType() == WebKitCSSTransformValue::TranslateYTransformOperation)
5078
                else if (transformValue->operationType() == WebKitCSSTransformValue::TranslateYTransformOperation)
5063
                    ty = convertToFloatLength(firstValue, style, rootStyle, zoomFactor, &ok);
5079
                    ty = convertToFloatLength(firstValue, styleSelector, zoomFactor, &ok);
5064
                else {
5080
                else {
5065
                    tx = convertToFloatLength(firstValue, style, rootStyle, zoomFactor, &ok);
5081
                    tx = convertToFloatLength(firstValue, styleSelector, zoomFactor, &ok);
5066
                    if (transformValue->operationType() != WebKitCSSTransformValue::TranslateXTransformOperation) {
5082
                    if (transformValue->operationType() != WebKitCSSTransformValue::TranslateXTransformOperation) {
5067
                        if (transformValue->length() > 2) {
5083
                        if (transformValue->length() > 2) {
5068
                            CSSPrimitiveValue* thirdValue = static_cast<CSSPrimitiveValue*>(transformValue->itemWithoutBoundsCheck(2));
5084
                            CSSPrimitiveValue* thirdValue = static_cast<CSSPrimitiveValue*>(transformValue->itemWithoutBoundsCheck(2));
5069
                            tz = convertToFloatLength(thirdValue, style, rootStyle, zoomFactor, &ok);
5085
                            tz = convertToFloatLength(thirdValue, styleSelector, zoomFactor, &ok);
5070
                        }
5086
                        }
5071
                        if (transformValue->length() > 1) {
5087
                        if (transformValue->length() > 1) {
5072
                            CSSPrimitiveValue* secondValue = static_cast<CSSPrimitiveValue*>(transformValue->itemWithoutBoundsCheck(1));
5088
                            CSSPrimitiveValue* secondValue = static_cast<CSSPrimitiveValue*>(transformValue->itemWithoutBoundsCheck(1));
5073
                            ty = convertToFloatLength(secondValue, style, rootStyle, zoomFactor, &ok);
5089
                            ty = convertToFloatLength(secondValue, styleSelector, zoomFactor, &ok);
5074
                        }
5090
                        }
5075
                    }
5091
                    }
5076
                }
5092
                }
Lines 5174-5180 bool CSSStyleSelector::createTransformOp Source/WebCore/css/CSSStyleSelector.cpp_sec14
5174
                bool ok = true;
5190
                bool ok = true;
5175
                Length p = Length(0, Fixed);
5191
                Length p = Length(0, Fixed);
5176
                if (firstValue->isLength())
5192
                if (firstValue->isLength())
5177
                    p = convertToFloatLength(firstValue, style, rootStyle, zoomFactor, &ok);
5193
                    p = convertToFloatLength(firstValue, styleSelector, zoomFactor, &ok);
5178
                else {
5194
                else {
5179
                    // This is a quirk that should go away when 3d transforms are finalized.
5195
                    // This is a quirk that should go away when 3d transforms are finalized.
5180
                    double val = firstValue->getDoubleValue();
5196
                    double val = firstValue->getDoubleValue();
Lines 5531-5537 bool CSSStyleSelector::createFilterOpera Source/WebCore/css/CSSStyleSelector.cpp_sec15
5531
            bool ok = true;
5547
            bool ok = true;
5532
            Length stdDeviation = Length(0, Fixed);
5548
            Length stdDeviation = Length(0, Fixed);
5533
            if (filterValue->length() >= 1) {
5549
            if (filterValue->length() >= 1) {
5534
                stdDeviation = convertToFloatLength(firstValue, style, rootStyle, zoomFactor, &ok);
5550
                stdDeviation = convertToFloatLength(firstValue, this, zoomFactor, &ok);
5535
            }
5551
            }
5536
            if (!ok)
5552
            if (!ok)
5537
                return false;
5553
                return false;
Lines 5671-5674 void CSSStyleSelector::loadPendingImages Source/WebCore/css/CSSStyleSelector.cpp_sec16
5671
    m_pendingImageProperties.clear();
5687
    m_pendingImageProperties.clear();
5672
}
5688
}
5673
5689
5690
Length RelativeviewportLength(CSSPrimitiveValue* primitiveValue, Document* document)
5691
{
5692
    Length viewportLength;
5693
    switch (primitiveValue->primitiveType()) {
5694
    case CSSPrimitiveValue::CSS_VW:
5695
        viewportLength = Length(primitiveValue->getDoubleValue(), RelativeViewport, ViewportWidth, document);
5696
        break;
5697
    case CSSPrimitiveValue::CSS_VH:
5698
        viewportLength = Length(primitiveValue->getDoubleValue(), RelativeViewport, ViewportHeight, document);
5699
        break;
5700
    case CSSPrimitiveValue::CSS_VMIN:
5701
        viewportLength = Length(primitiveValue->getDoubleValue(), RelativeViewport, ViewportMin, document);
5702
        break;
5703
    default:
5704
        break;
5705
    }
5706
    return viewportLength;
5707
}
5708
5674
} // namespace WebCore
5709
} // namespace WebCore
- Source/WebCore/css/CSSStyleSelector.h -1 / +3 lines
Lines 215-221 public: Source/WebCore/css/CSSStyleSelector.h_sec1
215
    bool usesBeforeAfterRules() const { return m_features.usesBeforeAfterRules; }
215
    bool usesBeforeAfterRules() const { return m_features.usesBeforeAfterRules; }
216
    bool usesLinkRules() const { return m_features.usesLinkRules; }
216
    bool usesLinkRules() const { return m_features.usesLinkRules; }
217
217
218
    static bool createTransformOperations(CSSValue* inValue, RenderStyle* inStyle, RenderStyle* rootStyle, TransformOperations& outOperations);
218
    static bool createTransformOperations(CSSValue* inValue, CSSStyleSelector*, TransformOperations& outOperations);
219
    
219
    
220
    void invalidateMatchedDeclarationCache();
220
    void invalidateMatchedDeclarationCache();
221
221
Lines 476-481 private: Source/WebCore/css/CSSStyleSelector.h_sec2
476
    friend bool operator!=(const MatchRanges&, const MatchRanges&);
476
    friend bool operator!=(const MatchRanges&, const MatchRanges&);
477
};
477
};
478
478
479
Length RelativeviewportLength(CSSPrimitiveValue*, Document*);
480
479
} // namespace WebCore
481
} // namespace WebCore
480
482
481
#endif // CSSStyleSelector_h
483
#endif // CSSStyleSelector_h
- Source/WebCore/css/WebKitCSSMatrix.cpp -1 / +1 lines
Lines 63-69 void WebKitCSSMatrix::setMatrixValue(con Source/WebCore/css/WebKitCSSMatrix.cpp_sec1
63
            return;
63
            return;
64
64
65
        TransformOperations operations;
65
        TransformOperations operations;
66
        if (!CSSStyleSelector::createTransformOperations(value.get(), 0, 0, operations)) {
66
        if (!CSSStyleSelector::createTransformOperations(value.get(), 0, operations)) {
67
            ec = SYNTAX_ERR;
67
            ec = SYNTAX_ERR;
68
            return;
68
            return;
69
        }
69
        }
- Source/WebCore/platform/Length.h -7 / +69 lines
Lines 23-28 Source/WebCore/platform/Length.h_sec1
23
#define Length_h
23
#define Length_h
24
24
25
#include "AnimationUtilities.h"
25
#include "AnimationUtilities.h"
26
#include "Document.h"
27
#include "FrameView.h"
28
#include "IntSize.h"
29
#include <math.h>
26
#include <wtf/Assertions.h>
30
#include <wtf/Assertions.h>
27
#include <wtf/FastAllocBase.h>
31
#include <wtf/FastAllocBase.h>
28
#include <wtf/Forward.h>
32
#include <wtf/Forward.h>
Lines 34-71 namespace WebCore { Source/WebCore/platform/Length.h_sec2
34
const int intMaxForLength = 0x7ffffff; // max value for a 28-bit int
38
const int intMaxForLength = 0x7ffffff; // max value for a 28-bit int
35
const int intMinForLength = (-0x7ffffff - 1); // min value for a 28-bit int
39
const int intMinForLength = (-0x7ffffff - 1); // min value for a 28-bit int
36
40
37
enum LengthType { Auto, Relative, Percent, Fixed, Intrinsic, MinIntrinsic, Undefined };
41
enum LengthType { Auto, Relative, Percent, Fixed, Intrinsic, MinIntrinsic, RelativeViewport, Undefined };
42
enum RelativeViewportLengthType { ViewportWidth, ViewportHeight, ViewportMin, UndefinedViewportLength };
38
43
39
struct Length {
44
struct Length {
40
    WTF_MAKE_FAST_ALLOCATED;
45
    WTF_MAKE_FAST_ALLOCATED;
41
public:
46
public:
42
    Length()
47
    Length()
43
        :  m_intValue(0), m_quirk(false), m_type(Auto), m_isFloat(false)
48
        :  m_intValue(0), m_quirk(false), m_type(Auto), m_isFloat(false), m_document(0)
44
    {
49
    {
45
    }
50
    }
46
51
47
    Length(LengthType t)
52
    Length(LengthType t)
48
        : m_intValue(0), m_quirk(false), m_type(t), m_isFloat(false)
53
        : m_intValue(0), m_quirk(false), m_type(t), m_isFloat(false), m_viewportLengthType(Undefined), m_document(0)
49
    {
54
    {
50
    }
55
    }
51
56
52
    Length(int v, LengthType t, bool q = false)
57
    Length(int v, LengthType t, bool q = false)
53
        : m_intValue(v), m_quirk(q), m_type(t), m_isFloat(false)
58
        : m_intValue(v), m_quirk(q), m_type(t), m_isFloat(false), m_viewportLengthType(Undefined), m_document(0)
54
    {
59
    {
55
    }
60
    }
56
    
61
    
57
    Length(float v, LengthType t, bool q = false)
62
    Length(float v, LengthType t, bool q = false)
58
    : m_floatValue(v), m_quirk(q), m_type(t), m_isFloat(true)
63
    : m_floatValue(v), m_quirk(q), m_type(t), m_isFloat(true), m_viewportLengthType(Undefined), m_document(0)
59
    {
64
    {
60
    }
65
    }
61
66
62
    Length(double v, LengthType t, bool q = false)
67
    Length(double v, LengthType t, bool q = false)
63
        : m_quirk(q), m_type(t), m_isFloat(true)
68
        : m_quirk(q), m_type(t), m_isFloat(true), m_viewportLengthType(Undefined), m_document(0)
64
    {
69
    {
65
        m_floatValue = static_cast<float>(v);    
70
        m_floatValue = static_cast<float>(v);    
66
    }
71
    }
67
72
68
    bool operator==(const Length& o) const { return (m_type == o.m_type) && (m_quirk == o.m_quirk) && (isUndefined() || (getFloatValue() == o.getFloatValue())); }
73
    Length(double v, LengthType t, RelativeViewportLengthType viewportLengthType, Document *document, bool q = false)
74
        : m_quirk(q), m_type(t), m_isFloat(true), m_viewportLengthType(viewportLengthType), m_document(document)
75
    {
76
        m_floatValue = static_cast<float>(v);    
77
    }
78
79
    bool operator==(const Length& o) const 
80
    { 
81
        return (m_type == o.m_type) && (m_quirk == o.m_quirk) && (isUndefined() || (getFloatValue() == o.getFloatValue())) 
82
               && (m_viewportLengthType == o.m_viewportLengthType); 
83
    }
84
    
69
    bool operator!=(const Length& o) const { return !(*this == o); }
85
    bool operator!=(const Length& o) const { return !(*this == o); }
70
86
71
    const Length& operator*=(float v)
87
    const Length& operator*=(float v)
Lines 128-133 public: Source/WebCore/platform/Length.h_sec3
128
        switch (type()) {
144
        switch (type()) {
129
            case Fixed:
145
            case Fixed:
130
            case Percent:
146
            case Percent:
147
            case RelativeViewport:
131
                return calcMinValue(maxValue, roundPercentages);
148
                return calcMinValue(maxValue, roundPercentages);
132
            case Auto:
149
            case Auto:
133
                return maxValue;
150
                return maxValue;
Lines 146-151 public: Source/WebCore/platform/Length.h_sec4
146
    {
163
    {
147
        switch (type()) {
164
        switch (type()) {
148
            case Fixed:
165
            case Fixed:
166
            case RelativeViewport:
149
                return value();
167
                return value();
150
            case Percent:
168
            case Percent:
151
                if (roundPercentages)
169
                if (roundPercentages)
Lines 169-174 public: Source/WebCore/platform/Length.h_sec5
169
    {
187
    {
170
        switch (type()) {
188
        switch (type()) {
171
            case Fixed:
189
            case Fixed:
190
            case RelativeViewport:
172
                return getFloatValue();
191
                return getFloatValue();
173
            case Percent:
192
            case Percent:
174
                return static_cast<float>(maxValue * percent() / 100.0f);
193
                return static_cast<float>(maxValue * percent() / 100.0f);
Lines 226-243 public: Source/WebCore/platform/Length.h_sec6
226
        return Length(WebCore::blend(fromValue, toValue, progress), resultType);
245
        return Length(WebCore::blend(fromValue, toValue, progress), resultType);
227
    }
246
    }
228
247
248
    RelativeViewportLengthType relativeViewportLengthType() const { return static_cast<RelativeViewportLengthType>(m_viewportLengthType); }
249
    bool isRelativeViewport() const { return type() == RelativeViewport; }
250
    
251
    float relativeViewportLengthValue() const
252
    {
253
        ASSERT(m_type == RelativeViewport);
254
        return m_floatValue;
255
    }
256
229
private:
257
private:
230
    int getIntValue() const
258
    int getIntValue() const
231
    {
259
    {
232
        ASSERT(!isUndefined());
260
        ASSERT(!isUndefined());
261
        
262
        if (isRelativeViewport())
263
            return static_cast<int>(getViewportLengthValue());
233
        return m_isFloat ? static_cast<int>(m_floatValue) : m_intValue;
264
        return m_isFloat ? static_cast<int>(m_floatValue) : m_intValue;
234
    }
265
    }
235
266
236
    float getFloatValue() const
267
    float getFloatValue() const
237
    {
268
    {
238
        ASSERT(!isUndefined());
269
        ASSERT(!isUndefined());
270
        
271
        if (isRelativeViewport())
272
            return getViewportLengthValue();
239
        return m_isFloat ? m_floatValue : m_intValue;
273
        return m_isFloat ? m_floatValue : m_intValue;
240
    }
274
    }
275
    
276
    float getViewportLengthValue() const
277
    {
278
        switch (relativeViewportLengthType()) {
279
        case ViewportWidth:
280
            return static_cast<float>(m_floatValue * viewportSize().width() / 100.0f);
281
        case ViewportHeight:
282
            return static_cast<float>(m_floatValue * viewportSize().height() / 100.0f);
283
        case ViewportMin:
284
            return static_cast<float>(m_floatValue * std::min(viewportSize().width(), viewportSize().height()) / 100.0f);
285
        case UndefinedViewportLength:
286
            ASSERT_NOT_REACHED();
287
            return 0;
288
        }
289
        ASSERT_NOT_REACHED();
290
        return 0;
291
    }
292
    
293
    IntSize viewportSize() const
294
    {
295
        ASSERT(m_document);
296
        FrameView* frameView = m_document->view();
297
        if (!frameView)
298
            return IntSize();
299
        return frameView->visibleContentRect().size();
300
    }
241
301
242
    union {
302
    union {
243
        int m_intValue;
303
        int m_intValue;
Lines 246-251 private: Source/WebCore/platform/Length.h_sec7
246
    bool m_quirk;
306
    bool m_quirk;
247
    unsigned char m_type;
307
    unsigned char m_type;
248
    bool m_isFloat;
308
    bool m_isFloat;
309
    unsigned char m_viewportLengthType;
310
    Document *m_document;
249
};
311
};
250
312
251
PassOwnArrayPtr<Length> newCoordsArray(const String&, int& len);
313
PassOwnArrayPtr<Length> newCoordsArray(const String&, int& len);
- Source/WebCore/rendering/RenderBox.cpp -1 / +1 lines
Lines 2042-2048 LayoutUnit RenderBox::computeLogicalHeig Source/WebCore/rendering/RenderBox.cpp_sec1
2042
{
2042
{
2043
    LayoutUnit logicalHeight = -1;
2043
    LayoutUnit logicalHeight = -1;
2044
    if (!h.isAuto()) {
2044
    if (!h.isAuto()) {
2045
        if (h.isFixed())
2045
        if (h.isFixed() || h.isRelativeViewport())
2046
            logicalHeight = h.value();
2046
            logicalHeight = h.value();
2047
        else if (h.isPercent())
2047
        else if (h.isPercent())
2048
            logicalHeight = computePercentageLogicalHeight(h);
2048
            logicalHeight = computePercentageLogicalHeight(h);
- LayoutTests/ChangeLog +22 lines
Lines 1-3 LayoutTests/ChangeLog_sec1
1
2012-02-07  Joe Thomas  <joethomas@motorola.com>
2
3
        Implement vw/vh/vmin (viewport sizes) from CSS 3 Values and Units
4
        https://bugs.webkit.org/show_bug.cgi?id=27160
5
6
        The specification related to this implementation is located at http://dev.w3.org/csswg/css3-values/#viewport-relative-lengths.
7
        vw/vh/vmin are implemented as primitive length units. Added the parsing logic for these new units and creation of primitive values.
8
9
        Added a new Length type called "RelativeViewport" for viewport-relative lengths and included the support for fetching the value of these 
10
        relative length units based on the current viewport size.
11
12
        Reviewed by NOBODY (OOPS!).
13
14
        * css3/css3-relative-viewport-lengths-expected.txt: Added.
15
        * css3/css3-relative-viewport-lengths.html: Added.
16
        * fast/dom/Window/window-properties-expected.txt:
17
        * platform/gtk/fast/dom/Window/window-properties-expected.txt:
18
        * platform/mac/fast/dom/Window/window-properties-expected.txt:
19
        * platform/qt-wk2/fast/dom/Window/window-properties-expected.txt:
20
        * platform/qt/fast/dom/Window/window-properties-expected.txt:
21
        * platform/win/fast/dom/Window/window-properties-expected.txt:
22
1
2012-02-07  David Barton  <dbarton@mathscribe.com>
23
2012-02-07  David Barton  <dbarton@mathscribe.com>
2
24
3
        Remove extraneous MathML code before bug 52444 fix
25
        Remove extraneous MathML code before bug 52444 fix
- LayoutTests/css3/css3-relative-viewport-lengths-expected.txt +12 lines
Line 0 LayoutTests/css3/css3-relative-viewport-lengths-expected.txt_sec1
1
Test for Bug: 27160 - Implement vw/vh/vm (viewport sizes) from CSS 3 Values and Units
2
3
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
5
6
PASS vw - relative viewport width unit
7
PASS vh - relative viewport width unit
8
PASS vmin - relative viewport width unit
9
PASS successfullyParsed is true
10
11
TEST COMPLETE
12
- LayoutTests/css3/css3-relative-viewport-lengths.html +49 lines
Line 0 LayoutTests/css3/css3-relative-viewport-lengths.html_sec1
1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2
<html>
3
<head>
4
<script src="../fast/js/resources/js-test-pre.js"></script>
5
<style>
6
#testDiv {
7
    width: 40vw;
8
    height: 40vh;
9
}
10
</style>
11
</head>
12
<body>
13
<div id="testDiv"></div>
14
<p id="testDiv"></p>
15
<script>
16
if (window.layoutTestController)
17
    layoutTestController.dumpAsText();
18
19
description("Test for Bug: 27160 - Implement vw/vh/vm (viewport sizes) from CSS 3 Values and Units");
20
21
var divElement = document.getElementById("testDiv");
22
testViewportLengthUnits();
23
24
function testViewportLengthUnits()
25
{
26
    var divElement = document.getElementById("testDiv");
27
28
    if (divElement.offsetWidth == Math.floor(40 * window.innerWidth / 100))
29
        testPassed("vw - relative viewport width unit");
30
    else {
31
        testFailed("vw - relative viewport width unit");
32
    }
33
    if (divElement.offsetHeight == Math.floor(40 * window.innerHeight / 100))
34
        testPassed("vh - relative viewport width unit");
35
    else {
36
        testFailed("vh - relative viewport width unit");
37
    }
38
    divElement.style.height = "60vmin";
39
40
    if (divElement.offsetHeight == Math.floor(60 * Math.min(window.innerWidth, window.innerHeight) / 100))
41
        testPassed("vmin - relative viewport width unit");
42
    else
43
        testFailed("vmin - relative viewport width unit");
44
45
}
46
</script>
47
<script src="../fast/js/resources/js-test-post.js"></script>
48
</body>
49
</html>
- LayoutTests/fast/dom/Window/window-properties-expected.txt +6 lines
Lines 289-294 window.CSSPrimitiveValue.CSS_S [number] LayoutTests/fast/dom/Window/window-properties-expected.txt_sec1
289
window.CSSPrimitiveValue.CSS_STRING [number]
289
window.CSSPrimitiveValue.CSS_STRING [number]
290
window.CSSPrimitiveValue.CSS_UNKNOWN [number]
290
window.CSSPrimitiveValue.CSS_UNKNOWN [number]
291
window.CSSPrimitiveValue.CSS_URI [number]
291
window.CSSPrimitiveValue.CSS_URI [number]
292
window.CSSPrimitiveValue.CSS_VH [number]
293
window.CSSPrimitiveValue.CSS_VMIN [number]
294
window.CSSPrimitiveValue.CSS_VW [number]
292
window.CSSPrimitiveValue.prototype [object CSSPrimitiveValuePrototype]
295
window.CSSPrimitiveValue.prototype [object CSSPrimitiveValuePrototype]
293
window.CSSPrimitiveValue.prototype.CSS_ATTR [number]
296
window.CSSPrimitiveValue.prototype.CSS_ATTR [number]
294
window.CSSPrimitiveValue.prototype.CSS_CM [number]
297
window.CSSPrimitiveValue.prototype.CSS_CM [number]
Lines 320-325 window.CSSPrimitiveValue.prototype.CSS_S LayoutTests/fast/dom/Window/window-properties-expected.txt_sec2
320
window.CSSPrimitiveValue.prototype.CSS_UNKNOWN [number]
323
window.CSSPrimitiveValue.prototype.CSS_UNKNOWN [number]
321
window.CSSPrimitiveValue.prototype.CSS_URI [number]
324
window.CSSPrimitiveValue.prototype.CSS_URI [number]
322
window.CSSPrimitiveValue.prototype.CSS_VALUE_LIST [number]
325
window.CSSPrimitiveValue.prototype.CSS_VALUE_LIST [number]
326
window.CSSPrimitiveValue.prototype.CSS_VH [number]
327
window.CSSPrimitiveValue.prototype.CSS_VMIN [number]
328
window.CSSPrimitiveValue.prototype.CSS_VW [number]
323
window.CSSPrimitiveValue.prototype.getCounterValue [function]
329
window.CSSPrimitiveValue.prototype.getCounterValue [function]
324
window.CSSPrimitiveValue.prototype.getFloatValue [function]
330
window.CSSPrimitiveValue.prototype.getFloatValue [function]
325
window.CSSPrimitiveValue.prototype.getRGBColorValue [function]
331
window.CSSPrimitiveValue.prototype.getRGBColorValue [function]
- LayoutTests/platform/gtk/fast/dom/Window/window-properties-expected.txt +6 lines
Lines 289-294 window.CSSPrimitiveValue.CSS_S [number] LayoutTests/platform/gtk/fast/dom/Window/window-properties-expected.txt_sec1
289
window.CSSPrimitiveValue.CSS_STRING [number]
289
window.CSSPrimitiveValue.CSS_STRING [number]
290
window.CSSPrimitiveValue.CSS_UNKNOWN [number]
290
window.CSSPrimitiveValue.CSS_UNKNOWN [number]
291
window.CSSPrimitiveValue.CSS_URI [number]
291
window.CSSPrimitiveValue.CSS_URI [number]
292
window.CSSPrimitiveValue.CSS_VH [number]
293
window.CSSPrimitiveValue.CSS_VMIN [number]
294
window.CSSPrimitiveValue.CSS_VW [number]
292
window.CSSPrimitiveValue.prototype [object CSSPrimitiveValuePrototype]
295
window.CSSPrimitiveValue.prototype [object CSSPrimitiveValuePrototype]
293
window.CSSPrimitiveValue.prototype.CSS_ATTR [number]
296
window.CSSPrimitiveValue.prototype.CSS_ATTR [number]
294
window.CSSPrimitiveValue.prototype.CSS_CM [number]
297
window.CSSPrimitiveValue.prototype.CSS_CM [number]
Lines 320-325 window.CSSPrimitiveValue.prototype.CSS_S LayoutTests/platform/gtk/fast/dom/Window/window-properties-expected.txt_sec2
320
window.CSSPrimitiveValue.prototype.CSS_UNKNOWN [number]
323
window.CSSPrimitiveValue.prototype.CSS_UNKNOWN [number]
321
window.CSSPrimitiveValue.prototype.CSS_URI [number]
324
window.CSSPrimitiveValue.prototype.CSS_URI [number]
322
window.CSSPrimitiveValue.prototype.CSS_VALUE_LIST [number]
325
window.CSSPrimitiveValue.prototype.CSS_VALUE_LIST [number]
326
window.CSSPrimitiveValue.prototype.CSS_VH [number]
327
window.CSSPrimitiveValue.prototype.CSS_VMIN [number]
328
window.CSSPrimitiveValue.prototype.CSS_VW [number]
323
window.CSSPrimitiveValue.prototype.getCounterValue [function]
329
window.CSSPrimitiveValue.prototype.getCounterValue [function]
324
window.CSSPrimitiveValue.prototype.getFloatValue [function]
330
window.CSSPrimitiveValue.prototype.getFloatValue [function]
325
window.CSSPrimitiveValue.prototype.getRGBColorValue [function]
331
window.CSSPrimitiveValue.prototype.getRGBColorValue [function]
- LayoutTests/platform/mac/fast/dom/Window/window-properties-expected.txt +6 lines
Lines 314-319 window.CSSPrimitiveValue.CSS_S [number] LayoutTests/platform/mac/fast/dom/Window/window-properties-expected.txt_sec1
314
window.CSSPrimitiveValue.CSS_STRING [number]
314
window.CSSPrimitiveValue.CSS_STRING [number]
315
window.CSSPrimitiveValue.CSS_UNKNOWN [number]
315
window.CSSPrimitiveValue.CSS_UNKNOWN [number]
316
window.CSSPrimitiveValue.CSS_URI [number]
316
window.CSSPrimitiveValue.CSS_URI [number]
317
window.CSSPrimitiveValue.CSS_VH [number]
318
window.CSSPrimitiveValue.CSS_VMIN [number]
319
window.CSSPrimitiveValue.CSS_VW [number]
317
window.CSSPrimitiveValue.prototype [object CSSPrimitiveValuePrototype]
320
window.CSSPrimitiveValue.prototype [object CSSPrimitiveValuePrototype]
318
window.CSSPrimitiveValue.prototype.CSS_ATTR [number]
321
window.CSSPrimitiveValue.prototype.CSS_ATTR [number]
319
window.CSSPrimitiveValue.prototype.CSS_CM [number]
322
window.CSSPrimitiveValue.prototype.CSS_CM [number]
Lines 345-350 window.CSSPrimitiveValue.prototype.CSS_S LayoutTests/platform/mac/fast/dom/Window/window-properties-expected.txt_sec2
345
window.CSSPrimitiveValue.prototype.CSS_UNKNOWN [number]
348
window.CSSPrimitiveValue.prototype.CSS_UNKNOWN [number]
346
window.CSSPrimitiveValue.prototype.CSS_URI [number]
349
window.CSSPrimitiveValue.prototype.CSS_URI [number]
347
window.CSSPrimitiveValue.prototype.CSS_VALUE_LIST [number]
350
window.CSSPrimitiveValue.prototype.CSS_VALUE_LIST [number]
351
window.CSSPrimitiveValue.prototype.CSS_VH [number]
352
window.CSSPrimitiveValue.prototype.CSS_VMIN [number]
353
window.CSSPrimitiveValue.prototype.CSS_VW [number]
348
window.CSSPrimitiveValue.prototype.getCounterValue [function]
354
window.CSSPrimitiveValue.prototype.getCounterValue [function]
349
window.CSSPrimitiveValue.prototype.getFloatValue [function]
355
window.CSSPrimitiveValue.prototype.getFloatValue [function]
350
window.CSSPrimitiveValue.prototype.getRGBColorValue [function]
356
window.CSSPrimitiveValue.prototype.getRGBColorValue [function]
- LayoutTests/platform/qt-wk2/fast/dom/Window/window-properties-expected.txt +6 lines
Lines 286-291 window.CSSPrimitiveValue.CSS_S [number] LayoutTests/platform/qt-wk2/fast/dom/Window/window-properties-expected.txt_sec1
286
window.CSSPrimitiveValue.CSS_STRING [number]
286
window.CSSPrimitiveValue.CSS_STRING [number]
287
window.CSSPrimitiveValue.CSS_UNKNOWN [number]
287
window.CSSPrimitiveValue.CSS_UNKNOWN [number]
288
window.CSSPrimitiveValue.CSS_URI [number]
288
window.CSSPrimitiveValue.CSS_URI [number]
289
window.CSSPrimitiveValue.CSS_VH [number]
290
window.CSSPrimitiveValue.CSS_VMIN [number]
291
window.CSSPrimitiveValue.CSS_VW [number]
289
window.CSSPrimitiveValue.prototype [object CSSPrimitiveValuePrototype]
292
window.CSSPrimitiveValue.prototype [object CSSPrimitiveValuePrototype]
290
window.CSSPrimitiveValue.prototype.CSS_ATTR [number]
293
window.CSSPrimitiveValue.prototype.CSS_ATTR [number]
291
window.CSSPrimitiveValue.prototype.CSS_CM [number]
294
window.CSSPrimitiveValue.prototype.CSS_CM [number]
Lines 317-322 window.CSSPrimitiveValue.prototype.CSS_S LayoutTests/platform/qt-wk2/fast/dom/Window/window-properties-expected.txt_sec2
317
window.CSSPrimitiveValue.prototype.CSS_UNKNOWN [number]
320
window.CSSPrimitiveValue.prototype.CSS_UNKNOWN [number]
318
window.CSSPrimitiveValue.prototype.CSS_URI [number]
321
window.CSSPrimitiveValue.prototype.CSS_URI [number]
319
window.CSSPrimitiveValue.prototype.CSS_VALUE_LIST [number]
322
window.CSSPrimitiveValue.prototype.CSS_VALUE_LIST [number]
323
window.CSSPrimitiveValue.prototype.CSS_VH [number]
324
window.CSSPrimitiveValue.prototype.CSS_VMIN [number]
325
window.CSSPrimitiveValue.prototype.CSS_VW [number]
320
window.CSSPrimitiveValue.prototype.getCounterValue [function]
326
window.CSSPrimitiveValue.prototype.getCounterValue [function]
321
window.CSSPrimitiveValue.prototype.getFloatValue [function]
327
window.CSSPrimitiveValue.prototype.getFloatValue [function]
322
window.CSSPrimitiveValue.prototype.getRGBColorValue [function]
328
window.CSSPrimitiveValue.prototype.getRGBColorValue [function]
- LayoutTests/platform/qt/fast/dom/Window/window-properties-expected.txt +6 lines
Lines 286-291 window.CSSPrimitiveValue.CSS_S [number] LayoutTests/platform/qt/fast/dom/Window/window-properties-expected.txt_sec1
286
window.CSSPrimitiveValue.CSS_STRING [number]
286
window.CSSPrimitiveValue.CSS_STRING [number]
287
window.CSSPrimitiveValue.CSS_UNKNOWN [number]
287
window.CSSPrimitiveValue.CSS_UNKNOWN [number]
288
window.CSSPrimitiveValue.CSS_URI [number]
288
window.CSSPrimitiveValue.CSS_URI [number]
289
window.CSSPrimitiveValue.CSS_VH [number]
290
window.CSSPrimitiveValue.CSS_VMIN [number]
291
window.CSSPrimitiveValue.CSS_VW [number]
289
window.CSSPrimitiveValue.prototype [object CSSPrimitiveValuePrototype]
292
window.CSSPrimitiveValue.prototype [object CSSPrimitiveValuePrototype]
290
window.CSSPrimitiveValue.prototype.CSS_ATTR [number]
293
window.CSSPrimitiveValue.prototype.CSS_ATTR [number]
291
window.CSSPrimitiveValue.prototype.CSS_CM [number]
294
window.CSSPrimitiveValue.prototype.CSS_CM [number]
Lines 317-322 window.CSSPrimitiveValue.prototype.CSS_S LayoutTests/platform/qt/fast/dom/Window/window-properties-expected.txt_sec2
317
window.CSSPrimitiveValue.prototype.CSS_UNKNOWN [number]
320
window.CSSPrimitiveValue.prototype.CSS_UNKNOWN [number]
318
window.CSSPrimitiveValue.prototype.CSS_URI [number]
321
window.CSSPrimitiveValue.prototype.CSS_URI [number]
319
window.CSSPrimitiveValue.prototype.CSS_VALUE_LIST [number]
322
window.CSSPrimitiveValue.prototype.CSS_VALUE_LIST [number]
323
window.CSSPrimitiveValue.prototype.CSS_VH [number]
324
window.CSSPrimitiveValue.prototype.CSS_VMIN [number]
325
window.CSSPrimitiveValue.prototype.CSS_VW [number]
320
window.CSSPrimitiveValue.prototype.getCounterValue [function]
326
window.CSSPrimitiveValue.prototype.getCounterValue [function]
321
window.CSSPrimitiveValue.prototype.getFloatValue [function]
327
window.CSSPrimitiveValue.prototype.getFloatValue [function]
322
window.CSSPrimitiveValue.prototype.getRGBColorValue [function]
328
window.CSSPrimitiveValue.prototype.getRGBColorValue [function]
- LayoutTests/platform/win/fast/dom/Window/window-properties-expected.txt +6 lines
Lines 289-294 window.CSSPrimitiveValue.CSS_S [number] LayoutTests/platform/win/fast/dom/Window/window-properties-expected.txt_sec1
289
window.CSSPrimitiveValue.CSS_STRING [number]
289
window.CSSPrimitiveValue.CSS_STRING [number]
290
window.CSSPrimitiveValue.CSS_UNKNOWN [number]
290
window.CSSPrimitiveValue.CSS_UNKNOWN [number]
291
window.CSSPrimitiveValue.CSS_URI [number]
291
window.CSSPrimitiveValue.CSS_URI [number]
292
window.CSSPrimitiveValue.CSS_VH [number]
293
window.CSSPrimitiveValue.CSS_VMIN [number]
294
window.CSSPrimitiveValue.CSS_VW [number]
292
window.CSSPrimitiveValue.prototype [object CSSPrimitiveValuePrototype]
295
window.CSSPrimitiveValue.prototype [object CSSPrimitiveValuePrototype]
293
window.CSSPrimitiveValue.prototype.CSS_ATTR [number]
296
window.CSSPrimitiveValue.prototype.CSS_ATTR [number]
294
window.CSSPrimitiveValue.prototype.CSS_CM [number]
297
window.CSSPrimitiveValue.prototype.CSS_CM [number]
Lines 320-325 window.CSSPrimitiveValue.prototype.CSS_S LayoutTests/platform/win/fast/dom/Window/window-properties-expected.txt_sec2
320
window.CSSPrimitiveValue.prototype.CSS_UNKNOWN [number]
323
window.CSSPrimitiveValue.prototype.CSS_UNKNOWN [number]
321
window.CSSPrimitiveValue.prototype.CSS_URI [number]
324
window.CSSPrimitiveValue.prototype.CSS_URI [number]
322
window.CSSPrimitiveValue.prototype.CSS_VALUE_LIST [number]
325
window.CSSPrimitiveValue.prototype.CSS_VALUE_LIST [number]
326
window.CSSPrimitiveValue.prototype.CSS_VH [number]
327
window.CSSPrimitiveValue.prototype.CSS_VMIN [number]
328
window.CSSPrimitiveValue.prototype.CSS_VW [number]
323
window.CSSPrimitiveValue.prototype.getCounterValue [function]
329
window.CSSPrimitiveValue.prototype.getCounterValue [function]
324
window.CSSPrimitiveValue.prototype.getFloatValue [function]
330
window.CSSPrimitiveValue.prototype.getFloatValue [function]
325
window.CSSPrimitiveValue.prototype.getRGBColorValue [function]
331
window.CSSPrimitiveValue.prototype.getRGBColorValue [function]

Return to Bug 27160