Read-only Git mirror of the Mercurial gecko repositories at https://hg.mozilla.org. How to contribute: https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
Go to file
Emilio Cobos Álvarez 2bc468b78a servo: Merge #20597 - style: Implement the non-functional :host selector (from emilio:host); r=xidorn
Kinda tricky because :host only matches rules on the shadow root where the rules
come from. So we need to be careful during invalidation and style sharing.

I didn't use the non_ts_pseudo_class_list bits because as soon as we implement
the :host(..) bits we're going to need to special-case it anyway.

The general schema is the following:

 * Rightmost featureless :host selectors are handled inserting them in the
   host_rules hashmap. Note that we only insert featureless stuff there. We
   could insert all of them and just filter during matching, but that's slightly
   annoying.

 * The other selectors, like non-featureless :host or what not, are added to the
   normal cascade data. This is harmless, since the shadow host rules are never
   matched against the host, so we know they'll just never match, and avoids
   adding more special-cases.

 * Featureless :host selectors to the left of a combinator are handled during
   matching, in the special-case of next_element_for_combinator in selectors.
   This prevents this from being more invasive, and keeps the usual fast path
   slim, but it's a bit hard to match the spec and the implementation.

   We could keep a copy of the SelectorIter instead in the matching context to
   make the handling of featureless-ness explicit in match_non_ts_pseudo_class,
   but we'd still need the special-case anyway, so I'm not fond of it.

 * We take advantage of one thing that makes this sound. As you may have
   noticed, if you had `root` element which is a ShadowRoot, and you matched
   something like `div:host` against it, using a MatchingContext with
   current_host == root, we'd incorrectly report a match. But this is impossible
   due to the following constraints:

    * Shadow root rules aren't matched against the host during styling (except
      these featureless selectors).

    * DOM APIs' current_host needs to be the _containing_ host, not the element
      itself if you're a Shadow host.

Bug: 992245
Reviewed-by: xidorn
MozReview-Commit-ID: KayYNfTXb5h
Source-Repo: https://github.com/servo/servo
Source-Revision: cb754b262747e7cab794411df55588f0f0b30b5e

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 2ebbb2578ff9dbadfe905ae501cd52bd61a9fe9a
2018-04-09 06:41:59 -04:00
.cargo Bug 1447998 - Update serde patching to go with WR PR 2577. r=jrmuizel 2018-03-28 09:11:53 -04:00
.vscode Bug 1423565 - Update tasks.json as per documentation. r=rillian 2017-12-06 14:59:35 +01:00
accessible Bug 1450717: Remove unneeded / inconsistent arguments from nsCSSFrameConstructor. r=mats 2018-04-07 15:37:39 +02:00
browser Backed out changeset d9110e28f361 (bug 1358712) for wpt mass failures on Linux QuantumRender, e.g. in /css/css-tables/height-distribution/computing-row-measure-1.html 2018-04-08 01:49:40 +03:00
build Bug 1444274 - Require GCC 6.1+. - r=glandium 2018-04-02 17:05:43 -07:00
caps Bug 1448414. Remove the DOM_OBJECT classinfo bit. r=kmag 2018-03-28 22:46:23 -04:00
chrome Bug 1448162 - Remove all XUL overlay tests. r=Gijs 2018-03-22 16:21:26 -07:00
config Backed out 7 changesets (bug 1438688) for android xpcshell failures on builds/worker/workspace/build/tests/bin/components/test_necko.xpt 2018-04-03 02:30:53 +03:00
db Bug 1442370 - Change SQLITE_TEMP_FILE_PREFIX to a Mozilla unique value. r=asuth 2018-03-01 20:55:18 +01:00
devtools Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-04-09 12:02:52 +03:00
docshell Bug 1449631 part 3. Remove nsIDOMEventTarget::RemoveSystemEventListener. r=smaug 2018-04-05 13:42:40 -04:00
dom Bug 1451781 - Check if output device is mono and remove stereo check in order to disable opus channel inversion. r=jya 2018-04-09 13:07:58 +03:00
editor Bug 1451972 - Remove more nsIDOMDocument usages from editor. r=masayuki 2018-04-06 14:53:05 +09:00
embedding Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian 2018-01-29 15:20:18 -08:00
extensions Bug 1450620 - Add words to en-US dictionary. r=ehsan 2018-04-03 11:42:28 +07:00
gfx Merge inbound to mozilla-central. a=merge 2018-04-07 00:55:15 +03:00
gradle/wrapper Bug 1411654 - Part 1: Upgrade to Android-Gradle 3.0+ and build-tools;26.0.2. r=maliu 2017-10-26 11:00:36 -07:00
hal Bug 1447873 - Remove Time API backend in hal. r=gsvelto 2018-03-22 10:46:42 +09:00
image Bug 1451405: Notify debug-only image observers off a script-runner. r=bz 2018-04-05 11:45:40 +02:00
intl Bug 1451421 - Add a ToLowerCaseASCII utility method for nsAtom. r=hisvonen 2018-04-06 15:30:15 -07:00
ipc Bug 1449679 - Disable sentinel checking in IPC in debug fuzzing builds. r=jld 2018-03-28 14:26:10 -04:00
js Merge inbound to mozilla-central. a=merge 2018-04-09 00:43:58 +03:00
layout Bug 1452534 part 4 - Remove unused ComputedStyle::{IsReset,IsInherited}. r=emilio 2018-04-09 15:57:53 +10:00
media Bug 1448762 - Update mp4parse-rust to 9e70cb4. r=padenot 2018-04-09 09:59:57 +02:00
memory Bug 1447795: Add even more UseItOrLoseIt to SmokeDMD.cpp 2018-04-01 09:37:42 -04:00
mfbt Bug 1447480 - Add support of MOZ_FALLTHROUGH_ASSERT without any argument r=hsivonen 2018-04-05 11:42:23 +02:00
mobile no bug - Bumping Fennec l10n changesets DONTBUILD r=release a=l10n-bump 2018-04-06 03:40:01 -07:00
modules Bug 1451926: add a user pref for AV1 codec. r=cpearce 2018-04-05 20:35:57 -07:00
mozglue Backed out changeset e72d2ab40d64 (bug 1450959) for failing in builds/worker/workspace/build/src/obj-firefox/dist/include/js/UbiNode.h on a CLOSED TREE 2018-04-05 11:55:19 +03:00
netwerk Bug 1286861: Update CookieService to enforce same site cookies. r=valentin 2018-04-08 19:52:05 +02:00
nsprpub Bug 1432480, land NSPR_4_19_RTM, no code changes, only version numbers. Require version 4.19 for building. r=me 2018-03-05 17:05:18 +01:00
other-licenses Bug 1448483 Remove reference and use of ssize_t in CityHash to avoid conflicting definitions in MinGW x64 r=froydnj 2018-03-23 16:27:49 -05:00
parser Bug 1447480 - Add a MOZ_ASSERT to make it clear that it can never fall through r=hsivonen 2018-04-03 13:40:59 +02:00
python Bug 1444274 - Require GCC 6.1+. - r=glandium 2018-04-02 17:05:43 -07:00
rdf Bug 1378552 - Reduce the liklihood of inadvertently misusing NullPrincipal::Create(). r=ckerschb 2018-03-22 13:36:20 -05:00
security No bug, Automated HPKP preload list update from host bld-linux64-spot-303 - a=hpkp-update 2018-04-08 13:36:33 -07:00
services Bug 1448184 - only send notifications of history batch updates when we actually have updates. r=standard8,tcsc 2018-03-23 10:35:00 +11:00
servo servo: Merge #20597 - style: Implement the non-functional :host selector (from emilio:host); r=xidorn 2018-04-09 06:41:59 -04:00
startupcache Bug 1439047 - Part 2: Cleanup StartupCache::PutBuffer hashtable usage. r=froydnj 2018-02-16 15:58:30 -08:00
storage Bug 1170771 - Remove now-empty nsDOMClassInfo. r=bz 2018-04-05 14:20:44 +02:00
taskcluster Backed out changeset 918004b0cc5d (bug 1451968) for breaking comm-central builds, a=shame 2018-04-08 09:02:43 -07:00
testing Bug 1452479 - Include timeout duration in ScriptTimeoutError. r=whimboo 2018-04-08 17:23:14 +01:00
third_party Bug 1451945 - Update to cssparser-macros 0.3.2. r=ted 2018-04-05 15:54:03 -07:00
toolkit Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-04-08 01:04:38 +03:00
tools Merge mozilla-inbound to mozilla-central. a=merge 2018-04-06 13:20:21 +03:00
uriloader Bug 1448374 - Loading a .javascript file from a WebExtension's web_accessible_resources messing with macOS file associations r=jimm 2018-04-03 13:42:43 -07:00
view Bug 1423551: Use BaseRect access methods instead of member variables in view/. r=jet 2018-01-10 11:16:22 -05:00
widget Bug 1452041 - nsClipboard::HasDataMatchingFlavors(): return immediately when there's no clipboard content, r=jhorak 2018-04-09 13:36:03 +02:00
xpcom Bug 1448544 - remove AutoVsyncTelemetry; r=farre 2018-04-07 11:54:03 -04:00
xpfe Bug 1450418. Get rid of nsIDOMScreen. r=qdot 2018-04-03 00:42:41 -04:00
.arcconfig Bug 1424950: Add missing repository.callsign to .arcconfig. r=dkl 2017-12-13 15:38:18 +01:00
.clang-format Bug 1414764 - Remove Mozilla specific options to avoid build warnings with gcc and -Wcomment enabled. r=sylvestre 2017-11-06 11:47:40 +02:00
.clang-format-ignore Bug 1449244 Remove SphinxBase r=drno 2018-03-27 12:04:10 -05:00
.cron.yml Bug 1418188 - Run Searchfox indexing in TaskCluster on a daily basis (r=dustin,chmanchester) 2017-11-23 07:25:12 -08:00
.eslintignore Bug 1451821 - Move new-console-output content one folder up; r=jdescottes. 2018-04-06 15:03:20 +02:00
.eslintrc.js Bug 1434446 - Enable no-unused-vars for global scope on jsm files in browser/. r=mossop 2018-03-01 20:06:06 +00:00
.flake8 Bug 1436802 - [lint] Add some tests for the flake8 linter integration r=andi 2018-03-22 17:24:15 -04:00
.gdbinit
.gdbinit_python
.gitignore Bug 1439727 - Ignore third_party/python/psutil/tmp/ in VCS; r=nalexander 2018-03-07 08:59:48 -08:00
.hgignore Bug 1439727 - Ignore third_party/python/psutil/tmp/ in VCS; r=nalexander 2018-03-07 08:59:48 -08:00
.hgtags No bug - Tagging mozilla-central fdd1a0082c71673239fc2f3a6a93de889c07a1be with FIREFOX_NIGHTLY_60_END a=release DONTBUILD CLOSED TREE 2018-03-12 13:18:08 +00:00
.inferconfig
.lldbinit
.mailmap NO BUG - Use ato's new address. r=me 2018-02-26 15:59:29 +00:00
.taskcluster.yml Backed out changeset 3ff8ce674396 (bug 1447460) on request of tomprince a=backout 2018-04-03 18:30:58 +03:00
.yamllint
.ycm_extra_conf.py
aclocal.m4
AUTHORS
build.gradle Bug 1447734 - Specify Google Play Services library version in Gradle r=nalexander 2018-03-22 14:35:38 -05:00
Cargo.lock Bug 1448762 - Update mp4parse-rust to 9e70cb4. r=padenot 2018-04-09 09:59:57 +02:00
Cargo.toml Bug 1437004 - Vendored Rust dependencies;r=froydnj 2018-04-04 14:14:26 +02:00
client.mk Bug 1417264 - Write .mozconfig.json from Python; r=nalexander 2017-11-13 17:45:03 -08:00
client.py
CLOBBER Bug 1445465 - Part 4: Clobber for ICU update. r=clobber 2018-03-27 07:59:01 -07:00
configure.in
configure.py Bug 1412460 - Don't write make variables in configure.d; r=mshal 2017-11-01 15:02:11 -07:00
GNUmakefile
gradle.properties Bug 1411654 - Part 2: Update Robolectric to 3.5.1. r=mcomella 2017-11-07 20:26:43 -08:00
gradlew
LEGAL
LICENSE
mach
Makefile.in Bug 1387098 - enable tup quiet mode; r=froydnj 2018-02-23 14:27:58 -05:00
moz.build Bug 1445763 - Update moz.build meta data with "Firefox Build System". r=froydnj 2018-03-14 21:44:46 +01:00
moz.configure Bug 1435424 - Remove doxygen support from the build system. r=gps 2018-02-02 14:24:18 -08:00
mozilla-config.h.in Bug 1431803 Turn __try into if(true) and __except into else in the chromium sandbox code r=bobowen,glandium 2018-01-22 12:18:51 -06:00
npm-shrinkwrap.json Bug 1428414 - Support saving credit card changes in the Payment Request dialog. r=jaws 2018-04-03 14:06:21 -04:00
old-configure.in Bug 1371991 - don't link against crmf when building with --with-system-nss, r=ted 2018-04-04 14:36:12 +02:00
package.json Bug 1443093 - Update eslint-plugin-no-unsanitized to 3.0.0 / eslint to 4.18.2. r=mossop 2018-03-05 10:34:38 +00:00
README.txt
settings.gradle
test.mozbuild

An explanation of the Mozilla Source Code Directory Structure and links to
project pages with documentation can be found at:

    https://developer.mozilla.org/en/Mozilla_Source_Code_Directory_Structure

For information on how to build Mozilla from the source code, see:

    https://developer.mozilla.org/en/docs/Build_Documentation

To have your bug fix / feature added to Mozilla, you should create a patch and
submit it to Bugzilla (https://bugzilla.mozilla.org). Instructions are at:

    https://developer.mozilla.org/en/docs/Creating_a_patch
    https://developer.mozilla.org/en/docs/Getting_your_patch_in_the_tree

If you have a question about developing Mozilla, and can't find the solution
on https://developer.mozilla.org, you can try asking your question in a
mozilla.* Usenet group, or on IRC at irc.mozilla.org. [The Mozilla news groups
are accessible on Google Groups, or news.mozilla.org with a NNTP reader.]

You can download nightly development builds from the Mozilla FTP server.
Keep in mind that nightly builds, which are used by Mozilla developers for
testing, may be buggy. Firefox nightlies, for example, can be found at:

    https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/
            - or -
    https://nightly.mozilla.org/