本文整理汇总了C++中PaintLayer::scrollParent方法的典型用法代码示例。如果您正苦于以下问题:C++ PaintLayer::scrollParent方法的具体用法?C++ PaintLayer::scrollParent怎么用?C++ PaintLayer::scrollParent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PaintLayer
的用法示例。
在下文中一共展示了PaintLayer::scrollParent方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: rebuild
void GraphicsLayerTreeBuilder::rebuild(PaintLayer& layer, AncestorInfo info)
{
// Make the layer compositing if necessary, and set up clipping and content layers.
// Note that we can only do work here that is independent of whether the descendant layers
// have been processed. computeCompositingRequirements() will already have done the paint invalidation if necessary.
layer.stackingNode()->updateLayerListsIfNeeded();
const bool hasCompositedLayerMapping = layer.hasCompositedLayerMapping();
CompositedLayerMapping* currentCompositedLayerMapping = layer.compositedLayerMapping();
// If this layer has a compositedLayerMapping, then that is where we place subsequent children GraphicsLayers.
// Otherwise children continue to append to the child list of the enclosing layer.
GraphicsLayerVector layerChildren;
AncestorInfo infoForChildren(info);
if (hasCompositedLayerMapping) {
infoForChildren.childLayersOfEnclosingCompositedLayer = &layerChildren;
infoForChildren.enclosingCompositedLayer = &layer;
}
#if ENABLE(ASSERT)
LayerListMutationDetector mutationChecker(layer.stackingNode());
#endif
if (layer.stackingNode()->isStackingContext()) {
PaintLayerStackingNodeIterator iterator(*layer.stackingNode(), NegativeZOrderChildren);
while (PaintLayerStackingNode* curNode = iterator.next())
rebuild(*curNode->layer(), infoForChildren);
// If a negative z-order child is compositing, we get a foreground layer which needs to get parented.
if (hasCompositedLayerMapping && currentCompositedLayerMapping->foregroundLayer())
infoForChildren.childLayersOfEnclosingCompositedLayer->append(currentCompositedLayerMapping->foregroundLayer());
}
PaintLayerStackingNodeIterator iterator(*layer.stackingNode(), NormalFlowChildren | PositiveZOrderChildren);
while (PaintLayerStackingNode* curNode = iterator.next())
rebuild(*curNode->layer(), infoForChildren);
if (hasCompositedLayerMapping) {
bool parented = false;
if (layer.layoutObject()->isLayoutPart())
parented = PaintLayerCompositor::attachFrameContentLayersToIframeLayer(toLayoutPart(layer.layoutObject()));
if (!parented)
currentCompositedLayerMapping->setSublayers(layerChildren);
if (shouldAppendLayer(layer))
info.childLayersOfEnclosingCompositedLayer->append(currentCompositedLayerMapping->childForSuperlayers());
}
if (layer.scrollParent()
&& layer.scrollParent()->hasCompositedLayerMapping()
&& layer.scrollParent()->compositedLayerMapping()->needsToReparentOverflowControls()
&& layer.scrollParent()->getScrollableArea()->topmostScrollChild() == &layer)
info.childLayersOfEnclosingCompositedLayer->append(layer.scrollParent()->compositedLayerMapping()->detachLayerForOverflowControls(*info.enclosingCompositedLayer));
}