mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
style: Speed up selector matching with already-lowercase local name selectors
This makes relatively simple changes so that we check lowercase-ness of local-name selectors first. If so, we don't need to check whether we're an HTML element in an HTML document, which requires a fair bit of pointer-chasing. Differential Revision: https://phabricator.services.mozilla.com/D163627
This commit is contained in:
parent
dbba87d73e
commit
b6d9b77a15
3 changed files with 47 additions and 46 deletions
|
@ -365,7 +365,7 @@ where
|
|||
ref lower_name,
|
||||
} = *local_name;
|
||||
|
||||
let chosen_name = if element.is_html_element_in_html_document() {
|
||||
let chosen_name = if name == lower_name || element.is_html_element_in_html_document() {
|
||||
lower_name
|
||||
} else {
|
||||
name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue