mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 07:41:01 +00:00
LibWeb: Cache and reuse inline style for text input shadow trees
Instead of reparsing the style attributes every time we instantiate the internal shadow tree for a text input element, we now parse them once (in the internal CSS realm) and reuse them for all elements. Roughly a ~10% speedup on Speedometer 2.1 :^)
This commit is contained in:
parent
ba030f0363
commit
d856858015
Notes:
github-actions[bot]
2025-03-25 23:57:59 +00:00
Author: https://github.com/awesomekling
Commit: d856858015
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4081
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/shannonbooth
3 changed files with 69 additions and 28 deletions
|
@ -925,6 +925,12 @@ GC::Ref<CSS::CSSStyleProperties> Element::style_for_bindings()
|
|||
return *m_inline_style;
|
||||
}
|
||||
|
||||
void Element::set_inline_style(GC::Ptr<CSS::CSSStyleProperties> style)
|
||||
{
|
||||
m_inline_style = style;
|
||||
set_needs_style_update(true);
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#element-html-uppercased-qualified-name
|
||||
void Element::make_html_uppercased_qualified_name()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue