| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 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 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 802 } | 802 } |
| 803 | 803 |
| 804 bool ScrollView::userInputScrollable(ScrollbarOrientation orientation) const | 804 bool ScrollView::userInputScrollable(ScrollbarOrientation orientation) const |
| 805 { | 805 { |
| 806 ScrollbarMode mode = (orientation == HorizontalScrollbar) ? | 806 ScrollbarMode mode = (orientation == HorizontalScrollbar) ? |
| 807 m_horizontalScrollbarMode : m_verticalScrollbarMode; | 807 m_horizontalScrollbarMode : m_verticalScrollbarMode; |
| 808 | 808 |
| 809 return mode == ScrollbarAuto || mode == ScrollbarAlwaysOn; | 809 return mode == ScrollbarAuto || mode == ScrollbarAlwaysOn; |
| 810 } | 810 } |
| 811 | 811 |
| 812 bool ScrollView::shouldPlaceVerticalScrollbarOnLeft() const |
| 813 { |
| 814 return false; |
| 815 } |
| 816 |
| 812 void ScrollView::repaintContentRectangle(const IntRect& rect) | 817 void ScrollView::repaintContentRectangle(const IntRect& rect) |
| 813 { | 818 { |
| 814 IntRect paintRect = rect; | 819 IntRect paintRect = rect; |
| 815 if (clipsRepaints() && !paintsEntireContents()) | 820 if (clipsRepaints() && !paintsEntireContents()) |
| 816 paintRect.intersect(visibleContentRect()); | 821 paintRect.intersect(visibleContentRect()); |
| 817 if (paintRect.isEmpty()) | 822 if (paintRect.isEmpty()) |
| 818 return; | 823 return; |
| 819 | 824 |
| 820 if (HostWindow* window = hostWindow()) | 825 if (HostWindow* window = hostWindow()) |
| 821 window->invalidateContentsAndRootView(contentsToWindow(paintRect)); | 826 window->invalidateContentsAndRootView(contentsToWindow(paintRect)); |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1187 int ScrollView::pageStep(ScrollbarOrientation orientation) const | 1192 int ScrollView::pageStep(ScrollbarOrientation orientation) const |
| 1188 { | 1193 { |
| 1189 int length = (orientation == HorizontalScrollbar) ? visibleWidth() : visible
Height(); | 1194 int length = (orientation == HorizontalScrollbar) ? visibleWidth() : visible
Height(); |
| 1190 int minPageStep = static_cast<float>(length) * minFractionToStepWhenPaging()
; | 1195 int minPageStep = static_cast<float>(length) * minFractionToStepWhenPaging()
; |
| 1191 int pageStep = std::max(minPageStep, length - maxOverlapBetweenPages()); | 1196 int pageStep = std::max(minPageStep, length - maxOverlapBetweenPages()); |
| 1192 | 1197 |
| 1193 return std::max(pageStep, 1); | 1198 return std::max(pageStep, 1); |
| 1194 } | 1199 } |
| 1195 | 1200 |
| 1196 } // namespace WebCore | 1201 } // namespace WebCore |
| OLD | NEW |