mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 12:37:45 +00:00
LibWeb: Make SVG <svg> elements behave as CSS replaced elements
This makes SVG-in-HTML behave quite a bit better by following general replaced layout rules. It also turns <svg> elements into inline-level boxes instead of block-level boxes.
This commit is contained in:
parent
48abbefb99
commit
28b771560a
10 changed files with 21 additions and 14 deletions
|
@ -4,13 +4,13 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Layout/SVGSVGBox.h>
|
||||
#include <LibWeb/Layout/ReplacedBox.h>
|
||||
#include <LibWeb/Painting/SVGSVGPaintable.h>
|
||||
|
||||
namespace Web::Layout {
|
||||
|
||||
SVGSVGBox::SVGSVGBox(DOM::Document& document, SVG::SVGSVGElement& element, NonnullRefPtr<CSS::StyleProperties> properties)
|
||||
: SVGGraphicsBox(document, element, properties)
|
||||
: ReplacedBox(document, element, move(properties))
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue