Created
April 15, 2020 21:13
-
-
Save connorjclark/e69838b87f9c3c08d2fd32e88dc8a689 to your computer and use it in GitHub Desktop.
Chromium CSS selectors
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Match author styles (not UA or user styles) for an element: https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/core/css/resolver/style_resolver.cc;l=681;drc=28442cacc3be1a7d05a898aba663025a143095ac?originalUrl=https:%2F%2Fcs.chromium.org%2F | |
... 2 call stack frames away from ... | |
Collect the rules for an element: https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/core/css/element_rule_collector.cc;drc=28442cacc3be1a7d05a898aba663025a143095ac;bpv=0;bpt=1;l=207?originalUrl=https:%2F%2Fcs.chromium.org%2F | |
... which calls this a few times for different matching scenarios ... | |
Collect matching rules: https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/core/css/element_rule_collector.cc;l=133;drc=28442cacc3be1a7d05a898aba663025a143095ac?originalUrl=https:%2F%2Fcs.chromium.org%2F | |
After some early exit checks, it calls "checker.Match" which does the actual work: https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/core/css/selector_checker.cc?originalUrl=https:%2F%2Fcs.chromium.org%2F |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment