Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2011 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008, 2011 Apple Inc. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 113 void contentAreaDidHide() const; | 113 void contentAreaDidHide() const; |
| 114 | 114 |
| 115 void finishCurrentScrollAnimations() const; | 115 void finishCurrentScrollAnimations() const; |
| 116 | 116 |
| 117 virtual void didAddScrollbar(Scrollbar&, ScrollbarOrientation); | 117 virtual void didAddScrollbar(Scrollbar&, ScrollbarOrientation); |
| 118 virtual void willRemoveScrollbar(Scrollbar&, ScrollbarOrientation); | 118 virtual void willRemoveScrollbar(Scrollbar&, ScrollbarOrientation); |
| 119 | 119 |
| 120 virtual void contentsResized(); | 120 virtual void contentsResized(); |
| 121 | 121 |
| 122 bool hasOverlayScrollbars() const; | 122 bool hasOverlayScrollbars() const; |
| 123 void setScrollbarOverlayStyle(ScrollbarOverlayStyle); | 123 void setScrollbarOverlayColorTheme(ScrollbarOverlayColorTheme); |
| 124 void recalculateScrollbarOverlayStyle(Color); | 124 void recalculateScrollbarOverlayColorTheme(Color); |
| 125 ScrollbarOverlayStyle getScrollbarOverlayStyle() const { | 125 ScrollbarOverlayColorTheme getScrollbarOverlayColorTheme() const { |
| 126 return static_cast<ScrollbarOverlayStyle>(m_scrollbarOverlayStyle); | 126 return static_cast<ScrollbarOverlayColorTheme>( |
| 127 m_scrollbarOverlayColorTheme); | |
| 127 } | 128 } |
| 128 | 129 |
| 129 // This getter will create a ScrollAnimatorBase if it doesn't already exist. | 130 // This getter will create a ScrollAnimatorBase if it doesn't already exist. |
| 130 ScrollAnimatorBase& scrollAnimator() const; | 131 ScrollAnimatorBase& scrollAnimator() const; |
| 131 | 132 |
| 132 // This getter will return null if the ScrollAnimatorBase hasn't been created | 133 // This getter will return null if the ScrollAnimatorBase hasn't been created |
| 133 // yet. | 134 // yet. |
| 134 ScrollAnimatorBase* existingScrollAnimator() const { | 135 ScrollAnimatorBase* existingScrollAnimator() const { |
| 135 return m_scrollAnimator; | 136 return m_scrollAnimator; |
| 136 } | 137 } |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 383 virtual void updateScrollOffset(const ScrollOffset&, ScrollType) = 0; | 384 virtual void updateScrollOffset(const ScrollOffset&, ScrollType) = 0; |
| 384 | 385 |
| 385 virtual int lineStep(ScrollbarOrientation) const; | 386 virtual int lineStep(ScrollbarOrientation) const; |
| 386 virtual int pageStep(ScrollbarOrientation) const; | 387 virtual int pageStep(ScrollbarOrientation) const; |
| 387 virtual int documentStep(ScrollbarOrientation) const; | 388 virtual int documentStep(ScrollbarOrientation) const; |
| 388 virtual float pixelStep(ScrollbarOrientation) const; | 389 virtual float pixelStep(ScrollbarOrientation) const; |
| 389 | 390 |
| 390 mutable Member<ScrollAnimatorBase> m_scrollAnimator; | 391 mutable Member<ScrollAnimatorBase> m_scrollAnimator; |
| 391 mutable Member<ProgrammaticScrollAnimator> m_programmaticScrollAnimator; | 392 mutable Member<ProgrammaticScrollAnimator> m_programmaticScrollAnimator; |
| 392 | 393 |
| 393 unsigned m_scrollbarOverlayStyle : 2; // ScrollbarOverlayStyle | 394 unsigned m_scrollbarOverlayColorTheme : 2; // ScrollbarOverlayColorTheme |
|
bokan
2016/10/21 16:57:14
Just remove the comment, it adds nothing.
| |
| 394 | 395 |
| 395 unsigned m_scrollOriginChanged : 1; | 396 unsigned m_scrollOriginChanged : 1; |
| 396 | 397 |
| 397 unsigned m_horizontalScrollbarNeedsPaintInvalidation : 1; | 398 unsigned m_horizontalScrollbarNeedsPaintInvalidation : 1; |
| 398 unsigned m_verticalScrollbarNeedsPaintInvalidation : 1; | 399 unsigned m_verticalScrollbarNeedsPaintInvalidation : 1; |
| 399 unsigned m_scrollCornerNeedsPaintInvalidation : 1; | 400 unsigned m_scrollCornerNeedsPaintInvalidation : 1; |
| 400 | 401 |
| 401 // There are 6 possible combinations of writing mode and direction. Scroll | 402 // There are 6 possible combinations of writing mode and direction. Scroll |
| 402 // origin will be non-zero in the x or y axis if there is any reversed | 403 // origin will be non-zero in the x or y axis if there is any reversed |
| 403 // direction or writing-mode. The combinations are: | 404 // direction or writing-mode. The combinations are: |
| 404 // writing-mode / direction scrollOrigin.x() set scrollOrigin.y() set | 405 // writing-mode / direction scrollOrigin.x() set scrollOrigin.y() set |
| 405 // horizontal-tb / ltr NO NO | 406 // horizontal-tb / ltr NO NO |
| 406 // horizontal-tb / rtl YES NO | 407 // horizontal-tb / rtl YES NO |
| 407 // vertical-lr / ltr NO NO | 408 // vertical-lr / ltr NO NO |
| 408 // vertical-lr / rtl NO YES | 409 // vertical-lr / rtl NO YES |
| 409 // vertical-rl / ltr YES NO | 410 // vertical-rl / ltr YES NO |
| 410 // vertical-rl / rtl YES YES | 411 // vertical-rl / rtl YES YES |
| 411 IntPoint m_scrollOrigin; | 412 IntPoint m_scrollOrigin; |
| 412 }; | 413 }; |
| 413 | 414 |
| 414 } // namespace blink | 415 } // namespace blink |
| 415 | 416 |
| 416 #endif // ScrollableArea_h | 417 #endif // ScrollableArea_h |
| OLD | NEW |