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

Side by Side Diff: Source/platform/scroll/ScrollableArea.cpp

Issue 813883002: replace COMPILE_ASSERT with static_assert in platform/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: final fixups Created 6 years 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 | « Source/platform/heap/Visitor.h ('k') | Source/platform/text/BidiContext.cpp » ('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) 2010, Google Inc. All rights reserved. 2 * Copyright (c) 2010, Google Inc. All rights reserved.
3 * Copyright (C) 2008, 2011 Apple Inc. All Rights Reserved. 3 * Copyright (C) 2008, 2011 Apple Inc. All Rights Reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 namespace blink { 48 namespace blink {
49 49
50 struct SameSizeAsScrollableArea { 50 struct SameSizeAsScrollableArea {
51 virtual ~SameSizeAsScrollableArea(); 51 virtual ~SameSizeAsScrollableArea();
52 IntRect scrollbarDamage[2]; 52 IntRect scrollbarDamage[2];
53 void* pointer; 53 void* pointer;
54 unsigned bitfields : 16; 54 unsigned bitfields : 16;
55 IntPoint origin; 55 IntPoint origin;
56 }; 56 };
57 57
58 COMPILE_ASSERT(sizeof(ScrollableArea) == sizeof(SameSizeAsScrollableArea), Scrol lableArea_should_stay_small); 58 static_assert(sizeof(ScrollableArea) == sizeof(SameSizeAsScrollableArea), "Scrol lableArea should stay small");
59 59
60 int ScrollableArea::pixelsPerLineStep() 60 int ScrollableArea::pixelsPerLineStep()
61 { 61 {
62 return kPixelsPerLineStep; 62 return kPixelsPerLineStep;
63 } 63 }
64 64
65 float ScrollableArea::minFractionToStepWhenPaging() 65 float ScrollableArea::minFractionToStepWhenPaging()
66 { 66 {
67 return kMinFractionToStepWhenPaging; 67 return kMinFractionToStepWhenPaging;
68 } 68 }
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 { 492 {
493 return scrollSize(orientation); 493 return scrollSize(orientation);
494 } 494 }
495 495
496 float ScrollableArea::pixelStep(ScrollbarOrientation) const 496 float ScrollableArea::pixelStep(ScrollbarOrientation) const
497 { 497 {
498 return 1; 498 return 1;
499 } 499 }
500 500
501 } // namespace blink 501 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/heap/Visitor.h ('k') | Source/platform/text/BidiContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698