aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoreri <epazos@igalia.com>2024-10-29 22:42:22 +0000
committerGitHub <noreply@github.com>2024-10-29 22:42:22 +0000
commit01820e2a8a28bcf3b8e1b17863984d8f729ca79b (patch)
tree99df04833606ca839535daff4b0e75488556a18a /tests
parent43d1601016e03fe83fe9b8a526357de1d5fc4122 (diff)
downloadservo-01820e2a8a28bcf3b8e1b17863984d8f729ca79b.tar.gz
servo-01820e2a8a28bcf3b8e1b17863984d8f729ca79b.zip
Improve how intrinsic sizes work for videos (#31746)
* feat: patch for video layout sizes added rebase from main 2024/10/05 Co-authored-by: Josh Matthews <josh@joshmatthews.net> Signed-off-by: eri <epazos@igalia.com> * feat: take width and height parameters if provided Signed-off-by: eri <epazos@igalia.com> * chore: tidy the code and update test expectations Signed-off-by: eri <epazos@igalia.com> * feat: handle removing poster Signed-off-by: eri <epazos@igalia.com> * chore: update test expectations and remove debug code Signed-off-by: eri <epazos@igalia.com> * fix: issues after rebasing to main Signed-off-by: eri <epazos@igalia.com> * feat: pass src remove test and tidy Signed-off-by: eri <epazos@igalia.com> * chore: clippy fixes Signed-off-by: eri <epazos@igalia.com> * chore: update passing test expectations Signed-off-by: eri <epazos@igalia.com> * fix object-position-svg test Signed-off-by: eri <epazos@igalia.com> * fix unintentional override of video size and resize events Signed-off-by: eri <epazos@igalia.com> * change how resize events are sent to better match the spec Signed-off-by: eri <epazos@igalia.com> * simplify poster mutation handling Co-authored-by: Oriol Brufau <obrufau@igalia.com> Signed-off-by: eri <eri@inventati.org> * improved handling of intrinsic sizes - differentiate between natural size and css size - presentational attributes - fallback ratio for video element - handle more cases where the src/poster are added/removed - aspect ratio hints Signed-off-by: eri <epazos@igalia.com> * update test expectations Signed-off-by: eri <epazos@igalia.com> * fix cleaning current frame Signed-off-by: eri <epazos@igalia.com> * update test expectations Signed-off-by: eri <epazos@igalia.com> * Apply suggestions from code review Co-authored-by: Oriol Brufau <obrufau@igalia.com> Signed-off-by: eri <eri@inventati.org> * More code review suggestions Signed-off-by: eri <epazos@igalia.com> * Prevent aspect-ratio:auto from pulling the ratio from the default object size As resolved in https://github.com/w3c/csswg-drafts/issues/7524#issuecomment-1204462924 Signed-off-by: Oriol Brufau <obrufau@igalia.com> --------- Signed-off-by: eri <epazos@igalia.com> Signed-off-by: eri <eri@inventati.org> Signed-off-by: Oriol Brufau <obrufau@igalia.com> Co-authored-by: Josh Matthews <josh@joshmatthews.net> Co-authored-by: Oriol Brufau <obrufau@igalia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/wpt/meta/css/css-content/element-replacement-on-replaced-element.tentative.html.ini2
-rw-r--r--tests/wpt/meta/css/css-overflow/overflow-video.html.ini2
-rw-r--r--tests/wpt/meta/css/css-sizing/intrinsic-size-fallback-replaced.html.ini6
-rw-r--r--tests/wpt/meta/html/rendering/dimension-attributes.html.ini114
-rw-r--r--tests/wpt/meta/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio-lazy.html.ini3
-rw-r--r--tests/wpt/meta/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio.html.ini30
-rw-r--r--tests/wpt/meta/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/picture-aspect-ratio.html.ini6
-rw-r--r--tests/wpt/meta/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-aspect-ratio.html.ini24
-rw-r--r--tests/wpt/meta/html/semantics/embedded-content/the-img-element/image-loading-lazy-slow-aspect-ratio.html.ini2
-rw-r--r--tests/wpt/meta/html/semantics/embedded-content/the-video-element/intrinsic_sizes.htm.ini15
-rw-r--r--tests/wpt/meta/html/semantics/embedded-content/the-video-element/resize-during-playback.html.ini3
-rw-r--r--tests/wpt/meta/html/semantics/embedded-content/the-video-element/video_content_image.htm.ini2
-rw-r--r--tests/wpt/meta/html/semantics/embedded-content/the-video-element/video_content_text.htm.ini2
13 files changed, 0 insertions, 211 deletions
diff --git a/tests/wpt/meta/css/css-content/element-replacement-on-replaced-element.tentative.html.ini b/tests/wpt/meta/css/css-content/element-replacement-on-replaced-element.tentative.html.ini
deleted file mode 100644
index 7bd1c2d4164..00000000000
--- a/tests/wpt/meta/css/css-content/element-replacement-on-replaced-element.tentative.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[element-replacement-on-replaced-element.tentative.html]
- expected: FAIL
diff --git a/tests/wpt/meta/css/css-overflow/overflow-video.html.ini b/tests/wpt/meta/css/css-overflow/overflow-video.html.ini
deleted file mode 100644
index 1d0a9d754d6..00000000000
--- a/tests/wpt/meta/css/css-overflow/overflow-video.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[overflow-video.html]
- expected: FAIL
diff --git a/tests/wpt/meta/css/css-sizing/intrinsic-size-fallback-replaced.html.ini b/tests/wpt/meta/css/css-sizing/intrinsic-size-fallback-replaced.html.ini
index f0582a774ea..a7002aa4d58 100644
--- a/tests/wpt/meta/css/css-sizing/intrinsic-size-fallback-replaced.html.ini
+++ b/tests/wpt/meta/css/css-sizing/intrinsic-size-fallback-replaced.html.ini
@@ -1,16 +1,10 @@
[intrinsic-size-fallback-replaced.html]
- [.test 2]
- expected: FAIL
-
[.test 3: undefined]
expected: FAIL
[.test 4]
expected: FAIL
- [.test 6]
- expected: FAIL
-
[.test 7: undefined]
expected: FAIL
diff --git a/tests/wpt/meta/html/rendering/dimension-attributes.html.ini b/tests/wpt/meta/html/rendering/dimension-attributes.html.ini
index 77e01e40099..9edae9ec0d1 100644
--- a/tests/wpt/meta/html/rendering/dimension-attributes.html.ini
+++ b/tests/wpt/meta/html/rendering/dimension-attributes.html.ini
@@ -227,120 +227,6 @@
[<marquee height="0px"> mapping to <marquee> height property]
expected: FAIL
- [<video width="200"> mapping to <video> width property]
- expected: FAIL
-
- [<video width="1007"> mapping to <video> width property]
- expected: FAIL
-
- [<video width=" 00523 "> mapping to <video> width property]
- expected: FAIL
-
- [<video width="200.25"> mapping to <video> width property]
- expected: FAIL
-
- [<video width="200.7"> mapping to <video> width property]
- expected: FAIL
-
- [<video width="200."> mapping to <video> width property]
- expected: FAIL
-
- [<video width="200in"> mapping to <video> width property]
- expected: FAIL
-
- [<video width="200.25in"> mapping to <video> width property]
- expected: FAIL
-
- [<video width="200 %"> mapping to <video> width property]
- expected: FAIL
-
- [<video width="200 abc"> mapping to <video> width property]
- expected: FAIL
-
- [<video width="200%"> mapping to <video> width property]
- expected: FAIL
-
- [<video width="200%abc"> mapping to <video> width property]
- expected: FAIL
-
- [<video width="200.25%"> mapping to <video> width property]
- expected: FAIL
-
- [<video width="200.%"> mapping to <video> width property]
- expected: FAIL
-
- [<video width="20.25e2"> mapping to <video> width property]
- expected: FAIL
-
- [<video width="20.25E2"> mapping to <video> width property]
- expected: FAIL
-
- [<video width="0"> mapping to <video> width property]
- expected: FAIL
-
- [<video width="0%"> mapping to <video> width property]
- expected: FAIL
-
- [<video width="0px"> mapping to <video> width property]
- expected: FAIL
-
- [<video height="200"> mapping to <video> height property]
- expected: FAIL
-
- [<video height="1007"> mapping to <video> height property]
- expected: FAIL
-
- [<video height=" 00523 "> mapping to <video> height property]
- expected: FAIL
-
- [<video height="200.25"> mapping to <video> height property]
- expected: FAIL
-
- [<video height="200.7"> mapping to <video> height property]
- expected: FAIL
-
- [<video height="200."> mapping to <video> height property]
- expected: FAIL
-
- [<video height="200in"> mapping to <video> height property]
- expected: FAIL
-
- [<video height="200.25in"> mapping to <video> height property]
- expected: FAIL
-
- [<video height="200 %"> mapping to <video> height property]
- expected: FAIL
-
- [<video height="200 abc"> mapping to <video> height property]
- expected: FAIL
-
- [<video height="200%"> mapping to <video> height property]
- expected: FAIL
-
- [<video height="200%abc"> mapping to <video> height property]
- expected: FAIL
-
- [<video height="200.25%"> mapping to <video> height property]
- expected: FAIL
-
- [<video height="200.%"> mapping to <video> height property]
- expected: FAIL
-
- [<video height="20.25e2"> mapping to <video> height property]
- expected: FAIL
-
- [<video height="20.25E2"> mapping to <video> height property]
- expected: FAIL
-
- [<video height="0"> mapping to <video> height property]
- expected: FAIL
-
- [<video height="0%"> mapping to <video> height property]
- expected: FAIL
-
- [<video height="0px"> mapping to <video> height property]
- expected: FAIL
-
[<object width="200"> mapping to <object> width property]
expected: FAIL
diff --git a/tests/wpt/meta/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio-lazy.html.ini b/tests/wpt/meta/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio-lazy.html.ini
deleted file mode 100644
index f1d9d954f5c..00000000000
--- a/tests/wpt/meta/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio-lazy.html.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[img-aspect-ratio-lazy.html]
- [Image width and height attributes are used to infer aspect-ratio for lazy-loaded images]
- expected: FAIL
diff --git a/tests/wpt/meta/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio.html.ini b/tests/wpt/meta/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio.html.ini
index c86bf3cd3ca..b6a9c0f3c08 100644
--- a/tests/wpt/meta/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio.html.ini
+++ b/tests/wpt/meta/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio.html.ini
@@ -2,50 +2,20 @@
[Computed style]
expected: FAIL
- [Create, append and test immediately: <img> with attributes width=250, height=100]
- expected: FAIL
-
- [Create, append and test immediately: <img> with attributes width=0.8, height=0.2]
- expected: FAIL
-
- [Create, append and test immediately: <img> with invalid trailing attributes width=50pp height=25xx]
- expected: FAIL
-
- [Computed style test: img with {"width":"10","height":"20"}]
- expected: FAIL
-
[Computed style test: input with {"type":"image","width":"10","height":"20"}]
expected: FAIL
- [Computed style test: img with {"width":"0","height":"1"}]
- expected: FAIL
-
[Computed style test: input with {"type":"image","width":"0","height":"1"}]
expected: FAIL
- [Computed style test: img with {"width":"1","height":"0"}]
- expected: FAIL
-
[Computed style test: input with {"type":"image","width":"1","height":"0"}]
expected: FAIL
- [Computed style test: img with {"width":"0","height":"0"}]
- expected: FAIL
-
[Computed style test: input with {"type":"image","width":"0","height":"0"}]
expected: FAIL
- [Computed style test: img with {"width":"0.5","height":"1.5"}]
- expected: FAIL
-
[Computed style test: input with {"type":"image","width":"0.5","height":"1.5"}]
expected: FAIL
- [Loaded images test: <img> with width, height and empty src attributes]
- expected: FAIL
-
- [Loaded images test: Error image with width and height attributes]
- expected: FAIL
-
[Loaded images test: Error image with width, height and alt attributes]
expected: FAIL
diff --git a/tests/wpt/meta/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/picture-aspect-ratio.html.ini b/tests/wpt/meta/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/picture-aspect-ratio.html.ini
index b896e0912e9..5a433f19108 100644
--- a/tests/wpt/meta/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/picture-aspect-ratio.html.ini
+++ b/tests/wpt/meta/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/picture-aspect-ratio.html.ini
@@ -8,15 +8,9 @@
[Source width/height should take precedence over img attributes.]
expected: FAIL
- [Make sure style gets invalidated correctly when the source gets removed.]
- expected: FAIL
-
[If the <source> has only one of width/height, we don't get an aspect ratio, even if the <img> has both.]
expected: FAIL
- [If we don't have width/height on the source, we fall back to width/height on the <img>.]
- expected: FAIL
-
[If we only have one width/height attribute, we should get that attribute mapped but no aspect ratio, even if <img> has attributes.]
expected: FAIL
diff --git a/tests/wpt/meta/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-aspect-ratio.html.ini b/tests/wpt/meta/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-aspect-ratio.html.ini
deleted file mode 100644
index 91492a24a22..00000000000
--- a/tests/wpt/meta/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-aspect-ratio.html.ini
+++ /dev/null
@@ -1,24 +0,0 @@
-[video-aspect-ratio.html]
- [Video width and height attributes are not used to infer aspect-ratio]
- expected: FAIL
-
- [Computed style]
- expected: FAIL
-
- [Computed style test: video with {"width":"10","height":"20"}]
- expected: FAIL
-
- [Computed style test: video with {"width":"0.5","height":"1.5"}]
- expected: FAIL
-
- [Computed style test: video with {"width":"0","height":"1"}]
- expected: FAIL
-
- [Computed style test: video with {"width":"1","height":"0"}]
- expected: FAIL
-
- [Computed style test: video with {"width":"0","height":"0"}]
- expected: FAIL
-
- [Video width and height attributes are used to infer aspect-ratio]
- expected: FAIL
diff --git a/tests/wpt/meta/html/semantics/embedded-content/the-img-element/image-loading-lazy-slow-aspect-ratio.html.ini b/tests/wpt/meta/html/semantics/embedded-content/the-img-element/image-loading-lazy-slow-aspect-ratio.html.ini
deleted file mode 100644
index b63c1b1d0d3..00000000000
--- a/tests/wpt/meta/html/semantics/embedded-content/the-img-element/image-loading-lazy-slow-aspect-ratio.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[image-loading-lazy-slow-aspect-ratio.html]
- expected: FAIL
diff --git a/tests/wpt/meta/html/semantics/embedded-content/the-video-element/intrinsic_sizes.htm.ini b/tests/wpt/meta/html/semantics/embedded-content/the-video-element/intrinsic_sizes.htm.ini
deleted file mode 100644
index db806d2f7dc..00000000000
--- a/tests/wpt/meta/html/semantics/embedded-content/the-video-element/intrinsic_sizes.htm.ini
+++ /dev/null
@@ -1,15 +0,0 @@
-[intrinsic_sizes.htm]
- [default object size is 300x150]
- expected: FAIL
-
- [default height is half the width]
- expected: FAIL
-
- [default width is twice the height]
- expected: FAIL
-
- [default object size after src is removed]
- expected: FAIL
-
- [default object size after poster is removed]
- expected: FAIL
diff --git a/tests/wpt/meta/html/semantics/embedded-content/the-video-element/resize-during-playback.html.ini b/tests/wpt/meta/html/semantics/embedded-content/the-video-element/resize-during-playback.html.ini
index b1efee1da4b..b8abf202ffa 100644
--- a/tests/wpt/meta/html/semantics/embedded-content/the-video-element/resize-during-playback.html.ini
+++ b/tests/wpt/meta/html/semantics/embedded-content/the-video-element/resize-during-playback.html.ini
@@ -1,6 +1,3 @@
[resize-during-playback.html]
- [webm video]
- expected: FAIL
-
[mp4 video]
expected: PRECONDITION_FAILED
diff --git a/tests/wpt/meta/html/semantics/embedded-content/the-video-element/video_content_image.htm.ini b/tests/wpt/meta/html/semantics/embedded-content/the-video-element/video_content_image.htm.ini
deleted file mode 100644
index aff443ebe1e..00000000000
--- a/tests/wpt/meta/html/semantics/embedded-content/the-video-element/video_content_image.htm.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[video_content_image.htm]
- expected: FAIL
diff --git a/tests/wpt/meta/html/semantics/embedded-content/the-video-element/video_content_text.htm.ini b/tests/wpt/meta/html/semantics/embedded-content/the-video-element/video_content_text.htm.ini
deleted file mode 100644
index f1f13b23181..00000000000
--- a/tests/wpt/meta/html/semantics/embedded-content/the-video-element/video_content_text.htm.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[video_content_text.htm]
- expected: FAIL