Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(952)

Side by Side Diff: sky/engine/web/AssertMatchingEnums.cpp

Issue 1076623002: Remove our impressive amount of CSS Cursor code. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/engine/public/platform/WebCursorInfo.h ('k') | sky/engine/web/ChromeClientImpl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 25 matching lines...) Expand all
36 #include "sky/engine/core/dom/DocumentMarker.h" 36 #include "sky/engine/core/dom/DocumentMarker.h"
37 #include "sky/engine/core/dom/ExceptionCode.h" 37 #include "sky/engine/core/dom/ExceptionCode.h"
38 #include "sky/engine/core/dom/Node.h" 38 #include "sky/engine/core/dom/Node.h"
39 #include "sky/engine/core/editing/TextAffinity.h" 39 #include "sky/engine/core/editing/TextAffinity.h"
40 #include "sky/engine/core/frame/ConsoleTypes.h" 40 #include "sky/engine/core/frame/ConsoleTypes.h"
41 #include "sky/engine/core/frame/Settings.h" 41 #include "sky/engine/core/frame/Settings.h"
42 #include "sky/engine/core/loader/FrameLoaderTypes.h" 42 #include "sky/engine/core/loader/FrameLoaderTypes.h"
43 #include "sky/engine/core/loader/NavigationPolicy.h" 43 #include "sky/engine/core/loader/NavigationPolicy.h"
44 #include "sky/engine/core/page/PageVisibilityState.h" 44 #include "sky/engine/core/page/PageVisibilityState.h"
45 #include "sky/engine/core/rendering/style/RenderStyleConstants.h" 45 #include "sky/engine/core/rendering/style/RenderStyleConstants.h"
46 #include "sky/engine/platform/Cursor.h"
47 #include "sky/engine/platform/fonts/FontDescription.h" 46 #include "sky/engine/platform/fonts/FontDescription.h"
48 #include "sky/engine/platform/fonts/FontSmoothingMode.h" 47 #include "sky/engine/platform/fonts/FontSmoothingMode.h"
49 #include "sky/engine/platform/graphics/filters/FilterOperation.h" 48 #include "sky/engine/platform/graphics/filters/FilterOperation.h"
50 #include "sky/engine/platform/network/ResourceLoadPriority.h" 49 #include "sky/engine/platform/network/ResourceLoadPriority.h"
51 #include "sky/engine/platform/network/ResourceResponse.h" 50 #include "sky/engine/platform/network/ResourceResponse.h"
52 #include "sky/engine/platform/text/TextChecking.h" 51 #include "sky/engine/platform/text/TextChecking.h"
53 #include "sky/engine/platform/text/TextDecoration.h" 52 #include "sky/engine/platform/text/TextDecoration.h"
54 #include "sky/engine/platform/weborigin/ReferrerPolicy.h" 53 #include "sky/engine/platform/weborigin/ReferrerPolicy.h"
55 #include "sky/engine/public/platform/WebClipboard.h" 54 #include "sky/engine/public/platform/WebClipboard.h"
56 #include "sky/engine/public/platform/WebCursorInfo.h"
57 #include "sky/engine/public/platform/WebInputEvent.h" 55 #include "sky/engine/public/platform/WebInputEvent.h"
58 #include "sky/engine/public/platform/WebReferrerPolicy.h" 56 #include "sky/engine/public/platform/WebReferrerPolicy.h"
59 #include "sky/engine/public/platform/WebURLRequest.h" 57 #include "sky/engine/public/platform/WebURLRequest.h"
60 #include "sky/engine/public/platform/WebURLResponse.h" 58 #include "sky/engine/public/platform/WebURLResponse.h"
61 #include "sky/engine/public/web/WebConsoleMessage.h" 59 #include "sky/engine/public/web/WebConsoleMessage.h"
62 #include "sky/engine/public/web/WebFontDescription.h" 60 #include "sky/engine/public/web/WebFontDescription.h"
63 #include "sky/engine/public/web/WebNavigationPolicy.h" 61 #include "sky/engine/public/web/WebNavigationPolicy.h"
64 #include "sky/engine/public/web/WebNavigatorContentUtilsClient.h" 62 #include "sky/engine/public/web/WebNavigatorContentUtilsClient.h"
65 #include "sky/engine/public/web/WebNode.h" 63 #include "sky/engine/public/web/WebNode.h"
66 #include "sky/engine/public/web/WebSettings.h" 64 #include "sky/engine/public/web/WebSettings.h"
67 #include "sky/engine/public/web/WebTextAffinity.h" 65 #include "sky/engine/public/web/WebTextAffinity.h"
68 #include "sky/engine/public/web/WebTextCheckingResult.h" 66 #include "sky/engine/public/web/WebTextCheckingResult.h"
69 #include "sky/engine/public/web/WebTextCheckingType.h" 67 #include "sky/engine/public/web/WebTextCheckingType.h"
70 #include "sky/engine/public/web/WebTextDecorationType.h" 68 #include "sky/engine/public/web/WebTextDecorationType.h"
71 #include "sky/engine/public/web/WebView.h" 69 #include "sky/engine/public/web/WebView.h"
72 #include "sky/engine/wtf/Assertions.h" 70 #include "sky/engine/wtf/Assertions.h"
73 #include "sky/engine/wtf/text/StringImpl.h" 71 #include "sky/engine/wtf/text/StringImpl.h"
74 72
75 namespace blink { 73 namespace blink {
76 74
77 #define COMPILE_ASSERT_MATCHING_ENUM(public_name, core_name) \ 75 #define COMPILE_ASSERT_MATCHING_ENUM(public_name, core_name) \
78 COMPILE_ASSERT(int(public_name) == int(core_name), mismatching_enums) 76 COMPILE_ASSERT(int(public_name) == int(core_name), mismatching_enums)
79 77
80 #define COMPILE_ASSERT_MATCHING_UINT64(public_name, core_name) \ 78 #define COMPILE_ASSERT_MATCHING_UINT64(public_name, core_name) \
81 COMPILE_ASSERT(public_name == core_name, mismatching_enums) 79 COMPILE_ASSERT(public_name == core_name, mismatching_enums)
82 80
83 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypePointer, Cursor::Pointer);
84 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeCross, Cursor::Cross);
85 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeHand, Cursor::Hand);
86 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeIBeam, Cursor::IBeam);
87 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeWait, Cursor::Wait);
88 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeHelp, Cursor::Help);
89 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeEastResize, Cursor::EastResize);
90 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthResize, Cursor::NorthResize );
91 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthEastResize, Cursor::NorthEa stResize);
92 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthWestResize, Cursor::NorthWe stResize);
93 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeSouthResize, Cursor::SouthResize );
94 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeSouthEastResize, Cursor::SouthEa stResize);
95 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeSouthWestResize, Cursor::SouthWe stResize);
96 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeWestResize, Cursor::WestResize);
97 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthSouthResize, Cursor::NorthS outhResize);
98 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeEastWestResize, Cursor::EastWest Resize);
99 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthEastSouthWestResize, Cursor ::NorthEastSouthWestResize);
100 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthWestSouthEastResize, Cursor ::NorthWestSouthEastResize);
101 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeColumnResize, Cursor::ColumnResi ze);
102 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeRowResize, Cursor::RowResize);
103 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeMiddlePanning, Cursor::MiddlePan ning);
104 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeEastPanning, Cursor::EastPanning );
105 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthPanning, Cursor::NorthPanni ng);
106 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthEastPanning, Cursor::NorthE astPanning);
107 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthWestPanning, Cursor::NorthW estPanning);
108 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeSouthPanning, Cursor::SouthPanni ng);
109 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeSouthEastPanning, Cursor::SouthE astPanning);
110 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeSouthWestPanning, Cursor::SouthW estPanning);
111 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeWestPanning, Cursor::WestPanning );
112 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeMove, Cursor::Move);
113 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeVerticalText, Cursor::VerticalTe xt);
114 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeCell, Cursor::Cell);
115 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeContextMenu, Cursor::ContextMenu );
116 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeAlias, Cursor::Alias);
117 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeProgress, Cursor::Progress);
118 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNoDrop, Cursor::NoDrop);
119 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeCopy, Cursor::Copy);
120 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNone, Cursor::None);
121 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNotAllowed, Cursor::NotAllowed);
122 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeZoomIn, Cursor::ZoomIn);
123 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeZoomOut, Cursor::ZoomOut);
124 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeGrab, Cursor::Grab);
125 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeGrabbing, Cursor::Grabbing);
126 COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeCustom, Cursor::Custom);
127
128 COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::GenericFamilyNone, FontDescript ion::NoFamily); 81 COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::GenericFamilyNone, FontDescript ion::NoFamily);
129 COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::GenericFamilyStandard, FontDesc ription::StandardFamily); 82 COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::GenericFamilyStandard, FontDesc ription::StandardFamily);
130 COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::GenericFamilySerif, FontDescrip tion::SerifFamily); 83 COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::GenericFamilySerif, FontDescrip tion::SerifFamily);
131 COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::GenericFamilySansSerif, FontDes cription::SansSerifFamily); 84 COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::GenericFamilySansSerif, FontDes cription::SansSerifFamily);
132 COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::GenericFamilyMonospace, FontDes cription::MonospaceFamily); 85 COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::GenericFamilyMonospace, FontDes cription::MonospaceFamily);
133 COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::GenericFamilyCursive, FontDescr iption::CursiveFamily); 86 COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::GenericFamilyCursive, FontDescr iption::CursiveFamily);
134 COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::GenericFamilyFantasy, FontDescr iption::FantasyFamily); 87 COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::GenericFamilyFantasy, FontDescr iption::FantasyFamily);
135 88
136 COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::SmoothingAuto, AutoSmoothing); 89 COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::SmoothingAuto, AutoSmoothing);
137 COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::SmoothingNone, NoSmoothing); 90 COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::SmoothingNone, NoSmoothing);
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 COMPILE_ASSERT_MATCHING_ENUM(WebConsoleMessage::LevelInfo, InfoMessageLevel); 159 COMPILE_ASSERT_MATCHING_ENUM(WebConsoleMessage::LevelInfo, InfoMessageLevel);
207 160
208 COMPILE_ASSERT_MATCHING_ENUM(WebSettings::PointerTypeNone, PointerTypeNone); 161 COMPILE_ASSERT_MATCHING_ENUM(WebSettings::PointerTypeNone, PointerTypeNone);
209 COMPILE_ASSERT_MATCHING_ENUM(WebSettings::PointerTypeCoarse, PointerTypeCoarse); 162 COMPILE_ASSERT_MATCHING_ENUM(WebSettings::PointerTypeCoarse, PointerTypeCoarse);
210 COMPILE_ASSERT_MATCHING_ENUM(WebSettings::PointerTypeFine, PointerTypeFine); 163 COMPILE_ASSERT_MATCHING_ENUM(WebSettings::PointerTypeFine, PointerTypeFine);
211 COMPILE_ASSERT_MATCHING_ENUM(WebSettings::HoverTypeNone, HoverTypeNone); 164 COMPILE_ASSERT_MATCHING_ENUM(WebSettings::HoverTypeNone, HoverTypeNone);
212 COMPILE_ASSERT_MATCHING_ENUM(WebSettings::HoverTypeOnDemand, HoverTypeOnDemand); 165 COMPILE_ASSERT_MATCHING_ENUM(WebSettings::HoverTypeOnDemand, HoverTypeOnDemand);
213 COMPILE_ASSERT_MATCHING_ENUM(WebSettings::HoverTypeHover, HoverTypeHover); 166 COMPILE_ASSERT_MATCHING_ENUM(WebSettings::HoverTypeHover, HoverTypeHover);
214 167
215 } // namespace blink 168 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/public/platform/WebCursorInfo.h ('k') | sky/engine/web/ChromeClientImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698