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

Side by Side Diff: Source/core/paint/DeprecatedPaintLayer.cpp

Issue 1188363002: Compute the normal flow list on the fly (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaselined patch. Created 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after
1143 child->setNextSibling(beforeChild); 1143 child->setNextSibling(beforeChild);
1144 ASSERT(beforeChild != child); 1144 ASSERT(beforeChild != child);
1145 } else { 1145 } else {
1146 setLastChild(child); 1146 setLastChild(child);
1147 } 1147 }
1148 1148
1149 child->m_parent = this; 1149 child->m_parent = this;
1150 1150
1151 setNeedsCompositingInputsUpdate(); 1151 setNeedsCompositingInputsUpdate();
1152 1152
1153 if (!child->stackingNode()->isTreatedAsStackingContextForPainting()) 1153 if (!child->stackingNode()->isTreatedAsStackingContextForPainting() && !layo utObject()->documentBeingDestroyed())
1154 m_stackingNode->dirtyNormalFlowList(); 1154 compositor()->setNeedsCompositingUpdate(CompositingUpdateRebuildTree);
1155 1155
1156 if (child->stackingNode()->isTreatedAsStackingContextForPainting() || child- >firstChild()) { 1156 if (child->stackingNode()->isTreatedAsStackingContextForPainting() || child- >firstChild()) {
1157 // Dirty the z-order list in which we are contained. The ancestorStackin gContextNode() can be null in the 1157 // Dirty the z-order list in which we are contained. The ancestorStackin gContextNode() can be null in the
1158 // case where we're building up generated content layers. This is ok, si nce the lists will start 1158 // case where we're building up generated content layers. This is ok, si nce the lists will start
1159 // off dirty in that case anyway. 1159 // off dirty in that case anyway.
1160 child->stackingNode()->dirtyStackingContextZOrderLists(); 1160 child->stackingNode()->dirtyStackingContextZOrderLists();
1161 } 1161 }
1162 1162
1163 // Non-self-painting children paint into this layer, so the visible contents status of this layer is affected. 1163 // Non-self-painting children paint into this layer, so the visible contents status of this layer is affected.
1164 if (!child->isSelfPaintingLayer()) 1164 if (!child->isSelfPaintingLayer())
(...skipping 10 matching lines...) Expand all
1175 if (oldChild->previousSibling()) 1175 if (oldChild->previousSibling())
1176 oldChild->previousSibling()->setNextSibling(oldChild->nextSibling()); 1176 oldChild->previousSibling()->setNextSibling(oldChild->nextSibling());
1177 if (oldChild->nextSibling()) 1177 if (oldChild->nextSibling())
1178 oldChild->nextSibling()->setPreviousSibling(oldChild->previousSibling()) ; 1178 oldChild->nextSibling()->setPreviousSibling(oldChild->previousSibling()) ;
1179 1179
1180 if (m_first == oldChild) 1180 if (m_first == oldChild)
1181 m_first = oldChild->nextSibling(); 1181 m_first = oldChild->nextSibling();
1182 if (m_last == oldChild) 1182 if (m_last == oldChild)
1183 m_last = oldChild->previousSibling(); 1183 m_last = oldChild->previousSibling();
1184 1184
1185 if (!oldChild->stackingNode()->isTreatedAsStackingContextForPainting()) 1185 if (!oldChild->stackingNode()->isTreatedAsStackingContextForPainting() && !l ayoutObject()->documentBeingDestroyed())
1186 m_stackingNode->dirtyNormalFlowList(); 1186 compositor()->setNeedsCompositingUpdate(CompositingUpdateRebuildTree);
1187
1187 if (oldChild->stackingNode()->isTreatedAsStackingContextForPainting() || old Child->firstChild()) { 1188 if (oldChild->stackingNode()->isTreatedAsStackingContextForPainting() || old Child->firstChild()) {
1188 // Dirty the z-order list in which we are contained. When called via th e 1189 // Dirty the z-order list in which we are contained. When called via th e
1189 // reattachment process in removeOnlyThisLayer, the layer may already be disconnected 1190 // reattachment process in removeOnlyThisLayer, the layer may already be disconnected
1190 // from the main layer tree, so we need to null-check the 1191 // from the main layer tree, so we need to null-check the
1191 // |stackingContext| value. 1192 // |stackingContext| value.
1192 oldChild->stackingNode()->dirtyStackingContextZOrderLists(); 1193 oldChild->stackingNode()->dirtyStackingContextZOrderLists();
1193 } 1194 }
1194 1195
1195 if (layoutObject()->style()->visibility() != VISIBLE) 1196 if (layoutObject()->style()->visibility() != VISIBLE)
1196 dirtyVisibleContentStatus(); 1197 dirtyVisibleContentStatus();
(...skipping 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after
2392 if (paintsWithFilters() && layoutObject()->style()->filter().hasFilterThatAf fectsOpacity()) 2393 if (paintsWithFilters() && layoutObject()->style()->filter().hasFilterThatAf fectsOpacity())
2393 return false; 2394 return false;
2394 2395
2395 // FIXME: Handle simple transforms. 2396 // FIXME: Handle simple transforms.
2396 if (paintsWithTransform(PaintBehaviorNormal)) 2397 if (paintsWithTransform(PaintBehaviorNormal))
2397 return false; 2398 return false;
2398 2399
2399 // FIXME: Remove this check. 2400 // FIXME: Remove this check.
2400 // This function should not be called when layer-lists are dirty. 2401 // This function should not be called when layer-lists are dirty.
2401 // It is somehow getting triggered during style update. 2402 // It is somehow getting triggered during style update.
2402 if (m_stackingNode->zOrderListsDirty() || m_stackingNode->normalFlowListDirt y()) 2403 if (m_stackingNode->zOrderListsDirty())
2403 return false; 2404 return false;
2404 2405
2405 // FIXME: We currently only check the immediate layoutObject, 2406 // FIXME: We currently only check the immediate layoutObject,
2406 // which will miss many cases. 2407 // which will miss many cases.
2407 if (layoutObject()->backgroundIsKnownToBeOpaqueInRect(localRect)) 2408 if (layoutObject()->backgroundIsKnownToBeOpaqueInRect(localRect))
2408 return true; 2409 return true;
2409 2410
2410 // We can't consult child layers if we clip, since they might cover 2411 // We can't consult child layers if we clip, since they might cover
2411 // parts of the rect that are clipped out. 2412 // parts of the rect that are clipped out.
2412 if (layoutObject()->hasOverflowClip()) 2413 if (layoutObject()->hasOverflowClip())
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
2735 2736
2736 void showLayerTree(const blink::LayoutObject* layoutObject) 2737 void showLayerTree(const blink::LayoutObject* layoutObject)
2737 { 2738 {
2738 if (!layoutObject) { 2739 if (!layoutObject) {
2739 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); 2740 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n");
2740 return; 2741 return;
2741 } 2742 }
2742 showLayerTree(layoutObject->enclosingLayer()); 2743 showLayerTree(layoutObject->enclosingLayer());
2743 } 2744 }
2744 #endif 2745 #endif
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutTreeAsText.cpp ('k') | Source/core/paint/DeprecatedPaintLayerStackingNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698