⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 244817 in webkit


Ignore:
Timestamp:
Apr 30, 2019, 6:14:37 PM (7 years ago)
Author:
mmaxfield@apple.com
Message:

font-weight: 1000 is not parsed successfully
https://bugs.webkit.org/show_bug.cgi?id=197427

Reviewed by Dean Jackson.

Source/WebCore:

The spec says:
"Only values greater than or equal to 1, and less than or equal to 1000, are valid"

This change brings us in-line with all the other browsers.

Test: fast/text/font-weight-1-1000.html

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::consumeFontWeightNumber):

LayoutTests:

  • platform/win/TestExpectations: Windows disables variation fonts, so requires values to be divisible by 100
  • fast/text/font-weight-1-1000-expected.txt: Added.
  • fast/text/font-weight-1-1000.html: Added.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r244816 r244817  
     12019-04-30  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        font-weight: 1000 is not parsed successfully
     4        https://bugs.webkit.org/show_bug.cgi?id=197427
     5
     6        Reviewed by Dean Jackson.
     7
     8        * platform/win/TestExpectations: Windows disables variation fonts, so requires values to be divisible by 100
     9        * fast/text/font-weight-1-1000-expected.txt: Added.
     10        * fast/text/font-weight-1-1000.html: Added.
     11
    1122019-04-30  Commit Queue  <commit-queue@webkit.org>
    213
  • trunk/LayoutTests/platform/win/TestExpectations

    r244797 r244817  
    35983598transitions/clip-path-path-transitions.html [ Failure ]
    35993599legacy-animation-engine/transitions/clip-path-path-transitions.html [ Failure ]
     3600fast/text/font-weight-1-1000.html [ Failure ]
    36003601# Unexpected image-only failures tracked in webkit.org/b/172437.
    36013602editing/selection/update-selection-by-style-change.html [ ImageOnlyFailure ]
  • trunk/Source/WebCore/ChangeLog

    r244815 r244817  
     12019-04-30  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        font-weight: 1000 is not parsed successfully
     4        https://bugs.webkit.org/show_bug.cgi?id=197427
     5
     6        Reviewed by Dean Jackson.
     7
     8        The spec says:
     9        "Only values greater than or equal to 1, and less than or equal to 1000, are valid"
     10
     11        This change brings us in-line with all the other browsers.
     12
     13        Test: fast/text/font-weight-1-1000.html
     14
     15        * css/parser/CSSPropertyParserHelpers.cpp:
     16        (WebCore::CSSPropertyParserHelpers::consumeFontWeightNumber):
     17
    1182019-04-30  Youenn Fablet  <youenn@apple.com>
    219
  • trunk/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp

    r244115 r244817  
    231231    // Values less than or equal to 0 or greater than or equal to 1000 are parse errors.
    232232    auto& token = range.peek();
    233     if (token.type() == NumberToken && token.numericValue() > 0 && token.numericValue() < 1000
     233    if (token.type() == NumberToken && token.numericValue() >= 1 && token.numericValue() <= 1000
    234234#if !ENABLE(VARIATION_FONTS)
    235235        && token.numericValueType() == IntegerValueType && divisibleBy100(token.numericValue())
Note: See TracChangeset for help on using the changeset viewer.