RESOLVED FIXED 187990
Once <object> is hidden, its content won't be displayed again if its URL has fragment identifier ("#").
https://bugs.webkit.org/show_bug.cgi?id=187990
Summary Once <object> is hidden, its content won't be displayed again if its URL has ...
Takao Baba
Reported 2018-07-25 01:24:36 PDT
Created attachment 345746 [details] testcase Steps to reproduce the problem: 1. Download and extract attached testcase.zip 2. Open index.html What is the expected behavior? At first there is a red circle. It will be hidden after 0.5 second, and it appears again. What went wrong? The red circle, the content of the <object> element, is not displayed again despite the <object> is shown. This issue won't occur if the URL does not include "#". Only Safari and Chrome have this issue. Firefox, Edge and IE work well. chrome bug: https://bugs.chromium.org/p/chromium/issues/detail?id=865932
Attachments
testcase (584 bytes, application/x-zip-compressed)
2018-07-25 01:24 PDT, Takao Baba
no flags
Patch and layout tests (9.60 KB, patch)
2018-08-09 16:48 PDT, Daniel Bates
simon.fraser: review+
Daniel Bates
Comment 1 2018-08-09 15:27:14 PDT
Confirmed that this issue occurs in Mac nightly r234734.
Daniel Bates
Comment 2 2018-08-09 15:48:12 PDT
When "display: none" is set on an <object> that behaves as an iframe we detach the frame view of the page it is displaying. Subsequently setting "display: inline" asked the loader to load the page the <object> refers to. Loading a URL that contains a fragment goes through a specialized code path since the result of such a load is to scroll the frame to an anchor. Unlike a traditional page load, this code path assumes that the frame view it scrolls is associated with an owner frame element (e.g. <object>). But this is not always true as demonstrated by the test case.
Daniel Bates
Comment 3 2018-08-09 15:52:21 PDT
This issue is not specific to hiding and showing and <object> that behaves as an iframe. In general, navigating an <object> to a fragment in the same document that it is displaying will cause the same visual result: an empty repaint.
Daniel Bates
Comment 4 2018-08-09 16:48:14 PDT
Created attachment 346875 [details] Patch and layout tests
Simon Fraser (smfr)
Comment 5 2018-08-09 16:56:10 PDT
Comment on attachment 346875 [details] Patch and layout tests View in context: https://bugs.webkit.org/attachment.cgi?id=346875&action=review > Source/WebCore/ChangeLog:8 > + Fixes and issue where an HTML object element that behaves like an iframe and references a resource an issue
Daniel Bates
Comment 6 2018-08-10 10:41:51 PDT
Radar WebKit Bug Importer
Comment 7 2018-08-10 10:42:35 PDT
Note You need to log in before you can comment on or make changes to this bug.