Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: de7f2d41a10c0950e6f457d081f5f90d22b613d5
https://github.com/WebKit/WebKit/commit/de7f2d41a10c0950e6f457d081f5f90d22b613d5
Author: Daniel Jacobs <[email protected]>
Date: 2026-06-19 (Fri, 19 Jun 2026)
Changed paths:
M
LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/align.html
M Source/WebCore/html/HTMLElement.cpp
Log Message:
-----------
Per spec, deprecated attribute align="center" should be identical to
align="middle"
https://bugs.webkit.org/show_bug.cgi?id=317328
Reviewed by Anne van Kesteren.
Per the specification [1], when an embed, iframe, img, or object element, or an
input element whose type attribute is in the Image Button state, has an align
attribute whose value is an ASCII case-insensitive match for the string
"center" or the string "middle", the user agent is expected to act as if the
element's 'vertical-align' property was set to a value that aligns the vertical
middle of the element with the parent element's baseline.
[1]
https://html.spec.whatwg.org/multipage/rendering.html#attributes-for-embedded-content-and-images
* Source/WebCore/html/HTMLElement.cpp:
(HTMLElement::applyAlignmentAttributeToStyle):
Treat align="center" the same as align="middle".
*
LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/align.html:
Update tests for align="center" and align="middle".
Canonical link: https://commits.webkit.org/315531@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications