[iOS WK2] Layers that are created and destroyed in the same transaction shouldn't...
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Feb 2015 22:04:52 +0000 (22:04 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Feb 2015 22:04:52 +0000 (22:04 +0000)
commit2243cc4e833a5272129f23b45d3c95235d03e262
tree0c0facfd3c9400f52f6dea17dba19c13581c23da
parent2fff3fe41310cb45378534c66472f1ae792ecbc0
[iOS WK2] Layers that are created and destroyed in the same transaction shouldn't be encoded
https://bugs.webkit.org/show_bug.cgi?id=141228

Reviewed by Tim Horton.

With UI-side compositing, it was possible for layers to get created and
destroyed in the same transaction (e.g. two layouts before a single layer
tree commit). When that happened we would encode layer creation properties
but not encode layer properties, since the layer would be unreachable.

Fix by removing deleted layers from the created layers list, which is
converted into a map for easy searching.

* WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
* WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
(WebKit::RemoteLayerTreeContext::layerWasCreated):
(WebKit::RemoteLayerTreeContext::layerWillBeDestroyed):
(WebKit::RemoteLayerTreeContext::buildTransaction):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179630 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.h
Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.mm