Title: [157584] trunk/Source/WebCore
- Revision
- 157584
- Author
- [email protected]
- Date
- 2013-10-17 11:51:35 -0700 (Thu, 17 Oct 2013)
Log Message
Remove PlatformCALayerMac workaround for <rdar://problem/7390716>
https://bugs.webkit.org/show_bug.cgi?id=122983
Reviewed by Simon Fraser.
Remove a workaround for a bug fixed in Lion.
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayerMac::setSublayers):
(PlatformCALayerMac::removeAllSublayers):
(PlatformCALayerMac::adoptSublayers):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (157583 => 157584)
--- trunk/Source/WebCore/ChangeLog 2013-10-17 18:33:26 UTC (rev 157583)
+++ trunk/Source/WebCore/ChangeLog 2013-10-17 18:51:35 UTC (rev 157584)
@@ -1,3 +1,17 @@
+2013-10-17 Tim Horton <[email protected]>
+
+ Remove PlatformCALayerMac workaround for <rdar://problem/7390716>
+ https://bugs.webkit.org/show_bug.cgi?id=122983
+
+ Reviewed by Simon Fraser.
+
+ Remove a workaround for a bug fixed in Lion.
+
+ * platform/graphics/ca/mac/PlatformCALayerMac.mm:
+ (PlatformCALayerMac::setSublayers):
+ (PlatformCALayerMac::removeAllSublayers):
+ (PlatformCALayerMac::adoptSublayers):
+
2013-10-17 Robert Hogan <[email protected]>
"border-collapse: collapse;" for table removes part of its border (was: Border disappears when close to some elements)
Modified: trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm (157583 => 157584)
--- trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm 2013-10-17 18:33:26 UTC (rev 157583)
+++ trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm 2013-10-17 18:51:35 UTC (rev 157584)
@@ -326,17 +326,17 @@
void PlatformCALayerMac::setSublayers(const PlatformCALayerList& list)
{
- // Short circuiting here not only avoids the allocation of sublayers, but avoids <rdar://problem/7390716> (see below)
+ // Short circuiting here avoids the allocation of the array below.
if (list.size() == 0) {
removeAllSublayers();
return;
}
-
+
BEGIN_BLOCK_OBJC_EXCEPTIONS
NSMutableArray* sublayers = [[NSMutableArray alloc] init];
for (size_t i = 0; i < list.size(); ++i)
[sublayers addObject:list[i]->m_layer.get()];
-
+
[m_layer.get() setSublayers:sublayers];
[sublayers release];
END_BLOCK_OBJC_EXCEPTIONS
@@ -344,13 +344,8 @@
void PlatformCALayerMac::removeAllSublayers()
{
- // Workaround for <rdar://problem/7390716>: -[CALayer setSublayers:] crashes if sublayers is an empty array, or nil, under GC.
BEGIN_BLOCK_OBJC_EXCEPTIONS
- if (objc_collectingEnabled())
- while ([[m_layer.get() sublayers] count])
- [[[m_layer.get() sublayers] objectAtIndex:0] removeFromSuperlayer];
- else
- [m_layer.get() setSublayers:nil];
+ [m_layer.get() setSublayers:nil];
END_BLOCK_OBJC_EXCEPTIONS
}
@@ -380,19 +375,8 @@
void PlatformCALayerMac::adoptSublayers(PlatformCALayer* source)
{
- // Workaround for <rdar://problem/7390716>: -[CALayer setSublayers:] crashes if sublayers is an empty array, or nil, under GC.
- NSArray* sublayers = [source->m_layer.get() sublayers];
-
- if (objc_collectingEnabled() && ![sublayers count]) {
- BEGIN_BLOCK_OBJC_EXCEPTIONS
- while ([[m_layer.get() sublayers] count])
- [[[m_layer.get() sublayers] objectAtIndex:0] removeFromSuperlayer];
- END_BLOCK_OBJC_EXCEPTIONS
- return;
- }
-
BEGIN_BLOCK_OBJC_EXCEPTIONS
- [m_layer.get() setSublayers:sublayers];
+ [m_layer.get() setSublayers:[source->m_layer.get() sublayers]];
END_BLOCK_OBJC_EXCEPTIONS
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes