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

Side by Side Diff: third_party/WebKit/Source/core/style/ComputedStyleConstants.h

Issue 2910513003: Make TextDecorationSkip an enum class. (Closed)
Patch Set: Created 3 years, 6 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 | « third_party/WebKit/Source/core/style/ComputedStyle.h ('k') | no next file » | 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) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
6 * reserved. 6 * reserved.
7 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * 10 *
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 231
232 enum TextDecorationStyle { 232 enum TextDecorationStyle {
233 kTextDecorationStyleSolid, 233 kTextDecorationStyleSolid,
234 kTextDecorationStyleDouble, 234 kTextDecorationStyleDouble,
235 kTextDecorationStyleDotted, 235 kTextDecorationStyleDotted,
236 kTextDecorationStyleDashed, 236 kTextDecorationStyleDashed,
237 kTextDecorationStyleWavy 237 kTextDecorationStyleWavy
238 }; 238 };
239 239
240 static const size_t kTextDecorationSkipBits = 3; 240 static const size_t kTextDecorationSkipBits = 3;
241 enum TextDecorationSkip { 241 enum class TextDecorationSkip { kNone = 0x0, kObjects = 0x1, kInk = 0x2 };
242 kTextDecorationSkipNone = 0x0, 242 inline TextDecorationSkip operator&(TextDecorationSkip a,
243 kTextDecorationSkipObjects = 0x1, 243 TextDecorationSkip b) {
244 kTextDecorationSkipInk = 0x2 244 return TextDecorationSkip(static_cast<unsigned>(a) &
245 }; 245 static_cast<unsigned>(b));
246 }
246 inline TextDecorationSkip operator|(TextDecorationSkip a, 247 inline TextDecorationSkip operator|(TextDecorationSkip a,
247 TextDecorationSkip b) { 248 TextDecorationSkip b) {
248 return TextDecorationSkip(static_cast<unsigned>(a) | 249 return TextDecorationSkip(static_cast<unsigned>(a) |
249 static_cast<unsigned>(b)); 250 static_cast<unsigned>(b));
250 } 251 }
251 inline TextDecorationSkip& operator|=(TextDecorationSkip& a, 252 inline TextDecorationSkip& operator|=(TextDecorationSkip& a,
252 TextDecorationSkip b) { 253 TextDecorationSkip b) {
253 return a = a | b; 254 return a = a | b;
254 } 255 }
255 256
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 // fraction, which leaves 20 bits for the integer part, making 1048575 452 // fraction, which leaves 20 bits for the integer part, making 1048575
452 // the largest number. 453 // the largest number.
453 454
454 static const int kBorderWidthFractionalBits = 6; 455 static const int kBorderWidthFractionalBits = 6;
455 static const int kBorderWidthDenominator = 1 << kBorderWidthFractionalBits; 456 static const int kBorderWidthDenominator = 1 << kBorderWidthFractionalBits;
456 static const int kMaxForBorderWidth = ((1 << 26) - 1) / kBorderWidthDenominator; 457 static const int kMaxForBorderWidth = ((1 << 26) - 1) / kBorderWidthDenominator;
457 458
458 } // namespace blink 459 } // namespace blink
459 460
460 #endif // ComputedStyleConstants_h 461 #endif // ComputedStyleConstants_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698