mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-13 10:26:37 +02:00
LibWeb: Cache the value of Element::lang()
This reduces the time spent in `SelectorEngine::matches_lang_pseudo_class()` from 1.9% to 0.41% on https://cloudflare.com
This commit is contained in:
committed by
Jelle Raaijmakers
parent
0ec97eabab
commit
154e9db033
Notes:
github-actions[bot]
2025-11-12 11:37:21 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/154e9db0334 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6794 Reviewed-by: https://github.com/gmta ✅
@@ -144,6 +144,7 @@ void HTMLMetaElement::inserted()
|
||||
// 9. Set the pragma-set default language to candidate.
|
||||
auto language = String::from_utf8_without_validation(candidate.bytes());
|
||||
document().set_pragma_set_default_language(language);
|
||||
document().document_element()->invalidate_lang_value();
|
||||
break;
|
||||
}
|
||||
case HttpEquivAttributeState::ContentSecurityPolicy: {
|
||||
|
||||
Reference in New Issue
Block a user