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

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

Issue 2863693003: Unify TouchAction classes (Closed)
Patch Set: add cstdlib Created 3 years, 7 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
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 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 kAutoFlowColumnDense = 374 kAutoFlowColumnDense =
375 kInternalAutoFlowAlgorithmDense | kInternalAutoFlowDirectionColumn 375 kInternalAutoFlowAlgorithmDense | kInternalAutoFlowDirectionColumn
376 }; 376 };
377 377
378 enum DraggableRegionMode { 378 enum DraggableRegionMode {
379 kDraggableRegionNone, 379 kDraggableRegionNone,
380 kDraggableRegionDrag, 380 kDraggableRegionDrag,
381 kDraggableRegionNoDrag 381 kDraggableRegionNoDrag
382 }; 382 };
383 383
384 static const size_t kTouchActionBits = 6;
385 enum TouchAction {
386 kTouchActionNone = 0x0,
387 kTouchActionPanLeft = 0x1,
388 kTouchActionPanRight = 0x2,
389 kTouchActionPanX = kTouchActionPanLeft | kTouchActionPanRight,
390 kTouchActionPanUp = 0x4,
391 kTouchActionPanDown = 0x8,
392 kTouchActionPanY = kTouchActionPanUp | kTouchActionPanDown,
393 kTouchActionPan = kTouchActionPanX | kTouchActionPanY,
394 kTouchActionPinchZoom = 0x10,
395 kTouchActionManipulation = kTouchActionPan | kTouchActionPinchZoom,
396 kTouchActionDoubleTapZoom = 0x20,
397 kTouchActionAuto = kTouchActionManipulation | kTouchActionDoubleTapZoom
398 };
399 inline TouchAction operator|(TouchAction a, TouchAction b) {
400 return static_cast<TouchAction>(int(a) | int(b));
401 }
402 inline TouchAction& operator|=(TouchAction& a, TouchAction b) {
403 return a = a | b;
404 }
405 inline TouchAction operator&(TouchAction a, TouchAction b) {
406 return static_cast<TouchAction>(int(a) & int(b));
407 }
408 inline TouchAction& operator&=(TouchAction& a, TouchAction b) {
409 return a = a & b;
410 }
411
412 enum EIsolation { kIsolationAuto, kIsolationIsolate }; 384 enum EIsolation { kIsolationAuto, kIsolationIsolate };
413 385
414 static const size_t kContainmentBits = 4; 386 static const size_t kContainmentBits = 4;
415 enum Containment { 387 enum Containment {
416 kContainsNone = 0x0, 388 kContainsNone = 0x0,
417 kContainsLayout = 0x1, 389 kContainsLayout = 0x1,
418 kContainsStyle = 0x2, 390 kContainsStyle = 0x2,
419 kContainsPaint = 0x4, 391 kContainsPaint = 0x4,
420 kContainsSize = 0x8, 392 kContainsSize = 0x8,
421 kContainsStrict = 393 kContainsStrict =
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 // fraction, which leaves 20 bits for the integer part, making 1048575 477 // fraction, which leaves 20 bits for the integer part, making 1048575
506 // the largest number. 478 // the largest number.
507 479
508 static const int kBorderWidthFractionalBits = 6; 480 static const int kBorderWidthFractionalBits = 6;
509 static const int kBorderWidthDenominator = 1 << kBorderWidthFractionalBits; 481 static const int kBorderWidthDenominator = 1 << kBorderWidthFractionalBits;
510 static const int kMaxForBorderWidth = ((1 << 26) - 1) / kBorderWidthDenominator; 482 static const int kMaxForBorderWidth = ((1 << 26) - 1) / kBorderWidthDenominator;
511 483
512 } // namespace blink 484 } // namespace blink
513 485
514 #endif // ComputedStyleConstants_h 486 #endif // ComputedStyleConstants_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.h ('k') | third_party/WebKit/Source/core/style/StyleRareNonInheritedData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698