aboutsummaryrefslogtreecommitdiffstats
path: root/components/selectors/parser.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* stylo: Update rust-cssparser; extract more specific error types when ↵Josh Matthews2017-07-101-3/+4
| | | | reporting (bug 1352669).
* Backed out changeset fec394734f83 (bug 17624) for build bustage a=backout ↵Gecko Backout2017-07-061-4/+3
| | | | | | CLOSED TREE Backs out https://github.com/servo/servo/pull/17624
* stylo: Update rust-cssparser; extract more specific error types when ↵Josh Matthews2017-07-061-3/+4
| | | | reporting (bug 1352669).
* Drive-by fix "unused import" warning.Simon Sapin2017-07-051-1/+0
|
* Invert the order of each compound selector.Bobby Holley2017-06-201-50/+62
| | | | MozReview-Commit-ID: JkBjqyYgbrB
* Hoist specificity computation into a new private builder module.Bobby Holley2017-06-201-136/+2
| | | | | | | This patch doesn't modify any of the code because making a few things pub. I did this first to make the next patch easier to audit. MozReview-Commit-ID: 7PYxoS5bVGN
* Store selectors in matching order, rather than parse order.Bobby Holley2017-06-201-25/+36
| | | | | | | We add a slow in-place reverse during parsing to achieve this for now, which gets fixed up later on. MozReview-Commit-ID: 42QkOzSgV3T
* Stop creating unnecessarily-large SmallVecs for specific tasks.Bobby Holley2017-06-201-14/+17
| | | | MozReview-Commit-ID: IM9aAjSeJI9
* Stop using parse_compound_selector for negation parsing.Bobby Holley2017-06-201-35/+30
| | | | | | | This makes the code easier to work with, and fixes a bug where we don't currently reject pseudo-elements within :not(). MozReview-Commit-ID: Cgl9w0PBsN3
* UntrySimon Sapin2017-06-181-1/+1
|
* Upgrade cssparser to 0.15Simon Sapin2017-06-161-19/+19
|
* style: Add a way to match a single compound selector.Emilio Cobos Álvarez2017-06-131-4/+22
| | | | | | | Also improve the ergonomics of matches_complex_selector. Bug: 1368240 MozReview-Commit-ID: 9DWDvyZmetM
* ID and class selectors are ASCII case-insensitive in quirks mode.Simon Sapin2017-06-121-1/+4
| | | | https://bugzilla.mozilla.org/show_bug.cgi?id=1363778
* Pack the fourth ancestor hash into the upper byte of the first three hashes.Bobby Holley2017-06-121-10/+38
| | | | MozReview-Commit-ID: KbtKQzLmwVO
* stylo: Implement GetSpecificity for ServoStyleRuleFernando Jiménez Moreno2017-06-121-18/+9
|
* stylo: Support :hover and :active quirkNazım Can Altınova2017-06-101-1/+21
|
* Thread ParseError return values through CSS parsing.Josh Matthews2017-06-091-101/+159
|
* Fix revalidation selectors when pseudo-elements are involved.Boris Zbarsky2017-06-081-1/+6
|
* Log element during selector matchingJ. Ryan Stinnett2017-06-071-0/+10
| | | | MozReview-Commit-ID: D8eFyRCy5BR
* Bug 1367615 - Stylo: implement inIDOMUtils.getSelectorCount and ↵Fernando Jiménez Moreno2017-06-071-9/+18
| | | | inIDOMUtils.getSelectorTextFromIndex
* Make a bunch of types 'static.Bobby Holley2017-06-061-1/+1
| | | | | | The reasoning for this is explained in a comment in the next patch. MozReview-Commit-ID: FQgDY77mg3B
* Fix up unit tests.Bobby Holley2017-06-051-240/+201
| | | | MozReview-Commit-ID: 9eyOhoQ02qX
* Eliminate redundant parse_selector.Bobby Holley2017-06-051-17/+5
| | | | MozReview-Commit-ID: 6eBVgT9ri5Q
* Use ThinArc in Selector.Bobby Holley2017-06-051-7/+8
| | | | MozReview-Commit-ID: Axvq0rbqA7Y
* Make ParseVec bigger.Bobby Holley2017-06-051-9/+5
| | | | MozReview-Commit-ID: DszMC031Xlj
* Use dynamically-sized Arcs for Selector.Bobby Holley2017-06-051-12/+25
| | | | MozReview-Commit-ID: hq0jYrx8Sg
* Move around specificity computation so that we know it by the time we mint ↵Bobby Holley2017-06-051-19/+19
| | | | | | | | the Selector. This is important to make the selector immutable, which needs to happen when we stick it in an Arc. MozReview-Commit-ID: BaMbOEbYC3D
* Stop slicing selectors when noting dependencies, and match with an offset ↵Bobby Holley2017-06-051-23/+15
| | | | | | instead. MozReview-Commit-ID: KLqmdRKygO0
* Collapse Selector, SelectorInner, and ComplexSelector into a single Selector.Bobby Holley2017-06-051-119/+50
| | | | | | The refcounting is still internal. We'll fix that up next. MozReview-Commit-ID: CTxZNaR3Qgj
* Move the ancestor hashes out of Selector.Bobby Holley2017-06-051-27/+54
| | | | MozReview-Commit-ID: 5mipXnjgSED
* Hoist specificity_and_flags into ComplexSelector (soon to be Selector).Bobby Holley2017-06-051-20/+20
| | | | | | | | In the upcoming patches we'll eliminate the existing Selector and SelectorInner, and ComplexSelector will become an Arc-managed |Selector|. So the tuple-indexed setup is just temporary. MozReview-Commit-ID: 4CcOYeHGUED
* Don’t visit attribute selectors that never match.Simon Sapin2017-05-181-2/+11
|
* Add more enum types to avoid unreachable!() for selector case-sensitivitySimon Sapin2017-05-181-19/+22
|
* Only non-namespaced attributes can have implicitly case-insensitive valuesSimon Sapin2017-05-181-1/+2
|
* Make some attr values case-insensitive in selectorsSimon Sapin2017-05-181-17/+33
| | | | https://bugzilla.mozilla.org/show_bug.cgi?id=1363531
* Shrink selectors::Component, add case-insensitive for other attr selectorsSimon Sapin2017-05-181-190/+178
| | | | | * https://bugzilla.mozilla.org/show_bug.cgi?id=1364148 * https://bugzilla.mozilla.org/show_bug.cgi?id=1364162
* Simplify rust-selectors API for attribute selectorsSimon Sapin2017-05-181-9/+1
|
* Rename CaseSensitivity::CaseInsensitive to AsciiCaseInsensitiveSimon Sapin2017-05-181-3/+3
|
* Bug 1364850: Move PseudoElement to be just another combinator in selectors. ↵Emilio Cobos Álvarez2017-05-171-120/+280
| | | | | | | r=bholley MozReview-Commit-ID: 8OoOIodkKJ5 Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
* Move "is universal" logic from stylist.rs to selectors/parser.rsSimon Sapin2017-05-161-0/+12
|
* Fix serialization of namespace and universal selectorsSimon Sapin2017-05-161-61/+279
| | | | | Fix #16017 Fix #16020
* Turns out, we never actual hash selectorsSimon Sapin2017-05-161-18/+16
|
* Add size_of tests for geckolib selectorsSimon Sapin2017-05-161-1/+1
|
* Bug 1364412: Allow pseudo-element selectors to store state. r=bholleyEmilio Cobos Álvarez2017-05-161-12/+12
| | | | | MozReview-Commit-ID: CzAwg2uxqO2 Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
* style: Account for cousin sharing in the revalidation logic.Emilio Cobos Álvarez2017-05-011-21/+0
| | | | Fixes bug 1361013.
* Unbust unit tests.Bobby Holley2017-04-291-1/+1
| | | | Not sure how this managed to get past bors before.
* Bug 1360399: Don't deduplicate revalidation selectors. r=bholleyEmilio Cobos Álvarez2017-04-281-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's unfortunate, but it's a correctness issue. I was looking at the expectations update here: * https://hg.mozilla.org/integration/autoland/rev/659cddddd434 And investigating it I realised that it's wrong to coalesce selectors like that, because we keep the bloom filter flags. So in the test cases disabled, we have a selector that looks like this: msub > :not(:first-child), msup > :not(:first-child), msubsup > :not(:first-child), mmultiscripts > :not(:first-child) { -moz-script-level: +1; -moz-math-display: inline; } And an element that looks like this: <msubsup><mi></mi><mi></mi></msubsup> We're only inserting the first selector msub > :not(:first-child) into the set, so when we're going to match the <mi> elements we fast-reject it in both cases due to the bloom filter, so they share style. I can't see an easy way to fix this keeping the deduplication. If we keep it, we need to remove the bloom filter optimization, which means that we'd trash the cache for every first-child in the document (the :not(:first-child) effectively becomes a global rule). MozReview-Commit-ID: 9VPkmdj9zDg Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
* Store SelectorInner and only revalidate up to the rightmost ancestor combinator.Bobby Holley2017-04-271-0/+37
| | | | MozReview-Commit-ID: HiTGVhwuvCE
* Require Clone for SelectorImpl so that all the types that are parameterized ↵Bobby Holley2017-04-271-12/+6
| | | | | | | | on it can derive(Clone). It's not clear to me why this is a requirement, but it seems to be one. MozReview-Commit-ID: JM0DKjHHfT
* Downgrade selectors not() behavior to level 3.Bobby Holley2017-04-251-71/+110
| | | | MozReview-Commit-ID: 6p750Ml2wzm