Anthony Ramine
44163148c2
Make use of RefCell::try_borrow_unguarded
2019-04-12 19:02:07 +02:00
Emilio Cobos Álvarez
8c004c0858
style: Reformat recent changes.
2019-04-12 12:20:14 +02:00
Julian Descottes
5a55978478
style: Augment CSS errors with the CSS selector.
...
Differential Revision: https://phabricator.services.mozilla.com/D24894
2019-04-12 12:19:35 +02:00
Jan Andre Ikenmeyer
1d6fe65401
Update MPL license to https (part 4)
2018-11-19 14:47:27 +01:00
Simon Sapin
a15d33a10e
cargo fix --edition
2018-11-10 17:47:28 +01:00
Emilio Cobos Álvarez
f564b32b75
style: Better debugging for stylesheets and URLs.
...
Bug: 1470145
Reviewed-by: xidorn
MozReview-Commit-ID: FIcz2K1ZYX0
2018-06-23 20:37:03 +02:00
Emilio Cobos Álvarez
3a0c3224b9
style: Move the error reporter into ParserContext.
...
Summary:
This should make it easier to report errors, and also reduce codesize.
The reason this was so generic is that error reporting was unconditionally
enabled and was super-hot, but now that's no longer the case after bug 1452143,
so we can afford the virtual call in the "error reporting enabled" case.
This opens the possibility of simplifying a lot the error setup as well, though
this patch doesn't do it.
Test Plan: No behavior change, so no new tests.
Reviewers: xidorn
Bug #: 1469957
Differential Revision: https://phabricator.services.mozilla.com/D1734
MozReview-Commit-ID: F3wTdhX9MB5
2018-06-23 20:36:23 +02:00
Bobby Holley
c99bcdd4b8
Run rustfmt on selectors, servo_arc, and style.
...
This was generated with:
./mach cargo fmt --package selectors &&
./mach cargo fmt --package servo_arc &&
./mach cargo fmt --package style
Using rustfmt 0.4.1-nightly (a4462d1 2018-03-26)
2018-04-10 17:35:15 -07:00
Bastien Orivel
0918ac8cc7
Bump env_logger to 0.5 and log to 0.4 in every servo crate
2018-03-28 19:50:58 +02:00
Emilio Cobos Álvarez
d82c54bd30
stylo: Fix missing null terminators in error reporting code.
...
This was causing the patch in bug 1420026 to fail.
2018-01-31 17:49:15 +01:00
Emilio Cobos Álvarez
ea5efd9e2f
style: Update cssparser to 0.23.
2017-12-05 10:01:37 +01:00
Cameron McCormack
7015d5b22e
style: Add a new CSS error type for lone value parsing errors.
...
This allows us to report errors in functions that want to just parse a
single CSS value, rather than a value for a particular property declaration.
The one value type that we need to support for now is <color> value parsing
errors, so just add formatting/support for that.
2017-12-05 13:22:22 +08:00
Simon Sapin
c0f8f15f39
Update to cssparser 0.22 (source location in error types)
2017-10-10 13:28:17 +02:00
Fernando Jiménez Moreno
337a90329c
stylo: Error reporting for unknown media features
2017-09-08 12:48:50 +02:00
Simon Sapin
17aa04b712
Remove uses of format!
in components/style/error_reporting.rs
2017-09-02 10:15:36 +02:00
Simon Sapin
f6d20e6461
Reformat a couple match expressions
2017-09-02 10:15:35 +02:00
Simon Sapin
7382dad939
Update to cssparser 0.19, count line numbers during tokenization
2017-08-09 22:37:16 +02:00
Nazım Can Altınova
43cf493832
style: Implement parsing/serialization for @font-feature-values rule
2017-07-27 13:37:57 -07:00
Josh Matthews
0b43d0072c
stylo: Update rust-cssparser; extract more specific error types when reporting (bug 1352669).
2017-07-10 20:46:12 -04:00
Josh Matthews
a08371e8eb
stylo: Create error reporters linked to documents (bug 1352669)
2017-07-10 20:46:08 -04:00
Gecko Backout
32269fa7cc
Backed out changeset fec394734f83 (bug 17624) for build bustage a=backout CLOSED TREE
...
Backs out https://github.com/servo/servo/pull/17624
2017-07-06 21:58:15 +00:00
Josh Matthews
f5a3830ea2
stylo: Update rust-cssparser; extract more specific error types when reporting (bug 1352669).
2017-07-06 14:32:37 -04:00
Josh Matthews
dc2a500f4b
stylo: Create error reporters linked to documents (bug 1352669)
2017-07-06 14:05:52 -04:00
Simon Sapin
b83afdedc8
Upgrade cssparser to 0.15
2017-06-16 15:05:46 +02:00
Bastien Orivel
76d8573393
Bump serde to 1.0
2017-06-16 13:31:18 +02:00
Josh Matthews
27ae1ef2e7
Thread ParseError return values through CSS parsing.
2017-06-09 16:46:25 -04:00
Josh Matthews
58e39bfffa
The ParseErrorReporter trait no longer needs to be Send.
2017-06-09 13:16:39 -04:00
Josh Matthews
3773a4d499
Encapsulate CSS error reporter creation for stylo.
2017-06-09 13:16:38 -04:00
Josh Matthews
fd6e54d9e3
Report CSS parse errors via enum instead of strings.
2017-06-09 13:16:32 -04:00
Simon Sapin
7fe57ecaea
Rename StdoutErrorReporter to RustLogReporter.
2017-04-24 08:23:41 +02:00
Simon Sapin
de1fe51dc6
Rename MemoryHoleReporter to NullReporter
2017-04-24 07:56:50 +02:00
mckaymatt
5d8cbd8e6a
Support line number offsets for inline stylesheets
2017-04-13 19:36:49 -04:00
Xidorn Quan
37585309e9
Use a UrlExtraData type alias to unify url handling logic.
2017-04-03 21:57:16 +10:00
Emilio Cobos Álvarez
b4de69e3eb
style: Avoid cloning all over the error reporter.
2017-03-14 00:49:18 +01:00
avinash
f48f0567cf
Add ServoUrl as a parameter to report_error(...) of ParseErrorReporter
...
passes test-tidy
removed match and used map
added new test test_report_error_passing_correct_url(...) and modified old unit tests
removed the option for servourl and tidied up
removed the duplicate test.
made a few more changes after @cbrewster suggestions.
changed _url to url in few places
fixed the indenting
2017-03-06 09:06:42 -06:00
Emilio Cobos Álvarez
858ee1f1ec
style: Document the error_reporting module.
2016-12-31 23:24:19 +01:00
Ms2ger
79e0d18a1d
Add some documentation to the style crate.
2016-06-27 17:33:14 +02:00
Simon Sapin
00b6210519
Make the style crate almost build on stable Rust.
...
`discriminant_value` will need to be replaced with something else later.
2016-06-22 15:44:13 +02:00
Bobby Holley
384cdfcfff
Hoist ParseErrorReporter into style and remove the dependency on msg.
...
The pipeline id stuff is currently unused. If someone needs it, they can add
an additional trait bound on their css error reporter to get the pipeline id.
2016-01-11 18:01:48 -08:00