| OLD | NEW |
| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 #include "platform/TraceEvent.h" | 45 #include "platform/TraceEvent.h" |
| 46 | 46 |
| 47 static const int kPixelsPerLineStep = 40; | 47 static const int kPixelsPerLineStep = 40; |
| 48 static const float kMinFractionToStepWhenPaging = 0.875f; | 48 static const float kMinFractionToStepWhenPaging = 0.875f; |
| 49 | 49 |
| 50 namespace blink { | 50 namespace blink { |
| 51 | 51 |
| 52 struct SameSizeAsScrollableArea { | 52 struct SameSizeAsScrollableArea { |
| 53 virtual ~SameSizeAsScrollableArea(); | 53 virtual ~SameSizeAsScrollableArea(); |
| 54 IntRect scrollbarDamage[2]; | 54 IntRect scrollbarDamage[2]; |
| 55 #if ENABLE(ASSERT) && ENABLE(OILPAN) |
| 56 VerifyEagerFinalization verifyEager; |
| 57 #endif |
| 55 void* pointer; | 58 void* pointer; |
| 56 unsigned bitfields : 16; | 59 unsigned bitfields : 16; |
| 57 IntPoint origin; | 60 IntPoint origin; |
| 58 }; | 61 }; |
| 59 | 62 |
| 60 static_assert(sizeof(ScrollableArea) == sizeof(SameSizeAsScrollableArea), "Scrol
lableArea should stay small"); | 63 static_assert(sizeof(ScrollableArea) == sizeof(SameSizeAsScrollableArea), "Scrol
lableArea should stay small"); |
| 61 | 64 |
| 62 int ScrollableArea::pixelsPerLineStep() | 65 int ScrollableArea::pixelsPerLineStep() |
| 63 { | 66 { |
| 64 return kPixelsPerLineStep; | 67 return kPixelsPerLineStep; |
| (...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 verticalScrollbarWidth = !verticalBar->isOverlayScrollbar() ? verticalBa
r->width() : 0; | 605 verticalScrollbarWidth = !verticalBar->isOverlayScrollbar() ? verticalBa
r->width() : 0; |
| 603 if (Scrollbar* horizontalBar = horizontalScrollbar()) | 606 if (Scrollbar* horizontalBar = horizontalScrollbar()) |
| 604 horizontalScrollbarHeight = !horizontalBar->isOverlayScrollbar() ? horiz
ontalBar->height() : 0; | 607 horizontalScrollbarHeight = !horizontalBar->isOverlayScrollbar() ? horiz
ontalBar->height() : 0; |
| 605 | 608 |
| 606 return IntSize(std::max(0, size.width() - verticalScrollbarWidth), | 609 return IntSize(std::max(0, size.width() - verticalScrollbarWidth), |
| 607 std::max(0, size.height() - horizontalScrollbarHeight)); | 610 std::max(0, size.height() - horizontalScrollbarHeight)); |
| 608 | 611 |
| 609 } | 612 } |
| 610 | 613 |
| 611 } // namespace blink | 614 } // namespace blink |
| OLD | NEW |