Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / cocoa / nsview_additions.mm
index 3334400..aaced22 100644 (file)
     [child cr_recursivelySetNeedsDisplay:flag];
 }
 
+- (BOOL)cr_supportsLayerSquashing {
+  return [self respondsToSelector:@selector(setCanDrawSubviewsIntoLayer:)];
+}
+
 - (void)cr_setWantsLayer:(BOOL)wantsLayer
            withSquashing:(BOOL)squashing {
   if (!CommandLine::ForCurrentProcess()->HasSwitch(
   if (CommandLine::ForCurrentProcess()->HasSwitch(
           switches::kDisableCoreAnimationLayerSquashing))
     return;
-  if ([self respondsToSelector:@selector(setCanDrawSubviewsIntoLayer:)])
+  if ([self cr_supportsLayerSquashing])
     [self setCanDrawSubviewsIntoLayer:squashing];
 }