mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:48:12 +00:00
LibWeb: Attach DOM::Document to its frame before parsing
FrameLoader now begins by constructing a DOM::Document, and then builds a document tree inside it based on the MIME type. For text/html we pass control to the HTMLDocumentParser as before. This gives us access to things like window.alert() during parsing. Fixes #3973.
This commit is contained in:
parent
22c582a887
commit
1eee6716e0
3 changed files with 59 additions and 54 deletions
|
@ -159,6 +159,9 @@ void Frame::scroll_to_anchor(const String& fragment)
|
|||
}
|
||||
}
|
||||
|
||||
// FIXME: This is overly aggressive and should be something more like a "update_layout_if_needed()"
|
||||
document()->force_layout();
|
||||
|
||||
if (!element || !element->layout_node())
|
||||
return;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue