WebKit Bugzilla
Attachment 368586 Details for
Bug 197427
: font-weight: 1000 is not parsed successfully
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-197427-20190430122430.patch (text/plain), 5.31 KB, created by
Myles C. Maxfield
on 2019-04-30 12:24:31 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Myles C. Maxfield
Created:
2019-04-30 12:24:31 PDT
Size:
5.31 KB
patch
obsolete
>Subversion Revision: 244762 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index c0eea3e665eecc17a43323b8a922f2c3db0e7aa0..10cc7d0783a619ec3659502bab63d6a0749f19bc 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,20 @@ >+2019-04-30 Myles C. Maxfield <mmaxfield@apple.com> >+ >+ font-weight: 1000 is not parsed successfully >+ https://bugs.webkit.org/show_bug.cgi?id=197427 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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): >+ > 2019-04-29 Truitt Savell <tsavell@apple.com> > > Unreviewed, rolling out r244755. >diff --git a/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp b/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp >index 720a2f91ac28f0126285f3bf4c77092ce06f18f7..8b939aaaa3d66d3d88fc429349f5dd5c9eaf060e 100644 >--- a/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp >+++ b/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp >@@ -230,7 +230,7 @@ RefPtr<CSSPrimitiveValue> consumeFontWeightNumber(CSSParserTokenRange& range) > { > // Values less than or equal to 0 or greater than or equal to 1000 are parse errors. > auto& token = range.peek(); >- if (token.type() == NumberToken && token.numericValue() > 0 && token.numericValue() < 1000 >+ if (token.type() == NumberToken && token.numericValue() >= 1 && token.numericValue() <= 1000 > #if !ENABLE(VARIATION_FONTS) > && token.numericValueType() == IntegerValueType && divisibleBy100(token.numericValue()) > #endif >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 87c1bd7fe0c99d8f3fb1538ca81b6d9d35be00e5..17b488cd807e0187162c90d077d7b2a5e92b2835 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,13 @@ >+2019-04-30 Myles C. Maxfield <mmaxfield@apple.com> >+ >+ font-weight: 1000 is not parsed successfully >+ https://bugs.webkit.org/show_bug.cgi?id=197427 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * fast/text/font-weight-1-1000-expected.txt: Added. >+ * fast/text/font-weight-1-1000.html: Added. >+ > 2019-04-29 Truitt Savell <tsavell@apple.com> > > Unreviewed, rolling out r244755. >diff --git a/LayoutTests/fast/text/font-weight-1-1000-expected.txt b/LayoutTests/fast/text/font-weight-1-1000-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..ede62457dcb80da9e6f31a5576d4491e5ed7d7a3 >--- /dev/null >+++ b/LayoutTests/fast/text/font-weight-1-1000-expected.txt >@@ -0,0 +1,15 @@ >+This test makes sure that font-weight's range of values are parsed correctly. >+ >+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >+ >+ >+PASS window.getComputedStyle(document.getElementById('test1')).getPropertyValue('font-weight') is "normal" >+PASS window.getComputedStyle(document.getElementById('test2')).getPropertyValue('font-weight') is "normal" >+PASS window.getComputedStyle(document.getElementById('test3')).getPropertyValue('font-weight') is "1" >+PASS window.getComputedStyle(document.getElementById('test4')).getPropertyValue('font-weight') is "999" >+PASS window.getComputedStyle(document.getElementById('test5')).getPropertyValue('font-weight') is "999.5" >+PASS window.getComputedStyle(document.getElementById('test6')).getPropertyValue('font-weight') is "1000" >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+ >diff --git a/LayoutTests/fast/text/font-weight-1-1000.html b/LayoutTests/fast/text/font-weight-1-1000.html >new file mode 100644 >index 0000000000000000000000000000000000000000..23bf64b9d910da5990d699aeaf3fb465476bc7a0 >--- /dev/null >+++ b/LayoutTests/fast/text/font-weight-1-1000.html >@@ -0,0 +1,26 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../../resources/js-test-pre.js"></script> >+</head> >+<body> >+<div id="reference"></div> >+<div id="test1" style="font-weight: 0;"></div> >+<div id="test2" style="font-weight: 0.5;"></div> >+<div id="test3" style="font-weight: 1;"></div> >+<div id="test4" style="font-weight: 999;"></div> >+<div id="test5" style="font-weight: 999.5;"></div> >+<div id="test6" style="font-weight: 1000;"></div> >+<script> >+description("This test makes sure that font-weight's range of values are parsed correctly."); >+let reference = window.getComputedStyle(document.getElementById("reference")).getPropertyValue("font-weight"); >+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test1')).getPropertyValue('font-weight')", reference); >+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test2')).getPropertyValue('font-weight')", reference); >+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test3')).getPropertyValue('font-weight')", "1"); >+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test4')).getPropertyValue('font-weight')", "999"); >+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test5')).getPropertyValue('font-weight')", "999.5"); >+shouldBeEqualToString("window.getComputedStyle(document.getElementById('test6')).getPropertyValue('font-weight')", "1000"); >+</script> >+<script src="../../resources/js-test-post.js"></script> >+</body> >+</html>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
dino
:
review+
ews-watchlist
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 197427
: 368586 |
368607
|
368609