return IntRect();
#endif
- FloatRect perspectiveRect = m_webGraphicsLayerClient->visibleContentsRect();
-
#if ENABLE(TIZEN_CSS_OVERFLOW_CLIPPING_BACKING_STORE)
if (GraphicsLayer::overflowClipping() && m_mainBackingStore) {
WebGraphicsLayer* parentLayer = toWebGraphicsLayer(parent());
if (parentLayer)
- perspectiveRect = parentLayer->clippingBounds();
+ return enclosingIntRect(m_layerTransform.combined().inverse().clampedBoundsOfProjectedQuad(FloatQuad(parentLayer->clippingBounds())));
}
#endif
- if (m_movingVisibleRect) {
- IntRect startAnimationRect = enclosingIntRect(m_layerTransform.combined().inverse().clampedBoundsOfProjectedQuad(FloatQuad(perspectiveRect)));
- IntRect endAnimationRect = enclosingIntRect(m_layerSettledTransform.combined().inverse().clampedBoundsOfProjectedQuad(FloatQuad(perspectiveRect)));
- endAnimationRect.unite(startAnimationRect);
- return endAnimationRect;
- }
-
#if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_SCROLLBAR)
if (isScrollbar()) {
WebGraphicsLayer* parentLayer = toWebGraphicsLayer(parent());
adjustedTransform.setPosition(FloatPoint(position().x() - parentLayer->position().x(),
position().y() - parentLayer->position().y()));
adjustedTransform.combineTransforms(parent() ? toWebGraphicsLayer(parent())->m_layerTransform.combinedForChildren() : TransformationMatrix());
- return enclosingIntRect(adjustedTransform.combined().inverse().clampedBoundsOfProjectedQuad(FloatQuad(perspectiveRect)));
+ return enclosingIntRect(adjustedTransform.combined().inverse().clampedBoundsOfProjectedQuad(FloatQuad(FloatRect(m_webGraphicsLayerClient->visibleContentsRect()))));
}
}
#endif
// Return a projection of the visible rect (surface coordinates) onto the layer's plane (layer coordinates).
// The resulting quad might be squewed and the visible rect is the bounding box of this quad,
// so it might spread further than the real visible area (and then even more amplified by the cover rect multiplier).
- return enclosingIntRect(m_layerTransform.combined().inverse().clampedBoundsOfProjectedQuad(FloatQuad(perspectiveRect)));
+ return enclosingIntRect(m_layerTransform.combined().inverse().clampedBoundsOfProjectedQuad(FloatQuad(FloatRect(m_webGraphicsLayerClient->visibleContentsRect()))));
}
Color WebGraphicsLayer::tiledBackingStoreBackgroundColor() const
void WebGraphicsLayer::computeTransformedVisibleRect()
{
// When we have a transform animation, we need to update visible rect every frame to adjust the visible rect of a backing store.
+ bool hasActiveTransformAnimation = selfOrAncestorHasActiveTransformAnimation();
if (!m_shouldUpdateVisibleRect && !m_movingVisibleRect)
return;
m_shouldUpdateVisibleRect = false;
TransformationMatrix currentTransform = transform();
- if (m_movingVisibleRect) {
- m_layerSettledTransform.setLocalTransform(currentTransform);
- m_layerSettledTransform.setPosition(position());
- m_layerSettledTransform.setAnchorPoint(anchorPoint());
- m_layerSettledTransform.setSize(size());
- m_layerSettledTransform.setFlattening(!preserves3D());
- m_layerSettledTransform.setChildrenTransform(childrenTransform());
- m_layerSettledTransform.combineTransforms(parent() ? toWebGraphicsLayer(parent())->m_layerTransform.combinedForChildren() : TransformationMatrix());
-
+ if (m_movingVisibleRect)
client()->getCurrentTransform(this, currentTransform);
- }
-
m_layerTransform.setLocalTransform(currentTransform);
m_layerTransform.setPosition(position());
m_layerTransform.setAnchorPoint(anchorPoint());