Commit graph

26 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
7ab4b21bc3
selectors: Remove the get_ prefix from get_local_name and get_namespace. 2018-02-24 22:45:38 +01:00
Emilio Cobos Álvarez
b26f3280d2
style: Add invalidation support for ::slotted().
Bug: 1424607
Reviewed-by: heycam
MozReview-Commit-ID: 8pIVUx27o7x
2018-01-09 14:26:02 +01:00
Emilio Cobos Álvarez
f32f09656b
style: Allow disabling invalidation-based querySelector from C++
Rust compile times are hard.

MozReview-Commit-ID: 9Xhtf7f3Vzv
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-11-04 11:34:40 +01:00
Emilio Cobos Álvarez
f0999365e2
style: Bump the selector length heuristic.
A selector with combinators has to have length > 2 (a component, a combinator,
another component).

MozReview-Commit-ID: GvMEbRdOVi2
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-11-04 11:34:39 +01:00
Emilio Cobos Álvarez
72ec0392a4
style: Add a query-selector fast path for #id foo.
MozReview-Commit-ID: DkrLcfQLPga
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-11-04 11:34:38 +01:00
Emilio Cobos Álvarez
dbfc1eb3e0
style: Extract a bit better the logic for finding elements with an ID under a subtree.
MozReview-Commit-ID: Hj9yxBk1OvS
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-11-04 11:34:38 +01:00
Emilio Cobos Álvarez
0032d04bcf
style: Optimize all ids in the rightmost compound selector.
This is effectively the same optimization Gecko has now.

MozReview-Commit-ID: 21HrjpHdpOz
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-11-04 11:34:38 +01:00
Emilio Cobos Álvarez
60aec43dad
style: Add a fast path for querySelector/All with a single id selector using the doc ID table.
MozReview-Commit-ID: JVnDO890kn4
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-11-04 11:34:37 +01:00
Emilio Cobos Álvarez
93272f46a5
style: Move the single simple selector optimizations to a different function.
MozReview-Commit-ID: EEM3AzW2A9s
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-11-04 11:34:36 +01:00
Gecko Backout
8f8fd517ed Backed out changeset dbd300f4d75b for build bustage. r=backout on a CLOSED TREE
Backs out https://github.com/servo/servo/pull/19108
2017-11-03 23:56:42 +00:00
Emilio Cobos Álvarez
bfabd9f855
style: Allow disabling invalidation-based querySelector from C++
Rust compile times are hard.

MozReview-Commit-ID: 9Xhtf7f3Vzv
2017-11-03 14:18:48 +01:00
Emilio Cobos Álvarez
9a378a89b4
style: Bump the selector length heuristic.
A selector with combinators has to have length > 2 (a component, a combinator,
another component).

MozReview-Commit-ID: GvMEbRdOVi2
2017-11-03 14:18:46 +01:00
Emilio Cobos Álvarez
eea8ecd345
style: Add a query-selector fast path for #id foo.
MozReview-Commit-ID: DkrLcfQLPga
2017-11-03 14:18:45 +01:00
Emilio Cobos Álvarez
ea8f493ae6
style: Extract a bit better the logic for finding elements with an ID under a subtree.
MozReview-Commit-ID: Hj9yxBk1OvS
2017-11-03 14:18:44 +01:00
Emilio Cobos Álvarez
b03b59b218
style: Optimize all ids in the rightmost compound selector.
This is effectively the same optimization Gecko has now.

MozReview-Commit-ID: 21HrjpHdpOz
2017-11-03 14:18:44 +01:00
Emilio Cobos Álvarez
1fd7269949
style: Add a fast path for querySelector/All with a single id selector using the doc ID table.
MozReview-Commit-ID: JVnDO890kn4
2017-11-03 14:18:43 +01:00
Emilio Cobos Álvarez
c3876a42a8
style: Move the single simple selector optimizations to a different function.
MozReview-Commit-ID: EEM3AzW2A9s
2017-11-03 13:49:15 +01:00
Emilio Cobos Álvarez
dd5cd29a61
style: Introduce TDocument::is_html_element and TDocument::quirks_mode.
This allows some code to read a bit nicer, and stop passing down quirks mode to
querySelector / querySelectorAll.
2017-10-26 13:22:31 +02:00
Emilio Cobos Álvarez
644b502b0d
style: Ensure QuerySelector only processes the light tree.
MozReview-Commit-ID: 7Nw1SEuWNaC
2017-10-23 08:27:50 +02:00
Emilio Cobos Álvarez
dd7196949f
style: Don't use the invalidation machinery unless we may get some benefit from it.
MozReview-Commit-ID: 8Wpn2bjuHBQ
2017-10-23 08:27:49 +02:00
Emilio Cobos Álvarez
d73af807b7
style: Add a few QuerySelector fast-paths.
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-10-23 08:27:46 +02:00
Emilio Cobos Álvarez
2274fd7ef3
style: Refactor querySelector to be generic over the query type, and implement a tree-walking variant of it.
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-10-23 08:25:09 +02:00
Emilio Cobos Álvarez
6d78e9ba54
style: Add a very simple invalidation-based querySelector.
MozReview-Commit-ID: Fimc8tz4OWX
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-10-23 08:22:52 +02:00
Matt Brubeck
efc3683cc7 Fix commonmark Markdown warnings in docs, part 1
Fixes warnings from rust-lang/rust#44229 when `--enable-commonmark` is
passed to rustdoc.

This is mostly a global find-and-replace for bare URIs on lines by
themselves in doc comments.
2017-10-17 11:24:57 -07:00
Emilio Cobos Álvarez
f64f8b8be2
style: Share code for Element::Closest. 2017-10-13 17:21:31 +02:00
Emilio Cobos Álvarez
9e6c49d479
style: Share code for Element::Matches. 2017-10-13 17:21:26 +02:00