Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(676)

Issue 17176013: Do not report some CSS errors for code valid in other browsers. (Closed)

Created:
7 years, 6 months ago by apavlov
Modified:
7 years, 6 months ago
Reviewers:
vsevik, pfeldman, PhistucK
CC:
blink-reviews, caseq+blink_chromium.org, loislo+blink_chromium.org, eustas+blink_chromium.org, alph+blink_chromium.org, eae+blinkwatch, yurys+blink_chromium.org, lushnikov+blink_chromium.org, vsevik+blink_chromium.org, pfeldman+blink_chromium.org, dglazkov+blink, apavlov+blink_chromium.org, darktears, aandrey+blink_chromium.org
Visibility:
Public.

Description

Do not report some CSS errors for code valid in other browsers. R=pfeldman, vsevik BUG=252105 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=152886

Patch Set 1 #

Total comments: 2

Patch Set 2 : Comments addressed #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+63 lines, -22 lines) Patch
M LayoutTests/inspector/console/console-css-warnings.html View 2 chunks +10 lines, -0 lines 1 comment Download
M LayoutTests/inspector/console/console-css-warnings-expected.txt View 1 chunk +17 lines, -18 lines 0 comments Download
M Source/core/inspector/InspectorCSSAgent.cpp View 1 5 chunks +36 lines, -4 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
apavlov
7 years, 6 months ago (2013-06-21 11:58:33 UTC) #1
pfeldman
I think we should filter properties on the front-end level. I'd recommend emitting CSS.cssError structured ...
7 years, 6 months ago (2013-06-21 12:20:45 UTC) #2
pfeldman
lgtm
7 years, 6 months ago (2013-06-21 13:05:31 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/apavlov@chromium.org/17176013/4001
7 years, 6 months ago (2013-06-21 13:11:00 UTC) #4
commit-bot: I haz the power
Change committed as 152886
7 years, 6 months ago (2013-06-21 14:59:05 UTC) #5
PhistucK
https://codereview.chromium.org/17176013/diff/4001/LayoutTests/inspector/console/console-css-warnings.html File LayoutTests/inspector/console/console-css-warnings.html (right): https://codereview.chromium.org/17176013/diff/4001/LayoutTests/inspector/console/console-css-warnings.html#newcode78 LayoutTests/inspector/console/console-css-warnings.html:78: background: linear-gradient(top,rgba(0,0,0,0) 0,rgba(0,0,0,1) 100%) ; This test is problematic. ...
7 years, 6 months ago (2013-06-21 21:13:09 UTC) #6
apavlov
On 2013/06/21 21:13:09, PhistucK wrote: > https://codereview.chromium.org/17176013/diff/4001/LayoutTests/inspector/console/console-css-warnings.html > File LayoutTests/inspector/console/console-css-warnings.html (right): > > https://codereview.chromium.org/17176013/diff/4001/LayoutTests/inspector/console/console-css-warnings.html#newcode78 > ...
7 years, 6 months ago (2013-06-22 12:37:42 UTC) #7
PhistucK
7 years, 6 months ago (2013-06-22 12:43:03 UTC) #8
Message was sent while issue was closed.
On 2013/06/22 12:37:42, apavlov wrote:
> On 2013/06/21 21:13:09, PhistucK wrote:
> >
>
https://codereview.chromium.org/17176013/diff/4001/LayoutTests/inspector/cons...
> > File LayoutTests/inspector/console/console-css-warnings.html (right):
> > 
> >
>
https://codereview.chromium.org/17176013/diff/4001/LayoutTests/inspector/cons...
> > LayoutTests/inspector/console/console-css-warnings.html:78: background:     
 
> 
> > linear-gradient(top,rgba(0,0,0,0) 0,rgba(0,0,0,1) 100%)    ;
> > This test is problematic. While linear-gradient is valid, the value for
which
> > you test here is invalid (it should read "to top" instead of "top").
> > While the Developer Tools is not meant to be a general CSS validator, I
think
> it
> > would be good to warn this broken value (even if only to promote standards
> > compliancy and help avoid future useless breakage). Is there any way to do
it?
> > basically, maybe add another case for (regular expression)
> > linear-gradient[\s\t\n\r]*\([\s\t\n\r]*(top|bottom|left|right).
> 
> Well, DevTools are not a home-made implementation of http://jigsaw.w3.org/.
> We've just learned to report CSS parsing errors _from the Blink standpoint_.
> They, however, are not necessarily errors on all other engines. So we try to
> filter out errors that _we think_ may not be actual errors on Firefox, IE,
etc.
> 
> So, if we see "linear-gradient", which we don't understand, we can either
report
> it as an error or say, "OK, we don't understand it, but we know others
> understand property values that start with this string, so we won't report
it."
> Our goal in this case is not to run a specification-precise check of the value
> but just to avoid as many false-positives as possible, based on the knowledge
> that web developers write cross-browser code.

In the specific case of linear-gradient, which is a candidate recommendation, no
browser understands the (non prefixed) "linear-gradient(top"... value, however,
many tools already emitted this wrong value (they were doing it right at the
time, before the syntax changed), which is why I think we should special case
it.

Thank you for your time!

Powered by Google App Engine
This is Rietveld 408576698