Removing using namespace WebCore from WebLayer
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Nov 2018 01:02:25 +0000 (01:02 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Nov 2018 01:02:25 +0000 (01:02 +0000)
https://bugs.webkit.org/show_bug.cgi?id=191870
<rdar://problem/46192206>

Rubber-stamped by Sam Weinig.

Remove "using namespace WebCore" from WebLayer.mm
because it will cause type clashes in unified source
builds.

* platform/graphics/mac/WebLayer.mm:
(-[WebLayer drawInContext:]):
(-[WebSimpleLayer setNeedsDisplay]):
(-[WebSimpleLayer setNeedsDisplayInRect:]):
(-[WebSimpleLayer display]):
(-[WebSimpleLayer drawInContext:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238410 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/mac/WebLayer.mm

index 8b593a9..0f74f7a 100644 (file)
@@ -1,3 +1,22 @@
+2018-11-20  Dean Jackson  <dino@apple.com>
+
+        Removing using namespace WebCore from WebLayer
+        https://bugs.webkit.org/show_bug.cgi?id=191870
+        <rdar://problem/46192206>
+
+        Rubber-stamped by Sam Weinig.
+
+        Remove "using namespace WebCore" from WebLayer.mm
+        because it will cause type clashes in unified source
+        builds.
+
+        * platform/graphics/mac/WebLayer.mm:
+        (-[WebLayer drawInContext:]):
+        (-[WebSimpleLayer setNeedsDisplay]):
+        (-[WebSimpleLayer setNeedsDisplayInRect:]):
+        (-[WebSimpleLayer display]):
+        (-[WebSimpleLayer drawInContext:]):
+
 2018-11-20  Ryosuke Niwa  <rniwa@webkit.org>
 
         Input element gains focus when a selectstart event listener on document prevents the default action
index 1103d37..808804b 100644 (file)
@@ -39,8 +39,6 @@
 #import "WebCoreThread.h"
 #endif
 
-using namespace WebCore;
-
 #if PLATFORM(IOS_FAMILY)
 @interface WebLayer(Private)
 - (void)drawScaledContentsInContext:(CGContextRef)context;
@@ -51,10 +49,10 @@ using namespace WebCore;
 
 - (void)drawInContext:(CGContextRef)context
 {
-    PlatformCALayer* layer = PlatformCALayer::platformCALayer((__bridge void*)self);
+    WebCore::PlatformCALayer* layer = WebCore::PlatformCALayer::platformCALayer((__bridge void*)self);
     if (layer) {
-        PlatformCALayer::RepaintRectList rectsToPaint = PlatformCALayer::collectRectsToPaint(context, layer);
-        PlatformCALayer::drawLayerContents(context, layer, rectsToPaint, self.isRenderingInContext ? GraphicsLayerPaintSnapshotting : GraphicsLayerPaintNormal);
+        WebCore::PlatformCALayer::RepaintRectList rectsToPaint = WebCore::PlatformCALayer::collectRectsToPaint(context, layer);
+        WebCore::PlatformCALayer::drawLayerContents(context, layer, rectsToPaint, self.isRenderingInContext ? WebCore::GraphicsLayerPaintSnapshotting : WebCore::GraphicsLayerPaintNormal);
     }
 }
 
@@ -81,20 +79,20 @@ using namespace WebCore;
 
 - (void)setNeedsDisplay
 {
-    PlatformCALayer* layer = PlatformCALayer::platformCALayer((__bridge void*)self);
+    WebCore::PlatformCALayer* layer = WebCore::PlatformCALayer::platformCALayer((__bridge void*)self);
     if (layer && layer->owner() && layer->owner()->platformCALayerDrawsContent())
         [super setNeedsDisplay];
 }
 
 - (void)setNeedsDisplayInRect:(CGRect)dirtyRect
 {
-    PlatformCALayer* platformLayer = PlatformCALayer::platformCALayer((__bridge void*)self);
+    WebCore::PlatformCALayer* platformLayer = WebCore::PlatformCALayer::platformCALayer((__bridge void*)self);
     if (!platformLayer) {
         [super setNeedsDisplayInRect:dirtyRect];
         return;
     }
 
-    if (PlatformCALayerClient* layerOwner = platformLayer->owner()) {
+    if (WebCore::PlatformCALayerClient* layerOwner = platformLayer->owner()) {
         if (layerOwner->platformCALayerDrawsContent()) {
             [super setNeedsDisplayInRect:dirtyRect];
 
@@ -115,7 +113,7 @@ using namespace WebCore;
 #endif
     ASSERT(isMainThread());
     [super display];
-    PlatformCALayer* layer = PlatformCALayer::platformCALayer((__bridge void*)self);
+    WebCore::PlatformCALayer* layer = WebCore::PlatformCALayer::platformCALayer((__bridge void*)self);
     if (layer && layer->owner())
         layer->owner()->platformCALayerLayerDidDisplay(layer);
 }
@@ -127,14 +125,14 @@ using namespace WebCore;
         WebThreadLock();
 #endif
     ASSERT(isMainThread());
-    PlatformCALayer* layer = PlatformCALayer::platformCALayer((__bridge void*)self);
+    WebCore::PlatformCALayer* layer = WebCore::PlatformCALayer::platformCALayer((__bridge void*)self);
     if (layer && layer->owner()) {
-        GraphicsContext graphicsContext(context);
+        WebCore::GraphicsContext graphicsContext(context);
         graphicsContext.setIsCALayerContext(true);
         graphicsContext.setIsAcceleratedContext(layer->acceleratesDrawing());
 
-        FloatRect clipBounds = CGContextGetClipBoundingBox(context);
-        layer->owner()->platformCALayerPaintContents(layer, graphicsContext, clipBounds, self.isRenderingInContext ? GraphicsLayerPaintSnapshotting : GraphicsLayerPaintNormal);
+        WebCore::FloatRect clipBounds = CGContextGetClipBoundingBox(context);
+        layer->owner()->platformCALayerPaintContents(layer, graphicsContext, clipBounds, self.isRenderingInContext ? WebCore::GraphicsLayerPaintSnapshotting : WebCore::GraphicsLayerPaintNormal);
     }
 }