| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. |
| 3 * 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 3 * 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 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 | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. 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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 } | 269 } |
| 270 | 270 |
| 271 int RenderListBox::baselinePosition(FontBaseline baselineType, bool firstLine, L
ineDirectionMode lineDirection, LinePositionMode linePositionMode) const | 271 int RenderListBox::baselinePosition(FontBaseline baselineType, bool firstLine, L
ineDirectionMode lineDirection, LinePositionMode linePositionMode) const |
| 272 { | 272 { |
| 273 return RenderBox::baselinePosition(baselineType, firstLine, lineDirection, l
inePositionMode) - baselineAdjustment; | 273 return RenderBox::baselinePosition(baselineType, firstLine, lineDirection, l
inePositionMode) - baselineAdjustment; |
| 274 } | 274 } |
| 275 | 275 |
| 276 LayoutRect RenderListBox::itemBoundingBoxRect(const LayoutPoint& additionalOffse
t, int index) | 276 LayoutRect RenderListBox::itemBoundingBoxRect(const LayoutPoint& additionalOffse
t, int index) |
| 277 { | 277 { |
| 278 return LayoutRect(additionalOffset.x() + borderLeft() + paddingLeft(), | 278 return LayoutRect(additionalOffset.x() + borderLeft() + paddingLeft(), |
| 279 additionalOffset.y() + borderTop() + paddingTop() + itemHeigh
t() * (index - m_indexOffset), | 279 additionalOffset.y() + borderTop() + paddingTop() + itemHeight() * (inde
x - m_indexOffset), |
| 280 contentWidth(), itemHeight()); | 280 contentWidth(), itemHeight()); |
| 281 } | 281 } |
| 282 | 282 |
| 283 void RenderListBox::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOf
fset) | 283 void RenderListBox::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOf
fset) |
| 284 { | 284 { |
| 285 if (style()->visibility() != VISIBLE) | 285 if (style()->visibility() != VISIBLE) |
| 286 return; | 286 return; |
| 287 | 287 |
| 288 int listItemsSize = numItems(); | 288 int listItemsSize = numItems(); |
| 289 | 289 |
| 290 if (paintInfo.phase == PaintPhaseForeground) { | 290 if (paintInfo.phase == PaintPhaseForeground) { |
| (...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 836 IntPoint RenderListBox::maximumScrollPosition() const | 836 IntPoint RenderListBox::maximumScrollPosition() const |
| 837 { | 837 { |
| 838 return IntPoint(0, numItems() - numVisibleItems()); | 838 return IntPoint(0, numItems() - numVisibleItems()); |
| 839 } | 839 } |
| 840 | 840 |
| 841 bool RenderListBox::userInputScrollable(ScrollbarOrientation orientation) const | 841 bool RenderListBox::userInputScrollable(ScrollbarOrientation orientation) const |
| 842 { | 842 { |
| 843 return orientation == VerticalScrollbar; | 843 return orientation == VerticalScrollbar; |
| 844 } | 844 } |
| 845 | 845 |
| 846 bool RenderListBox::shouldPlaceVerticalScrollbarOnLeft() const |
| 847 { |
| 848 return false; |
| 849 } |
| 850 |
| 846 int RenderListBox::lineStep(ScrollbarOrientation) const | 851 int RenderListBox::lineStep(ScrollbarOrientation) const |
| 847 { | 852 { |
| 848 return 1; | 853 return 1; |
| 849 } | 854 } |
| 850 | 855 |
| 851 int RenderListBox::pageStep(ScrollbarOrientation orientation) const | 856 int RenderListBox::pageStep(ScrollbarOrientation orientation) const |
| 852 { | 857 { |
| 853 return max(1, numVisibleItems() - 1); | 858 return max(1, numVisibleItems() - 1); |
| 854 } | 859 } |
| 855 | 860 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 907 | 912 |
| 908 if (m_vBar) | 913 if (m_vBar) |
| 909 m_vBar->styleChanged(); | 914 m_vBar->styleChanged(); |
| 910 | 915 |
| 911 // Force an update since we know the scrollbars have changed things. | 916 // Force an update since we know the scrollbars have changed things. |
| 912 if (document().hasAnnotatedRegions()) | 917 if (document().hasAnnotatedRegions()) |
| 913 document().setAnnotatedRegionsDirty(true); | 918 document().setAnnotatedRegionsDirty(true); |
| 914 } | 919 } |
| 915 | 920 |
| 916 } // namespace WebCore | 921 } // namespace WebCore |
| OLD | NEW |