[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
Thu Dec 1 11:38:31 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=42840


Darin Adler <darin at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #108642|review?                     |review+
               Flag|                            |




--- Comment #21 from Darin Adler <darin at apple.com>  2011-12-01 11:38:30 PST ---
(From update of attachment 108642)
View in context: https://bugs.webkit.org/attachment.cgi?id=108642&action=review

Patch is OK, but not great. I’d like to look at cleaner ways to do this in the future, but it seems fine to land this now.

> Source/WebCore/loader/ImageLoader.cpp:257
> -    if (renderer->isImage())
> +    if (renderer->isImage() && !static_cast<RenderImage*>(renderer)->isGeneratedContent())

This is a non-obvious check, and it needs a comment to make clear why this is correct.

We might even want to later rename renderImageResource longer term to make it clearer what the function returns.

It seems that given we already use a different class for the generated content image, the bit could be on RenderImageResource instead of on RenderImage. We could even use a virtual function instead of a bit.

-- 
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