mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 14:58:46 +00:00
LibWeb: Create layout node for HTMLObjectElement navigable containers
This makes SVGs in object elements actually render!
This commit is contained in:
parent
dd7623eb30
commit
3ebc7fbd28
Notes:
github-actions[bot]
2024-11-26 17:59:21 +00:00
Author: https://github.com/awesomekling
Commit: 3ebc7fbd28
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2592
4 changed files with 357 additions and 354 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2020-2023, Andreas Kling <andreas@ladybird.org>
|
||||
* Copyright (c) 2020-2024, Andreas Kling <andreas@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -21,6 +21,7 @@
|
|||
#include <LibWeb/HTML/Parser/HTMLParser.h>
|
||||
#include <LibWeb/HTML/PotentialCORSRequest.h>
|
||||
#include <LibWeb/Layout/ImageBox.h>
|
||||
#include <LibWeb/Layout/NavigableContainerViewport.h>
|
||||
#include <LibWeb/Loader/ResourceLoader.h>
|
||||
#include <LibWeb/MimeSniff/MimeType.h>
|
||||
#include <LibWeb/MimeSniff/Resource.h>
|
||||
|
@ -143,8 +144,7 @@ GC::Ptr<Layout::Node> HTMLObjectElement::create_layout_node(CSS::StyleProperties
|
|||
case Representation::Children:
|
||||
return NavigableContainer::create_layout_node(move(style));
|
||||
case Representation::NestedBrowsingContext:
|
||||
// FIXME: Actually paint the nested browsing context's document, similar to how iframes are painted with NavigableContainerViewport and NavigableContainerViewportPaintable.
|
||||
return nullptr;
|
||||
return heap().allocate<Layout::NavigableContainerViewport>(document(), *this, move(style));
|
||||
case Representation::Image:
|
||||
if (image_data())
|
||||
return heap().allocate<Layout::ImageBox>(document(), *this, move(style), *this);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue