Changeset 140620 in webkit
- Timestamp:
- Jan 23, 2013 5:42:08 PM (11 years ago)
- Location:
- trunk/Source
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r140617 r140620 1 2013-01-23 Ian Vollick <vollick@chromium.org> 2 3 Introduce the "stacking container" concept. 4 https://bugs.webkit.org/show_bug.cgi?id=107734 5 6 Reviewed by Simon Fraser. 7 8 A stacking container is treated just like a stacking context. That 9 is, it has z-order lists, it and its descendants are stacked as a 10 unit, and when the RenderLayerCompositor does its overlap testing, 11 the composited regions for all layer lists take effect only once the 12 stacking container is done being processed. 13 14 This patch also adds the function RenderLayer::isStackingContainer(). 15 Currently, this is equivalent to RenderLayer::isStackingContext(), 16 but in future, the definition of stacking container will be broadened 17 to encompass more than just stacking contexts. 18 19 Other than the addition of this extra function, the patch is mostly 20 comprised of name changes. Any code that used to refer to the 21 stacking context concept, but didn't necessarily require a stacking 22 context in the strict, CSS-sense, was switched to refer to stacking 23 container. No functionality was changed. 24 25 No new tests, no change in functionality. 26 27 * inspector/InspectorLayerTreeAgent.cpp: 28 (WebCore::InspectorLayerTreeAgent::buildObjectForLayer): 29 * rendering/RenderLayer.cpp: 30 (WebCore::RenderLayer::RenderLayer): 31 (WebCore): 32 (WebCore::RenderLayer::updatePagination): 33 (WebCore::RenderLayer::canBeStackingContainer): 34 (WebCore::RenderLayer::setHasVisibleContent): 35 (WebCore::RenderLayer::dirty3DTransformedDescendantStatus): 36 (WebCore::RenderLayer::stackingContainer): 37 (WebCore::compositingContainer): 38 (WebCore::expandClipRectForDescendantsAndReflection): 39 (WebCore::RenderLayer::addChild): 40 (WebCore::RenderLayer::removeChild): 41 (WebCore::RenderLayer::updateNeedsCompositedScrolling): 42 (WebCore::RenderLayer::updateCompositingLayersAfterScroll): 43 (WebCore::RenderLayer::paintPaginatedChildLayer): 44 (WebCore::RenderLayer::hitTestPaginatedChildLayer): 45 (WebCore::RenderLayer::calculateLayerBounds): 46 (WebCore::RenderLayer::dirtyZOrderLists): 47 (WebCore::RenderLayer::dirtyStackingContainerZOrderLists): 48 (WebCore::RenderLayer::collectLayers): 49 (WebCore::RenderLayer::updateCompositingAndLayerListsIfNeeded): 50 (WebCore::RenderLayer::updateStackingContextsAfterStyleChange): 51 (WebCore::RenderLayer::styleChanged): 52 * rendering/RenderLayer.h: 53 (RenderLayer): 54 (WebCore::RenderLayer::isStackingContainer): 55 (WebCore::RenderLayer::posZOrderList): 56 (WebCore::RenderLayer::negZOrderList): 57 (WebCore::RenderLayer::isDirtyStackingContainer): 58 (WebCore::RenderLayer::clearZOrderLists): 59 (WebCore::RenderLayer::updateZOrderLists): 60 * rendering/RenderLayerBacking.cpp: 61 (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): 62 (WebCore::RenderLayerBacking::compositingOpacity): 63 (WebCore::RenderLayerBacking::hasVisibleNonCompositingDescendantLayers): 64 * rendering/RenderLayerCompositor.cpp: 65 (WebCore::RenderLayerCompositor::enclosingNonStackingClippingLayer): 66 (WebCore::RenderLayerCompositor::addToOverlapMapRecursive): 67 (WebCore::RenderLayerCompositor::computeCompositingRequirements): 68 (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): 69 (WebCore::RenderLayerCompositor::updateLayerTreeGeometry): 70 (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry): 71 (WebCore::RenderLayerCompositor::requiresCompositingForPosition): 72 (WebCore::RenderLayerCompositor::layerHas3DContent): 73 (WebCore::isRootmostFixedOrStickyLayer): 74 1 75 2013-01-23 Simon Fraser <simon.fraser@apple.com> 2 76 -
trunk/Source/WebCore/inspector/InspectorLayerTreeAgent.cpp
r138457 r140620 150 150 childrenArray->addItem(buildObjectForLayer(renderLayer->reflectionLayer())); 151 151 152 if (renderLayer->isStackingCont ext()) {152 if (renderLayer->isStackingContainer()) { 153 153 if (Vector<RenderLayer*>* negZOrderList = renderLayer->negZOrderList()) { 154 154 size_t listSize = negZOrderList->size(); … … 164 164 } 165 165 166 if (renderLayer->isStackingCont ext()) {166 if (renderLayer->isStackingContainer()) { 167 167 if (Vector<RenderLayer*>* posZOrderList = renderLayer->posZOrderList()) { 168 168 size_t listSize = posZOrderList->size(); -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r140546 r140620 197 197 m_isSelfPaintingLayer = shouldBeSelfPaintingLayer(); 198 198 199 // Non-stacking cont exts should have empty z-order lists. As this is already the case,199 // Non-stacking containers should have empty z-order lists. As this is already the case, 200 200 // there is no need to dirty / recompute these lists. 201 m_zOrderListsDirty = isStackingCont ext();201 m_zOrderListsDirty = isStackingContainer(); 202 202 203 203 ScrollableArea::setConstrainsScrollingToContentEdge(false); … … 523 523 } 524 524 525 // If we are a stacking cont ext, then this function will determine if our525 // If we are a stacking container, then this function will determine if our 526 526 // descendants for a contiguous block in stacking order. This is required in 527 // order for an element to be safely promoted to a stacking cont ext. It is safe528 // to become a stacking cont extif this change would not alter the stacking527 // order for an element to be safely promoted to a stacking container. It is safe 528 // to become a stacking container if this change would not alter the stacking 529 529 // order of layers on the page. That can only happen if a non-descendant appear 530 530 // between us and our descendants in stacking order. Here's an example: … … 539 539 // 540 540 // I've labeled our normal flow descendants A, B, C, and D, our stacking 541 // cont extdescendants with their z indices, and us with 'this' (we're a542 // stacking cont extand our zIndex doesn't matter here). These nodes appear in541 // container descendants with their z indices, and us with 'this' (we're a 542 // stacking container and our zIndex doesn't matter here). These nodes appear in 543 543 // three lists: posZOrder, negZOrder, and normal flow (keep in mind that normal 544 544 // flow layers don't overlap). So if we arrange these lists in order we get our … … 556 556 // Note that the normal flow descendants can share an index because they don't 557 557 // stack/overlap. Now our problem becomes very simple: a layer can safely become 558 // a stacking cont extif the stacking-order indices of it and its descendants558 // a stacking container if the stacking-order indices of it and its descendants 559 559 // appear in a contiguous block in the list of stacking indices. This problem 560 560 // can be solved very efficiently by calculating the min/max stacking indices in 561 // the subtree, and the number stacking cont extdescendants. Once we have this561 // the subtree, and the number stacking container descendants. Once we have this 562 562 // information, we know that the subtree's indices form a contiguous block if: 563 563 // … … 574 574 // ===> 2 == 2 575 575 // 576 // Since this is true, A can safely become a stacking cont ext.576 // Since this is true, A can safely become a stacking container. 577 577 // Now, for node C we have: 578 578 // … … 586 586 // ===> 4 == 2 587 587 // 588 // Since this is false, C cannot be safely promoted to a stacking cont ext. This588 // Since this is false, C cannot be safely promoted to a stacking container. This 589 589 // happened because of the elements with z-index 5 and 0. Now if 5 had been a 590 590 // child of C rather than D, and A had no child with Z index 0, we would have had: … … 916 916 } 917 917 918 // If we're not normal flow, then we need to look for a multi-column object between us and our stacking cont ext.919 RenderLayer* ancestorStackingCont ext = stackingContext();918 // If we're not normal flow, then we need to look for a multi-column object between us and our stacking container. 919 RenderLayer* ancestorStackingContainer = stackingContainer(); 920 920 for (RenderLayer* curr = parent(); curr; curr = curr->parent()) { 921 921 if (curr->renderer()->hasColumns()) { … … 923 923 return; 924 924 } 925 if (curr == ancestorStackingCont ext)925 if (curr == ancestorStackingContainer) 926 926 return; 927 927 } 928 928 } 929 929 930 bool RenderLayer::can SafelyEstablishAStackingContext() const931 { 932 if (isStackingContext() || !stackingCont ext())930 bool RenderLayer::canBeStackingContainer() const 931 { 932 if (isStackingContext() || !stackingContainer()) 933 933 return true; 934 934 … … 948 948 if (!isNormalFlowOnly()) { 949 949 // We don't collect invisible layers in z-order lists if we are not in compositing mode. 950 // As we became visible, we need to dirty our stacking cont exts ancestors to be properly950 // As we became visible, we need to dirty our stacking containers ancestors to be properly 951 951 // collected. FIXME: When compositing, we could skip this dirtying phase. 952 for (RenderLayer* sc = stackingCont ext(); sc; sc = sc->stackingContext()) {952 for (RenderLayer* sc = stackingContainer(); sc; sc = sc->stackingContainer()) { 953 953 sc->dirtyZOrderLists(); 954 954 if (sc->hasVisibleContent()) … … 1069 1069 void RenderLayer::dirty3DTransformedDescendantStatus() 1070 1070 { 1071 RenderLayer* curr = stackingCont ext();1071 RenderLayer* curr = stackingContainer(); 1072 1072 if (curr) 1073 1073 curr->m_3DTransformedDescendantStatusDirty = true; 1074 1074 1075 1075 // This propagates up through preserve-3d hierarchies to the enclosing flattening layer. 1076 // Note that preserves3D() creates stacking context, so we can just run up the stacking cont exts.1076 // Note that preserves3D() creates stacking context, so we can just run up the stacking containers. 1077 1077 while (curr && curr->preserves3D()) { 1078 1078 curr->m_3DTransformedDescendantStatusDirty = true; 1079 curr = curr->stackingCont ext();1079 curr = curr->stackingContainer(); 1080 1080 } 1081 1081 } … … 1240 1240 } 1241 1241 1242 RenderLayer* RenderLayer::stackingCont ext() const1242 RenderLayer* RenderLayer::stackingContainer() const 1243 1243 { 1244 1244 RenderLayer* layer = parent(); 1245 while (layer && !layer->isStackingCont ext())1245 while (layer && !layer->isStackingContainer()) 1246 1246 layer = layer->parent(); 1247 1247 1248 ASSERT(!layer || layer->isStackingCont ext());1248 ASSERT(!layer || layer->isStackingContainer()); 1249 1249 return layer; 1250 1250 } … … 1296 1296 static inline const RenderLayer* compositingContainer(const RenderLayer* layer) 1297 1297 { 1298 return layer->isNormalFlowOnly() ? layer->parent() : layer->stackingCont ext();1298 return layer->isNormalFlowOnly() ? layer->parent() : layer->stackingContainer(); 1299 1299 } 1300 1300 … … 1510 1510 if (!layer->renderer()->hasMask()) { 1511 1511 // Note: we don't have to walk z-order lists since transparent elements always establish 1512 // a stacking cont ext.This means we can just walk the layer tree directly.1512 // a stacking container. This means we can just walk the layer tree directly. 1513 1513 for (RenderLayer* curr = layer->firstChild(); curr; curr = curr->nextSibling()) { 1514 1514 if (!layer->reflection() || layer->reflectionLayer() != curr) … … 1625 1625 1626 1626 if (!child->isNormalFlowOnly() || child->firstChild()) { 1627 // Dirty the z-order list in which we are contained. The stackingContext() can be null in the1628 // case where we're building up generated content layers. 1627 // Dirty the z-order list in which we are contained. The stackingContainer() can be null in the 1628 // case where we're building up generated content layers. This is ok, since the lists will start 1629 1629 // off dirty in that case anyway. 1630 child->dirtyStackingCont extZOrderLists();1630 child->dirtyStackingContainerZOrderLists(); 1631 1631 } 1632 1632 … … 1669 1669 // Dirty the z-order list in which we are contained. When called via the 1670 1670 // reattachment process in removeOnlyThisLayer, the layer may already be disconnected 1671 // from the main layer tree, so we need to null-check the |stackingCont ext| value.1672 oldChild->dirtyStackingCont extZOrderLists();1671 // from the main layer tree, so we need to null-check the |stackingContainer| value. 1672 oldChild->dirtyStackingContainerZOrderLists(); 1673 1673 } 1674 1674 … … 1905 1905 else { 1906 1906 bool forceUseCompositedScrolling = acceleratedCompositingForOverflowScrollEnabled() 1907 && can SafelyEstablishAStackingContext()1907 && canBeStackingContainer() 1908 1908 && !hasOutOfFlowPositionedDescendant(); 1909 1909 … … 2218 2218 #if USE(ACCELERATED_COMPOSITING) 2219 2219 if (compositor()->inCompositingMode()) { 2220 // Our stacking cont extis guaranteed to contain all of our descendants that may need2220 // Our stacking container is guaranteed to contain all of our descendants that may need 2221 2221 // repositioning, so update compositing layers from there. 2222 if (RenderLayer* compositingAncestor = stackingCont ext()->enclosingCompositingLayer()) {2222 if (RenderLayer* compositingAncestor = stackingContainer()->enclosingCompositingLayer()) { 2223 2223 if (compositor()->compositingConsultsOverlap()) 2224 2224 compositor()->updateCompositingLayers(CompositingUpdateOnScroll, compositingAncestor); … … 3843 3843 // We need to do multiple passes, breaking up our child layer into strips. 3844 3844 Vector<RenderLayer*> columnLayers; 3845 RenderLayer* ancestorLayer = isNormalFlowOnly() ? parent() : stackingCont ext();3845 RenderLayer* ancestorLayer = isNormalFlowOnly() ? parent() : stackingContainer(); 3846 3846 for (RenderLayer* curr = childLayer->parent(); curr; curr = curr->parent()) { 3847 3847 if (curr->renderer()->hasColumns() && checkContainingBlockChainForPagination(childLayer->renderer(), curr->renderBox())) … … 4357 4357 { 4358 4358 Vector<RenderLayer*> columnLayers; 4359 RenderLayer* ancestorLayer = isNormalFlowOnly() ? parent() : stackingCont ext();4359 RenderLayer* ancestorLayer = isNormalFlowOnly() ? parent() : stackingContainer(); 4360 4360 for (RenderLayer* curr = childLayer->parent(); curr; curr = curr->parent()) { 4361 4361 if (curr->renderer()->hasColumns() && checkContainingBlockChainForPagination(childLayer->renderer(), curr->renderBox())) … … 4919 4919 } 4920 4920 4921 ASSERT(isStackingCont ext() || (!posZOrderList() || !posZOrderList()->size()));4921 ASSERT(isStackingContainer() || (!posZOrderList() || !posZOrderList()->size())); 4922 4922 4923 4923 #if !ASSERT_DISABLED … … 5100 5100 { 5101 5101 ASSERT(m_layerListMutationAllowed); 5102 ASSERT(isStackingCont ext());5102 ASSERT(isStackingContainer()); 5103 5103 5104 5104 if (m_posZOrderList) … … 5117 5117 } 5118 5118 5119 void RenderLayer::dirtyStackingCont extZOrderLists()5120 { 5121 RenderLayer* sc = stackingCont ext();5119 void RenderLayer::dirtyStackingContainerZOrderLists() 5120 { 5121 RenderLayer* sc = stackingContainer(); 5122 5122 if (sc) 5123 5123 sc->dirtyZOrderLists(); … … 5208 5208 updateDescendantDependentFlags(); 5209 5209 5210 bool isStacking = isStackingContainer(); 5210 5211 // Overflow layers are just painted by their enclosing layers, so they don't get put in zorder lists. 5211 bool includeHiddenLayer = includeHiddenLayers || (m_hasVisibleContent || (m_hasVisibleDescendant && isStacking Context()));5212 bool includeHiddenLayer = includeHiddenLayers || (m_hasVisibleContent || (m_hasVisibleDescendant && isStacking)); 5212 5213 if (includeHiddenLayer && !isNormalFlowOnly() && !renderer()->isRenderFlowThread()) { 5213 5214 // Determine which buffer the child should be in. … … 5223 5224 5224 5225 // Recur into our children to collect more layers, but only if we don't establish 5225 // a stacking context .5226 if ((includeHiddenLayers || m_hasVisibleDescendant) && !isStacking Context()) {5226 // a stacking context/container. 5227 if ((includeHiddenLayers || m_hasVisibleDescendant) && !isStacking) { 5227 5228 for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) { 5228 5229 // Ignore reflections. … … 5253 5254 #if USE(ACCELERATED_COMPOSITING) 5254 5255 if (compositor()->inCompositingMode()) { 5255 if (isDirtyStackingCont ext() || m_normalFlowListDirty)5256 if (isDirtyStackingContainer() || m_normalFlowListDirty) 5256 5257 compositor()->updateCompositingLayers(CompositingUpdateOnHitTest, this); 5257 5258 return; … … 5374 5375 bool isStackingContext = this->isStackingContext(); 5375 5376 if (isStackingContext != wasStackingContext) { 5376 dirtyStackingCont extZOrderLists();5377 dirtyStackingContainerZOrderLists(); 5377 5378 if (isStackingContext) 5378 5379 dirtyZOrderLists(); … … 5385 5386 // likely be folded along with the rest. 5386 5387 if (oldStyle->zIndex() != renderer()->style()->zIndex() || oldStyle->visibility() != renderer()->style()->visibility()) { 5387 dirtyStackingCont extZOrderLists();5388 dirtyStackingContainerZOrderLists(); 5388 5389 if (isStackingContext) 5389 5390 dirtyZOrderLists(); … … 5481 5482 if (p) 5482 5483 p->dirtyNormalFlowList(); 5483 dirtyStackingCont extZOrderLists();5484 dirtyStackingContainerZOrderLists(); 5484 5485 } 5485 5486 … … 5535 5536 m_backing->updateGraphicsLayerGeometry(); 5536 5537 else if (oldStyle && oldStyle->overflowX() != renderer()->style()->overflowX()) { 5537 if (stackingCont ext()->hasCompositingDescendant())5538 if (stackingContainer()->hasCompositingDescendant()) 5538 5539 compositor()->setCompositingLayersNeedRebuild(); 5539 5540 } -
trunk/Source/WebCore/rendering/RenderLayer.h
r140286 r140620 428 428 void repaintBlockSelectionGaps(); 429 429 430 // Get the enclosing stacking context for this layer. A stacking context is a layer 431 // that has a non-auto z-index. 432 RenderLayer* stackingContext() const; 430 // A stacking context is a layer that has a non-auto z-index. 433 431 bool isStackingContext() const { return isStackingContext(renderer()->style()); } 434 432 433 // A stacking container can have z-order lists. All stacking contexts are 434 // stacking containers, but the converse is not true. 435 bool isStackingContainer() const { return isStackingContext(); } 436 437 // Gets the enclosing stacking container for this layer. 438 RenderLayer* stackingContainer() const; 439 435 440 void dirtyZOrderLists(); 436 void dirtyStackingCont extZOrderLists();441 void dirtyStackingContainerZOrderLists(); 437 442 438 443 Vector<RenderLayer*>* posZOrderList() const 439 444 { 440 445 ASSERT(!m_zOrderListsDirty); 441 ASSERT(isStackingCont ext() || !m_posZOrderList);446 ASSERT(isStackingContainer() || !m_posZOrderList); 442 447 return m_posZOrderList.get(); 443 448 } … … 448 453 { 449 454 ASSERT(!m_zOrderListsDirty); 450 ASSERT(isStackingCont ext() || !m_negZOrderList);455 ASSERT(isStackingContainer() || !m_negZOrderList); 451 456 return m_negZOrderList.get(); 452 457 } … … 761 766 762 767 bool isStackingContext(const RenderStyle* style) const { return !style->hasAutoZIndex() || isRootLayer(); } 763 bool isDirtyStackingContext() const { return m_zOrderListsDirty && isStackingContext(); } 768 769 bool isDirtyStackingContainer() const { return m_zOrderListsDirty && isStackingContainer(); } 764 770 765 771 void setAncestorChainHasSelfPaintingLayerDescendant(); … … 986 992 #endif 987 993 988 // Returns true if z ordering would not change if this layer were to establish a stacking context.989 bool can SafelyEstablishAStackingContext() const;994 // Returns true if z ordering would not change if this layer were a stacking container. 995 bool canBeStackingContainer() const; 990 996 991 997 friend class RenderLayerBacking; … … 1154 1160 inline void RenderLayer::clearZOrderLists() 1155 1161 { 1156 ASSERT(!isStackingCont ext());1162 ASSERT(!isStackingContainer()); 1157 1163 1158 1164 m_posZOrderList.clear(); … … 1165 1171 return; 1166 1172 1167 if (!isStackingCont ext()) {1173 if (!isStackingContainer()) { 1168 1174 clearZOrderLists(); 1169 1175 m_zOrderListsDirty = false; -
trunk/Source/WebCore/rendering/RenderLayerBacking.cpp
r140223 r140620 566 566 { 567 567 // If we haven't built z-order lists yet, wait until later. 568 if (m_owningLayer->isStackingCont ext() && m_owningLayer->m_zOrderListsDirty)568 if (m_owningLayer->isStackingContainer() && m_owningLayer->m_zOrderListsDirty) 569 569 return; 570 570 … … 1266 1266 // We only care about parents that are stacking contexts. 1267 1267 // Recall that opacity creates stacking context. 1268 if (!curr->isStackingCont ext())1268 if (!curr->isStackingContainer()) 1269 1269 continue; 1270 1270 … … 1476 1476 } 1477 1477 1478 if (m_owningLayer->isStackingCont ext()) {1478 if (m_owningLayer->isStackingContainer()) { 1479 1479 if (!m_owningLayer->hasVisibleDescendant()) 1480 1480 return false; -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r140593 r140620 734 734 { 735 735 for (RenderLayer* curr = layer->parent(); curr != 0; curr = curr->parent()) { 736 if (curr->isStackingCont ext())736 if (curr->isStackingContainer()) 737 737 return 0; 738 738 … … 781 781 #endif 782 782 783 if (layer->isStackingCont ext()) {783 if (layer->isStackingContainer()) { 784 784 if (Vector<RenderLayer*>* negZOrderList = layer->negZOrderList()) { 785 785 size_t listSize = negZOrderList->size(); … … 799 799 } 800 800 801 if (layer->isStackingCont ext()) {801 if (layer->isStackingContainer()) { 802 802 if (Vector<RenderLayer*>* posZOrderList = layer->posZOrderList()) { 803 803 size_t listSize = posZOrderList->size(); … … 884 884 bool anyDescendantHas3DTransform = false; 885 885 886 if (layer->isStackingCont ext()) {886 if (layer->isStackingContainer()) { 887 887 if (Vector<RenderLayer*>* negZOrderList = layer->negZOrderList()) { 888 888 size_t listSize = negZOrderList->size(); … … 916 916 } 917 917 918 if (layer->isStackingCont ext()) {918 if (layer->isStackingContainer()) { 919 919 if (Vector<RenderLayer*>* posZOrderList = layer->posZOrderList()) { 920 920 size_t listSize = posZOrderList->size(); … … 1097 1097 #endif 1098 1098 1099 if (layer->isStackingCont ext()) {1099 if (layer->isStackingContainer()) { 1100 1100 if (Vector<RenderLayer*>* negZOrderList = layer->negZOrderList()) { 1101 1101 size_t listSize = negZOrderList->size(); … … 1119 1119 } 1120 1120 1121 if (layer->isStackingCont ext()) {1121 if (layer->isStackingContainer()) { 1122 1122 if (Vector<RenderLayer*>* posZOrderList = layer->posZOrderList()) { 1123 1123 size_t listSize = posZOrderList->size(); … … 1335 1335 #endif 1336 1336 1337 if (layer->isStackingCont ext()) {1337 if (layer->isStackingContainer()) { 1338 1338 if (Vector<RenderLayer*>* negZOrderList = layer->negZOrderList()) { 1339 1339 size_t listSize = negZOrderList->size(); … … 1349 1349 } 1350 1350 1351 if (layer->isStackingCont ext()) {1351 if (layer->isStackingContainer()) { 1352 1352 if (Vector<RenderLayer*>* posZOrderList = layer->posZOrderList()) { 1353 1353 size_t listSize = posZOrderList->size(); … … 1386 1386 #endif 1387 1387 1388 if (layer->isStackingCont ext()) {1388 if (layer->isStackingContainer()) { 1389 1389 if (Vector<RenderLayer*>* negZOrderList = layer->negZOrderList()) { 1390 1390 size_t listSize = negZOrderList->size(); … … 1400 1400 } 1401 1401 1402 if (layer->isStackingCont ext()) {1402 if (layer->isStackingContainer()) { 1403 1403 if (Vector<RenderLayer*>* posZOrderList = layer->posZOrderList()) { 1404 1404 size_t listSize = posZOrderList->size(); … … 2034 2034 EPosition position = renderer->style()->position(); 2035 2035 bool isFixed = renderer->isOutOfFlowPositioned() && position == FixedPosition; 2036 if (isFixed && !layer->isStackingCont ext())2036 if (isFixed && !layer->isStackingContainer()) 2037 2037 return false; 2038 2038 … … 2645 2645 #endif 2646 2646 2647 if (layer->isStackingCont ext()) {2647 if (layer->isStackingContainer()) { 2648 2648 if (Vector<RenderLayer*>* negZOrderList = layer->negZOrderList()) { 2649 2649 size_t listSize = negZOrderList->size(); … … 2695 2695 return false; 2696 2696 2697 for (RenderLayer* stackingCont ext = layer->stackingContext(); stackingContext; stackingContext = stackingContext->stackingContext()) {2698 if (stackingCont ext->isComposited() && stackingContext->renderer()->style()->position() == FixedPosition)2697 for (RenderLayer* stackingContainer = layer->stackingContainer(); stackingContainer; stackingContainer = stackingContainer->stackingContainer()) { 2698 if (stackingContainer->isComposited() && stackingContainer->renderer()->style()->position() == FixedPosition) 2699 2699 return false; 2700 2700 } -
trunk/Source/WebKit2/ChangeLog
r140612 r140620 1 2013-01-23 Ian Vollick <vollick@chromium.org> 2 3 Introduce the "stacking container" concept. 4 https://bugs.webkit.org/show_bug.cgi?id=107734 5 6 Reviewed by Simon Fraser. 7 8 A stacking container is treated just like a stacking context. That 9 is, it has z-order lists, it and its descendants are stacked as a 10 unit, and when the RenderLayerCompositor does its overlap testing, 11 the composited regions for all layer lists take effect only once the 12 stacking container is done being processed. 13 14 This patch also adds the function RenderLayer::isStackingContainer(). 15 Currently, this is equivalent to RenderLayer::isStackingContext(), 16 but in future, the definition of stacking container will be broadened 17 to encompass more than just stacking contexts. 18 19 Other than the addition of this extra function, the patch is mostly 20 comprised of name changes. Any code that used to refer to the 21 stacking context concept, but didn't necessarily require a stacking 22 context in the strict, CSS-sense, was switched to refer to stacking 23 container. No functionality was changed. 24 25 No new tests, no change in functionality. 26 27 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: 28 (WebKit::updateOffsetFromViewportForSelf): 29 1 30 2013-01-23 Anders Carlsson <andersca@apple.com> 2 31 -
trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp
r140328 r140620 481 481 return; 482 482 483 if (!renderLayer->isStackingCont ext())483 if (!renderLayer->isStackingContainer()) 484 484 return; 485 485
Note: See TracChangeset
for help on using the changeset viewer.