Changeset 79942 in webkit


Ignore:
Timestamp:
Feb 28, 2011 4:51:45 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-02-28 Avi Drissman <avi@google.com>

Reviewed by James Robinson.

WebCursorInfo needs to match enums in platform/Cursor.h
https://bugs.webkit.org/show_bug.cgi?id=55094

  • platform/chromium/CursorChromium.cpp: (WebCore::grabCursor): (WebCore::grabbingCursor):
  • platform/chromium/PlatformCursor.h:

2011-02-28 Avi Drissman <avi@google.com>

Reviewed by James Robinson.

WebCursorInfo needs to match enums in platform/Cursor.h
https://bugs.webkit.org/show_bug.cgi?id=55094

  • public/WebCursorInfo.h:
  • src/AssertMatchingEnums.cpp:
Location:
trunk/Source
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r79936 r79942  
     12011-02-28  Avi Drissman  <avi@google.com>
     2
     3        Reviewed by James Robinson.
     4
     5        WebCursorInfo needs to match enums in platform/Cursor.h
     6        https://bugs.webkit.org/show_bug.cgi?id=55094
     7
     8        * platform/chromium/CursorChromium.cpp:
     9        (WebCore::grabCursor):
     10        (WebCore::grabbingCursor):
     11        * platform/chromium/PlatformCursor.h:
     12
    1132011-02-28  Jia Pu  <jpu@apple.com>
    214
  • trunk/Source/WebCore/platform/chromium/CursorChromium.cpp

    r63339 r79942  
    3232#include "Cursor.h"
    3333
     34#include <wtf/Assertions.h>
     35
    3436namespace WebCore {
    3537
     
    307309const Cursor& grabCursor()
    308310{
    309     return pointerCursor();
     311    static const Cursor c(PlatformCursor::TypeGrab);
     312    return c;
    310313}
    311314
    312315const Cursor& grabbingCursor()
    313316{
    314     return pointerCursor();
     317    static const Cursor c(PlatformCursor::TypeGrabbing);
     318    return c;
    315319}
    316320
    317321} // namespace WebCore
     322
     323#define COMPILE_ASSERT_MATCHING_ENUM(cursor_name, platform_cursor_name) \
     324    COMPILE_ASSERT(int(WebCore::Cursor::cursor_name) == int(WebCore::PlatformCursor::platform_cursor_name), mismatching_enums)
     325
     326COMPILE_ASSERT_MATCHING_ENUM(Pointer, TypePointer);
     327COMPILE_ASSERT_MATCHING_ENUM(Cross, TypeCross);
     328COMPILE_ASSERT_MATCHING_ENUM(Hand, TypeHand);
     329COMPILE_ASSERT_MATCHING_ENUM(IBeam, TypeIBeam);
     330COMPILE_ASSERT_MATCHING_ENUM(Wait, TypeWait);
     331COMPILE_ASSERT_MATCHING_ENUM(Help, TypeHelp);
     332COMPILE_ASSERT_MATCHING_ENUM(EastResize, TypeEastResize);
     333COMPILE_ASSERT_MATCHING_ENUM(NorthResize, TypeNorthResize);
     334COMPILE_ASSERT_MATCHING_ENUM(NorthEastResize, TypeNorthEastResize);
     335COMPILE_ASSERT_MATCHING_ENUM(NorthWestResize, TypeNorthWestResize);
     336COMPILE_ASSERT_MATCHING_ENUM(SouthResize, TypeSouthResize);
     337COMPILE_ASSERT_MATCHING_ENUM(SouthEastResize, TypeSouthEastResize);
     338COMPILE_ASSERT_MATCHING_ENUM(SouthWestResize, TypeSouthWestResize);
     339COMPILE_ASSERT_MATCHING_ENUM(WestResize, TypeWestResize);
     340COMPILE_ASSERT_MATCHING_ENUM(NorthSouthResize, TypeNorthSouthResize);
     341COMPILE_ASSERT_MATCHING_ENUM(EastWestResize, TypeEastWestResize);
     342COMPILE_ASSERT_MATCHING_ENUM(NorthEastSouthWestResize, TypeNorthEastSouthWestResize);
     343COMPILE_ASSERT_MATCHING_ENUM(NorthWestSouthEastResize, TypeNorthWestSouthEastResize);
     344COMPILE_ASSERT_MATCHING_ENUM(ColumnResize, TypeColumnResize);
     345COMPILE_ASSERT_MATCHING_ENUM(RowResize, TypeRowResize);
     346COMPILE_ASSERT_MATCHING_ENUM(MiddlePanning, TypeMiddlePanning);
     347COMPILE_ASSERT_MATCHING_ENUM(EastPanning, TypeEastPanning);
     348COMPILE_ASSERT_MATCHING_ENUM(NorthPanning, TypeNorthPanning);
     349COMPILE_ASSERT_MATCHING_ENUM(NorthEastPanning, TypeNorthEastPanning);
     350COMPILE_ASSERT_MATCHING_ENUM(NorthWestPanning, TypeNorthWestPanning);
     351COMPILE_ASSERT_MATCHING_ENUM(SouthPanning, TypeSouthPanning);
     352COMPILE_ASSERT_MATCHING_ENUM(SouthEastPanning, TypeSouthEastPanning);
     353COMPILE_ASSERT_MATCHING_ENUM(SouthWestPanning, TypeSouthWestPanning);
     354COMPILE_ASSERT_MATCHING_ENUM(WestPanning, TypeWestPanning);
     355COMPILE_ASSERT_MATCHING_ENUM(Move, TypeMove);
     356COMPILE_ASSERT_MATCHING_ENUM(VerticalText, TypeVerticalText);
     357COMPILE_ASSERT_MATCHING_ENUM(Cell, TypeCell);
     358COMPILE_ASSERT_MATCHING_ENUM(ContextMenu, TypeContextMenu);
     359COMPILE_ASSERT_MATCHING_ENUM(Alias, TypeAlias);
     360COMPILE_ASSERT_MATCHING_ENUM(Progress, TypeProgress);
     361COMPILE_ASSERT_MATCHING_ENUM(NoDrop, TypeNoDrop);
     362COMPILE_ASSERT_MATCHING_ENUM(Copy, TypeCopy);
     363COMPILE_ASSERT_MATCHING_ENUM(None, TypeNone);
     364COMPILE_ASSERT_MATCHING_ENUM(NotAllowed, TypeNotAllowed);
     365COMPILE_ASSERT_MATCHING_ENUM(ZoomIn, TypeZoomIn);
     366COMPILE_ASSERT_MATCHING_ENUM(ZoomOut, TypeZoomOut);
     367COMPILE_ASSERT_MATCHING_ENUM(Grab, TypeGrab);
     368COMPILE_ASSERT_MATCHING_ENUM(Grabbing, TypeGrabbing);
     369COMPILE_ASSERT_MATCHING_ENUM(Custom, TypeCustom);
  • trunk/Source/WebCore/platform/chromium/PlatformCursor.h

    r39903 r79942  
    8282            TypeZoomIn,
    8383            TypeZoomOut,
     84            TypeGrab,
     85            TypeGrabbing,
    8486            TypeCustom
    8587        };
  • trunk/Source/WebKit/chromium/ChangeLog

    r79920 r79942  
     12011-02-28  Avi Drissman  <avi@google.com>
     2
     3        Reviewed by James Robinson.
     4
     5        WebCursorInfo needs to match enums in platform/Cursor.h
     6        https://bugs.webkit.org/show_bug.cgi?id=55094
     7
     8        * public/WebCursorInfo.h:
     9        * src/AssertMatchingEnums.cpp:
     10
    1112011-02-28  Sheriff Bot  <webkit.review.bot@gmail.com>
    212
  • trunk/Source/WebKit/chromium/public/WebCursorInfo.h

    r50678 r79942  
    8989        TypeZoomIn,
    9090        TypeZoomOut,
     91        TypeGrab,
     92        TypeGrabbing,
    9193        TypeCustom
    9294    };
  • trunk/Source/WebKit/chromium/src/AssertMatchingEnums.cpp

    r79920 r79942  
    259259COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeZoomIn, PlatformCursor::TypeZoomIn);
    260260COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeZoomOut, PlatformCursor::TypeZoomOut);
     261COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeGrab, PlatformCursor::TypeGrab);
     262COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeGrabbing, PlatformCursor::TypeGrabbing);
    261263COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeCustom, PlatformCursor::TypeCustom);
    262264
Note: See TracChangeset for help on using the changeset viewer.