Open Bug 261337 Opened 20 years ago Updated 2 years ago

CSS Errors for style= attributes don't include line numbers but says "Line: 0"

Categories

(Core :: CSS Parsing and Computation, defect)

defect

Tracking

()

People

(Reporter: timeless, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug, )

Details

Attachments

(1 file)

Error: Expected declaration but found '.'.  Skipped to next declaration.
Source File: data:text/html,<body style="..">
Line: 0

This bug is to catch dupes and make it easier for people to find the bug which
will fix this bug. People are welcome to improve the summary.
Summary: CSS Errors for style= attributes don't include line numbers → CSS Errors for style= attributes don't include line numbers but says "Line: 0"
bug 266373 also do some line detection. perhaps code could be borrowed?
Error: Expected ';' to terminate declaration but found '}'.  Declaration dropped.
Source File: cant share url :(
Line: 0

I have a feeling that this has something to do with a CSS sheet imported by a
LINK REL, so maybe it isn't a matter of the line number being wrong, but the
file / URI.  In my would-be example which I cannot include, the filename shown
is the main document, the html, whereas I think the error (which I haven't
found... no line number ;)  is probably in a separate .css file.
*** Bug 319171 has been marked as a duplicate of this bug. ***
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060504 Minefield/3.0a1 ID:2006050405 [cairo]

It would appear that this doesn't say "Line: 0" anymore, it just shows no line number at all, which is just as bad as before.

Here's a very simple test case with some bad CSS that has no line number:
http://mortal.peril.org/jack/mozilla/css_error_where.html

Woops, very sloppy of me, but I was using console^2.  Without console^2, it still says line: 0 like before.  sorry for the spam.
QA Contact: ian → style-system
Blocks: 435025
No longer blocks: 65469
OS: Windows XP → All
Hardware: x86 → All
The source link currently misses any line or column information. The attached screenshot of the DevTools console shows this.

Expected result:

Error in parsing value for 'color'.  Declaration dropped.   css_error_…:8:34
Expected color but found 'asdf'.  Error in parsing          css_error_…:9:35
  value for 'color'.  Declaration dropped.

Sebastian
Severity: minor → S4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: