Changeset 170544 in webkit


Ignore:
Timestamp:
Jun 27, 2014 11:55:46 AM (10 years ago)
Author:
mhodovan.u-szeged@partner.samsung.com
Message:

REGRESSION (r168685): css calc() expression fails
https://bugs.webkit.org/show_bug.cgi?id=134059

Source/WebCore:
The expression 'calc((100% - 20px) / 3' did not work properly after r168685,
because primitiveType() function in CSSCalculationValue.cpp has handled
CalcPercentLength and CalcPercentNumber categories as if they were angles.
The patch fixes this incorrect behavior.

Reviewed by Simon Fraser.

Test: fast/css/calc-percentage-pixel.html

  • css/CSSCalculationValue.cpp:

LayoutTests:
Added test demonstrates that expressions like
'calc((100% - 20px) / 3' work correctly again.

Reviewed by Simon Fraser.

  • fast/css/calc-percentage-pixel-expected.html: Added.
  • fast/css/calc-percentage-pixel.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r170542 r170544  
     12014-06-27  Martin Hodovan  <mhodovan.u-szeged@partner.samsung.com>
     2
     3        REGRESSION (r168685): css calc() expression fails
     4        https://bugs.webkit.org/show_bug.cgi?id=134059
     5
     6        Added test demonstrates that expressions like
     7        'calc((100% - 20px) / 3' work correctly again.
     8
     9        Reviewed by Simon Fraser.
     10
     11        * fast/css/calc-percentage-pixel-expected.html: Added.
     12        * fast/css/calc-percentage-pixel.html: Added.
     13
    1142014-06-27  Jer Noble  <jer.noble@apple.com>
    215
  • trunk/Source/WebCore/ChangeLog

    r170543 r170544  
     12014-06-27  Martin Hodovan  <mhodovan.u-szeged@partner.samsung.com>
     2
     3        REGRESSION (r168685): css calc() expression fails
     4        https://bugs.webkit.org/show_bug.cgi?id=134059
     5
     6        The expression 'calc((100% - 20px) / 3' did not work properly after r168685,
     7        because primitiveType() function in CSSCalculationValue.cpp has handled
     8        CalcPercentLength and CalcPercentNumber categories as if they were angles.
     9        The patch fixes this incorrect behavior.
     10
     11        Reviewed by Simon Fraser.
     12
     13        Test: fast/css/calc-percentage-pixel.html
     14
     15        * css/CSSCalculationValue.cpp:
     16
    1172014-06-27  Jer Noble  <jer.noble@apple.com>
    218
  • trunk/Source/WebCore/css/CSSCalculationValue.cpp

    r169407 r170544  
    494494            return CSSPrimitiveValue::CSS_UNKNOWN;
    495495        }
    496         case CalcPercentLength:
    497         case CalcPercentNumber:
    498496        case CalcAngle:
    499497            return CSSPrimitiveValue::CSS_DEG;
     
    502500        case CalcFrequency:
    503501            return CSSPrimitiveValue::CSS_HZ;
     502        case CalcPercentLength:
     503        case CalcPercentNumber:
    504504        case CalcOther:
    505505            return CSSPrimitiveValue::CSS_UNKNOWN;
Note: See TracChangeset for help on using the changeset viewer.