| 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 29 matching lines...) Expand all Loading... |
| 40 | 40 |
| 41 #include "platform/TraceEvent.h" | 41 #include "platform/TraceEvent.h" |
| 42 | 42 |
| 43 static const int kPixelsPerLineStep = 40; | 43 static const int kPixelsPerLineStep = 40; |
| 44 static const float kMinFractionToStepWhenPaging = 0.875f; | 44 static const float kMinFractionToStepWhenPaging = 0.875f; |
| 45 | 45 |
| 46 namespace blink { | 46 namespace blink { |
| 47 | 47 |
| 48 struct SameSizeAsScrollableArea { | 48 struct SameSizeAsScrollableArea { |
| 49 virtual ~SameSizeAsScrollableArea(); | 49 virtual ~SameSizeAsScrollableArea(); |
| 50 unsigned damageBits : 2; | |
| 51 IntRect scrollbarDamage[2]; | 50 IntRect scrollbarDamage[2]; |
| 52 void* pointer; | 51 void* pointer; |
| 53 unsigned bitfields : 16; | 52 unsigned bitfields : 16; |
| 54 IntPoint origin; | 53 IntPoint origin; |
| 55 }; | 54 }; |
| 56 | 55 |
| 57 COMPILE_ASSERT(sizeof(ScrollableArea) == sizeof(SameSizeAsScrollableArea), Scrol
lableArea_should_stay_small); | 56 COMPILE_ASSERT(sizeof(ScrollableArea) == sizeof(SameSizeAsScrollableArea), Scrol
lableArea_should_stay_small); |
| 58 | 57 |
| 59 int ScrollableArea::pixelsPerLineStep() | 58 int ScrollableArea::pixelsPerLineStep() |
| 60 { | 59 { |
| 61 return kPixelsPerLineStep; | 60 return kPixelsPerLineStep; |
| 62 } | 61 } |
| 63 | 62 |
| 64 float ScrollableArea::minFractionToStepWhenPaging() | 63 float ScrollableArea::minFractionToStepWhenPaging() |
| 65 { | 64 { |
| 66 return kMinFractionToStepWhenPaging; | 65 return kMinFractionToStepWhenPaging; |
| 67 } | 66 } |
| 68 | 67 |
| 69 int ScrollableArea::maxOverlapBetweenPages() | 68 int ScrollableArea::maxOverlapBetweenPages() |
| 70 { | 69 { |
| 71 static int maxOverlapBetweenPages = ScrollbarTheme::theme()->maxOverlapBetwe
enPages(); | 70 static int maxOverlapBetweenPages = ScrollbarTheme::theme()->maxOverlapBetwe
enPages(); |
| 72 return maxOverlapBetweenPages; | 71 return maxOverlapBetweenPages; |
| 73 } | 72 } |
| 74 | 73 |
| 75 ScrollableArea::ScrollableArea() | 74 ScrollableArea::ScrollableArea() |
| 76 : m_hasHorizontalBarDamage(false) | 75 : m_constrainsScrollingToContentEdge(true) |
| 77 , m_hasVerticalBarDamage(false) | |
| 78 , m_constrainsScrollingToContentEdge(true) | |
| 79 , m_inLiveResize(false) | 76 , m_inLiveResize(false) |
| 80 , m_verticalScrollElasticity(ScrollElasticityNone) | 77 , m_verticalScrollElasticity(ScrollElasticityNone) |
| 81 , m_horizontalScrollElasticity(ScrollElasticityNone) | 78 , m_horizontalScrollElasticity(ScrollElasticityNone) |
| 82 , m_scrollbarOverlayStyle(ScrollbarOverlayStyleDefault) | 79 , m_scrollbarOverlayStyle(ScrollbarOverlayStyleDefault) |
| 83 , m_scrollOriginChanged(false) | 80 , m_scrollOriginChanged(false) |
| 84 { | 81 { |
| 85 } | 82 } |
| 86 | 83 |
| 87 ScrollableArea::~ScrollableArea() | 84 ScrollableArea::~ScrollableArea() |
| 88 { | 85 { |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 { | 470 { |
| 474 return scrollSize(orientation); | 471 return scrollSize(orientation); |
| 475 } | 472 } |
| 476 | 473 |
| 477 float ScrollableArea::pixelStep(ScrollbarOrientation) const | 474 float ScrollableArea::pixelStep(ScrollbarOrientation) const |
| 478 { | 475 { |
| 479 return 1; | 476 return 1; |
| 480 } | 477 } |
| 481 | 478 |
| 482 } // namespace blink | 479 } // namespace blink |
| OLD | NEW |