Changeset 35879 in webkit


Ignore:
Timestamp:
Aug 21, 2008 4:35:23 PM (16 years ago)
Author:
dino@apple.com
Message:

2008-08-21 Chris Marrin <cmarrin@apple.com>

Allow 0 (without units) for Time eg. duration
Fix for https://bugs.webkit.org/show_bug.cgi?id=20467

Reviewed by Dave Hyatt.

Test: css1/units/zero-duration-without-units.html

  • css/CSSParser.cpp: (WebCore::CSSParser::validUnit):
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r35862 r35879  
     12008-08-21  Chris Marrin  <cmarrin@apple.com>
     2
     3        Allow 0 (without units) for Time eg. duration
     4        Fix for https://bugs.webkit.org/show_bug.cgi?id=20467
     5
     6        Reviewed by Dave Hyatt.
     7
     8        * css1/units/zero-duration-without-units-expected.txt: Added.
     9        * css1/units/zero-duration-without-units.html: Added.
     10
    1112008-08-20  Simon Fraser  <simon.fraser@apple.com>
    212
  • trunk/WebCore/ChangeLog

    r35878 r35879  
     12008-08-21  Chris Marrin  <cmarrin@apple.com>
     2
     3        Allow 0 (without units) for Time eg. duration
     4        Fix for https://bugs.webkit.org/show_bug.cgi?id=20467
     5
     6        Reviewed by Dave Hyatt.
     7
     8        Test: css1/units/zero-duration-without-units.html
     9
     10        * css/CSSParser.cpp:
     11        (WebCore::CSSParser::validUnit):
     12
    1132008-08-21  Timothy Hatcher  <timothy@apple.com>
    214
  • trunk/WebCore/css/CSSParser.cpp

    r35580 r35879  
    409409    case CSSPrimitiveValue::CSS_NUMBER:
    410410        b = (unitflags & FNumber);
    411         if (!b && ((unitflags & (FLength | FAngle)) && (value->fValue == 0 || !strict))) {
    412             value->unit = (unitflags & FLength) ? CSSPrimitiveValue::CSS_PX : CSSPrimitiveValue::CSS_DEG;
     411        if (!b && ((unitflags & (FLength | FAngle | FTime)) && (value->fValue == 0 || !strict))) {
     412            value->unit = (unitflags & FLength) ? CSSPrimitiveValue::CSS_PX :
     413                          ((unitflags & FAngle) ? CSSPrimitiveValue::CSS_DEG : CSSPrimitiveValue::CSS_S);
    413414            b = true;
    414415        }
Note: See TracChangeset for help on using the changeset viewer.