Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(716)

Side by Side Diff: Source/core/rendering/RenderListBox.cpp

Issue 164553004: Convert LayoutState/LayoutStateMaintainer/LayoutStateDisabler to references (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/rendering/RenderLayer.cpp ('k') | Source/core/rendering/RenderListItem.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderLayer.cpp ('k') | Source/core/rendering/RenderListItem.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698