LibWeb: Support dimension attributes on HTMLVideoElement
This commit is contained in:
parent
4b1abcf61d
commit
0ffc338406
Notes:
sideshowbarker
2024-07-17 08:43:11 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/0ffc338406 Pull-request: https://github.com/SerenityOS/serenity/pull/23928 Issue: https://github.com/SerenityOS/serenity/issues/23926 Reviewed-by: https://github.com/AtkinsSJ
3 changed files with 20 additions and 0 deletions
15
Tests/LibWeb/Layout/expected/html-dimensions.txt
Normal file
15
Tests/LibWeb/Layout/expected/html-dimensions.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
|
||||
BlockContainer <html> at (0,0) content-size 800x736 [BFC] children: not-inline
|
||||
BlockContainer <body> at (8,8) content-size 784x720 children: inline
|
||||
frag 0 from VideoBox start: 0, length: 0, rect: [8,8 320x240] baseline: 240
|
||||
frag 1 from VideoBox start: 0, length: 0, rect: [8,248 640x480] baseline: 480
|
||||
VideoBox <video> at (8,8) content-size 320x240 children: not-inline
|
||||
TextNode <#text>
|
||||
VideoBox <video> at (8,248) content-size 640x480 children: not-inline
|
||||
TextNode <#text>
|
||||
|
||||
ViewportPaintable (Viewport<#document>) [0,0 800x600] overflow: [0,0 800x736]
|
||||
PaintableWithLines (BlockContainer<HTML>) [0,0 800x736]
|
||||
PaintableWithLines (BlockContainer<BODY>) [8,8 784x720]
|
||||
VideoPaintable (VideoBox<VIDEO>) [8,8 320x240]
|
||||
VideoPaintable (VideoBox<VIDEO>) [8,248 640x480]
|
2
Tests/LibWeb/Layout/input/html-dimensions.html
Normal file
2
Tests/LibWeb/Layout/input/html-dimensions.html
Normal file
|
@ -0,0 +1,2 @@
|
|||
<video width="320" height="240" src="../../../../Base/home/anon/Videos/test-webm.webm"></video>
|
||||
<video width="640" height="480" src="../../../../Base/home/anon/Videos/test-webm.webm"></video>
|
|
@ -50,6 +50,9 @@ private:
|
|||
|
||||
virtual void attribute_changed(FlyString const& name, Optional<String> const& value) override;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/media.html#the-video-element:dimension-attributes
|
||||
virtual bool supports_dimension_attributes() const override { return true; }
|
||||
|
||||
virtual JS::GCPtr<Layout::Node> create_layout_node(NonnullRefPtr<CSS::StyleProperties>) override;
|
||||
|
||||
virtual void on_playing() override;
|
||||
|
|
Loading…
Add table
Reference in a new issue