Closed Bug 1921122 Opened 9 months ago Closed 9 months ago

[wpt-sync] Sync PR 48343 - The <embed> element does not have to enforce layout when the type attribute is set to image

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
132 Branch
Tracking Status
firefox132 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 48343 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/48343
Details from upstream follow.

zhoupeng <zhoupeng.1996@bytedance.com> wrote:

The <embed> element does not have to enforce layout when the type attribute is set to image

According to the spec1, the \<embed> element represents nothing
in those conditions:

The element has neither a src attribute nor a type attribute.
The element has a media element ancestor.
The element has an ancestor object element that is not showing
its fallback content.
There is no requirement for ImageType to enforce layout in the spec.
So removed the logic of forcing layout when type is set to image.

This patch also moves "embed-represent-nothing-04.html" to
"embed-in-object-fallback-image.html".
And "embed-represent-nothing-04.html is failing in all browsers.
According to the spec2:

If the data attribute is present and its value is not the empty
string, then: ...
Fallback: The object element represents the element's children.
This is the element's fallback content.
If the object element does not have a data attribute,
its children should be used as fallback content.
The test case in "embed-represent-nothing-04.html", object does not
have a data attribute, so it should fallback, show it's children.

Bug: 40780999
Change-Id: I86bcd3cfe68c3cbe882c02008770bd3330a56026
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5877938
Reviewed-by: Mason Freed \<masonf@chromium.org>
Reviewed-by: Joey Arhar \<jarhar@chromium.org>
Commit-Queue: Peng Zhou \<zhoupeng.1996@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#1360197}

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core

CI Results

Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 1 tests

Status Summary

Firefox

PASS: 1

Chrome

PASS: 1

Safari

PASS: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b690ced154fe [wpt PR 48343] - The <embed> element does not have to enforce layout when the type attribute is set to image, a=testonly
Status: NEW → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 132 Branch
You need to log in before you can comment on or make changes to this bug.