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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 bool enabled = numVisibleItems() < numItems(); | 184 bool enabled = numVisibleItems() < numItems(); |
185 m_vBar->setEnabled(enabled); | 185 m_vBar->setEnabled(enabled); |
186 m_vBar->setProportion(numVisibleItems(), numItems()); | 186 m_vBar->setProportion(numVisibleItems(), numItems()); |
187 if (!enabled) { | 187 if (!enabled) { |
188 scrollToOffsetWithoutAnimation(VerticalScrollbar, 0); | 188 scrollToOffsetWithoutAnimation(VerticalScrollbar, 0); |
189 m_indexOffset = 0; | 189 m_indexOffset = 0; |
190 } | 190 } |
191 } | 191 } |
192 | 192 |
193 if (m_scrollToRevealSelectionAfterLayout) { | 193 if (m_scrollToRevealSelectionAfterLayout) { |
194 LayoutStateDisabler layoutStateDisabler(view()); | 194 LayoutStateDisabler layoutStateDisabler(*this); |
195 scrollToRevealSelection(); | 195 scrollToRevealSelection(); |
196 } | 196 } |
197 } | 197 } |
198 | 198 |
199 void RenderListBox::scrollToRevealSelection() | 199 void RenderListBox::scrollToRevealSelection() |
200 { | 200 { |
201 HTMLSelectElement* select = selectElement(); | 201 HTMLSelectElement* select = selectElement(); |
202 | 202 |
203 m_scrollToRevealSelectionAfterLayout = false; | 203 m_scrollToRevealSelectionAfterLayout = false; |
204 | 204 |
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
951 | 951 |
952 if (m_vBar) | 952 if (m_vBar) |
953 m_vBar->styleChanged(); | 953 m_vBar->styleChanged(); |
954 | 954 |
955 // Force an update since we know the scrollbars have changed things. | 955 // Force an update since we know the scrollbars have changed things. |
956 if (document().hasAnnotatedRegions()) | 956 if (document().hasAnnotatedRegions()) |
957 document().setAnnotatedRegionsDirty(true); | 957 document().setAnnotatedRegionsDirty(true); |
958 } | 958 } |
959 | 959 |
960 } // namespace WebCore | 960 } // namespace WebCore |
OLD | NEW |