| OLD | NEW |
| 1 /* | 1 /* |
| 2 * This file is part of the select element renderer in WebCore. | 2 * This file is part of the select element renderer in WebCore. |
| 3 * | 3 * |
| 4 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved. | 4 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 | 137 |
| 138 void setHasVerticalScrollbar(bool hasScrollbar); | 138 void setHasVerticalScrollbar(bool hasScrollbar); |
| 139 PassRefPtr<Scrollbar> createScrollbar(); | 139 PassRefPtr<Scrollbar> createScrollbar(); |
| 140 void destroyScrollbar(); | 140 void destroyScrollbar(); |
| 141 | 141 |
| 142 LayoutUnit itemHeight() const; | 142 LayoutUnit itemHeight() const; |
| 143 void valueChanged(unsigned listIndex); | 143 void valueChanged(unsigned listIndex); |
| 144 int numVisibleItems() const; | 144 int numVisibleItems() const; |
| 145 int numItems() const; | 145 int numItems() const; |
| 146 LayoutUnit listHeight() const; | 146 LayoutUnit listHeight() const; |
| 147 int scrollbarLeft() const; |
| 147 void paintScrollbar(PaintInfo&, const LayoutPoint&); | 148 void paintScrollbar(PaintInfo&, const LayoutPoint&); |
| 148 void paintItemForeground(PaintInfo&, const LayoutPoint&, int listIndex); | 149 void paintItemForeground(PaintInfo&, const LayoutPoint&, int listIndex); |
| 149 void paintItemBackground(PaintInfo&, const LayoutPoint&, int listIndex); | 150 void paintItemBackground(PaintInfo&, const LayoutPoint&, int listIndex); |
| 150 void scrollToRevealSelection(); | 151 void scrollToRevealSelection(); |
| 151 | 152 |
| 152 bool m_optionsChanged; | 153 bool m_optionsChanged; |
| 153 bool m_scrollToRevealSelectionAfterLayout; | 154 bool m_scrollToRevealSelectionAfterLayout; |
| 154 bool m_inAutoscroll; | 155 bool m_inAutoscroll; |
| 155 int m_optionsWidth; | 156 int m_optionsWidth; |
| 156 int m_indexOffset; | 157 int m_indexOffset; |
| 157 | 158 |
| 158 RefPtr<Scrollbar> m_vBar; | 159 RefPtr<Scrollbar> m_vBar; |
| 159 }; | 160 }; |
| 160 | 161 |
| 161 inline RenderListBox* toRenderListBox(RenderObject* object) | 162 inline RenderListBox* toRenderListBox(RenderObject* object) |
| 162 { | 163 { |
| 163 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isListBox()); | 164 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isListBox()); |
| 164 return static_cast<RenderListBox*>(object); | 165 return static_cast<RenderListBox*>(object); |
| 165 } | 166 } |
| 166 | 167 |
| 167 // This will catch anyone doing an unnecessary cast. | 168 // This will catch anyone doing an unnecessary cast. |
| 168 void toRenderListBox(const RenderListBox*); | 169 void toRenderListBox(const RenderListBox*); |
| 169 | 170 |
| 170 } // namepace WebCore | 171 } // namepace WebCore |
| 171 | 172 |
| 172 #endif // RenderListBox_h | 173 #endif // RenderListBox_h |
| OLD | NEW |