If a page contains an iframe, and there're some elements in the iframe been set as -webkit-transform: translate3d(0px, 0px, 0) .
When set the iframe as visibility: hidden , It can't be hidden normally.
visibility:hidden is invalid on an iframe with elements been set as -webkit-transform: translate3d
Created attachment 218950[details]
the iframe visibility:hidden test case
If a page contains an iframe, and there're some elements in the iframe been set as -webkit-transform: translate3d(0px, 0px, 0) .
When set the iframe as visibility: hidden , It can't be hidden normally.
Comment on attachment 225450[details]
Patch
Very bizarre patch. Why non-debug only? Not painting isn't the correct solution either; the actual bug here is that the WinCairo compositing code doesn't respect visibility:hidden for iframes (although maybe that's an issue with other platforms). Does this work on Mac, or iOS?
Hi Simon,
I have checked the issue on Mac, Linux and Windows. Issues is getting reproducible in Mac(Safari and Chrome), Linux(Efl Port), Windows (WinCG, Safari and Chrome). So the issues is not specific to WinCG.
Also I have observed that issue is happening in case of Webkit transform property that too when only 3d properties are given or when RenderLayerBacking is getting created. When we paint any element we do check for the Visibility of the element.
Hence I am checking here in RenderLayerBacking itself.
--Please Suggest
Comment on attachment 225841[details]
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=225841&action=review> Source/WebCore/rendering/RenderLayerBacking.cpp:2204
> + return;
It doesnt make much sense to create compositing for something that we never display. I think we should make a decision earlier so that an iframe with visibility: hidden would not be creating a compositing layer. If we manage to not create this compositing layer, existing code will probably take care of the not-painting part.
Created attachment 227009[details]
Archive of layout-test-results from webkit-ews-13 for mac-mountainlion-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-13 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.5
Created attachment 227012[details]
Archive of layout-test-results from webkit-ews-04 for mac-mountainlion
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-04 Port: mac-mountainlion Platform: Mac OS X 10.8.5
Created attachment 227014[details]
Archive of layout-test-results from webkit-ews-01 for mac-mountainlion
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-01 Port: mac-mountainlion Platform: Mac OS X 10.8.5
Created attachment 227035[details]
Archive of layout-test-results from webkit-ews-05 for mac-mountainlion
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-05 Port: mac-mountainlion Platform: Mac OS X 10.8.5
Created attachment 227040[details]
Archive of layout-test-results from webkit-ews-10 for mac-mountainlion-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-10 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.5
Comment on attachment 227042[details]
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=227042&action=review> Source/WebCore/rendering/RenderIFrame.cpp:66
> bool RenderIFrame::requiresLayer() const
> {
> - return RenderFrameBase::requiresLayer() || style().resize() != RESIZE_NONE;
> + return (style().visibility() == VISIBLE || style().hasOutOfFlowPosition())
> + && (RenderFrameBase::requiresLayer() || style().resize() != RESIZE_NONE);
> }
This is the wrong place. This is about RenderLayer creation, not compositing (GraphicsLayer) creation.
RenderLayerCompositor::requiresCompositingForFrame() is the one you should change.
Created attachment 227164[details]
Archive of layout-test-results from webkit-ews-16 for mac-mountainlion-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-16 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.5
Created attachment 227166[details]
Archive of layout-test-results from webkit-ews-08 for mac-mountainlion
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-08 Port: mac-mountainlion Platform: Mac OS X 10.8.5
Comment on attachment 227403[details]
Patch
The code change looks good, however I'd create a ref test instead testing maybe even against a non-layer case. I'd also add a test case to check if dynamically removing the hidden property will bring the compositing content back.
Created attachment 228606[details]
Archive of layout-test-results from webkit-ews-08 for mac-mountainlion
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-08 Port: mac-mountainlion Platform: Mac OS X 10.8.5
Created attachment 234749[details]
Archive of layout-test-results from webkit-ews-08 for mac-mountainlion
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-08 Port: mac-mountainlion Platform: Mac OS X 10.8.5
Created attachment 234752[details]
Archive of layout-test-results from webkit-ews-04 for mac-mountainlion
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-04 Port: mac-mountainlion Platform: Mac OS X 10.8.5
I have added two test cases in support of my Patch, where one test Cases is getting failed (iframe-visibility-change-dynamically.html).
In this test cases Iframe is visibility is hidden initially, and dynamically we are changing visibility to visible. But this case is getting failed in mac as when visibility is changed, all the elements are rendered except the element having property (-webkit-transform: translate3d(0px, 0px, 0);) due to which test case is getting failed.
I tried to run this test case on Webkit Gtk and efl port in both the cases it is getting passed. It is failing only in mac.
I am not having mac machine with me, hence struggling to get the route cause of this issue. Can you please suggest what can be done in this case?
Created attachment 311321[details]
Archive of layout-test-results from ews126 for ios-simulator-wk2
The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews126 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.5
Comment on attachment 311325[details]
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=311325&action=review> LayoutTests/compositing/visibility/iframe-visibility-hidden.html:14
> + document.getElementById("divToVisible").style.visibility = "visible";
But divToVisible (which is actually an iframe) is already visible?
> LayoutTests/compositing/visibility/iframe-visibility-hidden.html:44
> +<iframe frameborder=no id=divToVisible onload="makeDivVisible()" width="80" height="80" style="visibility: visible"
Should this start hidden?
2013-12-11 04:53 PST, j5726
2014-02-28 02:35 PST, Manish Gurnaney
2014-03-04 18:58 PST, Manish Gurnaney
2014-03-17 20:39 PDT, Manish Gurnaney
2014-03-17 21:39 PDT, Build Bot
2014-03-17 22:06 PDT, Build Bot
2014-03-17 23:10 PDT, Build Bot
2014-03-18 04:12 PDT, Manish Gurnaney
2014-03-18 04:43 PDT, Build Bot
2014-03-18 05:21 PDT, Build Bot
2014-03-18 05:59 PDT, Manish Gurnaney
simon.fraser: commit-queue-
2014-03-18 23:03 PDT, Manish Gurnaney
2014-03-19 00:15 PDT, Build Bot
2014-03-19 00:35 PDT, Build Bot
2014-03-21 02:19 PDT, Manish Gurnaney
2014-04-04 08:35 PDT, Manish Gurnaney
2014-04-04 10:57 PDT, Build Bot
2014-07-11 00:24 PDT, Manish Gurnaney
buildbot: commit-queue-
2014-07-11 01:49 PDT, Build Bot
2014-07-11 02:49 PDT, Build Bot
2017-05-25 10:21 PDT, zalan
2017-05-25 16:31 PDT, zalan
2017-05-25 17:57 PDT, Build Bot
2017-05-25 19:09 PDT, zalan
2017-05-25 20:15 PDT, zalan