unnecessary/wrong elements in external css file will cause the first style to be ignored

RESOLVED INVALID

Status

()

Core
CSS Parsing and Computation
--
minor
RESOLVED INVALID
13 years ago
13 years ago

People

(Reporter: Wang Wei, Assigned: dbaron)

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

13 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.7.6) Gecko/20050226 Firefox/1.0.1 (ax)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.7.6) Gecko/20050226 Firefox/1.0.1 (ax)

/////////////////begin css file////////////////
anything wrong


body {  font-family: "arial, 宋体"; font-size: 9pt; line-height: 13pt;
background-color: #E5EFE0;}
table {  font-family: "arial, 宋体";font-size: 9pt; line-height: 13pt;}

/////////////////end css file////////////////

above is a sample css file, there is an unecessary/wrong enlement "anything
wrong" on top, this will cause the first style -- "body" be ignored by firefox,
adding blank lines after the wrong line won't fix.

if we modify it to

/////////////////begin css file////////////////
anythingwrong
wrong again

dummy {}
body {  font-family: "arial, 宋体"; font-size: 9pt; line-height: 13pt;
background-color: #E5EFE0;}
table {  font-family: "arial, 宋体";font-size: 9pt; line-height: 13pt;}

/////////////////end css file////////////////

then every style seem to be processed, so I conclude that the first style be
ingnored/wrongly processed by the processor, and also adding any more wrong
lines won't cause more style to be ignored.

Reproducible: Always

Steps to Reproduce:
1. add any wrong lines in front of an external css file
(Reporter)

Comment 1

13 years ago
I changed the Severity to "minor", sine it should be a fault-tolerance function
Severity: normal → minor

Comment 2

13 years ago
how are you proposing that Firefox determine where the unnecessary stuff ends
and the first style begins?
Assignee: firefox → dbaron
Component: General → Style System (CSS)
Product: Firefox → Core
QA Contact: general → ian
Version: unspecified → Trunk
This is invalid. See bug 149466, bug 221274, bug 234508 and bug 274012.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → FIXED
Status: RESOLVED → UNCONFIRMED
Resolution: FIXED → ---
Status: UNCONFIRMED → RESOLVED
Last Resolved: 13 years ago13 years ago
Resolution: --- → INVALID
*** Bug 293142 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.