Open Bug 300383 Opened 19 years ago Updated 2 years ago

strange parsing report: Error: Expected URI in @import rule but found '@import'.

Categories

(Core :: CSS Parsing and Computation, defect, P5)

x86
Windows XP
defect

Tracking

()

People

(Reporter: timeless, Unassigned)

References

()

Details

(Keywords: helpwanted)

actual results:
Error: Expected URI in @import rule but found '@import'.  Unrecognized at-rule
or error parsing at-rule '@import'.
Source File: data:text/html,<style>@import</style>
Line: 1
Error: Unexpected end of file while searching for 'end of unknown at-rule'.
Source File: data:text/html,<style>@import</style>
Line: 1

confusion:
didn't it really not find anything? @import was already tokenized...
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P5
Keywords: helpwanted
Assignee: dbaron → nobody
QA Contact: ian → style-system
With stylo the error message is "Ruleset ignored due to bad selector."

Which seems strictly worse than what we used to have, I think....
Flags: needinfo?(simon.sapin)
Flags: needinfo?(josh)
This is a failure of this code: https://searchfox.org/mozilla-central/source/servo/components/style/stylesheets/rule_parser.rs#176
We would need to add a new error variant to https://searchfox.org/mozilla-central/source/servo/components/style_traits/lib.rs#91, match during the parsing and extract the invalid token or EOF. Then https://searchfox.org/mozilla-central/source/servo/ports/geckolib/error_reporter.rs#266-282 will need to be updated to match the new variant to convert it to PEImportNotURI.
Flags: needinfo?(josh)
I think there’s also https://searchfox.org/mozilla-central/rev/bffd3e0225b/servo/ports/geckolib/error_reporter.rs#335 which incorrectly defaults to PEBadSelectorRSIgnored even for rules that are not style rules and do not involve selectors.
Flags: needinfo?(simon.sapin)
OK, do you want a separate bug on that, or use this one?
Severity: trivial → S4
You need to log in before you can comment on or make changes to this bug.