Formatting, replaced alert with warning

This commit is contained in:
Aparajita Fishman committed 2013-02-21 08:52:58 -05:00
1 parent fb01ceb2a9
commit d473a82715
1 file changed
+7 -3
+7 -3
View File
@@ -474,6 +474,7 @@ var CALayerRegisteredRunLoopUpdates = nil;
CGContextSaveGState(_context);
CGContextConcatCTM(_context, transform);//_transformFromView);
if (USE_BUFFER)
{
// CGContextDrawImage(_context, _bounds, _contents.context);
@@ -481,6 +482,7 @@ var CALayerRegisteredRunLoopUpdates = nil;
}
else
[self drawInContext:_context];
CGContextRestoreGState(_context);
}
@@ -536,7 +538,7 @@ var CALayerRegisteredRunLoopUpdates = nil;
@param aContext the context to draw the layer into
*/
- (void)drawInContext:(CGContext)aContext
{ //if (!window.loop || window.nodisplay) CPLog.error("htiasd");
{
if (_backgroundColor)
{
CGContextSetFillColor(aContext, _backgroundColor);
@@ -659,6 +661,7 @@ if (_DOMContentsElement && aLayer._zPosition > _DOMContentsElement.style.zIndex)
{
[self insertSublayer:aLayer atIndex:_sublayers.length];
return;
ADJUST_CONTENTS_ZINDEX(aLayer);
[_sublayers addObject:aLayer];
@@ -746,6 +749,7 @@ if (_DOMContentsElement && aLayer._zPosition > _DOMContentsElement.style.zIndex)
- (void)insertSublayer:(CALayer)aLayer above:(CALayer)aSublayer
{
var index = aSublayer ? [_sublayers indexOfObjectIdenticalTo:aSublayer] : _sublayers.length;
if (index == CPNotFound)
[CPException raise:"CALayerNotFoundException" reason:"aSublayer is not a sublayer of this layer"];
@@ -762,10 +766,9 @@ if (_DOMContentsElement && aLayer._zPosition > _DOMContentsElement.style.zIndex)
if (aSublayer == aLayer)
return;
// FIXME: EXCEPTION
if (aSublayer._superlayer != self)
{
alert("EXCEPTION");
CPLog.warn("Attempt to replace a sublayer (%s) which is not in the sublayers of the receiver (%s).", [aSublayer description], [self description]);
return;
}
@@ -798,6 +801,7 @@ if (_DOMContentsElement && aLayer._zPosition > _DOMContentsElement.style.zIndex)
layer._runLoopUpdateMask = 0;
}
window.loop = false;
CALayerRegisteredRunLoopUpdates = nil;
}