From e60d18caf80a57fe716836c72fa8f47b34fe2ae9 Mon Sep 17 00:00:00 2001 From: "burg@cs.washington.edu" Date: Wed, 27 Aug 2014 23:29:28 +0000 Subject: [PATCH] Enums in ScrollTypes and PlatformWheelEvent should not use uint64_t storage https://bugs.webkit.org/show_bug.cgi?id=136318 Reviewed by Simon Fraser. This regressed in a replay-related patch. Revert back to uint8_t storage size. * platform/PlatformWheelEvent.h: * platform/ScrollTypes.h: * replay/WebInputs.json: git-svn-id: https://svn.webkit.org/repository/webkit/trunk@173034 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Source/WebCore/ChangeLog | 13 +++++++++++++ Source/WebCore/platform/PlatformWheelEvent.h | 4 ++-- Source/WebCore/platform/ScrollTypes.h | 6 +++--- Source/WebCore/replay/WebInputs.json | 10 +++++----- 4 files changed, 23 insertions(+), 10 deletions(-) diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index f2ffe30..513a881 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,16 @@ +2014-08-27 Brian J. Burg + + Enums in ScrollTypes and PlatformWheelEvent should not use uint64_t storage + https://bugs.webkit.org/show_bug.cgi?id=136318 + + Reviewed by Simon Fraser. + + This regressed in a replay-related patch. Revert back to uint8_t storage size. + + * platform/PlatformWheelEvent.h: + * platform/ScrollTypes.h: + * replay/WebInputs.json: + 2014-08-27 Simon Fraser Speling is hard. diff --git a/Source/WebCore/platform/PlatformWheelEvent.h b/Source/WebCore/platform/PlatformWheelEvent.h index 62fdb66..1f11fed 100644 --- a/Source/WebCore/platform/PlatformWheelEvent.h +++ b/Source/WebCore/platform/PlatformWheelEvent.h @@ -48,13 +48,13 @@ namespace WebCore { // and synthesized in other cases where platforms generate line-by-line scrolling events. // The ScrollByPageWheelEvent indicates that the wheel event should scroll an entire page. In this case WebCore's built in paging behavior is used to page // up and down (you get the same behavior as if the user was clicking in a scrollbar track to page up or page down). - enum PlatformWheelEventGranularity : uint64_t { + enum PlatformWheelEventGranularity : uint8_t { ScrollByPageWheelEvent, ScrollByPixelWheelEvent, }; #if PLATFORM(COCOA) - enum PlatformWheelEventPhase : uint64_t { + enum PlatformWheelEventPhase : uint8_t { PlatformWheelEventPhaseNone = 0, PlatformWheelEventPhaseBegan = 1 << 0, PlatformWheelEventPhaseStationary = 1 << 1, diff --git a/Source/WebCore/platform/ScrollTypes.h b/Source/WebCore/platform/ScrollTypes.h index d616fe6..46df9fe 100644 --- a/Source/WebCore/platform/ScrollTypes.h +++ b/Source/WebCore/platform/ScrollTypes.h @@ -30,14 +30,14 @@ namespace WebCore { - enum ScrollDirection : uint64_t { + enum ScrollDirection : uint8_t { ScrollUp, ScrollDown, ScrollLeft, ScrollRight }; - enum ScrollLogicalDirection : uint64_t { + enum ScrollLogicalDirection : uint8_t { ScrollBlockDirectionBackward, ScrollBlockDirectionForward, ScrollInlineDirectionBackward, @@ -103,7 +103,7 @@ namespace WebCore { return ScrollUp; } - enum ScrollGranularity : uint64_t { + enum ScrollGranularity : uint8_t { ScrollByLine, ScrollByPage, ScrollByDocument, diff --git a/Source/WebCore/replay/WebInputs.json b/Source/WebCore/replay/WebInputs.json index 9d8af6e..61f5b61 100644 --- a/Source/WebCore/replay/WebInputs.json +++ b/Source/WebCore/replay/WebInputs.json @@ -67,13 +67,13 @@ "header": "platform/PlatformWheelEvent.h" }, { - "name": "PlatformWheelEventGranularity", "mode": "SCALAR", "storage": "uint64_t", + "name": "PlatformWheelEventGranularity", "mode": "SCALAR", "storage": "uint8_t", "flags": ["ENUM"], "values": ["ScrollByPageWheelEvent", "ScrollByPixelWheelEvent"], "header": "platform/PlatformWheelEvent.h" }, { - "name": "PlatformWheelEventPhase", "mode": "SCALAR", "storage": "uint64_t", + "name": "PlatformWheelEventPhase", "mode": "SCALAR", "storage": "uint8_t", "flags": ["ENUM"], "guard": "PLATFORM(COCOA)", "values": [ @@ -92,13 +92,13 @@ "header": "plugins/PluginData.h" }, { - "name": "ScrollDirection", "mode": "SCALAR", "storage": "uint64_t", + "name": "ScrollDirection", "mode": "SCALAR", "storage": "uint8_t", "flags": ["ENUM"], "values": ["ScrollUp", "ScrollDown", "ScrollLeft", "ScrollRight"], "header": "platform/ScrollTypes.h" }, { - "name": "ScrollGranularity", "mode": "SCALAR", "storage": "uint64_t", + "name": "ScrollGranularity", "mode": "SCALAR", "storage": "uint8_t", "flags": ["ENUM"], "values": [ "ScrollByLine", @@ -110,7 +110,7 @@ "header": "platform/ScrollTypes.h" }, { - "name": "ScrollLogicalDirection", "mode": "SCALAR", "storage": "uint64_t", + "name": "ScrollLogicalDirection", "mode": "SCALAR", "storage": "uint8_t", "flags": ["ENUM"], "values": [ "ScrollBlockDirectionBackward", -- 1.8.3.1