The 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 forImageType
to enforce layout in the spec.
So removed the logic of forcing layout whentype
is set toimage
.
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 theobject
element does not have adata
attribute,
its children should be used as fallback content.
The test case in "embed-represent-nothing-04.html",object
does not
have adata
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}