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

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

Issue 470633002: Rename repaint to paintInvalidation in rendering/style. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | « no previous file | Source/core/rendering/RenderLayerModelObject.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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 if (isOutOfFlowPositioned()) 137 if (isOutOfFlowPositioned())
138 RenderBlock::removePositionedObject(this); 138 RenderBlock::removePositionedObject(this);
139 } 139 }
140 140
141 void RenderBox::styleWillChange(StyleDifference diff, const RenderStyle& newStyl e) 141 void RenderBox::styleWillChange(StyleDifference diff, const RenderStyle& newStyl e)
142 { 142 {
143 RenderStyle* oldStyle = style(); 143 RenderStyle* oldStyle = style();
144 if (oldStyle) { 144 if (oldStyle) {
145 // The background of the root element or the body element could propagat e up to 145 // The background of the root element or the body element could propagat e up to
146 // the canvas. Just dirty the entire canvas when our style changes subst antially. 146 // the canvas. Just dirty the entire canvas when our style changes subst antially.
147 if ((diff.needsRepaint() || diff.needsLayout()) && node() 147 if ((diff.needsPaintInvalidation() || diff.needsLayout()) && node()
148 && (isHTMLHtmlElement(*node()) || isHTMLBodyElement(*node()))) { 148 && (isHTMLHtmlElement(*node()) || isHTMLBodyElement(*node()))) {
149 view()->paintInvalidationForWholeRenderer(); 149 view()->paintInvalidationForWholeRenderer();
150 150
151 if (oldStyle->hasEntirelyFixedBackground() != newStyle.hasEntirelyFi xedBackground()) 151 if (oldStyle->hasEntirelyFixedBackground() != newStyle.hasEntirelyFi xedBackground())
152 view()->compositor()->setNeedsUpdateFixedBackground(); 152 view()->compositor()->setNeedsUpdateFixedBackground();
153 } 153 }
154 154
155 // When a layout hint happens and an object's position style changes, we have to do a layout 155 // When a layout hint happens and an object's position style changes, we have to do a layout
156 // to dirty the render tree using the old position value now. 156 // to dirty the render tree using the old position value now.
157 if (diff.needsFullLayout() && parent() && oldStyle->position() != newSty le.position()) { 157 if (diff.needsFullLayout() && parent() && oldStyle->position() != newSty le.position()) {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 left = (left / oldStyle->effectiveZoom()) * newStyle->effectiveZoom( ); 204 left = (left / oldStyle->effectiveZoom()) * newStyle->effectiveZoom( );
205 layer()->scrollableArea()->scrollToXOffset(left); 205 layer()->scrollableArea()->scrollToXOffset(left);
206 } 206 }
207 if (int top = layer()->scrollableArea()->scrollYOffset()) { 207 if (int top = layer()->scrollableArea()->scrollYOffset()) {
208 top = (top / oldStyle->effectiveZoom()) * newStyle->effectiveZoom(); 208 top = (top / oldStyle->effectiveZoom()) * newStyle->effectiveZoom();
209 layer()->scrollableArea()->scrollToYOffset(top); 209 layer()->scrollableArea()->scrollToYOffset(top);
210 } 210 }
211 } 211 }
212 212
213 // Our opaqueness might have changed without triggering layout. 213 // Our opaqueness might have changed without triggering layout.
214 if (diff.needsRepaint()) { 214 if (diff.needsPaintInvalidation()) {
215 RenderObject* parentToInvalidate = parent(); 215 RenderObject* parentToInvalidate = parent();
216 for (unsigned i = 0; i < backgroundObscurationTestMaxDepth && parentToIn validate; ++i) { 216 for (unsigned i = 0; i < backgroundObscurationTestMaxDepth && parentToIn validate; ++i) {
217 parentToInvalidate->invalidateBackgroundObscurationStatus(); 217 parentToInvalidate->invalidateBackgroundObscurationStatus();
218 parentToInvalidate = parentToInvalidate->parent(); 218 parentToInvalidate = parentToInvalidate->parent();
219 } 219 }
220 } 220 }
221 221
222 if (isDocumentElement() || isBody()) 222 if (isDocumentElement() || isBody())
223 document().view()->recalculateScrollbarOverlayStyle(); 223 document().view()->recalculateScrollbarOverlayStyle();
224 224
(...skipping 4474 matching lines...) Expand 10 before | Expand all | Expand 10 after
4699 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style) 4699 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style)
4700 { 4700 {
4701 backgroundColor = style.visitedDependentColor(CSSPropertyBackgroundColor); 4701 backgroundColor = style.visitedDependentColor(CSSPropertyBackgroundColor);
4702 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage(); 4702 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage();
4703 ASSERT(hasBackground == style.hasBackground()); 4703 ASSERT(hasBackground == style.hasBackground());
4704 hasBorder = style.hasBorder(); 4704 hasBorder = style.hasBorder();
4705 hasAppearance = style.hasAppearance(); 4705 hasAppearance = style.hasAppearance();
4706 } 4706 }
4707 4707
4708 } // namespace blink 4708 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/core/rendering/RenderLayerModelObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698