Hiding then showing an <object> of type image makes the underlaying image disappear
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 May 2018 01:17:55 +0000 (01:17 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 May 2018 01:17:55 +0000 (01:17 +0000)
commit4584fbe3c1dbf1db57de689909701eee67138ba8
treea3665fe6f56829e9500956f39a7d2a70cf7cc76f
parent971ac1464c193a7dea3e31fc2dda77d6d00f1729
Hiding then showing an <object> of type image makes the underlaying image disappear
https://bugs.webkit.org/show_bug.cgi?id=185216
<rdar://problem/39055630>

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2018-05-02
Reviewed by Youenn Fablet.

Source/WebCore:

Ensure the HTMLPlugInImageElement updates the RenderImageResource of its
RenderImage with the CachedImage of its ImageLoader when the RenderImage
is recreated.

Test: fast/images/object-image-hide-show.html

* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::didAttachRenderers):
This is very similar to what we do in HTMLImageElement::didAttachRenderers().

LayoutTests:

* fast/images/object-image-hide-show-expected.html: Added.
* fast/images/object-image-hide-show.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231292 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/images/object-image-hide-show-expected.html [new file with mode: 0644]
LayoutTests/fast/images/object-image-hide-show.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLPlugInImageElement.cpp