WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
72936
images inserted using content: url( ... ) shouldn't be resized
https://bugs.webkit.org/show_bug.cgi?id=72936
Summary
images inserted using content: url( ... ) shouldn't be resized
Florian Rivoal
Reported
2011-11-22 03:59:22 PST
Created
attachment 116197
[details]
Test case showing the problem. As defined in CSS 2.1 (section 12.1 an 12.2), images inserted using content: url( ... ) shouldn't be affected by the width and height set on the (pseudo) element. With CSS 3 inserting them becomes possible on non pseudos, as introduced by
Bug 9827
, but they still shouldn't be affected by the width and height set on the element. CSS3-content may lead to think otherwise, but that spec is old and broken, and should not be trusted. See the following thread on www-style for details about this:
http://lists.w3.org/Archives/Public/www-style/2011Nov/0451.html
Attachments
Test case showing the problem.
(508 bytes, text/html)
2011-11-22 03:59 PST
,
Florian Rivoal
no flags
Details
Safari 15.5 matches other browsers
(384.72 KB, image/png)
2022-06-17 11:47 PDT
,
Ahmad Saleem
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Tab Atkins
Comment 1
2011-11-22 07:36:35 PST
More specifically, the 'content' property on elements is acting differently than the 'content' property on pseudos, and the pseudo behavior is correct. An image used in 'content' should generate an anonymous inline box inside the element (which is then unsizeable manually and only uses its intrinsic size). Instead, when used on elements, we are turning the element into a replaced element like <img>. This also means that we're unable to mix both images and text in 'content' on elements, while we can with pseudos.
Ahmad Saleem
Comment 2
2022-06-17 11:47:04 PDT
Created
attachment 460304
[details]
Safari 15.5 matches other browsers I am unable to reproduce this bug in Safari 15.5 on macOS 12.4 considering it is matching all other browsers based on attached test case and results can be referred into attached screenshot. Although, it does not match "Expected Results' and show "Green box within large red box", while expected result is the whole box to be green and no red. If I am testing incorrectly, please retest it but since all browser behavior is aligned now. It can be marked as "RESOLVED INVALID" or "RESOLVED CONFIGURATION CHANGED". Thanks!
Radar WebKit Bug Importer
Comment 3
2022-06-17 11:47:37 PDT
<
rdar://problem/95403471
>
Ryosuke Niwa
Comment 4
2022-06-17 21:13:23 PDT
Config changed. All browser's behaviors match.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug