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

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

Issue 318803002: Rename Repaint to Paint Invalidation part 3 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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
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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 m_optionsChanged = false; 168 m_optionsChanged = false;
169 169
170 setHasVerticalScrollbar(true); 170 setHasVerticalScrollbar(true);
171 171
172 setNeedsLayoutAndPrefWidthsRecalcAndFullRepaint(); 172 setNeedsLayoutAndPrefWidthsRecalcAndFullRepaint();
173 } 173 }
174 } 174 }
175 175
176 void RenderListBox::selectionChanged() 176 void RenderListBox::selectionChanged()
177 { 177 {
178 repaint(); 178 paintInvalidationForWholeRenderer();
179 if (!m_inAutoscroll) { 179 if (!m_inAutoscroll) {
180 if (m_optionsChanged || needsLayout()) 180 if (m_optionsChanged || needsLayout())
181 m_scrollToRevealSelectionAfterLayout = true; 181 m_scrollToRevealSelectionAfterLayout = true;
182 else 182 else
183 scrollToRevealSelection(); 183 scrollToRevealSelection();
184 } 184 }
185 185
186 if (AXObjectCache* cache = document().existingAXObjectCache()) 186 if (AXObjectCache* cache = document().existingAXObjectCache())
187 cache->selectedChildrenChanged(this); 187 cache->selectedChildrenChanged(this);
188 } 188 }
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 void RenderListBox::scrollTo(int newOffset) 673 void RenderListBox::scrollTo(int newOffset)
674 { 674 {
675 if (newOffset == m_indexOffset) 675 if (newOffset == m_indexOffset)
676 return; 676 return;
677 677
678 m_indexOffset = newOffset; 678 m_indexOffset = newOffset;
679 679
680 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled() && frameView()->isIn PerformLayout()) 680 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled() && frameView()->isIn PerformLayout())
681 setShouldDoFullPaintInvalidationAfterLayout(true); 681 setShouldDoFullPaintInvalidationAfterLayout(true);
682 else 682 else
683 repaint(); 683 paintInvalidationForWholeRenderer();
684 684
685 node()->document().enqueueScrollEventForNode(node()); 685 node()->document().enqueueScrollEventForNode(node());
686 } 686 }
687 687
688 LayoutUnit RenderListBox::itemHeight() const 688 LayoutUnit RenderListBox::itemHeight() const
689 { 689 {
690 return style()->fontMetrics().height() + rowSpacing; 690 return style()->fontMetrics().height() + rowSpacing;
691 } 691 }
692 692
693 int RenderListBox::verticalScrollbarWidth() const 693 int RenderListBox::verticalScrollbarWidth() const
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 IntRect scrollRect = rect; 776 IntRect scrollRect = rect;
777 if (style()->shouldPlaceBlockDirectionScrollbarOnLogicalLeft()) 777 if (style()->shouldPlaceBlockDirectionScrollbarOnLogicalLeft())
778 scrollRect.move(borderLeft(), borderTop()); 778 scrollRect.move(borderLeft(), borderTop());
779 else 779 else
780 scrollRect.move(width() - borderRight() - scrollbar->width(), borderTop( )); 780 scrollRect.move(width() - borderRight() - scrollbar->width(), borderTop( ));
781 781
782 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled() && frameView()->isIn PerformLayout()) { 782 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled() && frameView()->isIn PerformLayout()) {
783 m_verticalBarDamage = scrollRect; 783 m_verticalBarDamage = scrollRect;
784 m_hasVerticalBarDamage = true; 784 m_hasVerticalBarDamage = true;
785 } else { 785 } else {
786 repaintRectangle(scrollRect); 786 invalidatePaintRectangle(scrollRect);
787 } 787 }
788 } 788 }
789 789
790 void RenderListBox::repaintScrollbarIfNeeded() 790 void RenderListBox::repaintScrollbarIfNeeded()
791 { 791 {
792 if (!hasVerticalBarDamage()) 792 if (!hasVerticalBarDamage())
793 return; 793 return;
794 repaintRectangle(verticalBarDamage()); 794 invalidatePaintRectangle(verticalBarDamage());
795 795
796 resetScrollbarDamage(); 796 resetScrollbarDamage();
797 } 797 }
798 798
799 IntRect RenderListBox::convertFromScrollbarToContainingView(const Scrollbar* scr ollbar, const IntRect& scrollbarRect) const 799 IntRect RenderListBox::convertFromScrollbarToContainingView(const Scrollbar* scr ollbar, const IntRect& scrollbarRect) const
800 { 800 {
801 RenderView* view = this->view(); 801 RenderView* view = this->view();
802 if (!view) 802 if (!view)
803 return scrollbarRect; 803 return scrollbarRect;
804 804
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
1022 { 1022 {
1023 return itemBoundingBoxRectInternal(point, listIndexToRenderListBoxIndex(inde x)); 1023 return itemBoundingBoxRectInternal(point, listIndexToRenderListBoxIndex(inde x));
1024 } 1024 }
1025 1025
1026 bool RenderListBox::scrollToRevealElementAtListIndex(int index) 1026 bool RenderListBox::scrollToRevealElementAtListIndex(int index)
1027 { 1027 {
1028 return scrollToRevealElementAtListIndexInternal(listIndexToRenderListBoxInde x(index)); 1028 return scrollToRevealElementAtListIndexInternal(listIndexToRenderListBoxInde x(index));
1029 } 1029 }
1030 1030
1031 } // namespace WebCore 1031 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderLayerScrollableArea.cpp ('k') | Source/core/rendering/RenderListMarker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698