Title: [197593] trunk/Source/WebCore
Revision
197593
Author
[email protected]
Date
2016-03-04 15:32:14 -0800 (Fri, 04 Mar 2016)

Log Message

Use BoxExtent instead of EdgeSet in TileController
https://bugs.webkit.org/show_bug.cgi?id=155040

Reviewed by Zalan Bujtas.

Remove EdgeSet, which was very similar to the existing BoxExtent, and use BoxExtent
in TileController.

* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/EdgeSet.h: Removed.
(WebCore::EdgeSet::EdgeSet): Deleted.
(WebCore::EdgeSet::top): Deleted.
(WebCore::EdgeSet::setTop): Deleted.
(WebCore::EdgeSet::right): Deleted.
(WebCore::EdgeSet::setRight): Deleted.
(WebCore::EdgeSet::bottom): Deleted.
(WebCore::EdgeSet::setBottom): Deleted.
(WebCore::EdgeSet::left): Deleted.
(WebCore::EdgeSet::setLeft): Deleted.
(WebCore::EdgeSet::operator==): Deleted.
(WebCore::EdgeSet::operator!=): Deleted.
* platform/graphics/ca/TileController.cpp:
(WebCore::TileController::setHasMargins):
* platform/graphics/ca/TileController.h:

Modified Paths

Removed Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (197592 => 197593)


--- trunk/Source/WebCore/ChangeLog	2016-03-04 23:29:31 UTC (rev 197592)
+++ trunk/Source/WebCore/ChangeLog	2016-03-04 23:32:14 UTC (rev 197593)
@@ -1,3 +1,30 @@
+2016-03-04  Simon Fraser  <[email protected]>
+
+        Use BoxExtent instead of EdgeSet in TileController
+        https://bugs.webkit.org/show_bug.cgi?id=155040
+
+        Reviewed by Zalan Bujtas.
+
+        Remove EdgeSet, which was very similar to the existing BoxExtent, and use BoxExtent
+        in TileController.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * platform/graphics/EdgeSet.h: Removed.
+        (WebCore::EdgeSet::EdgeSet): Deleted.
+        (WebCore::EdgeSet::top): Deleted.
+        (WebCore::EdgeSet::setTop): Deleted.
+        (WebCore::EdgeSet::right): Deleted.
+        (WebCore::EdgeSet::setRight): Deleted.
+        (WebCore::EdgeSet::bottom): Deleted.
+        (WebCore::EdgeSet::setBottom): Deleted.
+        (WebCore::EdgeSet::left): Deleted.
+        (WebCore::EdgeSet::setLeft): Deleted.
+        (WebCore::EdgeSet::operator==): Deleted.
+        (WebCore::EdgeSet::operator!=): Deleted.
+        * platform/graphics/ca/TileController.cpp:
+        (WebCore::TileController::setHasMargins):
+        * platform/graphics/ca/TileController.h:
+
 2016-03-04  Brent Fulgham  <[email protected]>
 
         [WK2] Gather resource load statistics

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (197592 => 197593)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2016-03-04 23:29:31 UTC (rev 197592)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2016-03-04 23:32:14 UTC (rev 197593)
@@ -460,7 +460,6 @@
 		0F15ED5C1B7EC7C500EDDFEB /* WillChangeData.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F15ED5A1B7EC7C500EDDFEB /* WillChangeData.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		0F1774801378B772009DA76A /* ScrollAnimatorIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F17747E1378B771009DA76A /* ScrollAnimatorIOS.h */; };
 		0F1774811378B772009DA76A /* ScrollAnimatorIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F17747F1378B772009DA76A /* ScrollAnimatorIOS.mm */; };
-		0F2884001C7CF7D500888E9A /* EdgeSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2883FF1C7CF7D500888E9A /* EdgeSet.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		0F36E7371BD1837A002DB891 /* LayoutPoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F36E7361BD1837A002DB891 /* LayoutPoint.cpp */; };
 		0F36E7391BD184B9002DB891 /* LayoutSize.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F36E7381BD184B9002DB891 /* LayoutSize.cpp */; };
 		0F3C725E1974874B00AEDD0C /* ImageSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F3C725D1974874B00AEDD0C /* ImageSource.cpp */; };
@@ -7851,7 +7850,6 @@
 		0F15ED5A1B7EC7C500EDDFEB /* WillChangeData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WillChangeData.h; sourceTree = "<group>"; };
 		0F17747E1378B771009DA76A /* ScrollAnimatorIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollAnimatorIOS.h; sourceTree = "<group>"; };
 		0F17747F1378B772009DA76A /* ScrollAnimatorIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ScrollAnimatorIOS.mm; sourceTree = "<group>"; };
-		0F2883FF1C7CF7D500888E9A /* EdgeSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EdgeSet.h; sourceTree = "<group>"; };
 		0F36E7361BD1837A002DB891 /* LayoutPoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LayoutPoint.cpp; sourceTree = "<group>"; };
 		0F36E7381BD184B9002DB891 /* LayoutSize.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LayoutSize.cpp; sourceTree = "<group>"; };
 		0F3C725D1974874B00AEDD0C /* ImageSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ImageSource.cpp; sourceTree = "<group>"; };
@@ -21865,7 +21863,6 @@
 				2D29ECC2192ECC8300984B78 /* DisplayRefreshMonitorClient.h */,
 				2D29ECC3192ECC8300984B78 /* DisplayRefreshMonitorManager.cpp */,
 				2D29ECC4192ECC8300984B78 /* DisplayRefreshMonitorManager.h */,
-				0F2883FF1C7CF7D500888E9A /* EdgeSet.h */,
 				6E67D2A81280E8BD008758F7 /* Extensions3D.h */,
 				B275353A0B053814002CE64F /* FloatPoint.cpp */,
 				B275353B0B053814002CE64F /* FloatPoint.h */,
@@ -25283,7 +25280,6 @@
 				E125F8421824253A00D84CD9 /* CryptoAlgorithmAES_CBC.h in Headers */,
 				E1FE137B184D21BB00892F13 /* CryptoAlgorithmAES_KW.h in Headers */,
 				E125F83A1824104800D84CD9 /* CryptoAlgorithmAesCbcParams.h in Headers */,
-				0F2884001C7CF7D500888E9A /* EdgeSet.h in Headers */,
 				E19AC3F71824E5D100349426 /* CryptoAlgorithmAesKeyGenParams.h in Headers */,
 				E157A8ED181851AC009F821D /* CryptoAlgorithmDescriptionBuilder.h in Headers */,
 				E125F8321822F11B00D84CD9 /* CryptoAlgorithmHMAC.h in Headers */,

Deleted: trunk/Source/WebCore/platform/graphics/EdgeSet.h (197592 => 197593)


--- trunk/Source/WebCore/platform/graphics/EdgeSet.h	2016-03-04 23:29:31 UTC (rev 197592)
+++ trunk/Source/WebCore/platform/graphics/EdgeSet.h	2016-03-04 23:32:14 UTC (rev 197593)
@@ -1,76 +0,0 @@
-/*
- * Copyright (C) 2016 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef EdgeSet_h
-#define EdgeSet_h
-
-namespace WebCore {
-
-template <typename T>
-class EdgeSet {
-public:
-    EdgeSet(T top, T right, T bottom, T left)
-        : m_top(top)
-        , m_right(right)
-        , m_bottom(bottom)
-        , m_left(left)
-    {
-    }
-
-    T top() const { return m_top; }
-    void setTop(T top) { m_top = top; }
-
-    T right() const { return m_right; }
-    void setRight(T right) { m_right = right; }
-
-    T bottom() const { return m_bottom; }
-    void setBottom(T bottom) { m_bottom = bottom; }
-
-    T left() const { return m_left; }
-    void setLeft(T left) { m_left = left; }
-
-    bool operator==(const EdgeSet<T>& b) const
-    {
-        return top() == b.top()
-            && right() == b.right()
-            && bottom() == b.bottom()
-            && left() == b.left();
-    }
-
-    bool operator!=(const EdgeSet<T>& b) const
-    {
-        return !(*this == b);
-    }
-
-private:
-    T m_top;
-    T m_right;
-    T m_bottom;
-    T m_left;
-};
-
-} // namespace WebCore
-
-#endif // EdgeSet_h

Modified: trunk/Source/WebCore/platform/graphics/ca/TileController.cpp (197592 => 197593)


--- trunk/Source/WebCore/platform/graphics/ca/TileController.cpp	2016-03-04 23:29:31 UTC (rev 197592)
+++ trunk/Source/WebCore/platform/graphics/ca/TileController.cpp	2016-03-04 23:32:14 UTC (rev 197593)
@@ -613,7 +613,7 @@
 
 void TileController::setHasMargins(bool marginTop, bool marginBottom, bool marginLeft, bool marginRight)
 {
-    EdgeSet<bool> marginEdges(marginTop, marginRight, marginBottom, marginLeft);
+    BoxExtent<bool> marginEdges(marginTop, marginRight, marginBottom, marginLeft);
     if (marginEdges == m_marginEdges)
         return;
     

Modified: trunk/Source/WebCore/platform/graphics/ca/TileController.h (197592 => 197593)


--- trunk/Source/WebCore/platform/graphics/ca/TileController.h	2016-03-04 23:29:31 UTC (rev 197592)
+++ trunk/Source/WebCore/platform/graphics/ca/TileController.h	2016-03-04 23:32:14 UTC (rev 197593)
@@ -26,9 +26,9 @@
 #ifndef TileController_h
 #define TileController_h
 
-#include "EdgeSet.h"
 #include "FloatRect.h"
 #include "IntRect.h"
+#include "LengthBox.h"
 #include "PlatformCALayer.h"
 #include "PlatformCALayerClient.h"
 #include "TiledBacking.h"
@@ -213,7 +213,7 @@
     
     Scrollability m_scrollability { HorizontallyScrollable | VerticallyScrollable };
     
-    EdgeSet<bool> m_marginEdges;
+    BoxExtent<bool> m_marginEdges;
     
     bool m_isInWindow { false };
     bool m_scrollingPerformanceLoggingEnabled { false };
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to