| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2008 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 25 matching lines...) Expand all Loading... |
| 36 #include "platform/scroll/ScrollbarTheme.h" | 36 #include "platform/scroll/ScrollbarTheme.h" |
| 37 | 37 |
| 38 using namespace std; | 38 using namespace std; |
| 39 | 39 |
| 40 #if ((OS(POSIX) && !OS(MACOSX)) || OS(WIN)) | 40 #if ((OS(POSIX) && !OS(MACOSX)) || OS(WIN)) |
| 41 // The position of the scrollbar thumb affects the appearance of the steppers, s
o | 41 // The position of the scrollbar thumb affects the appearance of the steppers, s
o |
| 42 // when the thumb moves, we have to invalidate them for painting. | 42 // when the thumb moves, we have to invalidate them for painting. |
| 43 #define THUMB_POSITION_AFFECTS_BUTTONS | 43 #define THUMB_POSITION_AFFECTS_BUTTONS |
| 44 #endif | 44 #endif |
| 45 | 45 |
| 46 namespace WebCore { | 46 namespace blink { |
| 47 | 47 |
| 48 PassRefPtr<Scrollbar> Scrollbar::create(ScrollableArea* scrollableArea, Scrollba
rOrientation orientation, ScrollbarControlSize size) | 48 PassRefPtr<Scrollbar> Scrollbar::create(ScrollableArea* scrollableArea, Scrollba
rOrientation orientation, ScrollbarControlSize size) |
| 49 { | 49 { |
| 50 return adoptRef(new Scrollbar(scrollableArea, orientation, size)); | 50 return adoptRef(new Scrollbar(scrollableArea, orientation, size)); |
| 51 } | 51 } |
| 52 | 52 |
| 53 Scrollbar::Scrollbar(ScrollableArea* scrollableArea, ScrollbarOrientation orient
ation, ScrollbarControlSize controlSize, ScrollbarTheme* theme) | 53 Scrollbar::Scrollbar(ScrollableArea* scrollableArea, ScrollbarOrientation orient
ation, ScrollbarControlSize controlSize, ScrollbarTheme* theme) |
| 54 : m_scrollableArea(scrollableArea) | 54 : m_scrollableArea(scrollableArea) |
| 55 , m_orientation(orientation) | 55 , m_orientation(orientation) |
| 56 , m_controlSize(controlSize) | 56 , m_controlSize(controlSize) |
| (...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 596 { | 596 { |
| 597 if (!m_scrollableArea) | 597 if (!m_scrollableArea) |
| 598 return 0; | 598 return 0; |
| 599 | 599 |
| 600 if (m_orientation == HorizontalScrollbar) | 600 if (m_orientation == HorizontalScrollbar) |
| 601 return m_scrollableArea->scrollPosition().x() - m_scrollableArea->minimu
mScrollPosition().x(); | 601 return m_scrollableArea->scrollPosition().x() - m_scrollableArea->minimu
mScrollPosition().x(); |
| 602 | 602 |
| 603 return m_scrollableArea->scrollPosition().y() - m_scrollableArea->minimumScr
ollPosition().y(); | 603 return m_scrollableArea->scrollPosition().y() - m_scrollableArea->minimumScr
ollPosition().y(); |
| 604 } | 604 } |
| 605 | 605 |
| 606 } // namespace WebCore | 606 } // namespace blink |
| OLD | NEW |