| OLD | NEW |
| 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 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 581 dirty3DTransformedDescendantStatus(); | 581 dirty3DTransformedDescendantStatus(); |
| 582 } | 582 } |
| 583 | 583 |
| 584 TransformationMatrix RenderLayer::currentTransform(RenderStyle::ApplyTransformOr
igin applyOrigin) const | 584 TransformationMatrix RenderLayer::currentTransform(RenderStyle::ApplyTransformOr
igin applyOrigin) const |
| 585 { | 585 { |
| 586 if (!m_transform) | 586 if (!m_transform) |
| 587 return TransformationMatrix(); | 587 return TransformationMatrix(); |
| 588 | 588 |
| 589 if (renderer()->style()->isRunningAcceleratedAnimation()) { | 589 if (renderer()->style()->isRunningAcceleratedAnimation()) { |
| 590 TransformationMatrix currTransform; | 590 TransformationMatrix currTransform; |
| 591 RefPtr<RenderStyle> style = renderer()->animation()->getAnimatedStyleFor
Renderer(renderer()); | 591 RefPtr<RenderStyle> style = renderer()->animation().getAnimatedStyleForR
enderer(renderer()); |
| 592 style->applyTransform(currTransform, renderBox()->pixelSnappedBorderBoxR
ect().size(), applyOrigin); | 592 style->applyTransform(currTransform, renderBox()->pixelSnappedBorderBoxR
ect().size(), applyOrigin); |
| 593 makeMatrixRenderable(currTransform, canRender3DTransforms()); | 593 makeMatrixRenderable(currTransform, canRender3DTransforms()); |
| 594 return currTransform; | 594 return currTransform; |
| 595 } | 595 } |
| 596 | 596 |
| 597 // m_transform includes transform-origin, so we need to recompute the transf
orm here. | 597 // m_transform includes transform-origin, so we need to recompute the transf
orm here. |
| 598 if (applyOrigin == RenderStyle::ExcludeTransformOrigin) { | 598 if (applyOrigin == RenderStyle::ExcludeTransformOrigin) { |
| 599 RenderBox* box = renderBox(); | 599 RenderBox* box = renderBox(); |
| 600 TransformationMatrix currTransform; | 600 TransformationMatrix currTransform; |
| 601 box->style()->applyTransform(currTransform, box->pixelSnappedBorderBoxRe
ct().size(), RenderStyle::ExcludeTransformOrigin); | 601 box->style()->applyTransform(currTransform, box->pixelSnappedBorderBoxRe
ct().size(), RenderStyle::ExcludeTransformOrigin); |
| (...skipping 3656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4258 { | 4258 { |
| 4259 ASSERT(newStyle); | 4259 ASSERT(newStyle); |
| 4260 return !compositedLayerMapping() && oldStyle && (oldStyle->overflowX() != ne
wStyle->overflowX()) && ancestorStackingContainerLayer()->hasCompositingDescenda
nt(); | 4260 return !compositedLayerMapping() && oldStyle && (oldStyle->overflowX() != ne
wStyle->overflowX()) && ancestorStackingContainerLayer()->hasCompositingDescenda
nt(); |
| 4261 } | 4261 } |
| 4262 | 4262 |
| 4263 inline bool RenderLayer::needsCompositingLayersRebuiltForFilters(const RenderSty
le* oldStyle, const RenderStyle* newStyle, bool didPaintWithFilters) const | 4263 inline bool RenderLayer::needsCompositingLayersRebuiltForFilters(const RenderSty
le* oldStyle, const RenderStyle* newStyle, bool didPaintWithFilters) const |
| 4264 { | 4264 { |
| 4265 if (!hasOrHadFilters(oldStyle, newStyle)) | 4265 if (!hasOrHadFilters(oldStyle, newStyle)) |
| 4266 return false; | 4266 return false; |
| 4267 | 4267 |
| 4268 if (renderer()->animation()->isRunningAcceleratedAnimationOnRenderer(rendere
r(), CSSPropertyWebkitFilter)) { | 4268 if (renderer()->animation().isRunningAcceleratedAnimationOnRenderer(renderer
(), CSSPropertyWebkitFilter)) { |
| 4269 // When the compositor is performing the filter animation, we shouldn't
touch the compositing layers. | 4269 // When the compositor is performing the filter animation, we shouldn't
touch the compositing layers. |
| 4270 // All of the layers above us should have been promoted to compositing l
ayers already. | 4270 // All of the layers above us should have been promoted to compositing l
ayers already. |
| 4271 return false; | 4271 return false; |
| 4272 } | 4272 } |
| 4273 | 4273 |
| 4274 FilterOutsets newOutsets = newStyle->filterOutsets(); | 4274 FilterOutsets newOutsets = newStyle->filterOutsets(); |
| 4275 if (oldStyle && (oldStyle->filterOutsets() != newOutsets)) { | 4275 if (oldStyle && (oldStyle->filterOutsets() != newOutsets)) { |
| 4276 // When filter outsets change, we need to: | 4276 // When filter outsets change, we need to: |
| 4277 // (1) Recompute the overlap map to promote the correct layers to compos
ited layers. | 4277 // (1) Recompute the overlap map to promote the correct layers to compos
ited layers. |
| 4278 // (2) Update the composited layer bounds (and child GraphicsLayer posit
ions) on platforms | 4278 // (2) Update the composited layer bounds (and child GraphicsLayer posit
ions) on platforms |
| (...skipping 15 matching lines...) Expand all Loading... |
| 4294 } | 4294 } |
| 4295 | 4295 |
| 4296 void RenderLayer::updateFilters(const RenderStyle* oldStyle, const RenderStyle*
newStyle) | 4296 void RenderLayer::updateFilters(const RenderStyle* oldStyle, const RenderStyle*
newStyle) |
| 4297 { | 4297 { |
| 4298 if (!hasOrHadFilters(oldStyle, newStyle)) | 4298 if (!hasOrHadFilters(oldStyle, newStyle)) |
| 4299 return; | 4299 return; |
| 4300 | 4300 |
| 4301 updateOrRemoveFilterClients(); | 4301 updateOrRemoveFilterClients(); |
| 4302 // During an accelerated animation, both WebKit and the compositor animate p
roperties. | 4302 // During an accelerated animation, both WebKit and the compositor animate p
roperties. |
| 4303 // However, WebKit shouldn't ask the compositor to update its filters if the
compositor is performing the animation. | 4303 // However, WebKit shouldn't ask the compositor to update its filters if the
compositor is performing the animation. |
| 4304 bool shouldUpdateFilters = compositedLayerMapping() && !renderer()->animatio
n()->isRunningAcceleratedAnimationOnRenderer(renderer(), CSSPropertyWebkitFilter
); | 4304 bool shouldUpdateFilters = compositedLayerMapping() && !renderer()->animatio
n().isRunningAcceleratedAnimationOnRenderer(renderer(), CSSPropertyWebkitFilter)
; |
| 4305 if (shouldUpdateFilters) | 4305 if (shouldUpdateFilters) |
| 4306 compositedLayerMapping()->updateFilters(renderer()->style()); | 4306 compositedLayerMapping()->updateFilters(renderer()->style()); |
| 4307 updateOrRemoveFilterEffectRenderer(); | 4307 updateOrRemoveFilterEffectRenderer(); |
| 4308 } | 4308 } |
| 4309 | 4309 |
| 4310 void RenderLayer::styleChanged(StyleDifference, const RenderStyle* oldStyle) | 4310 void RenderLayer::styleChanged(StyleDifference, const RenderStyle* oldStyle) |
| 4311 { | 4311 { |
| 4312 m_stackingNode->updateIsNormalFlowOnly(); | 4312 m_stackingNode->updateIsNormalFlowOnly(); |
| 4313 | 4313 |
| 4314 if (m_scrollableArea) | 4314 if (m_scrollableArea) |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4681 } | 4681 } |
| 4682 } | 4682 } |
| 4683 | 4683 |
| 4684 void showLayerTree(const WebCore::RenderObject* renderer) | 4684 void showLayerTree(const WebCore::RenderObject* renderer) |
| 4685 { | 4685 { |
| 4686 if (!renderer) | 4686 if (!renderer) |
| 4687 return; | 4687 return; |
| 4688 showLayerTree(renderer->enclosingLayer()); | 4688 showLayerTree(renderer->enclosingLayer()); |
| 4689 } | 4689 } |
| 4690 #endif | 4690 #endif |
| OLD | NEW |