Previously, the layers of a phantom window were recreated when the
surface changed in the corresponding layers of the original window.
The code also assumed that layers with surfaces are leaves in the
layer tree, but Exosphere surfaces are nested. Recursive layer
cloning would be inefficient for surfaces changing in each frame,
so this CL adds an alternative way to mirror layers. In addition,
the bounds of Exosphere surfaces relative to their parent window
are updated whenever the window moves, so this CL provides a way
to synchronize relative positions of layers in phantom windows.
In addition to implementing phantom windows for ARC apps, this CL
fixes three bugs related to mirroring:
1) Memory corruption due to the non-recursive layer cloning.
2) Dangling pointers due to observers sticking around.
3) Black Alt+Tab previews for ARC windows.
BUG=642894 BUG=649452 BUG=653113
TEST=ARC apps that render continuously (e.g. games, video players)
can be dragged to external displays, and their content is
mirrored in phantom windows.
TEST=ARC apps are mirrored in Alt+Tab previews.
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel
Do not reload inside IOSSSLErrorHandler::InterstitialWasDismissed to
avoid extra reloads.
InterstitialWasDismissed is called in the following cases:
1.) Reload button tapped (no need for the second reload)
2.) Back button tapped (no need to reload, going back is enough)
3.) Tab closed (no need to reload closed tab)
4.) "Back to safety" button tapped (reload is actually needed in this
case, but it can be done in WebInterstitialImpl::DontProceed).
BUG=653963
TEST=dismissing SSL interstitial works correctly
Add serialization/deserialization for FakePictureLayer for testing.
Previously we serialize/deserialize FakePictureLayer into PictureLayer.
This introduced an issue in LayerTreeHostTestReadyToActivateNonEmpty and
other unit test cases in layer_tree_host_unittests.cc that downcasting
from PictureLayerImpl to FakePictureLayerImpl will fail.
The data flow was:
FakePictureLayer==>PictureLayer==>PictureLayerImpl==>
FakePictureLayerImpl(downcast failure).
This CL adds procedure to process FakePictureLayer, so it can be
deserialized and down cast correctly.
The data flow becomes:
FakePictureLayer==>FakePictureLayer==>FakePictureLayerImpl