WebKit Bugzilla
Attachment 339343 Details for
Bug 185216
: Hiding then showing an <object> of type image makes the underlaying image disappear
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185216-20180502144136.patch (text/plain), 4.76 KB, created by
Said Abou-Hallawa
on 2018-05-02 14:41:36 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Said Abou-Hallawa
Created:
2018-05-02 14:41:36 PDT
Size:
4.76 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 231264) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,23 @@ >+2018-05-02 Said Abou-Hallawa <sabouhallawa@apple.com> >+ >+ Hiding then showing an <object> of type image makes the underlaying image disappear >+ https://bugs.webkit.org/show_bug.cgi?id=185216 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ ImageLoader::updateFromElement() has to call ImageLoader::updateRenderer() >+ always because it ensures the CachedImage of ImageLoader is set to the >+ CachedImage of the RenderImageResouce of the RenderImage. The condition >+ (newImage != oldImage) in ImageLoader::updateFromElement() is true only >+ if the image is being loaded. If the image is loaded and the RenderImage >+ is destroyed and then recreated, the ImageLoader::updateRenderer() will >+ never be called. >+ >+ Test: fast/images/object-image-hide-show.html >+ >+ * loader/ImageLoader.cpp: >+ (WebCore::ImageLoader::updateFromElement): >+ > 2018-05-02 Youenn Fablet <youenn@apple.com> > > Use NetworkLoadChecker for navigation loads >Index: Source/WebCore/loader/ImageLoader.cpp >=================================================================== >--- Source/WebCore/loader/ImageLoader.cpp (revision 230959) >+++ Source/WebCore/loader/ImageLoader.cpp (working copy) >@@ -243,19 +243,19 @@ void ImageLoader::updateFromElement() > dispatchPendingBeforeLoadEvent(); > else > beforeLoadEventSender().dispatchEventSoon(*this); >- } else >- updateRenderer(); >+ } > > // If newImage is cached, addClient() will result in the load event > // being queued to fire. Ensure this happens after beforeload is > // dispatched. > newImage->addClient(*this); > } >- if (oldImage) { >+ if (oldImage) > oldImage->removeClient(*this); >- updateRenderer(); >- } > } >+ >+ if (m_image) >+ updateRenderer(); > > if (RenderImageResource* imageResource = renderImageResource()) > imageResource->resetAnimation(); >Index: LayoutTests/ChangeLog >=================================================================== >--- LayoutTests/ChangeLog (revision 230959) >+++ LayoutTests/ChangeLog (working copy) >@@ -1,3 +1,16 @@ >+2018-05-02 Said Abou-Hallawa <sabouhallawa@apple.com> >+ >+ Hiding then showing an <object> of type image makes the underlaying image disappear >+ https://bugs.webkit.org/show_bug.cgi?id=185216 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Ensure the ImageLoader always updates the RenderImage of its element when >+ the RenderImage is recreated. >+ >+ * fast/images/object-image-hide-show-expected.html: Added. >+ * fast/images/object-image-hide-show.html: Added. >+ > 2018-04-23 Daniel Bates <dabates@apple.com> > > Implement Same-Site cookies >Index: LayoutTests/fast/images/object-image-hide-show-expected.html >=================================================================== >--- LayoutTests/fast/images/object-image-hide-show-expected.html (nonexistent) >+++ LayoutTests/fast/images/object-image-hide-show-expected.html (working copy) >@@ -0,0 +1,10 @@ >+<style> >+ div { >+ width: 100px; >+ height: 100px; >+ background-color: lime; >+ } >+</style> >+<body> >+ <div></div> >+</body> >Index: LayoutTests/fast/images/object-image-hide-show.html >=================================================================== >--- LayoutTests/fast/images/object-image-hide-show.html (nonexistent) >+++ LayoutTests/fast/images/object-image-hide-show.html (working copy) >@@ -0,0 +1,33 @@ >+<style> >+ object { >+ width: 100px; >+ height: 100px; >+ } >+</style> >+<body> >+ <object data="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVQIHWNg+M8AAAICAQDpLOrTAAAAAElFTkSuQmCC" type="image/png" /> >+ <script> >+ function toggleVisiblity(element, after) { >+ return new Promise((resolve) => { >+ setTimeout(() => { >+ if (element.style.display === "none") >+ element.style.display = "block"; >+ else >+ element.style.display = "none"; >+ resolve(); >+ }, after); >+ }); >+ } >+ >+ if (window.testRunner) >+ testRunner.waitUntilDone(); >+ >+ var element = document.querySelector("object"); >+ toggleVisiblity(element, 50).then(() => { >+ return toggleVisiblity(element, 50); >+ }).then(() => { >+ if (window.testRunner) >+ testRunner.notifyDone(); >+ }); >+ </script> >+</body>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185216
:
339339
|
339343
|
339361
|
339364