Closed
Bug 155855
Opened 22 years ago
Closed 22 years ago
turn CSS error reporting on for DEBUG builds
Categories
(Core :: CSS Parsing and Computation, defect, P2)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla1.1beta
People
(Reporter: dbaron, Assigned: dbaron)
Details
(Whiteboard: [whitebox])
Attachments
(1 file, 1 obsolete file)
11.22 KB,
patch
|
bzbarsky
:
review+
bugs
:
superreview+
|
Details | Diff | Splinter Review |
I'm tired of seeing new CSS errors creep into the chrome. I expect authors of
chrome CSS are also annoyed at the lack of error reporting. So I want to turn
on CSS error reporting in DEBUG builds.
I'll attach a patch to do this, and also to enhance the reporting a bit.
Assignee | ||
Comment 1•22 years ago
|
||
Assignee | ||
Comment 2•22 years ago
|
||
For reference, see bug 139942 and bug 65469. In particular, bug 139942 will
shortly have a patch that fixes all the CSS errors in the tree, although I don't
intend to check it in.
Comment 3•22 years ago
|
||
> + REPORT_UNEXPECTED_EOF(NS_LITERAL_STRING("end of @media media list"));
This could happen for a media list attached to an @import rule as well.
> + REPORT_UNEXPECTED_EOF(NS_LITERAL_STRING("end of @import rule"));
This should be something like "URI to import in @import rule"
> + REPORT_UNEXPECTED_EOF(NS_LITERAL_STRING("namespace prefix"));
"namespace prefix in @namespace rule" ?
> + REPORT_UNEXPECTED_EOF(NS_LITERAL_STRING("namespace URI"));
"namespace URI in @namespace rule" ?
> + REPORT_UNEXPECTED_EOF(NS_LITERAL_STRING(", or {"));
Maybe put the ',' and '{' in single quotes?
> + REPORT_UNEXPECTED_EOF(NS_LITERAL_STRING("; or } to end declaration"));
Same here
> + REPORT_UNEXPECTED_EOF(NS_LITERAL_STRING("; or } to end declaration"));
And here
Other things in nsCSSParser:
Could you change
394 #define REPORT_UNEXPECTED_TOKEN(_reas) \
395 ReportUnexpectedToken(mScanner,mToken,_reas)
to have "_reason" instead? There's no reason to lose those extra few chars and
it makes things more readable, imo.
> + mScanner->AddToError(NS_LITERAL_STRING("Unexpected end of file while
searching for ") + _err)
Maybe append a '.' on the end, a la ReportUnexpectedToken()?
Things in nsCSSScanner:
252 printf("CSS Error (%s :%u.%u): %s\n",
fprintf(stderr, ... ) please? Or do we really want this going to stdout?
Assignee | ||
Comment 4•22 years ago
|
||
Attachment #90269 -
Attachment is obsolete: true
Updated•22 years ago
|
Attachment #90277 -
Flags: review+
Comment 5•22 years ago
|
||
Comment on attachment 90277 [details] [diff] [review]
revised patch
r=bzbarsky
Assignee | ||
Updated•22 years ago
|
Status: NEW → ASSIGNED
Priority: -- → P2
Target Milestone: --- → mozilla1.1beta
Comment 6•22 years ago
|
||
Attachment #90277 -
Flags: superreview+
Assignee | ||
Comment 7•22 years ago
|
||
Fix checked in 2002-07-08 21:28 PDT.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Updated•22 years ago
|
Whiteboard: [whitebox]
You need to log in
before you can comment on or make changes to this bug.
Description
•