WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
116829
[CSS] -webkit-var prefix is case-sensitive
https://bugs.webkit.org/show_bug.cgi?id=116829
Summary
[CSS] -webkit-var prefix is case-sensitive
Claudio Saavedra
Reported
2013-05-27 08:20:39 PDT
[CSS] -webkit-var prefix is case-sensitive
Attachments
Patch
(3.66 KB, patch)
2013-05-27 08:25 PDT
,
Claudio Saavedra
no flags
Details
Formatted Diff
Diff
Patch
(4.44 KB, patch)
2013-05-27 12:43 PDT
,
Claudio Saavedra
darin
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Claudio Saavedra
Comment 1
2013-05-27 08:25:55 PDT
Created
attachment 202987
[details]
Patch
Sergio Villar Senin
Comment 2
2013-05-27 09:28:18 PDT
Comment on
attachment 202987
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=202987&action=review
The fix looks sane to me, just some minor comments.
> Source/WebCore/css/CSSParser.cpp:9866 > + do {
The first assert of the case insensitive version still applies here, not sure if adding it pays off though as this is only used by the CSS custom properties stuff.
> Source/WebCore/css/CSSParser.cpp:9867 > + if ((*string++) != (*constantString++))
I guess you can omit the parentheses here
> LayoutTests/fast/css/variables/case-sensitive.html:11 > + -WEBKIT-VAR-padding: 200px;
What about adding something like "with no left padding" to the <p> in order to better explain test results?
Darin Adler
Comment 3
2013-05-27 12:32:56 PDT
Why is -webkit-var case sensitive when other things in CSS are not? Could you point to the specification that says it should be?
Claudio Saavedra
Comment 4
2013-05-27 12:43:34 PDT
Created
attachment 203003
[details]
Patch
Claudio Saavedra
Comment 5
2013-05-27 12:45:18 PDT
(In reply to
comment #3
)
> Why is -webkit-var case sensitive when other things in CSS are not? Could you point to the specification that says it should be?
"Unlike other CSS properties, custom property names are case-sensitive. The "var-" prefix must be written in lower-case. For example, VAR-FOO is invalid, because the prefix isn't "var-". While both var-foo and var-FOO are valid, they are distinct properties - using var(foo) will refer to the first one, while using var(FOO) will refer to the second."
http://dev.w3.org/csswg/css-variables/#defining-variables
Darin Adler
Comment 6
2013-05-27 13:06:02 PDT
Comment on
attachment 203003
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=203003&action=review
> Source/WebCore/css/CSSParser.cpp:9867 > + ASSERT((*constantString >= 'a' && *constantString <= 'z') || *constantString == '-');
There is no reason to have this assertion. I know the previous reviewer suggested you add it. But the assertion above is there because it’s a precondition to calling toASCIILowerUnchecked. There’s no corresponding issue here and no need for the assertion.
Claudio Saavedra
Comment 7
2013-05-27 13:58:49 PDT
Committed
r150776
: <
http://trac.webkit.org/changeset/150776
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug