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

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

Issue 280633002: Rename RenderObject::setNeedsLayout to setNeedsLayoutAndFullRepaint (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 7 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/RenderObject.h ('k') | Source/core/rendering/RenderObjectChildList.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) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 2039 matching lines...) Expand 10 before | Expand all | Expand 10 after
2050 // in the future as we move renderer changes out of layout and into style ch anges. 2050 // in the future as we move renderer changes out of layout and into style ch anges.
2051 if (doesNotNeedLayout) 2051 if (doesNotNeedLayout)
2052 return; 2052 return;
2053 2053
2054 // Now that the layer (if any) has been updated, we need to adjust the diff again, 2054 // Now that the layer (if any) has been updated, we need to adjust the diff again,
2055 // check whether we should layout now, and decide if we need to repaint. 2055 // check whether we should layout now, and decide if we need to repaint.
2056 StyleDifference updatedDiff = adjustStyleDifference(diff, contextSensitivePr operties); 2056 StyleDifference updatedDiff = adjustStyleDifference(diff, contextSensitivePr operties);
2057 2057
2058 if (!diff.needsFullLayout()) { 2058 if (!diff.needsFullLayout()) {
2059 if (updatedDiff.needsFullLayout()) 2059 if (updatedDiff.needsFullLayout())
2060 setNeedsLayoutAndPrefWidthsRecalc(); 2060 setNeedsLayoutAndPrefWidthsRecalcAndFullRepaint();
2061 else if (updatedDiff.needsPositionedMovementLayout()) 2061 else if (updatedDiff.needsPositionedMovementLayout())
2062 setNeedsPositionedMovementLayout(); 2062 setNeedsPositionedMovementLayout();
2063 } 2063 }
2064 2064
2065 if (contextSensitiveProperties & ContextSensitivePropertyTransform && !needs Layout()) { 2065 if (contextSensitiveProperties & ContextSensitivePropertyTransform && !needs Layout()) {
2066 if (RenderBlock* container = containingBlock()) 2066 if (RenderBlock* container = containingBlock())
2067 container->setNeedsOverflowRecalcAfterStyleChange(); 2067 container->setNeedsOverflowRecalcAfterStyleChange();
2068 if (isBox()) 2068 if (isBox())
2069 toRenderBox(this)->updateLayerTransform(); 2069 toRenderBox(this)->updateLayerTransform();
2070 } 2070 }
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
2218 // directly affect the containing block of this object is a change to 2218 // directly affect the containing block of this object is a change to
2219 // the position style. 2219 // the position style.
2220 if (needsLayout() && oldStyle->position() != m_style->position()) 2220 if (needsLayout() && oldStyle->position() != m_style->position())
2221 markContainingBlocksForLayout(); 2221 markContainingBlocksForLayout();
2222 2222
2223 // Ditto. 2223 // Ditto.
2224 if (needsOverflowRecalcAfterStyleChange() && oldStyle->position() != m_s tyle->position()) 2224 if (needsOverflowRecalcAfterStyleChange() && oldStyle->position() != m_s tyle->position())
2225 markContainingBlocksForOverflowRecalc(); 2225 markContainingBlocksForOverflowRecalc();
2226 2226
2227 if (diff.needsFullLayout()) 2227 if (diff.needsFullLayout())
2228 setNeedsLayoutAndPrefWidthsRecalc(); 2228 setNeedsLayoutAndPrefWidthsRecalcAndFullRepaint();
2229 } else if (diff.needsPositionedMovementLayout()) 2229 } else if (diff.needsPositionedMovementLayout())
2230 setNeedsPositionedMovementLayout(); 2230 setNeedsPositionedMovementLayout();
2231 2231
2232 // Don't check for repaint here; we need to wait until the layer has been 2232 // Don't check for repaint here; we need to wait until the layer has been
2233 // updated by subclasses before we know if we have to repaint (in setStyle() ). 2233 // updated by subclasses before we know if we have to repaint (in setStyle() ).
2234 2234
2235 if (oldStyle && !areCursorsEqual(oldStyle, style())) { 2235 if (oldStyle && !areCursorsEqual(oldStyle, style())) {
2236 if (LocalFrame* frame = this->frame()) 2236 if (LocalFrame* frame = this->frame())
2237 frame->eventHandler().scheduleCursorUpdate(); 2237 frame->eventHandler().scheduleCursorUpdate();
2238 } 2238 }
(...skipping 1222 matching lines...) Expand 10 before | Expand all | Expand 10 after
3461 { 3461 {
3462 if (object1) { 3462 if (object1) {
3463 const WebCore::RenderObject* root = object1; 3463 const WebCore::RenderObject* root = object1;
3464 while (root->parent()) 3464 while (root->parent())
3465 root = root->parent(); 3465 root = root->parent();
3466 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 3466 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
3467 } 3467 }
3468 } 3468 }
3469 3469
3470 #endif 3470 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderObject.h ('k') | Source/core/rendering/RenderObjectChildList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698