| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Intel Corporation. All rights reserved. | 3 * Copyright (C) 2013 Intel Corporation. All rights reserved. |
| 4 * | 4 * |
| 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
| 6 * | 6 * |
| 7 * Other contributors: | 7 * Other contributors: |
| 8 * Robert O'Callahan <roc+@cs.cmu.edu> | 8 * Robert O'Callahan <roc+@cs.cmu.edu> |
| 9 * David Baron <dbaron@fas.harvard.edu> | 9 * David Baron <dbaron@fas.harvard.edu> |
| 10 * Christian Biesinger <cbiesinger@web.de> | 10 * Christian Biesinger <cbiesinger@web.de> |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 // If true, this layer's children are included in its bounds for overlap tes
ting. | 157 // If true, this layer's children are included in its bounds for overlap tes
ting. |
| 158 // We can't rely on the children's positions if this layer has a filter that
could have moved the children's pixels around. | 158 // We can't rely on the children's positions if this layer has a filter that
could have moved the children's pixels around. |
| 159 bool overlapBoundsIncludeChildren() const { return hasFilter() && renderer()
->style()->filter().hasFilterThatMovesPixels(); } | 159 bool overlapBoundsIncludeChildren() const { return hasFilter() && renderer()
->style()->filter().hasFilterThatMovesPixels(); } |
| 160 | 160 |
| 161 LayoutRect boundingBoxForCompositing(const RenderLayer* ancestorLayer = 0) c
onst; | 161 LayoutRect boundingBoxForCompositing(const RenderLayer* ancestorLayer = 0) c
onst; |
| 162 | 162 |
| 163 LayoutSize subpixelAccumulation() const; | 163 LayoutSize subpixelAccumulation() const; |
| 164 void setSubpixelAccumulation(const LayoutSize&); | 164 void setSubpixelAccumulation(const LayoutSize&); |
| 165 | 165 |
| 166 bool hasTransform() const { return renderer()->hasTransform(); } | 166 bool hasTransform() const { return renderer()->hasTransform(); } |
| 167 // Note that this transform has the transform-origin baked in. | 167 // This transform has the transform-origin baked in. |
| 168 TransformationMatrix* transform() const { return m_transform.get(); } | 168 TransformationMatrix* transform() const { return m_transform.get(); } |
| 169 // currentTransform computes a transform which takes accelerated animations
into account. The | |
| 170 // resulting transform has transform-origin baked in. If the layer does not
have a transform, | |
| 171 // returns the identity matrix. | |
| 172 TransformationMatrix currentTransform(RenderStyle::ApplyTransformOrigin = Re
nderStyle::IncludeTransformOrigin) const; | |
| 173 TransformationMatrix renderableTransform() const; | |
| 174 | 169 |
| 175 // Get the perspective transform, which is applied to transformed sublayers. | 170 // Get the perspective transform, which is applied to transformed sublayers. |
| 176 // Returns true if the layer has a -webkit-perspective. | 171 // Returns true if the layer has a -webkit-perspective. |
| 177 // Note that this transform has the perspective-origin baked in. | 172 // Note that this transform has the perspective-origin baked in. |
| 178 TransformationMatrix perspectiveTransform() const; | 173 TransformationMatrix perspectiveTransform() const; |
| 179 FloatPoint perspectiveOrigin() const; | 174 FloatPoint perspectiveOrigin() const; |
| 180 bool preserves3D() const { return renderer()->style()->transformStyle3D() ==
TransformStyle3DPreserve3D; } | 175 bool preserves3D() const { return renderer()->style()->transformStyle3D() ==
TransformStyle3DPreserve3D; } |
| 181 bool has3DTransform() const { return m_transform && !m_transform->isAffine()
; } | 176 bool has3DTransform() const { return m_transform && !m_transform->isAffine()
; } |
| 182 | 177 |
| 183 bool has3DTransformedDescendant() const { return m_has3DTransformedDescendan
t; } | 178 bool has3DTransformedDescendant() const { return m_has3DTransformedDescendan
t; } |
| 184 // Both updates the status, and returns true if descendants of this have 3d. | 179 // Both updates the status, and returns true if descendants of this have 3d. |
| 185 bool update3DTransformedDescendantStatus(); | 180 bool update3DTransformedDescendantStatus(); |
| 186 | 181 |
| 187 // FIXME: reflections should force transform-style to be flat in the style:
https://bugs.webkit.org/show_bug.cgi?id=106959 | 182 // FIXME: reflections should force transform-style to be flat in the style:
https://bugs.webkit.org/show_bug.cgi?id=106959 |
| 188 bool shouldPreserve3D() const { return renderer()->style()->transformStyle3D
() == TransformStyle3DPreserve3D; } | 183 bool shouldPreserve3D() const { return renderer()->style()->transformStyle3D
() == TransformStyle3DPreserve3D; } |
| 189 | 184 |
| 190 bool hasFilter() const { return renderer()->hasFilter(); } | 185 bool hasFilter() const { return renderer()->hasFilter(); } |
| 191 | 186 |
| 192 void* operator new(size_t); | 187 void* operator new(size_t); |
| 193 // Only safe to call from RenderBox::destroyLayer() | 188 // Only safe to call from RenderBox::destroyLayer() |
| 194 void operator delete(void*); | 189 void operator delete(void*); |
| 195 | 190 |
| 196 bool paintsWithTransform() const; | |
| 197 | |
| 198 FilterOperations computeFilterOperations(const RenderStyle*); | 191 FilterOperations computeFilterOperations(const RenderStyle*); |
| 199 bool paintsWithFilters() const; | 192 bool paintsWithFilters() const; |
| 200 bool requiresFullLayerImageForFilters() const; | 193 bool requiresFullLayerImageForFilters() const; |
| 201 FilterEffectRenderer* filterRenderer() const | 194 FilterEffectRenderer* filterRenderer() const |
| 202 { | 195 { |
| 203 RenderLayerFilterInfo* filterInfo = this->filterInfo(); | 196 RenderLayerFilterInfo* filterInfo = this->filterInfo(); |
| 204 return filterInfo ? filterInfo->renderer() : 0; | 197 return filterInfo ? filterInfo->renderer() : 0; |
| 205 } | 198 } |
| 206 | 199 |
| 207 RenderLayerFilterInfo* filterInfo() const { return hasFilterInfo() ? RenderL
ayerFilterInfo::filterInfoForRenderLayer(this) : 0; } | 200 RenderLayerFilterInfo* filterInfo() const { return hasFilterInfo() ? RenderL
ayerFilterInfo::filterInfoForRenderLayer(this) : 0; } |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 | 312 |
| 320 } // namespace blink | 313 } // namespace blink |
| 321 | 314 |
| 322 #ifndef NDEBUG | 315 #ifndef NDEBUG |
| 323 // Outside the WebCore namespace for ease of invocation from gdb. | 316 // Outside the WebCore namespace for ease of invocation from gdb. |
| 324 void showLayerTree(const blink::RenderLayer*); | 317 void showLayerTree(const blink::RenderLayer*); |
| 325 void showLayerTree(const blink::RenderObject*); | 318 void showLayerTree(const blink::RenderObject*); |
| 326 #endif | 319 #endif |
| 327 | 320 |
| 328 #endif // SKY_ENGINE_CORE_RENDERING_RENDERLAYER_H_ | 321 #endif // SKY_ENGINE_CORE_RENDERING_RENDERLAYER_H_ |
| OLD | NEW |