Fix some style issues in the Web Process part of the Remote Layer Tree code
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 2 Sep 2017 10:48:34 +0000 (10:48 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 2 Sep 2017 10:48:34 +0000 (10:48 +0000)
https://bugs.webkit.org/show_bug.cgi?id=176272

Reviewed by Dan Bernstein.

In bug 176271, the style bot noticed some existing style issues in the UI-side
compositing code. Fix them, because there aren't many and they're straightforward.

* WebProcess/WebPage/Cocoa/RemoteLayerTree/GraphicsLayerCARemote.cpp:
* WebProcess/WebPage/Cocoa/RemoteLayerTree/PlatformCAAnimationRemote.h:
* WebProcess/WebPage/Cocoa/RemoteLayerTree/PlatformCAAnimationRemote.mm:
(WebKit::PlatformCAAnimationRemote::setValues):
* WebProcess/WebPage/Cocoa/RemoteLayerTree/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::appendSublayer):
(WebKit::PlatformCALayerRemote::insertSublayer):
(WebKit::PlatformCALayerRemote::replaceSublayer):
* WebProcess/WebPage/Cocoa/RemoteLayerTree/PlatformCALayerRemote.h:
* WebProcess/WebPage/Cocoa/RemoteLayerTree/PlatformCALayerRemoteCustom.mm:
(WebKit::PlatformCALayerRemoteCustom::clone const):
* WebProcess/WebPage/Cocoa/RemoteLayerTree/PlatformCALayerRemoteTiledBacking.h:
* WebProcess/WebPage/Cocoa/RemoteLayerTree/RemoteLayerTreeContext.h:
* WebProcess/WebPage/Cocoa/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
* WebProcess/WebPage/Cocoa/RemoteLayerTree/RemoteScrollingCoordinator.h:
* WebProcess/WebPage/Cocoa/RemoteLayerTree/RemoteScrollingCoordinator.mm:

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

12 files changed:
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/WebPage/RemoteLayerTree/GraphicsLayerCARemote.cpp
Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.h
Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm
Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp
Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.h
Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteCustom.mm
Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteTiledBacking.h
Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.h
Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm
Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.h
Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.mm

index 6f71902..7ae9a89 100644 (file)
@@ -1,5 +1,33 @@
 2017-09-02  Tim Horton  <timothy_horton@apple.com>
 
+        Fix some style issues in the Web Process part of the Remote Layer Tree code
+        https://bugs.webkit.org/show_bug.cgi?id=176272
+
+        Reviewed by Dan Bernstein.
+
+        In bug 176271, the style bot noticed some existing style issues in the UI-side
+        compositing code. Fix them, because there aren't many and they're straightforward.
+
+        * WebProcess/WebPage/Cocoa/RemoteLayerTree/GraphicsLayerCARemote.cpp:
+        * WebProcess/WebPage/Cocoa/RemoteLayerTree/PlatformCAAnimationRemote.h:
+        * WebProcess/WebPage/Cocoa/RemoteLayerTree/PlatformCAAnimationRemote.mm:
+        (WebKit::PlatformCAAnimationRemote::setValues):
+        * WebProcess/WebPage/Cocoa/RemoteLayerTree/PlatformCALayerRemote.cpp:
+        (WebKit::PlatformCALayerRemote::appendSublayer):
+        (WebKit::PlatformCALayerRemote::insertSublayer):
+        (WebKit::PlatformCALayerRemote::replaceSublayer):
+        * WebProcess/WebPage/Cocoa/RemoteLayerTree/PlatformCALayerRemote.h:
+        * WebProcess/WebPage/Cocoa/RemoteLayerTree/PlatformCALayerRemoteCustom.mm:
+        (WebKit::PlatformCALayerRemoteCustom::clone const):
+        * WebProcess/WebPage/Cocoa/RemoteLayerTree/PlatformCALayerRemoteTiledBacking.h:
+        * WebProcess/WebPage/Cocoa/RemoteLayerTree/RemoteLayerTreeContext.h:
+        * WebProcess/WebPage/Cocoa/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
+        (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
+        * WebProcess/WebPage/Cocoa/RemoteLayerTree/RemoteScrollingCoordinator.h:
+        * WebProcess/WebPage/Cocoa/RemoteLayerTree/RemoteScrollingCoordinator.mm:
+
+2017-09-02  Tim Horton  <timothy_horton@apple.com>
+
         Move Web Process part of the Remote Layer Tree code out of a Mac-specific directory
         https://bugs.webkit.org/show_bug.cgi?id=176271
 
index 2df42e9..c1dcd06 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "config.h"
 #include "GraphicsLayerCARemote.h"
+
 #include "PlatformCAAnimationRemote.h"
 #include "PlatformCALayerRemote.h"
 #include <WebCore/PlatformScreen.h>
index c2d68de..a13cfe5 100644 (file)
@@ -23,8 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef PlatformCAAnimationRemote_h
-#define PlatformCAAnimationRemote_h
+#pragma once
 
 #include <WebCore/PlatformCAAnimation.h>
 #include <wtf/HashMap.h>
@@ -307,5 +306,3 @@ WTF::TextStream& operator<<(WTF::TextStream&, const PlatformCAAnimationRemote::P
 } // namespace WebKit
 
 SPECIALIZE_TYPE_TRAITS_CAANIMATION(WebKit::PlatformCAAnimationRemote, isPlatformCAAnimationRemote())
-
-#endif // PlatformCAAnimationRemote_h
index 06e273c..81f2bb1 100644 (file)
@@ -602,7 +602,7 @@ void PlatformCAAnimationRemote::setValues(const Vector<TransformationMatrix>& va
 {
     if (animationType() != Keyframe)
         return;
-        
+
     Vector<KeyframeValue> keyframes;
     keyframes.reserveInitialCapacity(values.size());
     
@@ -616,7 +616,7 @@ void PlatformCAAnimationRemote::setValues(const Vector<FloatPoint3D>& values)
 {
     if (animationType() != Keyframe)
         return;
-        
+
     Vector<KeyframeValue> keyframes;
     keyframes.reserveInitialCapacity(values.size());
     
@@ -630,7 +630,7 @@ void PlatformCAAnimationRemote::setValues(const Vector<Color>& values)
 {
     if (animationType() != Keyframe)
         return;
-        
+
     Vector<KeyframeValue> keyframes;
     keyframes.reserveInitialCapacity(values.size());
     
@@ -646,7 +646,7 @@ void PlatformCAAnimationRemote::setValues(const Vector<RefPtr<FilterOperation>>&
     
     if (animationType() != Keyframe)
         return;
-        
+
     Vector<KeyframeValue> keyframes;
     keyframes.reserveInitialCapacity(values.size());
     
index 0d14eed..27b149d 100644 (file)
@@ -277,7 +277,7 @@ void PlatformCALayerRemote::removeAllSublayers()
 
 void PlatformCALayerRemote::appendSublayer(PlatformCALayer& layer)
 {
-    Ref<PlatformCALayer> layerProtector(layer);
+    Ref<PlatformCALayer> protectedLayer(layer);
 
     layer.removeFromSuperlayer();
     m_children.append(&layer);
@@ -287,7 +287,7 @@ void PlatformCALayerRemote::appendSublayer(PlatformCALayer& layer)
 
 void PlatformCALayerRemote::insertSublayer(PlatformCALayer& layer, size_t index)
 {
-    Ref<PlatformCALayer> layerProtector(layer);
+    Ref<PlatformCALayer> protectedLayer(layer);
 
     layer.removeFromSuperlayer();
     m_children.insert(index, &layer);
@@ -298,7 +298,7 @@ void PlatformCALayerRemote::insertSublayer(PlatformCALayer& layer, size_t index)
 void PlatformCALayerRemote::replaceSublayer(PlatformCALayer& reference, PlatformCALayer& layer)
 {
     ASSERT(reference.superlayer() == this);
-    Ref<PlatformCALayer> layerProtector(layer);
+    Ref<PlatformCALayer> protectedLayer(layer);
 
     layer.removeFromSuperlayer();
     size_t referenceIndex = m_children.find(&reference);
index a9635ef..50e859f 100644 (file)
@@ -195,7 +195,7 @@ public:
     RemoteLayerTreeContext* context() const { return m_context; }
 
 protected:
-    PlatformCALayerRemote(WebCore::PlatformCALayer::LayerType, WebCore::PlatformCALayerClient* owner, RemoteLayerTreeContext& context);
+    PlatformCALayerRemote(WebCore::PlatformCALayer::LayerType, WebCore::PlatformCALayerClient* owner, RemoteLayerTreeContext&);
     PlatformCALayerRemote(const PlatformCALayerRemote&, WebCore::PlatformCALayerClient*, RemoteLayerTreeContext&);
 
     void updateClonedLayerProperties(PlatformCALayerRemote& clone, bool copyContents = true) const;
index c69b9b3..7e6d665 100644 (file)
@@ -109,9 +109,9 @@ Ref<WebCore::PlatformCALayer> PlatformCALayerRemoteCustom::clone(PlatformCALayer
         if ([platformLayer() isKindOfClass:getAVPlayerLayerClass()]) {
             clonedLayer = adoptNS([allocAVPlayerLayerInstance() init]);
 
-            AVPlayerLayerdestinationPlayerLayer = static_cast<AVPlayerLayer *>(clonedLayer.get());
-            AVPlayerLayersourcePlayerLayer = static_cast<AVPlayerLayer *>(platformLayer());
-            dispatch_async(dispatch_get_main_queue(), ^{
+            AVPlayerLayer *destinationPlayerLayer = static_cast<AVPlayerLayer *>(clonedLayer.get());
+            AVPlayerLayer *sourcePlayerLayer = static_cast<AVPlayerLayer *>(platformLayer());
+            dispatch_async(dispatch_get_main_queue(), [destinationPlayerLayer, sourcePlayerLayer] {
                 [destinationPlayerLayer setPlayer:[sourcePlayerLayer player]];
             });
         } else {
index 0ddfce8..d9734b3 100644 (file)
@@ -23,8 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef PlatformCALayerRemoteTiledBacking_h
-#define PlatformCALayerRemoteTiledBacking_h
+#pragma once
 
 #include "PlatformCALayerRemote.h"
 #include <WebCore/TileController.h>
@@ -71,5 +70,3 @@ private:
 };
 
 } // namespace WebKit
-
-#endif // PlatformCALayerRemoteTiledBacking_h
index 25548ea..9a7bff1 100644 (file)
@@ -23,8 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef RemoteLayerTreeContext_h
-#define RemoteLayerTreeContext_h
+#pragma once
 
 #include "LayerTreeContext.h"
 #include "RemoteLayerBackingStoreCollection.h"
@@ -95,5 +94,3 @@ private:
 };
 
 } // namespace WebKit
-
-#endif // RemoteLayerTreeContext_h
index f146fa0..6545cf2 100644 (file)
@@ -346,10 +346,10 @@ void RemoteLayerTreeDrawingArea::flushLayers()
     if (m_scrolledViewExposedRect)
         visibleRect.intersect(m_scrolledViewExposedRect.value());
 
-    RefPtr<WebPage> retainedPage = &m_webPage;
-    [CATransaction addCommitHandler:[retainedPage] {
-        if (Page* corePage = retainedPage->corePage()) {
-            if (Frame* coreFrame = retainedPage->mainFrame())
+    RefPtr<WebPage> protectedWebPage = &m_webPage;
+    [CATransaction addCommitHandler:[protectedWebPage] {
+        if (Page* corePage = protectedWebPage->corePage()) {
+            if (Frame* coreFrame = protectedWebPage->mainFrame())
                 corePage->inspectorController().didComposite(*coreFrame);
         }
     } forPhase:kCATransactionPhasePostCommit];
index cf5dced..8e64935 100644 (file)
@@ -23,8 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef RemoteScrollingCoordinator_h
-#define RemoteScrollingCoordinator_h
+#pragma once
 
 #if ENABLE(ASYNC_SCROLLING)
 
@@ -82,5 +81,3 @@ private:
 SPECIALIZE_TYPE_TRAITS_SCROLLING_COORDINATOR(WebKit::RemoteScrollingCoordinator, isRemoteScrollingCoordinator());
 
 #endif // ENABLE(ASYNC_SCROLLING)
-
-#endif // RemoteScrollingCoordinator_h
index 8864152..e780370 100644 (file)
@@ -36,9 +36,9 @@
 #import "WebCoreArgumentCoders.h"
 #import "WebPage.h"
 #import "WebProcess.h"
-#import <WebCore/GraphicsLayer.h>
-#import <WebCore/FrameView.h>
 #import <WebCore/Frame.h>
+#import <WebCore/FrameView.h>
+#import <WebCore/GraphicsLayer.h>
 #import <WebCore/RenderLayerCompositor.h>
 #import <WebCore/RenderView.h>
 #import <WebCore/ScrollingTreeFixedNode.h>