[Webkit-unassigned] [Bug 26285] Removing an image's src attribute, or setting it to null, via scripting, doesn't change the image

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 16 20:05:37 PST 2014


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





--- Comment #19 from Jaehun Lim <ljaehun.lim at samsung.com>  2014-01-16 20:03:08 PST ---
(From update of attachment 220962)
View in context: https://bugs.webkit.org/attachment.cgi?id=220962&action=review

Thanks comments.
I update ChangeLogs and LayoutTests.

>> Source/WebCore/rendering/RenderImage.cpp:283
>> +    if (m_imageResource->errorOccurred() || !m_imageResource->hasImage())
> 
> This patch could benefit a lot from per-function comments in ChangeLog. For example, I don't understand why this change was needed. What are the circumstances when imageResource has an image, even though an error occurred?

While removing 'src' attribute, the CachedImage was cleared. So m_imageResource->errorOccurred() returns false. In this case, both errorOccurred() and hasImage() return false.

See:
bool RenderImageResource::errorOccurred() const                                                                                                                                                                                   
{
    return m_cachedImage && m_cachedImage->errorOccurred();
}

But after removing 'src', the intrinsic size should be changed to 0x0 or 'alt' text size.

>> LayoutTests/canvas/philip/tests/2d.drawImage.image.incomplete.omitted-expected.txt:2
>> +
> 
> This change is not mentioned in ChangeLog. Why is it expected?

Update ChangeLog.

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