mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
LibWeb: Parse <style> element text content when inserted into document
1% progression on ACID3. :^)
This commit is contained in:
parent
fb11741f20
commit
efac862570
Notes:
sideshowbarker
2024-07-17 18:16:18 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/efac862570
2 changed files with 8 additions and 1 deletions
|
@ -27,6 +27,12 @@ void HTMLStyleElement::children_changed()
|
||||||
HTMLElement::children_changed();
|
HTMLElement::children_changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void HTMLStyleElement::inserted()
|
||||||
|
{
|
||||||
|
update_a_style_block();
|
||||||
|
return HTMLElement::inserted();
|
||||||
|
}
|
||||||
|
|
||||||
void HTMLStyleElement::removed_from(Node* old_parent)
|
void HTMLStyleElement::removed_from(Node* old_parent)
|
||||||
{
|
{
|
||||||
update_a_style_block();
|
update_a_style_block();
|
||||||
|
@ -93,7 +99,7 @@ static void create_a_css_style_sheet(DOM::Document& document, String type, DOM::
|
||||||
// NOTE: This is basically done by children_changed() today:
|
// NOTE: This is basically done by children_changed() today:
|
||||||
// The element's children changed steps run.
|
// The element's children changed steps run.
|
||||||
//
|
//
|
||||||
// NOTE: This is basically done by removed_from() today:
|
// NOTE: This is basically done by inserted() and removed_from() today:
|
||||||
// The element is not on the stack of open elements of an HTML parser or XML parser, and it becomes connected or disconnected.
|
// The element is not on the stack of open elements of an HTML parser or XML parser, and it becomes connected or disconnected.
|
||||||
//
|
//
|
||||||
// https://html.spec.whatwg.org/multipage/semantics.html#update-a-style-block
|
// https://html.spec.whatwg.org/multipage/semantics.html#update-a-style-block
|
||||||
|
|
|
@ -19,6 +19,7 @@ public:
|
||||||
virtual ~HTMLStyleElement() override;
|
virtual ~HTMLStyleElement() override;
|
||||||
|
|
||||||
virtual void children_changed() override;
|
virtual void children_changed() override;
|
||||||
|
virtual void inserted() override;
|
||||||
virtual void removed_from(Node*) override;
|
virtual void removed_from(Node*) override;
|
||||||
|
|
||||||
void update_a_style_block();
|
void update_a_style_block();
|
||||||
|
|
Loading…
Reference in a new issue