Title: [185080] trunk/Source
Revision
185080
Author
ander...@apple.com
Date
2015-06-01 15:43:45 -0700 (Mon, 01 Jun 2015)

Log Message

WAKScrollView.h cannot be imported standalone
https://bugs.webkit.org/show_bug.cgi?id=145529

Reviewed by Dan Bernstein.

Source/WebCore:

* page/mac/WebCoreFrameView.h:
Remove the __cplusplus #ifdefs since WebCoreFrameView.h is only used by Objective-C++ code.
(The different non-C++ method declarations were wrong anyway!)

* platform/ScrollTypes.h:
Remove the #ifdef __cplusplus surrounding the code, add header includes to make the file self-contained,
and reformat the enum definitions.

Source/WebKit/mac:

Don't migrate WAKScrollView.h, it's not used outside of WebKit.

* MigrateHeaders.make:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (185079 => 185080)


--- trunk/Source/WebCore/ChangeLog	2015-06-01 22:40:47 UTC (rev 185079)
+++ trunk/Source/WebCore/ChangeLog	2015-06-01 22:43:45 UTC (rev 185080)
@@ -1,3 +1,18 @@
+2015-06-01  Anders Carlsson  <ander...@apple.com>
+
+        WAKScrollView.h cannot be imported standalone
+        https://bugs.webkit.org/show_bug.cgi?id=145529
+
+        Reviewed by Dan Bernstein.
+
+        * page/mac/WebCoreFrameView.h:
+        Remove the __cplusplus #ifdefs since WebCoreFrameView.h is only used by Objective-C++ code.
+        (The different non-C++ method declarations were wrong anyway!)
+
+        * platform/ScrollTypes.h:
+        Remove the #ifdef __cplusplus surrounding the code, add header includes to make the file self-contained,
+        and reformat the enum definitions.
+
 2015-06-01  Alex Christensen  <achristen...@webkit.org>
 
         [Content Extensions] resource-type and load-type should be independent.

Modified: trunk/Source/WebCore/page/mac/WebCoreFrameView.h (185079 => 185080)


--- trunk/Source/WebCore/page/mac/WebCoreFrameView.h	2015-06-01 22:40:47 UTC (rev 185079)
+++ trunk/Source/WebCore/page/mac/WebCoreFrameView.h	2015-06-01 22:43:45 UTC (rev 185080)
@@ -23,38 +23,26 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#include "ScrollTypes.h"
+#import "ScrollTypes.h"
+#import <wtf/Platform.h>
 
-#ifdef __cplusplus
 #if PLATFORM(IOS)
-#include "WAKAppKitStubs.h"
+#import "WAKAppKitStubs.h"
 #endif
-#endif
 
-// WTF_PLATFORM_IOS
-#ifdef __cplusplus
 namespace WebCore {
-    class Frame;
+class Frame;
 }
-#endif
 
 @protocol WebCoreFrameScrollView
-// WTF_PLATFORM_IOS
-#ifdef __cplusplus
 - (void)setScrollingModes:(WebCore::ScrollbarMode)hMode vertical:(WebCore::ScrollbarMode)vMode andLock:(BOOL)lock;
 - (void)scrollingModes:(WebCore::ScrollbarMode*)hMode vertical:(WebCore::ScrollbarMode*)vMode;
-#else
-- (void)setScrollingModes:(int)hMode vertical:(int)vMode andLock:(BOOL)lock;
-- (void)scrollingModes:(int*)hMode vertical:(int*)vMode;
-#endif
+
 - (void)setScrollBarsSuppressed:(BOOL)suppressed repaintOnUnsuppress:(BOOL)repaint;
 - (void)setScrollOrigin:(NSPoint)origin updatePositionAtAll:(BOOL)updatePositionAtAll immediately:(BOOL)updatePositionImmediately;
 - (NSPoint)scrollOrigin;
 @end
 
 @protocol WebCoreFrameView
-// WTF_PLATFORM_IOS
-#ifdef __cplusplus
 - (WebCore::Frame*)_web_frame;
-#endif
 @end

Modified: trunk/Source/WebCore/platform/ScrollTypes.h (185079 => 185080)


--- trunk/Source/WebCore/platform/ScrollTypes.h	2015-06-01 22:40:47 UTC (rev 185079)
+++ trunk/Source/WebCore/platform/ScrollTypes.h	2015-06-01 22:43:45 UTC (rev 185080)
@@ -26,167 +26,167 @@
 #ifndef ScrollTypes_h
 #define ScrollTypes_h
 
-#ifdef __cplusplus
+#include <cstdint>
+#include <wtf/Assertions.h>
 
 namespace WebCore {
 
-    enum ScrollDirection : uint8_t {
-        ScrollUp,
-        ScrollDown,
-        ScrollLeft,
-        ScrollRight
-    };
+enum ScrollDirection : uint8_t {
+    ScrollUp,
+    ScrollDown,
+    ScrollLeft,
+    ScrollRight
+};
 
-    enum ScrollLogicalDirection : uint8_t {
-        ScrollBlockDirectionBackward,
-        ScrollBlockDirectionForward,
-        ScrollInlineDirectionBackward,
-        ScrollInlineDirectionForward
-    };
-    
-    
-    inline ScrollDirection logicalToPhysical(ScrollLogicalDirection direction, bool isVertical, bool isFlipped) 
-    {
-        switch (direction) {
-        case ScrollBlockDirectionBackward: {
-            if (isVertical) {
-                if (!isFlipped)
-                    return ScrollUp;
-                return ScrollDown;
-            } else {
-                if (!isFlipped)
-                    return ScrollLeft;
-                return ScrollRight;
-            }
-            break;
-        }
-        case ScrollBlockDirectionForward: {
-            if (isVertical) {
-                if (!isFlipped)
-                    return ScrollDown;
+enum ScrollLogicalDirection : uint8_t {
+    ScrollBlockDirectionBackward,
+    ScrollBlockDirectionForward,
+    ScrollInlineDirectionBackward,
+    ScrollInlineDirectionForward
+};
+
+
+inline ScrollDirection logicalToPhysical(ScrollLogicalDirection direction, bool isVertical, bool isFlipped)
+{
+    switch (direction) {
+    case ScrollBlockDirectionBackward: {
+        if (isVertical) {
+            if (!isFlipped)
                 return ScrollUp;
-            } else {
-                if (!isFlipped)
-                    return ScrollRight;
+            return ScrollDown;
+        } else {
+            if (!isFlipped)
                 return ScrollLeft;
-            }
-            break;
+            return ScrollRight;
         }
-        case ScrollInlineDirectionBackward: {
-            if (isVertical) {
-                if (!isFlipped)
-                    return ScrollLeft;
+        break;
+    }
+    case ScrollBlockDirectionForward: {
+        if (isVertical) {
+            if (!isFlipped)
+                return ScrollDown;
+            return ScrollUp;
+        } else {
+            if (!isFlipped)
                 return ScrollRight;
-            } else {
-                if (!isFlipped)
-                    return ScrollUp;
-                return ScrollDown;
-            }
-            break;
+            return ScrollLeft;
         }
-        case ScrollInlineDirectionForward: {
-            if (isVertical) {
-                if (!isFlipped)
-                    return ScrollRight;
+        break;
+    }
+    case ScrollInlineDirectionBackward: {
+        if (isVertical) {
+            if (!isFlipped)
                 return ScrollLeft;
-            } else {
-                if (!isFlipped)
-                    return ScrollDown;
+            return ScrollRight;
+        } else {
+            if (!isFlipped)
                 return ScrollUp;
-            }
-            break;
+            return ScrollDown;
         }
-        default:
-            ASSERT_NOT_REACHED();
-            break;
+        break;
+    }
+    case ScrollInlineDirectionForward: {
+        if (isVertical) {
+            if (!isFlipped)
+                return ScrollRight;
+            return ScrollLeft;
+        } else {
+            if (!isFlipped)
+                return ScrollDown;
+            return ScrollUp;
         }
-        return ScrollUp;
+        break;
     }
+    default:
+        ASSERT_NOT_REACHED();
+        break;
+    }
+    return ScrollUp;
+}
 
-    enum ScrollGranularity : uint8_t {
-        ScrollByLine,
-        ScrollByPage,
-        ScrollByDocument,
-        ScrollByPixel,
-        ScrollByPrecisePixel
-    };
+enum ScrollGranularity : uint8_t {
+    ScrollByLine,
+    ScrollByPage,
+    ScrollByDocument,
+    ScrollByPixel,
+    ScrollByPrecisePixel
+};
 
-    enum ScrollElasticity {
-        ScrollElasticityAutomatic,
-        ScrollElasticityNone,
-        ScrollElasticityAllowed
-    };
+enum ScrollElasticity {
+    ScrollElasticityAutomatic,
+    ScrollElasticityNone,
+    ScrollElasticityAllowed
+};
 
-    enum ScrollbarOrientation { HorizontalScrollbar, VerticalScrollbar };
+enum ScrollbarOrientation { HorizontalScrollbar, VerticalScrollbar };
 
-    enum ScrollbarMode { ScrollbarAuto, ScrollbarAlwaysOff, ScrollbarAlwaysOn };
+enum ScrollbarMode { ScrollbarAuto, ScrollbarAlwaysOff, ScrollbarAlwaysOn };
 
-    enum ScrollbarControlSize { RegularScrollbar, SmallScrollbar };
+enum ScrollbarControlSize { RegularScrollbar, SmallScrollbar };
 
-    enum class ScrollEventAxis { Horizontal, Vertical };
+enum class ScrollEventAxis { Horizontal, Vertical };
 
-    typedef unsigned ScrollbarControlState;
+typedef unsigned ScrollbarControlState;
 
-    enum ScrollbarControlStateMask {
-        ActiveScrollbarState = 1,
-        EnabledScrollbarState = 1 << 1,
-        PressedScrollbarState = 1 << 2
-    };
+enum ScrollbarControlStateMask {
+    ActiveScrollbarState = 1,
+    EnabledScrollbarState = 1 << 1,
+    PressedScrollbarState = 1 << 2
+};
 
-    enum ScrollbarPart {
-        NoPart = 0,
-        BackButtonStartPart = 1,
-        ForwardButtonStartPart = 1 << 1,
-        BackTrackPart = 1 << 2,
-        ThumbPart = 1 << 3,
-        ForwardTrackPart = 1 << 4,
-        BackButtonEndPart = 1 << 5,
-        ForwardButtonEndPart = 1 << 6,
-        ScrollbarBGPart = 1 << 7,
-        TrackBGPart = 1 << 8,
-        AllParts = 0xffffffff
-    };
+enum ScrollbarPart {
+    NoPart = 0,
+    BackButtonStartPart = 1,
+    ForwardButtonStartPart = 1 << 1,
+    BackTrackPart = 1 << 2,
+    ThumbPart = 1 << 3,
+    ForwardTrackPart = 1 << 4,
+    BackButtonEndPart = 1 << 5,
+    ForwardButtonEndPart = 1 << 6,
+    ScrollbarBGPart = 1 << 7,
+    TrackBGPart = 1 << 8,
+    AllParts = 0xffffffff
+};
 
-    enum ScrollbarButtonsPlacement {
-        ScrollbarButtonsNone,
-        ScrollbarButtonsSingle,
-        ScrollbarButtonsDoubleStart,
-        ScrollbarButtonsDoubleEnd,
-        ScrollbarButtonsDoubleBoth
-    };
+enum ScrollbarButtonsPlacement {
+    ScrollbarButtonsNone,
+    ScrollbarButtonsSingle,
+    ScrollbarButtonsDoubleStart,
+    ScrollbarButtonsDoubleEnd,
+    ScrollbarButtonsDoubleBoth
+};
 
-    enum class ScrollbarStyle {
-        AlwaysVisible,
-        Overlay
-    };
-    
-    enum ScrollbarOverlayStyle {
-        ScrollbarOverlayStyleDefault,
-        ScrollbarOverlayStyleDark,
-        ScrollbarOverlayStyleLight
-    };
+enum class ScrollbarStyle {
+    AlwaysVisible,
+    Overlay
+};
 
-    enum ScrollbarOverlayState {
-        ScrollbarOverlayStateHidden,
-        ScrollbarOverlayStateThumbShown,
-        ScrollbarOverlayStateAllShown,
-        ScrollbarOverlayStatePulseThumb
-    };
+enum ScrollbarOverlayStyle {
+    ScrollbarOverlayStyleDefault,
+    ScrollbarOverlayStyleDark,
+    ScrollbarOverlayStyleLight
+};
 
-    typedef unsigned ScrollbarControlPartMask;
+enum ScrollbarOverlayState {
+    ScrollbarOverlayStateHidden,
+    ScrollbarOverlayStateThumbShown,
+    ScrollbarOverlayStateAllShown,
+    ScrollbarOverlayStatePulseThumb
+};
 
-    enum ScrollPinningBehavior {
-        DoNotPin,
-        PinToTop,
-        PinToBottom
-    };
+typedef unsigned ScrollbarControlPartMask;
 
-    enum ScrollBehaviorForFixedElements {
-        StickToDocumentBounds,
-        StickToViewportBounds
-    };
+enum ScrollPinningBehavior {
+    DoNotPin,
+    PinToTop,
+    PinToBottom
+};
+
+enum ScrollBehaviorForFixedElements {
+    StickToDocumentBounds,
+    StickToViewportBounds
+};
+
 }
 
-#endif // __cplusplus
-
 #endif

Modified: trunk/Source/WebKit/mac/ChangeLog (185079 => 185080)


--- trunk/Source/WebKit/mac/ChangeLog	2015-06-01 22:40:47 UTC (rev 185079)
+++ trunk/Source/WebKit/mac/ChangeLog	2015-06-01 22:43:45 UTC (rev 185080)
@@ -1,3 +1,14 @@
+2015-06-01  Anders Carlsson  <ander...@apple.com>
+
+        WAKScrollView.h cannot be imported standalone
+        https://bugs.webkit.org/show_bug.cgi?id=145529
+
+        Reviewed by Dan Bernstein.
+
+        Don't migrate WAKScrollView.h, it's not used outside of WebKit.
+
+        * MigrateHeaders.make:
+
 2015-05-29  Anders Carlsson  <ander...@apple.com>
 
         Make the header replace rule more restrictive and get rid of a special case

Modified: trunk/Source/WebKit/mac/MigrateHeaders.make (185079 => 185080)


--- trunk/Source/WebKit/mac/MigrateHeaders.make	2015-06-01 22:40:47 UTC (rev 185079)
+++ trunk/Source/WebKit/mac/MigrateHeaders.make	2015-06-01 22:43:45 UTC (rev 185080)
@@ -206,7 +206,6 @@
     $(PRIVATE_HEADERS_DIR)/SystemMemory.h \
     $(PRIVATE_HEADERS_DIR)/WAKAppKitStubs.h \
     $(PRIVATE_HEADERS_DIR)/WAKResponder.h \
-    $(PRIVATE_HEADERS_DIR)/WAKScrollView.h \
     $(PRIVATE_HEADERS_DIR)/WAKView.h \
     $(PRIVATE_HEADERS_DIR)/WAKWindow.h \
     $(PRIVATE_HEADERS_DIR)/WKContentObservation.h \
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to