mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibWeb: Teach HTMLObjectElement to negotiate natural size with SVGs
We do this by generalizing the code previously used for SVGSVGBox into something that can be used for NavigableViewportContainer as well.
This commit is contained in:
parent
2405805ddf
commit
733c6b14ff
Notes:
github-actions[bot]
2024-11-26 17:58:55 +00:00
Author: https://github.com/awesomekling
Commit: 733c6b14ff
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2592
8 changed files with 386 additions and 358 deletions
|
@ -83,6 +83,14 @@ public:
|
|||
[[nodiscard]] RefPtr<CSS::CSSStyleValue> width_style_value_from_attribute() const;
|
||||
[[nodiscard]] RefPtr<CSS::CSSStyleValue> height_style_value_from_attribute() const;
|
||||
|
||||
struct NaturalMetrics {
|
||||
Optional<CSSPixels> width;
|
||||
Optional<CSSPixels> height;
|
||||
Optional<CSSPixelFraction> aspect_ratio;
|
||||
};
|
||||
|
||||
static NaturalMetrics negotiate_natural_metrics(SVGSVGElement const&);
|
||||
|
||||
private:
|
||||
SVGSVGElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue