| 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 else | 163 else |
| 164 scrollToRevealSelection(); | 164 scrollToRevealSelection(); |
| 165 } | 165 } |
| 166 | 166 |
| 167 if (AXObjectCache* cache = document()->existingAXObjectCache()) | 167 if (AXObjectCache* cache = document()->existingAXObjectCache()) |
| 168 cache->selectedChildrenChanged(this); | 168 cache->selectedChildrenChanged(this); |
| 169 } | 169 } |
| 170 | 170 |
| 171 void RenderListBox::layout() | 171 void RenderListBox::layout() |
| 172 { | 172 { |
| 173 StackStats::LayoutCheckPoint layoutCheckPoint; | |
| 174 RenderBlock::layout(); | 173 RenderBlock::layout(); |
| 175 | 174 |
| 176 if (m_vBar) { | 175 if (m_vBar) { |
| 177 bool enabled = numVisibleItems() < numItems(); | 176 bool enabled = numVisibleItems() < numItems(); |
| 178 m_vBar->setEnabled(enabled); | 177 m_vBar->setEnabled(enabled); |
| 179 m_vBar->setProportion(numVisibleItems(), numItems()); | 178 m_vBar->setProportion(numVisibleItems(), numItems()); |
| 180 if (!enabled) { | 179 if (!enabled) { |
| 181 scrollToOffsetWithoutAnimation(VerticalScrollbar, 0); | 180 scrollToOffsetWithoutAnimation(VerticalScrollbar, 0); |
| 182 m_indexOffset = 0; | 181 m_indexOffset = 0; |
| 183 } | 182 } |
| (...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 908 | 907 |
| 909 if (m_vBar) | 908 if (m_vBar) |
| 910 m_vBar->styleChanged(); | 909 m_vBar->styleChanged(); |
| 911 | 910 |
| 912 // Force an update since we know the scrollbars have changed things. | 911 // Force an update since we know the scrollbars have changed things. |
| 913 if (document()->hasAnnotatedRegions()) | 912 if (document()->hasAnnotatedRegions()) |
| 914 document()->setAnnotatedRegionsDirty(true); | 913 document()->setAnnotatedRegionsDirty(true); |
| 915 } | 914 } |
| 916 | 915 |
| 917 } // namespace WebCore | 916 } // namespace WebCore |
| OLD | NEW |