Changeset 112341 in webkit


Ignore:
Timestamp:
Mar 27, 2012 5:27:27 PM (12 years ago)
Author:
alexis.menard@openbossa.org
Message:

Simplify CSSPropertyBorderSpacing parsing.
https://bugs.webkit.org/show_bug.cgi?id=82397

Reviewed by Benjamin Poulain.

Remove the local array of longhand properties as it doesn't really
bring much in this simple parsing algorithm.

No new tests, no functionality change intended.

  • css/CSSParser.cpp:

(WebCore::CSSParser::parseValue):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r112340 r112341  
     12012-03-27  Alexis Menard  <alexis.menard@openbossa.org>
     2
     3        Simplify CSSPropertyBorderSpacing parsing.
     4        https://bugs.webkit.org/show_bug.cgi?id=82397
     5
     6        Reviewed by Benjamin Poulain.
     7
     8        Remove the local array of longhand properties as it doesn't really
     9        bring much in this simple parsing algorithm.
     10
     11        No new tests, no functionality change intended.
     12
     13        * css/CSSParser.cpp:
     14        (WebCore::CSSParser::parseValue):
     15
    1162012-03-27  Anders Carlsson  <andersca@apple.com>
    217
  • trunk/Source/WebCore/css/CSSParser.cpp

    r112310 r112341  
    15391539
    15401540    case CSSPropertyBorderSpacing: {
    1541         const int properties[2] = { CSSPropertyWebkitBorderHorizontalSpacing,
    1542                                     CSSPropertyWebkitBorderVerticalSpacing };
    15431541        if (num == 1) {
    15441542            ShorthandScope scope(this, CSSPropertyBorderSpacing);
    1545             if (!parseValue(properties[0], important))
     1543            if (!parseValue(CSSPropertyWebkitBorderHorizontalSpacing, important))
    15461544                return false;
    15471545            CSSValue* value = m_parsedProperties.last().value();
    1548             addProperty(properties[1], value, important);
     1546            addProperty(CSSPropertyWebkitBorderVerticalSpacing, value, important);
    15491547            return true;
    15501548        }
    15511549        else if (num == 2) {
    15521550            ShorthandScope scope(this, CSSPropertyBorderSpacing);
    1553             if (!parseValue(properties[0], important) || !parseValue(properties[1], important))
     1551            if (!parseValue(CSSPropertyWebkitBorderHorizontalSpacing, important) || !parseValue(CSSPropertyWebkitBorderVerticalSpacing, important))
    15541552                return false;
    15551553            return true;
Note: See TracChangeset for help on using the changeset viewer.