Title: [166753] trunk/Source/WebKit2
- Revision
- 166753
- Author
- [email protected]
- Date
- 2014-04-03 16:28:42 -0700 (Thu, 03 Apr 2014)
Log Message
ASSERT(m_children.isEmpty()) in PlatformCALayerRemote::removeAllSublayers() on time.com
https://bugs.webkit.org/show_bug.cgi?id=131187
Reviewed by Maciej Stachowiak.
After a call to PlatformCALayerRemote::adoptSublayers() when a layer
toggles between tiled and non-tiled, we'd assert in PlatformCALayerRemote::removeAllSublayers()
that not all sublayers had been removed (there was one with a null superlayer).
Fix by ensuring that we don't copy over custom subviews when adoptSublayers()
is called; they'll get added as we update children anyway.
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::adoptSublayers):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (166752 => 166753)
--- trunk/Source/WebKit2/ChangeLog 2014-04-03 23:04:49 UTC (rev 166752)
+++ trunk/Source/WebKit2/ChangeLog 2014-04-03 23:28:42 UTC (rev 166753)
@@ -1,3 +1,20 @@
+2014-04-03 Simon Fraser <[email protected]>
+
+ ASSERT(m_children.isEmpty()) in PlatformCALayerRemote::removeAllSublayers() on time.com
+ https://bugs.webkit.org/show_bug.cgi?id=131187
+
+ Reviewed by Maciej Stachowiak.
+
+ After a call to PlatformCALayerRemote::adoptSublayers() when a layer
+ toggles between tiled and non-tiled, we'd assert in PlatformCALayerRemote::removeAllSublayers()
+ that not all sublayers had been removed (there was one with a null superlayer).
+
+ Fix by ensuring that we don't copy over custom subviews when adoptSublayers()
+ is called; they'll get added as we update children anyway.
+
+ * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
+ (WebKit::PlatformCALayerRemote::adoptSublayers):
+
2014-04-03 Benjamin Poulain <[email protected]>
[iOS][WK2] Add SPI to handle animated resize
Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp (166752 => 166753)
--- trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp 2014-04-03 23:04:49 UTC (rev 166752)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp 2014-04-03 23:28:42 UTC (rev 166753)
@@ -264,7 +264,17 @@
void PlatformCALayerRemote::adoptSublayers(PlatformCALayer* source)
{
- setSublayers(toPlatformCALayerRemote(source)->m_children);
+ PlatformCALayerList layersToMove = toPlatformCALayerRemote(source)->m_children;
+
+ if (const PlatformCALayerList* customLayers = source->customSublayers()) {
+ for (const auto& layer : *customLayers) {
+ size_t layerIndex = layersToMove.find(layer);
+ if (layerIndex != notFound)
+ layersToMove.remove(layerIndex);
+ }
+ }
+
+ setSublayers(layersToMove);
}
void PlatformCALayerRemote::addAnimationForKey(const String& key, PlatformCAAnimation* animation)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes