aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/parser.rs
Commit message (Collapse)AuthorAgeFilesLines
* Rustfmt.Emilio Cobos Álvarez2021-02-261-1/+1
|
* style: Allow resource:// stylesheets to use chrome-only rules.Emilio Cobos Álvarez2021-02-261-1/+1
| | | | | | We'll use it to use @-moz-document from plaintext.css. Differential Revision: https://phabricator.services.mozilla.com/D101516
* style: Introduce InspectorUtils.supports().Emilio Cobos Álvarez2021-02-261-21/+0
| | | | | | | | | | | | Which allows to run CSS.supports in chrome/user-agent context. We should probably add a couple more tweaks for stuff like quirks or what not (the `ParsingMode` enum), but that seem lower priority. I only added the one-value version of CSS.supports because it should be enough and supporting the two value version required a bit of awkward code due to when we parse the CSS property name right now. Differential Revision: https://phabricator.services.mozilla.com/D92585
* style: Add parsing for cross-fade from CSS Image Values and Replaced Content ↵Zeke Medley2021-02-261-0/+12
| | | | | | | | | | Module Level 4. This is the first of what will likely be a couple patches for cross-fade's implementation. Bug 546052 tracks it's complete implementation. Differential Revision: https://phabricator.services.mozilla.com/D81889
* style: Rustfmt recent changes.Emilio Cobos Álvarez2020-06-041-2/+8
|
* style: Derive parse for TextOverflowSide.Emilio Cobos Álvarez2020-06-041-0/+6
| | | | | | Depends on D76330 Differential Revision: https://phabricator.services.mozilla.com/D76331
* style: Clean up parsing of UnicodeRange.Emilio Cobos Álvarez2020-06-041-5/+2
| | | | Differential Revision: https://phabricator.services.mozilla.com/D76330
* Fix some new warningsSimon Sapin2019-06-221-3/+3
|
* style: Centralize a bit invalid value error reporting.Emilio Cobos Álvarez2019-05-101-0/+6
| | | | | | | | | | Also, buffer the errors, since we're going to want to look at the whole declaration block to skip reporting them. This shouldn't change behavior, just moves some work to the caller, and defers a bit the work so that it happens only when error reporting is enabled. Differential Revision: https://phabricator.services.mozilla.com/D30200
* style: Refactor some enabledness checks.Emilio Cobos Álvarez2019-04-121-0/+13
| | | | | | There are some common checks that could get some easy-to-use aliases. Differential Revision: https://phabricator.services.mozilla.com/D25117
* Update MPL license to https (part 4)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* `cargo fix --edition --features gecko`Simon Sapin2018-11-101-1/+1
|
* `cargo fix --edition`Simon Sapin2018-11-101-4/+4
|
* Format style component.chansuke2018-09-091-5/+1
|
* style: Hook the use counters into StyleSheet parsing.Emilio Cobos Álvarez2018-09-031-1/+4
| | | | | | | | | | | | | | Still not hooked into telemetry, I talked with :janerik and :gfritzsche about that, but test incoming! This intentionally doesn't handle CSSOM and such for now, will file followups for those, though should be trivial. I want to unify / clean up how we do the use counters and the error reporting stuff for CSSOM, since the current function call still shows up in profiles, but that should be a follow-up. Differential Revision: https://phabricator.services.mozilla.com/D3828
* style: Add a very simple use counter implementation.Emilio Cobos Álvarez2018-09-031-3/+9
| | | | | | As simple as I could make it, for now. We can improve on this. Differential Revision: https://phabricator.services.mozilla.com/D3827
* style: Move the error reporter into ParserContext.Emilio Cobos Álvarez2018-06-231-17/+14
| | | | | | | | | | | | | | | | | | | | | | 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
* style: Move some parsing-only attributes to use #[parse(..)] instead of ↵Emilio Cobos Álvarez2018-06-121-4/+4
| | | | | | | | | | #[css(..)]. I need to admit I'm ambivalent about this one :). Bug: 1466609 Reviewed-by: xidorn MozReview-Commit-ID: F1jlfnQKXwo
* style: Introduce css(parse_condition).Emilio Cobos Álvarez2018-06-121-2/+11
| | | | | | | | This will allow us to add a pref for this, and to parse it only on chrome easily. Bug: 1288572 Reviewed-by: xidorn MozReview-Commit-ID: L1rsyc2A2hu
* Run rustfmt on selectors, servo_arc, and style.Bobby Holley2018-04-101-12/+19
| | | | | | | | | | 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)
* style: Trivially cleanup length parsing.Emilio Cobos Álvarez2018-02-161-0/+6
| | | | | Mostly formatting signatures properly, but also removing useless functions and stuff.
* Allow deriving Parse for keywords.Emilio Cobos Álvarez2017-12-151-2/+4
|
* style: Fix indentation of multiple CssParserContext construction.Emilio Cobos Álvarez2017-11-271-0/+3
|
* style: Enable chrome-only CSS features in user stylesheets.Emilio Cobos Álvarez2017-11-211-3/+3
| | | | | | MozReview-Commit-ID: FJ4vTiOrotH Reviewed-by: heycam Bug: 1418963
* Bump bitflags to 1.0 in every servo crateBastien Orivel2017-10-301-6/+4
|
* style: Minimal ParserContext cleanup.Emilio Cobos Álvarez2017-10-241-13/+16
| | | | MozReview-Commit-ID: I1Qgy1W7azU
* Backed out changeset e64e659c077d: servo PR #18809 and revendor for reftest ↵Gecko Backout2017-10-191-4/+6
| | | | | | 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
* Update bitflags to 1.0 in every servo crateBastien Orivel2017-10-191-6/+4
| | | | | It still needs dependencies update to remove all the other bitflags versions.
* stylo: Add a mechanism to restrict media-features to UA and chrome sheets.Emilio Cobos Álvarez2017-10-071-0/+5
| | | | | | Reviewed-by: xidorn Bug: 1396066 MozReview-Commit-ID: 38jRV6mPbE3
* Backout #18759Xidorn Quan2017-10-071-5/+0
|
* stylo: Restrict system-metric media features to UA and chrome sheets only. ↵Emilio Cobos Álvarez2017-10-051-0/+5
| | | | | | | | r=xidorn Reviewed-by: xidorn Bug: 1396066 MozReview-Commit-ID: 38jRV6mPbE3
* Use cssparser's new_with_line_number_offsetTom Tromey2017-08-281-24/+1
| | | | | | 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.
* Devirtualize CSS error reporting.Josh Matthews2017-08-241-11/+13
|
* style: Cleanup ParserContext::new_with_rule_type.Emilio Cobos Álvarez2017-08-181-3/+4
|
* style: A few minor formatting cleanups.Emilio Cobos Álvarez2017-08-181-9/+17
|
* Update to cssparser 0.19, count line numbers during tokenizationSimon Sapin2017-08-091-14/+9
|
* Introduce CommaWithSpaceAnthony Ramine2017-06-271-16/+0
| | | | | This allows us to support stroke-dasharray the same way as comma-separated values.
* Introduce Separator::parseAnthony Ramine2017-06-271-4/+6
|
* style: Have OneOrMoreSeparated replace OneOrMoreCommaSeparated.Jonathan Chan2017-06-191-2/+4
| | | | | | 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.
* Move ParsingMode into style_traits.Hiroyuki Ikezoe2017-06-141-29/+3
|
* Thread ParseError return values through CSS parsing.Josh Matthews2017-06-091-10/+13
|
* Report CSS parse errors via enum instead of strings.Josh Matthews2017-06-091-6/+6
|
* style: Simplify the namespace setup for stylesheet parsing.Emilio Cobos Álvarez2017-06-021-19/+21
|
* stylo: Use namespace ids for content: attr(..)Manish Goregaokar2017-06-011-1/+1
| | | | MozReview-Commit-ID: FZ9YEpHQCBh
* stylo: Move reference of namespace map to parser contextManish Goregaokar2017-06-011-1/+7
| | | | MozReview-Commit-ID: 74Kaj2Rqkdb
* Add PARSING_MODE_ALLOW_ALL_NUMERIC_VALUES to force to parse negative values.Hiroyuki Ikezoe2017-05-141-3/+12
| | | | | | | 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
* Make ParsingMode bitflags.Hiroyuki Ikezoe2017-05-141-10/+37
| | | | | assert_parsing_mode_match() is mostly the same as assert_restyle_hints_match().
* Rename LengthParsingMode to ParsingMode and LengthParsingMode::SVG to ↵Hiroyuki Ikezoe2017-05-141-13/+13
| | | | | | | 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.
* style: Use SmallVec in the computed value representation of most stuff.Emilio Cobos Álvarez2017-04-301-2/+0
|
* Propagate quirks mode all the way to ParserContextAnthony Ramine2017-04-271-4/+13
| | | | The quirks mode is still not properly propagated in geckolib.