[Webkit-unassigned] [Bug 42840] image element with src attribute can't be replaced by content: url() style
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jan 4 13:17:19 PST 2011
https://bugs.webkit.org/show_bug.cgi?id=42840
Darin Adler <darin at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #77401|review?, commit-queue? |review-, commit-queue-
Flag| |
--- Comment #15 from Darin Adler <darin at apple.com> 2011-01-04 13:17:19 PST ---
(From update of attachment 77401)
View in context: https://bugs.webkit.org/attachment.cgi?id=77401&action=review
I don't think it’s right to make a special RenderImageResource.
The real issue here is that RenderObject::createObject creates a RenderImage, but classes like HTMLImageElement assume that if the renderer is a RenderImage it’s the one they created. I think we should make a different renderer class, or add a flag to RenderImage, not RenderImageResource. I think the different class is probably the best way to handle it.
I looked and found functions that make the incorrect assumption that an image is one created by the element and these are the ones I found:
ImageLoader::renderImageResource
HTMLImageElement::parseMappedAttribute
HTMLImageElement::attach
HitTestResult::absoluteImageURL
absoluteURL functions generated by CodeGeneratorObjC.pm
Those should probably use a function that returns false for the images that were created based on style, rather than the isImage function, which returns true for those.
> WebCore/rendering/RenderImageResource.h:47
> + static PassOwnPtr<RenderImageResource> create(Type type = Normal)
In the context of RenderImageResource, I don’t think “generated” is a clear enough term to be used. In this patch it means generated content, in other words, the CSS content attribute.
But we also have a class named GeneratedImage in WebCore/platform/graphics, and this refers to images that are created by an algorithm, such as gradient, rather than with image data.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list