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

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

Issue 662483002: Ensure positioned descendants are invalidated if needed (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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') | no next file » | 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 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after
1216 // If we didn't need paint invalidation then our children don't need as well . 1216 // If we didn't need paint invalidation then our children don't need as well .
1217 // Skip walking down the tree as everything should be fine below us. 1217 // Skip walking down the tree as everything should be fine below us.
1218 if (!shouldCheckForPaintInvalidation(paintInvalidationState)) 1218 if (!shouldCheckForPaintInvalidation(paintInvalidationState))
1219 return; 1219 return;
1220 1220
1221 invalidatePaintIfNeeded(paintInvalidationState, paintInvalidationState.paint InvalidationContainer()); 1221 invalidatePaintIfNeeded(paintInvalidationState, paintInvalidationState.paint InvalidationContainer());
1222 clearPaintInvalidationState(paintInvalidationState); 1222 clearPaintInvalidationState(paintInvalidationState);
1223 invalidatePaintOfSubtreesIfNeeded(paintInvalidationState); 1223 invalidatePaintOfSubtreesIfNeeded(paintInvalidationState);
1224 } 1224 }
1225 1225
1226 void RenderObject::invalidatePaintOfSubtreesIfNeeded(const PaintInvalidationStat e& paintInvalidationState) 1226 void RenderObject::invalidatePaintOfSubtreesIfNeeded(const PaintInvalidationStat e& childPaintInvalidationState)
1227 { 1227 {
1228 for (RenderObject* child = slowFirstChild(); child; child = child->nextSibli ng()) { 1228 for (RenderObject* child = slowFirstChild(); child; child = child->nextSibli ng()) {
1229 if (!child->isOutOfFlowPositioned()) 1229 if (!child->isOutOfFlowPositioned())
1230 child->invalidateTreeIfNeeded(paintInvalidationState); 1230 child->invalidateTreeIfNeeded(childPaintInvalidationState);
1231 } 1231 }
1232 } 1232 }
1233 1233
1234 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> jsonObjectForOldAndNewRe cts(const LayoutRect& oldRect, const LayoutPoint& oldLocation, const LayoutRect& newRect, const LayoutPoint& newLocation) 1234 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> jsonObjectForOldAndNewRe cts(const LayoutRect& oldRect, const LayoutPoint& oldLocation, const LayoutRect& newRect, const LayoutPoint& newLocation)
1235 { 1235 {
1236 RefPtr<TracedValue> value = TracedValue::create(); 1236 RefPtr<TracedValue> value = TracedValue::create();
1237 addJsonObjectForRect(value.get(), "oldRect", oldRect); 1237 addJsonObjectForRect(value.get(), "oldRect", oldRect);
1238 addJsonObjectForPoint(value.get(), "oldLocation", oldLocation); 1238 addJsonObjectForPoint(value.get(), "oldLocation", oldLocation);
1239 addJsonObjectForRect(value.get(), "newRect", newRect); 1239 addJsonObjectForRect(value.get(), "newRect", newRect);
1240 addJsonObjectForPoint(value.get(), "newLocation", newLocation); 1240 addJsonObjectForPoint(value.get(), "newLocation", newLocation);
(...skipping 1899 matching lines...) Expand 10 before | Expand all | Expand 10 after
3140 { 3140 {
3141 if (object1) { 3141 if (object1) {
3142 const blink::RenderObject* root = object1; 3142 const blink::RenderObject* root = object1;
3143 while (root->parent()) 3143 while (root->parent())
3144 root = root->parent(); 3144 root = root->parent();
3145 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 3145 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
3146 } 3146 }
3147 } 3147 }
3148 3148
3149 #endif 3149 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderObject.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698