Commit Graph

145 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
fb715e3c6d servo: Merge #20243 - style: add infrastructure to match the :host selector (from emilio:host-selector-on-the-way); r=SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: 148beb4ea5f8f1680e694ac48045a632da58269c

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : e9d1c9e4dd54d3c9d5bd1f0a2805858456981598
2018-03-14 10:38:45 -04:00
Emilio Cobos Álvarez
12e71ed881 servo: Merge #20248 - style: Change the order we match selectors on invalidation to match normal order (from emilio:invalidation-selectors-faster); r=bholley
This changes the order to match the normal selector-matching order, which is
usually faster.

That is, when matching div:nth-child(2), for example, before this patch we'd
first try to match :nth-child(2), and only then div.

This patch makes us walk until the end or the next combinator, and only then
match backwards, matching first div, then :nth-child.

Bug: 1443814
Reviewed-by: bholley
Source-Repo: https://github.com/servo/servo
Source-Revision: 8e52f8a523e2f12b2666536d0f8ff3fa40b83ef5

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 4b8b140e54485fb2762745f13af285c640d39254
2018-03-08 18:44:29 -05:00
Emilio Cobos Álvarez
e47cb58448 servo: Merge #20117 - style: Somewhat miscelaneous cleanup (from emilio:misc-cleanup); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: bbfca28a4f3770896955375d01f1c489b4632fd3

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : cca02ea2c160395889cfd6eb60c62a065d490300
2018-02-24 17:28:20 -05:00
Emilio Cobos Álvarez
bfe87878dd servo: Merge #19878 - selectors: Never match ::slotted on <slot>s (from emilio:slotted-slot); r=nox
This fixes the test from https://github.com/w3c/web-platform-tests/pull/9212 in
Gecko.

Source-Repo: https://github.com/servo/servo
Source-Revision: 82922c97dc0313736fedb8021b205d4f84088a15

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : ec1b0b5dcf36a50fe9b1cd5b087efb5f665cc79e
2018-01-29 11:45:11 -06:00
Emilio Cobos Álvarez
abf264d604 servo: Merge #19822 - style: More tiny selector-matching cleanup (from emilio:less-match-public); r=KiChjang
See each commit individually.

Source-Repo: https://github.com/servo/servo
Source-Revision: 6fc71a7644bd7afcccf83f67cfdaf01897e1a3bc

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 61fb59e354c7ad8307d6f76b93bd365abc575c85
2018-01-19 23:05:18 -06:00
Emilio Cobos Álvarez
8ef23d295e servo: Merge #19805 - style: Handle correctly document state invalidation inside negation (from emilio:doc-state-fix); r=xidorn
style: Handle correctly document state invalidation inside negation.

Source-Repo: https://github.com/servo/servo
Source-Revision: 3b07be555310a3a31445fae1150720cc3ff7d5d5

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : e88145a934a3398f5439cd2437ad40cc9686384c
2018-01-19 19:18:47 -06:00
Emilio Cobos Álvarez
33bcc6c989 servo: Merge #19817 - style: Track the visited-handling-mode on the MatchingContext (from emilio:matching-context-visited); r=nox
This fixes bugs where we're not passing the value around correctly, like from
::-moz-any.

This is a fix for https://bugzilla.mozilla.org/show_bug.cgi?id=1431539.

Source-Repo: https://github.com/servo/servo
Source-Revision: 0d7d02fca772a407d4ffa1ebd1e03d60f385eb74

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : c3d27604818f36b68c16d53ef143b4ef892c006e
2018-01-19 12:50:00 -06:00
Emilio Cobos Álvarez
e50e0550d9 servo: Merge #19813 - selectors: Simplify SelectorIter::next (from emilio:tidy); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 726a1854b08b7809dbe31fa57c186de39bd5ca42

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : e4fa16e3240de364dbb8b5f9b95185a08f68d2a9
2018-01-19 06:49:54 -06:00
Xidorn Quan
480222357d servo: Merge #19781 - Optimize selector matching for some common cases (from upsuper:matching-opt); r=emilio
This is the "better way" I mentioned in #19774, which seems to actually improve the score of dromaeo_css on talos.

Source-Repo: https://github.com/servo/servo
Source-Revision: 525758ea5ef67148c28acae9404916691e9a960c

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 0d5d151d5cadca6bf2feed3e0fe463a1b02e753d
2018-01-16 16:47:29 -06:00
Simon Sapin
fef592f6e7 servo: Merge #19751 - Clean up the selectors crate for a new crates.io release (from servo:selectors); r=bholley
Source-Repo: https://github.com/servo/servo
Source-Revision: 6ca651c0c8271ce185448e1db95b893a276eaed9

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 712f0420bf06ff978766865f757432bc7eb52b2a
2018-01-12 16:55:12 -06:00
Emilio Cobos Álvarez
543216dd9a servo: Merge #19747 - style: Add a document state invalidator (from emilio:doc-state-invalidator); r=upsuper
Don't use it yet (since I was working from a Servo tree). Will hook it up and improve in the Gecko bug.

Right now it takes a `StyleRuleCascadeData`, which means that if all the origins in the document have state selectors we could do just one walk over the tree and not multiple, that will be improved.

Other than that, this is completely untested of course, but I prefer to land it, given I don't think it's complex, and work on the Gecko integration separately. The reason for this is that I also plan to fix the `<slot>` bugs, which will change `StyleRuleCascadeData` and such, and I want the two bugs to conflict as little as possible.

Source-Repo: https://github.com/servo/servo
Source-Revision: 50e4171958d4ff7f1c76d133a8f89e7d5995376f

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 4f1c7698b9912d4782d744a4dbd9e80afa7fe0cf
2018-01-12 05:09:04 -06:00
Emilio Cobos Álvarez
d09192fc43 servo: Merge #19721 - style: Support ::slotted better (from emilio:slotted); r=heycam
This allows to selector-match ::slotted, though we still don't parse it.

Bug: 1425834, 1424607, 1425755
Reviewed-by: heycam
MozReview-Commit-ID: ItELHkf2PMl
Source-Repo: https://github.com/servo/servo
Source-Revision: bb34b7f54aa85cde600c6d675360d03714cf1f8b

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : c92bde66c55c112ea537384d89a698ccb5eba798
2018-01-09 07:26:28 -06:00
Emilio Cobos Álvarez
330618653c servo: Merge #19610 - style: Don't support a list of selectors in ::slotted yet (from emilio:slotted-list); r=xidorn
Bug: 1425757
Reviewed-by: xidorn
MozReview-Commit-ID: G0I0gM2sWTh
Source-Repo: https://github.com/servo/servo
Source-Revision: e074a1c62012e966b499d797b49b2efc08fe4007

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 8a3c314a43a335edc25f18b613c49b1eef954bb3
2017-12-20 11:09:50 -06:00
Emilio Cobos Álvarez
232ec02559 servo: Merge #19558 - selectors: Manually inline any(..) in matches_selector_list (from emilio:sadness); r=heycam
Since the compiler refuses to inline the inner closure even with -O3, which is
sad :(.

Sad try run:

  https://treeherder.mozilla.org/perf.html#/compare?originalProject=try&originalRevision=c2724c47e98f990826327da05220cd83b772d144&newProject=try&newRevision=52ac88b40a08a5ef6a629bd681f2e5a444b75f54&framework=1

Source-Repo: https://github.com/servo/servo
Source-Revision: 370f5acf6dcf2fa2b4755105376302b41a88fed3

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : c9111fe877a9e1d7893c91f13be33fded64acbe9
2017-12-14 10:19:23 -06:00
Emilio Cobos Álvarez
7e7d23433a servo: Merge #19541 - selectors: Add parsing support for ::slotted() (from emilio:parse-slotted); r=heycam
Without turning it on yet, of course.

The reason why I didn't use the general PseudoElement mechanism is because this
pseudo is a bit of its own thing, and I found easier to make ::selectors know
about it (because you need to jump to the assigned slot) than the other way
around.

Also, we need to support ::slotted(..)::before and such, and supporting multiple
pseudo-elements like that breaks some other invariants around the SelectorMap,
and fixing those would require special-casing slotted a lot more in other parts
of the code.

Let me know if you think otherwise.

I also don't like much the boolean tuple return value, but I plan to do some
cleanup in the area in a bit, so it should go away soon, I'd hope.

Source-Repo: https://github.com/servo/servo
Source-Revision: f5129ef7b5efa59a176cac98dc68d910cb3279c9

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 5f956f568b12d8aa7611bc05ac7b1d1497689189
2017-12-14 00:22:45 -06:00
Emilio Cobos Álvarez
be9bd84788 servo: Merge #19536 - style: Move the code to parse a list of compound selectors (from emilio:compound-selector-list); r=mbrubeck
I'll need this for ::slotted().

Source-Repo: https://github.com/servo/servo
Source-Revision: c6bf85eca90b9cb71ff05d4454a43a7da5fc3ac8

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 02f9868af7469734b70d02e8ddb0470a9c8d407d
2017-12-09 17:15:14 -06:00
Emilio Cobos Álvarez
342c95966f servo: Merge #19534 - style: Simplify naming and signatures of single-colon pseudo stuff (from emilio:naming-is-a-bit-hard-but-not-that-hard); r=nox
Also drop a few FIXMEs while at it, since they look bogus.

Source-Repo: https://github.com/servo/servo
Source-Revision: 051eb6bcb9204ecab1c1481a275a09fd50bf0467

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 049f90ddd1ae37e05adec201fbaa6f876cbdddfe
2017-12-09 09:52:27 -06:00
Emilio Cobos Álvarez
63378542f1 servo: Merge #19520 - selectors: Simplify :visited by only using the "is inside link" information (from emilio:simplify-visited); r=jryans
Right now we go through a lot of hoops to see if we ever see a relevant link.

However, that information is not needed: if the element is a link, we'll always
need to compute its visited style because its its own relevant link.

If the element inherits from a link, we need to also compute the visited style
anyway.

So the "has a relevant link been found" is pretty useless when we know what are
we inheriting from.

The branches at the beginning of matches_complex_selector_internal were
affecting performance, and there are no good reasons to keep them.

I've verified that this passes all the visited tests in mozilla central, and
that the test-cases too-flaky to be landed still pass.

Source-Repo: https://github.com/servo/servo
Source-Revision: 7a8733723551201d2c06acde9b0915b4c03938b4

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 00a655d0bcdf9cec70330c34eea0756b73c38cc3
2017-12-08 17:37:32 -06:00
Emilio Cobos Álvarez
95703831fd servo: Merge #19518 - style: Remove useless type parameter (from emilio:useless-code-is-useless); r=KiChjang
Source-Repo: https://github.com/servo/servo
Source-Revision: 22472b4db4564f7bc274eb01447e4f04fd7e7205

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 4c9671fc867830cf6fb5ccd528e7c0beafe39548
2017-12-07 20:32:11 -06:00
Bastien Orivel
2c7fc91a30 servo: Merge #19494 - Update smallvec to 0.6 (from Eijebong:smallvec); r=emilio
Source-Repo: https://github.com/servo/servo
Source-Revision: c20fd7d58a36496ea7d12ea3284172712da006b0

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 20803a41dd88a558e75d008dd808939d0a71429b
2017-12-05 13:44:19 -06:00
Emilio Cobos Álvarez
e1034ae8d0 servo: Merge #19457 - style: support calc() in color functions (from emilio:color-calc); r=SimonSapin
Depends on #19456 and https://github.com/servo/rust-cssparser/pull/207.

Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=984021

Source-Repo: https://github.com/servo/servo
Source-Revision: 3cef09ae217ece7fa276d1be653c7c36dee7febc

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 5e87eadeda400ec41303d8d2aa506bf65fd86ea4
2017-12-05 03:37:18 -06:00
Michael Wilson
4e69e9cedb servo: Merge #19195 - style: :dir() pseudo class now represented by enum (from wilsoniya:issue-16840); r=emilio
`:dir()` pseudo class param now represented as enum variants.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #16840
- [X] There are tests for these changes

Source-Repo: https://github.com/servo/servo
Source-Revision: 006202732f0bd8d2239bdd51898380bdbe0f0f1a

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : e9778d171eef1db2ebbf52b99d3255d50b2a60ec
2017-11-21 02:56:49 -06:00
Cameron McCormack
76d6a24dee servo: Merge #19263 - selectors: Allow white space in the brackets of an attribute selector (from heycam:attr-ws); r=SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: 7b886b4479763018ecad62aa6db96049732ca9ed

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : f8fea7deba0fe688a02437f5c3ddef7236f8f9de
2017-11-18 00:47:57 -06:00
Emilio Cobos Álvarez
7e44dfc9cc servo: Merge #19226 - style: Sprinkle some inline in trivial methods (from emilio:inline-qs); r=nox
These methods are instantiated by the Gecko library, and used during
querySelector, which means that they end up being super-hot in micro-benchmarks.

MozReview-Commit-ID: K1XJb0QyX5a
Source-Repo: https://github.com/servo/servo
Source-Revision: 85fa6409bb699647b4f5e22952538365e87418d7

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 156224040ad2191714b888e91c9b555e7efc9bb6
2017-11-15 09:22:14 -06:00
Simon Sapin
cf341df19a servo: Merge #19162 - Allow unused imports for AsciiExt in style code (from emilio:ascii-ext); r=emilio
See #19128, this part is cherry-picked so Gecko can build with rust nightly.

Source-Repo: https://github.com/servo/servo
Source-Revision: e7a654dd13f589e127193267bcb576ffd661c11d

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 0ee67ddf598b1ea99e92f6a285a960f86b1cb971
2017-11-09 06:49:29 -06:00
Emilio Cobos Álvarez
8df4224bb5 servo: Merge #19113 - Reland #19108, because it was backed out before its Gecko-side patches could land (from emilio:qsa); r=xidorn,bz
Source-Repo: https://github.com/servo/servo
Source-Revision: 0f5325d0a7e9b3039c7d5b5f9de5cd2511207d9a

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 8500b96a1e505ebf173bc034275d77e4c9100b17
2017-11-04 05:36:17 -05:00
Sebastian Hengst
855fb4576a Backed out changeset dbd300f4d75b for build bustage. r=backout on a CLOSED TREE 2017-11-04 00:55:25 +01:00
Emilio Cobos Álvarez
ab3406e598 servo: Merge #19108 - stylo: querySelector{,All} optimizations (from emilio:qsa); r=xidorn,bz
Bug: 1410624
Source-Repo: https://github.com/servo/servo
Source-Revision: a0cd781bdcdfa9db8b33632f0117e4d835ea1892

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 78c5ebda8da554c83af4c750bd5642fa17be8745
2017-11-03 14:27:34 -05:00
Bastien Orivel
b5ec6408a9 servo: Merge #18967 - Bump bitflags to 1.0 (from Eijebong:bitflags2.0); r=mbrubeck
See #18809

Still haven't had time to test it but it should fix the tests failures that appeared in m-c

Source-Repo: https://github.com/servo/servo
Source-Revision: fe4139b779b3af749ec1426ddf4e1393c7b85442

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 9a0549d7dd8a99315ba3f8eec5d0f9fdf9eb4c0f
2017-10-30 18:25:45 -05:00
Emilio Cobos Álvarez
a46ee955ef servo: Merge #19027 - selectors: Be consistent about how we get a parent element for selector matching (from emilio:svg-use-bug); r=upsuper
This fixes bug 1412011.

Source-Repo: https://github.com/servo/servo
Source-Revision: de7595f16fa41c32ca5654aef53c60ad19bb108a

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 7480db65e12b712853c9fa820671b81cd5f23dbe
2017-10-26 19:54:09 -05:00
Emilio Cobos Álvarez
7a1b70c7ff servo: Merge #18988 - stylo: querySelector / querySelectorAll machinery (from emilio:qs); r=heycam
Bug: 1410624
Reviewed-by: heycam
Source-Repo: https://github.com/servo/servo
Source-Revision: eaba7ede232c9b556f22d67698eca5dc64ad4075

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 96a43c005a9eb406d51d9b1630d0b8198288ec59
2017-10-23 08:14:35 -05:00
Emilio Cobos Álvarez
88319b3b55 servo: Merge #18983 - selectors: Reformat signatures in the parser module (from emilio:reformat-selector-parser); r=jdm
I was doing something unrelated with this code, and each signature uses a
different style. This PR unifies them.

Source-Repo: https://github.com/servo/servo
Source-Revision: a296e386af21b50409e78dd3a34ea6a5fd36d4bf

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : c783db0edd806e491f49edd8e11a50d710e0a910
2017-10-22 09:55:21 -05:00
Matt Brubeck
4b68b81e97 servo: Merge #18971 - Use env::var_os to read paths from the environment (from mbrubeck:var); r=emilio
This avoids unnecessary UTF-8 validation on OsStrings that we just pass
back to the OS.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because they are code cleanup only

Source-Repo: https://github.com/servo/servo
Source-Revision: 5ab0ac162019aede12a8150118328566467fddf2

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : c2249af39376e580dd2df6ed2ef943f16abe9fb6
2017-10-21 08:09:22 -05:00
Xidorn Quan
0acfc35aa7 servo: Merge #18962 - Support matching for ::-moz-tree-* pseudo-elements (from upsuper:tree-pseudos); r=emilio
This is the Servo side change of [bug 1397644](https://bugzilla.mozilla.org/show_bug.cgi?id=1397644).

Source-Repo: https://github.com/servo/servo
Source-Revision: b1e6f05ae455748f6091ddf81c1c0488e09546a1

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : bccb30f361f44fe3da55d5f4fe7c0cde61550524
2017-10-20 04:18:53 -05:00
Sebastian Hengst
bfad5a393e 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
--HG--
extra : amend_source : c80f31aec994c03e9ada2840b097efb3f894014e
2017-10-19 23:23:30 +02:00
Bastien Orivel
6c1dbf46fe servo: Merge #18809 - Update bitflags to 1.0 in every servo crate (from Eijebong:bitflags); r=nox
It still needs dependencies update to remove all the other bitflags
versions.

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because it's a dependency update

Source-Repo: https://github.com/servo/servo
Source-Revision: fe16c1d5c3c9084da0ccb85af599d6ec0f8ab20b

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : bb9d52a22bee6d1fe773718f649c977b07840719
2017-10-19 10:35:08 -05:00
Emilio Cobos Álvarez
24e9d2a703 servo: Merge #18934 - style: Make MatchingContext generic over SelectorImpl (from emilio:matching-context-generic); r=xidorn,heycam
This will help Xidorn implement tree pseudos, and in general makes sense,
allowing to put specific matching data in a selectors implementation.

Source-Repo: https://github.com/servo/servo
Source-Revision: 6268f482084179ed54e63028da038ae39c947359

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 2ed488ddfcbffb5b8779072c051a6d6057eee55b
2017-10-19 05:43:51 -05:00
Matt Brubeck
aae71ef096 servo: Merge #18924 - Fix commonmark Markdown warnings in docs, part 1 (from mbrubeck:doc); r=Manishearth
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.

---

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because they are doc formatting changes only

Source-Repo: https://github.com/servo/servo
Source-Revision: 0e62a5829b7c29ae2667a21a439aff1e89201bf3

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : a3cb4b6d3c62220f728cae0ab3bc603fa403ba8b
2017-10-17 16:04:10 -05:00
Emilio Cobos Álvarez
d5ff98a77c servo: Merge #18884 - style: Use left-to-right indices in the invalidator (from emilio:invalidator-ltr); r=heycam
This will make easier to create external invalidations that don't point to a combinator,
and also makes reasoning about the invalidator a bit easier.

Source-Repo: https://github.com/servo/servo
Source-Revision: a759ded65d965b54c535c74d460f60a782e51487

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 721b2c92428e7c63895cea2c4ac8e0b69108b3de
2017-10-16 03:41:54 -05:00
Emilio Cobos Álvarez
4484d6d979 servo: Merge #18876 - style: Do not expose LocalMatchingContext (from emilio:die-localmatchingcontext-die); r=SimonSapin
This type is a lot of complexity related to a very specific thing such as the
hover and active quirk.

Instead of that, move `nesting_level` to `MatchingContext`, and simplify all
this computing whether the quirk applies upfront, for each complex selector we
test.

This is less error-prone, and also allows simplifying more stuff in a bit.

Also, this makes the hover and active quirk work in Servo with no extra effort.

Source-Repo: https://github.com/servo/servo
Source-Revision: a200fb4b9df4e7461b4238fe3a6d49881f438e25

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : c0a047588e31497a14824809f41259847da86768
2017-10-15 02:21:47 -05:00
Simon Sapin
19637cf3a3 servo: Merge #18854 - Make optional the usage of some unstable features (from servo:servo-unstable-feature); r=nox
With `--no-default-features --features default-except-unstable`, more crates can now be compiled on stable Rust. This will help integrate them in rustc’s regression testing and compiler performance benchmarking.

Source-Repo: https://github.com/servo/servo
Source-Revision: 78aaa85aec8184d0a2d70006c45034d7c2ec561a

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 3490c14736cf026c4bd910423786ec46bbccfc5f
2017-10-13 12:26:39 -05:00
Simon Sapin
4f4b90db1f servo: Merge #18808 - Use the current parser location for CSS error (from servo:error-location_); r=emilio
… rather than the start location of the current construct. This likely places the error just *after* of the unexpected token whereas before would be best, but that’s likely a much bigger change.

See https://bugzilla.mozilla.org/show_bug.cgi?id=1378861

Source-Repo: https://github.com/servo/servo
Source-Revision: c79a54dbd9d3a590f5fd8191b8e57a0b9d1d0fdb

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 7a78da26aa9801972da42123730f90bcddc92930
2017-10-10 12:31:24 -05:00
Xidorn Quan
0aa342687d servo: Merge #18790 - Support :scope pseudo-class (from upsuper:scope); r=emilio
This fixes [bug 1406817](https://bugzilla.mozilla.org/show_bug.cgi?id=1406817).

Source-Repo: https://github.com/servo/servo
Source-Revision: bbb2a3cde9f4c7fc9debd5784fce2b07966101ff

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : d4d2b23cd7a27ea3fc053d5062673ff19f6c2a11
2017-10-09 23:04:15 -05:00
Emilio Cobos Álvarez
af378c7fa5 servo: Merge #18773 - style: Cleanup MatchingContext construction (from emilio:mc-cleanup); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 438b9df00cc9b1ba6733543ff9f4c99d07a3f27b

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : c3b801390c7676ad330b215268b006b6ef76af26
2017-10-07 08:31:44 -05:00
Emilio Cobos Álvarez
550a99e785 servo: Merge #18621 - selectors: Remove unused crate (from emilio:unused-crate); r=glennw
Source-Repo: https://github.com/servo/servo
Source-Revision: dd6aae9d52af1f7ff55826543e044e5a3f9dd5e6

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 3c9558fbf694d24589c77f8c8aa5a0141d6e8364
2017-09-24 21:05:49 -05:00
Bobby Holley
5f78e33b00 servo: Merge #18595 - Implement an nth-index cache (from bholley:nth_index_cache); r=emilio
https://bugzilla.mozilla.org/show_bug.cgi?id=1334730

Source-Repo: https://github.com/servo/servo
Source-Revision: be9c8ec07a0ca745adf1b412d32b3b32adec122c

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 3a03da9ae7e549b53b72306c7ec5f87365461470
2017-09-21 18:10:05 -05:00
Bobby Holley
af9981dd55 servo: Merge #18589 - Plumbing for the nth-index cache (from bholley:nth_index_plumbing); r=emilio
https://bugzilla.mozilla.org/show_bug.cgi?id=1334730

Source-Repo: https://github.com/servo/servo
Source-Revision: 39f8fce453f0a34751abb82485442429f06324bf

--HG--
rename : servo/components/style/cache.rs => servo/components/lru_cache/lib.rs
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : b0b2eb5c94f5c9ea2e6903cf5274840a5c561952
2017-09-21 01:24:01 -05:00
Tom Tromey
6471570ecb servo: Merge #18512 - Preserve sourceURL comment on style sheets (from tromey:preserve-style-sheet-source-url); r=SimonSapin
In addition to the sourceMappingURL comment, there is a second special
comment, "sourceURL", that can be used to set the "display name" of a
style sheet for developer tools.  This name is also used as the base
URL for the source-map URL resolution algorithm.  sourceURL is
described here:
https://blog.getfirebug.com/2009/08/11/give-your-eval-a-name-with-sourceurl/
The devtools feature bug is here:
https://bugzilla.mozilla.org/show_bug.cgi?id=880831

This patch changes servo to preserve and expose this value for use in M-C.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____

Source-Repo: https://github.com/servo/servo
Source-Revision: 7cc0af37cfcd03b0615a408428b53d221e493570

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 02e2fccecf6516604bad0c61f5f91126c40b6f5e
extra : histedit_source : 15404491f9f20e74312b8f2f1d64a3da19ffb1b3
2017-09-15 12:44:03 -07:00
Tom Tromey
eb5a0d0bde servo: Merge #18449 - Remove get_location_with_offset (from tromey:remove-get_location_with_offset); r=jdm
Now that rust-cssparser reports 1-based locations, bump the required
cssparser version and remove get_location_with_offset.  Previously,
some code paths were not calling get_location_with_offset; see
https://bugzilla.mozilla.org/show_bug.cgi?id=1398869 for some
background.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix https://bugzilla.mozilla.org/show_bug.cgi?id=1398869 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because tests are in rust-cssparser and/or M-C

Source-Repo: https://github.com/servo/servo
Source-Revision: 7746896bc4cf5a2a6dc78c00f643e4cff8e49da4

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 919aeee03abfd07cd5dbcc9d478dd98cc76f054e
2017-09-12 09:44:53 -05:00
Nicholas Nethercote
43983aa52e servo: Merge #18452 - Overhaul MallocSizeOf and related things (from nnethercote:bug-1398737); r=jdm
This patch makes the MallocSizeOf stuff in Stylo work more like the HeapSizeOf
stuff already in Servo, except better. In particular, it adds deriving support
for MallocSizeOf, which will make it easier to improve coverage.

The patch does the following.

- Combines servo/components/style/stylesheets/memory.rs and the heapsize crate
  into a new crate, malloc_size_of.

- Forks the heapsize_derive crate, calling it malloc_size_of, so that
  MallocSizeOf can be derived.

- Both the new crates have MIT/Apache licenses, like heapsize, in case they are
  incorporated into heapsize in the future.

- Renames the methods within MallocSizeOf and the related traits so they are
  more concise.

- Removes MallocSizeOfWithGuard.

- Adds `derive(MallocSizeOf)` to a lot of types, in some cases replacing an
  equivalent or almost-equivalent hand-written implementation.

- Adds stuff so that Rc/Arc can be handled properly.

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because tested on Gecko side.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 7f4cb1861b172423781a369b2decca6c65d60546

--HG--
rename : servo/components/hashglobe/LICENSE-APACHE => servo/components/malloc_size_of/LICENSE-APACHE
rename : servo/components/hashglobe/LICENSE-MIT => servo/components/malloc_size_of/LICENSE-MIT
rename : servo/components/jstraceable_derive/Cargo.toml => servo/components/malloc_size_of_derive/Cargo.toml
rename : servo/components/hashglobe/LICENSE-APACHE => servo/components/malloc_size_of_derive/LICENSE-APACHE
rename : servo/components/hashglobe/LICENSE-MIT => servo/components/malloc_size_of_derive/LICENSE-MIT
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : a8254c4ae15901b764d918355e900a1e74d6eb03
2017-09-11 22:11:25 -05:00