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

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

Issue 377123002: Revert of Divorce PaintInvalidationState from LayoutState (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix conflict Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderListBox.h ('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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 if (m_vBar) { 192 if (m_vBar) {
193 bool enabled = numVisibleItems() < numItems(); 193 bool enabled = numVisibleItems() < numItems();
194 m_vBar->setEnabled(enabled); 194 m_vBar->setEnabled(enabled);
195 m_vBar->setProportion(numVisibleItems(), numItems()); 195 m_vBar->setProportion(numVisibleItems(), numItems());
196 if (!enabled) { 196 if (!enabled) {
197 scrollToOffsetWithoutAnimation(VerticalScrollbar, 0); 197 scrollToOffsetWithoutAnimation(VerticalScrollbar, 0);
198 m_indexOffset = 0; 198 m_indexOffset = 0;
199 } 199 }
200 } 200 }
201 201
202 if (m_scrollToRevealSelectionAfterLayout) 202 if (m_scrollToRevealSelectionAfterLayout) {
203 ForceHorriblySlowRectMapping slowRectMapping(*this);
203 scrollToRevealSelection(); 204 scrollToRevealSelection();
205 }
204 } 206 }
205 207
206 void RenderListBox::invalidateTreeAfterLayout(const PaintInvalidationState& pain tInvalidationState) 208 void RenderListBox::invalidateTreeAfterLayout(const RenderLayerModelObject& inva lidationContainer)
207 { 209 {
208 repaintScrollbarIfNeeded(); 210 repaintScrollbarIfNeeded();
209 RenderBox::invalidateTreeAfterLayout(paintInvalidationState); 211 RenderBox::invalidateTreeAfterLayout(invalidationContainer);
210 } 212 }
211 213
212 void RenderListBox::scrollToRevealSelection() 214 void RenderListBox::scrollToRevealSelection()
213 { 215 {
214 HTMLSelectElement* select = selectElement(); 216 HTMLSelectElement* select = selectElement();
215 217
216 m_scrollToRevealSelectionAfterLayout = false; 218 m_scrollToRevealSelectionAfterLayout = false;
217 219
218 int firstIndex = listIndexToRenderListBoxIndex(select->activeSelectionStartL istIndex()); 220 int firstIndex = listIndexToRenderListBoxIndex(select->activeSelectionStartL istIndex());
219 int lastIndex = listIndexToRenderListBoxIndex(select->activeSelectionEndList Index()); 221 int lastIndex = listIndexToRenderListBoxIndex(select->activeSelectionEndList Index());
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after
1016 { 1018 {
1017 return itemBoundingBoxRectInternal(point, listIndexToRenderListBoxIndex(inde x)); 1019 return itemBoundingBoxRectInternal(point, listIndexToRenderListBoxIndex(inde x));
1018 } 1020 }
1019 1021
1020 bool RenderListBox::scrollToRevealElementAtListIndex(int index) 1022 bool RenderListBox::scrollToRevealElementAtListIndex(int index)
1021 { 1023 {
1022 return scrollToRevealElementAtListIndexInternal(listIndexToRenderListBoxInde x(index)); 1024 return scrollToRevealElementAtListIndexInternal(listIndexToRenderListBoxInde x(index));
1023 } 1025 }
1024 1026
1025 } // namespace WebCore 1027 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderListBox.h ('k') | Source/core/rendering/RenderListItem.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698