mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-10 13:18:45 +02:00
Dynamic changes are handled correctly because content property changes already cause a reframe. This implements the same bits as Blink / WebKit do (single content item which is an image, otherwise gets ignored), except for the edge cases where you use this on an image. In order to handle the edge cases right, we completely isolate the nsImageLoadingContent usage based on `mKind`. Blink's and WebKit's behavior there makes no sense and it's erratic, what I implemented is consistent (we apply to images as long as they don't generate a box, and we don't look at alt text or broken icons), though I'll update to whatever the WG decides in https://github.com/w3c/csswg-drafts/issues/2831 / https://github.com/w3c/csswg-drafts/issues/2832. I don't think it matters in terms of web compat in any case. MozReview-Commit-ID: JUurhC60hWr
6 lines
408 B
HTML
6 lines
408 B
HTML
<!DOCTYPE html>
|
|
<title>The content CSS property with a broken image doesn't pull the alt attribute from that element</title>
|
|
<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
|
|
<link rel="match" href="element-replacement-alt-ref.html">
|
|
<link rel="help" href="https://drafts.csswg.org/css-content-3/#content-property">
|
|
<div style="content: url(broken);" alt="Alt text">FAIL</div>
|