Emilio Cobos Álvarez
7a5a35f5e0
style: Fix indentation of multiple CssParserContext construction.
2017-11-27 15:35:16 +01:00
Emilio Cobos Álvarez
c7a3c929f6
style: Enable chrome-only CSS features in user stylesheets.
...
MozReview-Commit-ID: FJ4vTiOrotH
Reviewed-by: heycam
Bug: 1418963
2017-11-21 10:59:47 +01:00
Bastien Orivel
29b4eec141
Bump bitflags to 1.0 in every servo crate
2017-10-30 23:36:06 +01:00
Emilio Cobos Álvarez
066de9f8d2
style: Minimal ParserContext cleanup.
...
MozReview-Commit-ID: I1Qgy1W7azU
2017-10-24 12:30:20 +02:00
Gecko Backout
11c64178d8
Backed out changeset e64e659c077d: servo PR #18809 and revendor for reftest failures, e.g. in layout/reftests/bugs/392435-1.html. r=backout on a CLOSED TREE
...
Backs out https://github.com/servo/servo/pull/18809
2017-10-19 21:26:51 +00:00
Bastien Orivel
e8e2d0a4b2
Update bitflags to 1.0 in every servo crate
...
It still needs dependencies update to remove all the other bitflags
versions.
2017-10-19 15:01:17 +02:00
Emilio Cobos Álvarez
b0706d5cf0
stylo: Add a mechanism to restrict media-features to UA and chrome sheets.
...
Reviewed-by: xidorn
Bug: 1396066
MozReview-Commit-ID: 38jRV6mPbE3
2017-10-07 13:13:36 +02:00
Xidorn Quan
8fc24bc5fa
Backout #18759
2017-10-07 12:27:04 +11:00
Emilio Cobos Álvarez
43636e676d
stylo: Restrict system-metric media features to UA and chrome sheets only. r=xidorn
...
Reviewed-by: xidorn
Bug: 1396066
MozReview-Commit-ID: 38jRV6mPbE3
2017-10-05 20:51:21 +02:00
Tom Tromey
546ecaeee9
Use cssparser's new_with_line_number_offset
...
cssparser provides a way to set the initial line number on a
ParserInput. This patch changes servo to use this facility, rather than
reimplement the same functionality itself.
2017-08-28 12:49:30 -06:00
Josh Matthews
1297c0ff51
Devirtualize CSS error reporting.
2017-08-24 10:41:06 -07:00
Emilio Cobos Álvarez
a962c54928
style: Cleanup ParserContext::new_with_rule_type.
2017-08-18 19:57:59 +02:00
Emilio Cobos Álvarez
4763d05cf0
style: A few minor formatting cleanups.
2017-08-18 16:10:41 +02:00
Simon Sapin
7382dad939
Update to cssparser 0.19, count line numbers during tokenization
2017-08-09 22:37:16 +02:00
Anthony Ramine
c03f5f19ab
Introduce CommaWithSpace
...
This allows us to support stroke-dasharray the same way as comma-separated
values.
2017-06-27 23:37:48 +02:00
Anthony Ramine
17875b8a81
Introduce Separator::parse
2017-06-27 23:37:44 +02:00
Jonathan Chan
26179b3660
style: Have OneOrMoreSeparated replace OneOrMoreCommaSeparated.
...
A future patch series has some values that should be separated by spaces. This
allows us to re-use the code for serialization, but the types do get a little
clunky. The separator is now indicated with an associated type.
2017-06-19 16:09:37 -07:00
Hiroyuki Ikezoe
8bfed4cb3c
Move ParsingMode into style_traits.
2017-06-14 09:51:36 +09:00
Josh Matthews
27ae1ef2e7
Thread ParseError return values through CSS parsing.
2017-06-09 16:46:25 -04:00
Josh Matthews
fd6e54d9e3
Report CSS parse errors via enum instead of strings.
2017-06-09 13:16:32 -04:00
Emilio Cobos Álvarez
bbd85ccbda
style: Simplify the namespace setup for stylesheet parsing.
2017-06-02 14:38:05 +02:00
Manish Goregaokar
25d193ba34
stylo: Use namespace ids for content: attr(..)
...
MozReview-Commit-ID: FZ9YEpHQCBh
2017-06-01 14:11:31 -07:00
Manish Goregaokar
7deeccf4cb
stylo: Move reference of namespace map to parser context
...
MozReview-Commit-ID: 74Kaj2Rqkdb
2017-06-01 14:10:40 -07:00
Hiroyuki Ikezoe
59dd93f849
Add PARSING_MODE_ALLOW_ALL_NUMERIC_VALUES to force to parse negative values.
...
As per SVG spec [1], we should also parse negative color components values for
SMIL, but currently Gecko does not support it either.
[1] https://www.w3.org/TR/SVG/implnote.html#RangeClamping
2017-05-14 07:15:19 +09:00
Hiroyuki Ikezoe
b6b3187efa
Make ParsingMode bitflags.
...
assert_parsing_mode_match() is mostly the same as
assert_restyle_hints_match().
2017-05-14 07:15:19 +09:00
Hiroyuki Ikezoe
fcc50ea421
Rename LengthParsingMode to ParsingMode and LengthParsingMode::SVG to PasingMode::AllowUnitlessLength.
...
We need another flag that represents allow-negative-number for SMIL, so
this enum will also comprise the another parsing mode that allows negative number.
2017-05-14 07:15:19 +09:00
Emilio Cobos Álvarez
0c5681140a
style: Use SmallVec in the computed value representation of most stuff.
2017-04-30 23:32:32 +02:00
Anthony Ramine
f68e2fded9
Propagate quirks mode all the way to ParserContext
...
The quirks mode is still not properly propagated in geckolib.
2017-04-27 10:41:55 +02:00
J. Ryan Stinnett
6069e44f02
SVG length parsing mode
...
SVG allows non-zero lengths to be accepted and assumes they are in px. This
adds this length parsing mode to Servo.
MozReview-Commit-ID: Kxd3x64r9Ye
2017-04-14 17:22:16 +08:00
mckaymatt
5d8cbd8e6a
Support line number offsets for inline stylesheets
2017-04-13 19:36:49 -04:00
J. Ryan Stinnett
4574cd8ea6
Pull rule_type into ParserContext
...
Absorb `rule_type` into the `ParserContext` so that it's easier to pass down to
deeper levels of the parser.
MozReview-Commit-ID: DjBNytLxGKX
2017-04-12 16:40:17 +08:00
Simon Sapin
3ac0dd05cf
ParserContext::new_for_cssom is used for author origin, not user.
...
This probably doesn’t make any difference since the only thing we do
with this origin is test whether it is user-agent (for internal properties),
but this is more correct.
2017-04-03 18:28:47 +02:00
Xidorn Quan
37585309e9
Use a UrlExtraData type alias to unify url handling logic.
2017-04-03 21:57:16 +10:00
Xidorn Quan
0a97a0df0c
Create URLExtraData for holding base uri, referrer, and principal.
2017-04-03 14:30:33 +10:00
Emilio Cobos Álvarez
b4de69e3eb
style: Avoid cloning all over the error reporter.
2017-03-14 00:49:18 +01:00
Manish Goregaokar
eda6a4fc4f
stylo: Pass parser URL data in Servo_DeclarationBlock_SetProperty*
...
MozReview-Commit-ID: EVk4aEoyiXv
2017-03-09 14:44:17 -08: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
Manish Goregaokar
ff08de8ad1
stylo: Support stroke-dasharray and stroke-dashoffset
...
MozReview-Commit-ID: 4QKKzJ1DVYP
2017-02-18 02:43:36 -08:00
Simon Sapin
c3cad2d6c7
Update cssparser to 0.9
2017-02-15 12:42:14 +01:00
Simon Sapin
9ec8418d8c
Rename CommaSeparated to OneOrMoreCommaSeparated, reflecting its behavior.
2017-02-03 13:15:53 +01:00
Simon Sapin
4701850f37
Add unicode-range descriptor to @font-face
2017-02-02 20:28:21 +01:00
Manish Goregaokar
b4a83b6cec
CSSOM bits for @supports: CSSConditionRule and CSSSupportsRule, with conditionText attribute
2017-01-07 23:17:52 -08:00
Emilio Cobos Álvarez
e8d947430a
style: Document and clean up the parser module.
2017-01-02 12:57:52 +01:00
Ravi Shankar
dee1a65a69
Use the ParserContext along with Parser in the parse function
2016-11-27 08:49:20 +05:30
Simon Sapin
82b13d50e3
Update to selectors 0.15
2016-11-22 14:50:21 +01:00
Simon Sapin
b203ab2419
Rename selector_impl.rs to selector_parser.rs
...
This makes it consistent with an upcoming update of the selectors crate.
2016-11-20 15:30:37 +01:00
Emilio Cobos Álvarez
913c874cb5
Urlmageddon: Use refcounted urls more often.
2016-11-17 18:34:23 +01:00
Emilio Cobos Álvarez
5f2e7af864
style: Centralize specified url value handling, and refcount urls.
2016-11-10 13:15:21 +01:00
Manish Goregaokar
2bde9462b1
Add safer bindings for RefPtr
2016-10-14 00:44:06 +05:30
Manish Goregaokar
254900bd1a
Add ShapeSource to basic-shape values
2016-08-18 11:38:33 +05:30