|
Lines 101-106
RenderLayerBacking::RenderLayerBacking(RenderLayer* layer)
a/Source/WebCore/rendering/RenderLayerBacking.cpp_sec1
|
| 101 |
: m_owningLayer(layer) |
101 |
: m_owningLayer(layer) |
| 102 |
, m_scrollLayerID(0) |
102 |
, m_scrollLayerID(0) |
| 103 |
, m_artificiallyInflatedBounds(false) |
103 |
, m_artificiallyInflatedBounds(false) |
|
|
104 |
, m_boundsConstrainedByClipping(false) |
| 104 |
, m_isMainFrameRenderViewLayer(false) |
105 |
, m_isMainFrameRenderViewLayer(false) |
| 105 |
, m_usingTiledCacheLayer(false) |
106 |
, m_usingTiledCacheLayer(false) |
| 106 |
, m_requiresOwnBackingStore(true) |
107 |
, m_requiresOwnBackingStore(true) |
|
Lines 366-372
bool RenderLayerBacking::shouldClipCompositedBounds() const
a/Source/WebCore/rendering/RenderLayerBacking.cpp_sec2
|
| 366 |
return true; |
367 |
return true; |
| 367 |
} |
368 |
} |
| 368 |
|
369 |
|
| 369 |
|
|
|
| 370 |
void RenderLayerBacking::updateCompositedBounds() |
370 |
void RenderLayerBacking::updateCompositedBounds() |
| 371 |
{ |
371 |
{ |
| 372 |
IntRect layerBounds = compositor()->calculateCompositedBounds(m_owningLayer, m_owningLayer); |
372 |
IntRect layerBounds = compositor()->calculateCompositedBounds(m_owningLayer, m_owningLayer); |
|
Lines 389-395
void RenderLayerBacking::updateCompositedBounds()
a/Source/WebCore/rendering/RenderLayerBacking.cpp_sec3
|
| 389 |
clippingBounds.move(-delta.x(), -delta.y()); |
389 |
clippingBounds.move(-delta.x(), -delta.y()); |
| 390 |
|
390 |
|
| 391 |
layerBounds.intersect(pixelSnappedIntRect(clippingBounds)); |
391 |
layerBounds.intersect(pixelSnappedIntRect(clippingBounds)); |
| 392 |
} |
392 |
m_boundsConstrainedByClipping = true; |
|
|
393 |
} else |
| 394 |
m_boundsConstrainedByClipping = false; |
| 393 |
|
395 |
|
| 394 |
// If the element has a transform-origin that has fixed lengths, and the renderer has zero size, |
396 |
// If the element has a transform-origin that has fixed lengths, and the renderer has zero size, |
| 395 |
// then we need to ensure that the compositing layer has non-zero size so that we can apply |
397 |
// then we need to ensure that the compositing layer has non-zero size so that we can apply |
|
Lines 631-638
void RenderLayerBacking::updateGraphicsLayerGeometry()
a/Source/WebCore/rendering/RenderLayerBacking.cpp_sec4
|
| 631 |
|
633 |
|
| 632 |
FloatSize oldSize = m_graphicsLayer->size(); |
634 |
FloatSize oldSize = m_graphicsLayer->size(); |
| 633 |
FloatSize newSize = relativeCompositingBounds.size(); |
635 |
FloatSize newSize = relativeCompositingBounds.size(); |
| 634 |
if (oldSize != newSize) |
636 |
if (oldSize != newSize) { |
| 635 |
m_graphicsLayer->setSize(newSize); |
637 |
m_graphicsLayer->setSize(newSize); |
|
|
638 |
// Usually invalidation will happen via layout etc, but if we've affected the layer |
| 639 |
// size by constraining relative to a clipping ancestor or the viewport, we |
| 640 |
// have to invalidate to avoid showing stretched content. |
| 641 |
if (m_boundsConstrainedByClipping) |
| 642 |
m_graphicsLayer->setNeedsDisplay(); |
| 643 |
} |
| 636 |
|
644 |
|
| 637 |
// If we have a layer that clips children, position it. |
645 |
// If we have a layer that clips children, position it. |
| 638 |
IntRect clippingBox; |
646 |
IntRect clippingBox; |