| 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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 RenderLayerModelObject* layerRenderer = renderer(); | 232 RenderLayerModelObject* layerRenderer = renderer(); |
| 233 return isRootLayer() || layerRenderer->isPositioned() || hasTransform(); | 233 return isRootLayer() || layerRenderer->isPositioned() || hasTransform(); |
| 234 } | 234 } |
| 235 | 235 |
| 236 void updateOrRemoveFilterEffectRenderer(); | 236 void updateOrRemoveFilterEffectRenderer(); |
| 237 void updateSelfPaintingLayer(); | 237 void updateSelfPaintingLayer(); |
| 238 | 238 |
| 239 void clipToRect(const LayerPaintingInfo&, GraphicsContext*, const ClipRect&,
BorderRadiusClippingRule = IncludeSelfForBorderRadius); | 239 void clipToRect(const LayerPaintingInfo&, GraphicsContext*, const ClipRect&,
BorderRadiusClippingRule = IncludeSelfForBorderRadius); |
| 240 void restoreClip(GraphicsContext*, const LayoutRect& paintDirtyRect, const C
lipRect&); | 240 void restoreClip(GraphicsContext*, const LayoutRect& paintDirtyRect, const C
lipRect&); |
| 241 | 241 |
| 242 RenderLayer* hitTestLayer(RenderLayer* rootLayer, RenderLayer* containerLaye
r, const HitTestRequest& request, HitTestResult& result, | 242 bool hitTestLayer(RenderLayer* rootLayer, RenderLayer* containerLayer, const
HitTestRequest& request, HitTestResult& result, |
| 243 const LayoutRect& hitTestRect, const HitTestLocati
on&, | 243 const LayoutRect& hitTestRect, const HitTestLocation&, |
| 244 const HitTestingTransformState* transformState = 0
, double* zOffset = 0); | 244 const HitTestingTransformState* transformState = 0, double
* zOffset = 0); |
| 245 | 245 |
| 246 private: | 246 private: |
| 247 // TODO(ojan): Get rid of this. These are basically layer-tree-only paint ph
ases. | 247 // TODO(ojan): Get rid of this. These are basically layer-tree-only paint ph
ases. |
| 248 enum PaintLayerFlags { | 248 enum PaintLayerFlags { |
| 249 PaintContent, | 249 PaintContent, |
| 250 }; | 250 }; |
| 251 | 251 |
| 252 // Bounding box in the coordinates of this layer. | 252 // Bounding box in the coordinates of this layer. |
| 253 LayoutRect logicalBoundingBox() const; | 253 LayoutRect logicalBoundingBox() const; |
| 254 | 254 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 265 bool hasSelfPaintingLayerDescendant() const | 265 bool hasSelfPaintingLayerDescendant() const |
| 266 { | 266 { |
| 267 if (m_hasSelfPaintingLayerDescendantDirty) | 267 if (m_hasSelfPaintingLayerDescendantDirty) |
| 268 updateHasSelfPaintingLayerDescendant(); | 268 updateHasSelfPaintingLayerDescendant(); |
| 269 ASSERT(!m_hasSelfPaintingLayerDescendantDirty); | 269 ASSERT(!m_hasSelfPaintingLayerDescendantDirty); |
| 270 return m_hasSelfPaintingLayerDescendant; | 270 return m_hasSelfPaintingLayerDescendant; |
| 271 } | 271 } |
| 272 | 272 |
| 273 LayoutPoint renderBoxLocation() const { return renderer()->isBox() ? toRende
rBox(renderer())->location() : LayoutPoint(); } | 273 LayoutPoint renderBoxLocation() const { return renderer()->isBox() ? toRende
rBox(renderer())->location() : LayoutPoint(); } |
| 274 | 274 |
| 275 RenderLayer* hitTestChildren(ChildrenIteration, RenderLayer* rootLayer, cons
t HitTestRequest&, HitTestResult&, | 275 bool hitTestChildren(ChildrenIteration, RenderLayer* rootLayer, const HitTes
tRequest&, HitTestResult&, |
| 276 const LayoutRect& hitTestRect, const HitTestLocatio
n&, | 276 const LayoutRect& hitTestRect, const HitTestLocation&, |
| 277 const HitTestingTransformState* transformState, dou
ble* zOffsetForDescendants, double* zOffset, | 277 const HitTestingTransformState* transformState, double*
zOffsetForDescendants, double* zOffset, |
| 278 const HitTestingTransformState* unflattenedTransfor
mState, bool depthSortDescendants); | 278 const HitTestingTransformState* unflattenedTransformSta
te, bool depthSortDescendants); |
| 279 | 279 |
| 280 PassRefPtr<HitTestingTransformState> createLocalTransformState(RenderLayer*
rootLayer, RenderLayer* containerLayer, | 280 PassRefPtr<HitTestingTransformState> createLocalTransformState(RenderLayer*
rootLayer, RenderLayer* containerLayer, |
| 281 const LayoutRect& hitTestRect, const HitTestLocation
&, | 281 const LayoutRect& hitTestRect, const HitTestLocation
&, |
| 282 const HitTestingTransformState* containerTransformSt
ate, | 282 const HitTestingTransformState* containerTransformSt
ate, |
| 283 const LayoutPoint& translationOffset = LayoutPoint()
) const; | 283 const LayoutPoint& translationOffset = LayoutPoint()
) const; |
| 284 | 284 |
| 285 bool hitTestContents(const HitTestRequest&, HitTestResult&, const LayoutRect
& layerBounds, const HitTestLocation&) const; | 285 bool hitTestContents(const HitTestRequest&, HitTestResult&, const LayoutRect
& layerBounds, const HitTestLocation&) const; |
| 286 | 286 |
| 287 bool shouldBeSelfPaintingLayer() const; | 287 bool shouldBeSelfPaintingLayer() const; |
| 288 | 288 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 | 347 |
| 348 } // namespace blink | 348 } // namespace blink |
| 349 | 349 |
| 350 #ifndef NDEBUG | 350 #ifndef NDEBUG |
| 351 // Outside the WebCore namespace for ease of invocation from gdb. | 351 // Outside the WebCore namespace for ease of invocation from gdb. |
| 352 void showLayerTree(const blink::RenderLayer*); | 352 void showLayerTree(const blink::RenderLayer*); |
| 353 void showLayerTree(const blink::RenderObject*); | 353 void showLayerTree(const blink::RenderObject*); |
| 354 #endif | 354 #endif |
| 355 | 355 |
| 356 #endif // SKY_ENGINE_CORE_RENDERING_RENDERLAYER_H_ | 356 #endif // SKY_ENGINE_CORE_RENDERING_RENDERLAYER_H_ |
| OLD | NEW |