| 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 | 140 |
| 141 // Gets the nearest enclosing positioned ancestor layer (also includes | 141 // Gets the nearest enclosing positioned ancestor layer (also includes |
| 142 // the <html> layer and the root layer). | 142 // the <html> layer and the root layer). |
| 143 RenderLayer* enclosingPositionedAncestor() const; | 143 RenderLayer* enclosingPositionedAncestor() const; |
| 144 | 144 |
| 145 RenderLayer* enclosingOverflowClipLayer(IncludeSelfOrNot = IncludeSelf) cons
t; | 145 RenderLayer* enclosingOverflowClipLayer(IncludeSelfOrNot = IncludeSelf) cons
t; |
| 146 | 146 |
| 147 RenderLayer* enclosingFilterLayer(IncludeSelfOrNot = IncludeSelf) const; | 147 RenderLayer* enclosingFilterLayer(IncludeSelfOrNot = IncludeSelf) const; |
| 148 bool hasAncestorWithFilterOutsets() const; | 148 bool hasAncestorWithFilterOutsets() const; |
| 149 | 149 |
| 150 bool canUseConvertToLayerCoords() const | |
| 151 { | |
| 152 return !renderer()->hasTransform(); | |
| 153 } | |
| 154 | |
| 155 void convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutPoint&) co
nst; | 150 void convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutPoint&) co
nst; |
| 156 void convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutRect&) con
st; | 151 void convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutRect&) con
st; |
| 157 | 152 |
| 158 // The two main functions that use the layer system. The paint method | 153 // The two main functions that use the layer system. The paint method |
| 159 // paints the layers that intersect the damage rect from back to | 154 // paints the layers that intersect the damage rect from back to |
| 160 // front. The hitTest method looks for mouse events by walking | 155 // front. The hitTest method looks for mouse events by walking |
| 161 // layers that intersect the point from front to back. | 156 // layers that intersect the point from front to back. |
| 162 // paint() assumes that the caller will clip to the bounds of damageRect if
necessary. | 157 // paint() assumes that the caller will clip to the bounds of damageRect if
necessary. |
| 163 void paint(GraphicsContext*, const LayoutRect& damageRect, RenderObject* pai
ntingRoot = 0); | 158 void paint(GraphicsContext*, const LayoutRect& damageRect, RenderObject* pai
ntingRoot = 0); |
| 164 bool hitTest(const HitTestRequest&, HitTestResult&); | 159 bool hitTest(const HitTestRequest&, HitTestResult&); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 bool hasFilter() const { return renderer()->hasFilter(); } | 212 bool hasFilter() const { return renderer()->hasFilter(); } |
| 218 | 213 |
| 219 void* operator new(size_t); | 214 void* operator new(size_t); |
| 220 // Only safe to call from RenderLayerModelObject::destroyLayer() | 215 // Only safe to call from RenderLayerModelObject::destroyLayer() |
| 221 void operator delete(void*); | 216 void operator delete(void*); |
| 222 | 217 |
| 223 bool needsCompositedScrolling() const { return m_scrollableArea && m_scrolla
bleArea->needsCompositedScrolling(); } | 218 bool needsCompositedScrolling() const { return m_scrollableArea && m_scrolla
bleArea->needsCompositedScrolling(); } |
| 224 | 219 |
| 225 bool paintsWithTransform() const; | 220 bool paintsWithTransform() const; |
| 226 | 221 |
| 227 // Returns true if background phase is painted opaque in the given rect. | |
| 228 // The query rect is given in local coordinates. | |
| 229 bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const; | |
| 230 | |
| 231 bool containsDirtyOverlayScrollbars() const { return m_containsDirtyOverlayS
crollbars; } | 222 bool containsDirtyOverlayScrollbars() const { return m_containsDirtyOverlayS
crollbars; } |
| 232 void setContainsDirtyOverlayScrollbars(bool dirtyScrollbars) { m_containsDir
tyOverlayScrollbars = dirtyScrollbars; } | 223 void setContainsDirtyOverlayScrollbars(bool dirtyScrollbars) { m_containsDir
tyOverlayScrollbars = dirtyScrollbars; } |
| 233 | 224 |
| 234 FilterOperations computeFilterOperations(const RenderStyle*); | 225 FilterOperations computeFilterOperations(const RenderStyle*); |
| 235 bool paintsWithFilters() const; | 226 bool paintsWithFilters() const; |
| 236 bool requiresFullLayerImageForFilters() const; | 227 bool requiresFullLayerImageForFilters() const; |
| 237 FilterEffectRenderer* filterRenderer() const | 228 FilterEffectRenderer* filterRenderer() const |
| 238 { | 229 { |
| 239 RenderLayerFilterInfo* filterInfo = this->filterInfo(); | 230 RenderLayerFilterInfo* filterInfo = this->filterInfo(); |
| 240 return filterInfo ? filterInfo->renderer() : 0; | 231 return filterInfo ? filterInfo->renderer() : 0; |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 const HitTestingTransformState* transformState, dou
ble* zOffsetForDescendants, double* zOffset, | 436 const HitTestingTransformState* transformState, dou
ble* zOffsetForDescendants, double* zOffset, |
| 446 const HitTestingTransformState* unflattenedTransfor
mState, bool depthSortDescendants); | 437 const HitTestingTransformState* unflattenedTransfor
mState, bool depthSortDescendants); |
| 447 | 438 |
| 448 PassRefPtr<HitTestingTransformState> createLocalTransformState(RenderLayer*
rootLayer, RenderLayer* containerLayer, | 439 PassRefPtr<HitTestingTransformState> createLocalTransformState(RenderLayer*
rootLayer, RenderLayer* containerLayer, |
| 449 const LayoutRect& hitTestRect, const HitTestLocation
&, | 440 const LayoutRect& hitTestRect, const HitTestLocation
&, |
| 450 const HitTestingTransformState* containerTransformSt
ate, | 441 const HitTestingTransformState* containerTransformSt
ate, |
| 451 const LayoutPoint& translationOffset = LayoutPoint()
) const; | 442 const LayoutPoint& translationOffset = LayoutPoint()
) const; |
| 452 | 443 |
| 453 bool hitTestContents(const HitTestRequest&, HitTestResult&, const LayoutRect
& layerBounds, const HitTestLocation&, HitTestFilter) const; | 444 bool hitTestContents(const HitTestRequest&, HitTestResult&, const LayoutRect
& layerBounds, const HitTestLocation&, HitTestFilter) const; |
| 454 | 445 |
| 455 bool childBackgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const; | |
| 456 | |
| 457 bool shouldBeSelfPaintingLayer() const; | 446 bool shouldBeSelfPaintingLayer() const; |
| 458 | 447 |
| 459 // FIXME: We should only create the stacking node if needed. | 448 // FIXME: We should only create the stacking node if needed. |
| 460 bool requiresStackingNode() const { return true; } | 449 bool requiresStackingNode() const { return true; } |
| 461 void updateStackingNode(); | 450 void updateStackingNode(); |
| 462 | 451 |
| 463 // FIXME: We could lazily allocate our ScrollableArea based on style propert
ies ('overflow', ...) | 452 // FIXME: We could lazily allocate our ScrollableArea based on style propert
ies ('overflow', ...) |
| 464 // but for now, we are always allocating it for RenderBox as it's safer. | 453 // but for now, we are always allocating it for RenderBox as it's safer. |
| 465 bool requiresScrollableArea() const { return renderBox(); } | 454 bool requiresScrollableArea() const { return renderBox(); } |
| 466 void updateScrollableArea(); | 455 void updateScrollableArea(); |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 539 | 528 |
| 540 } // namespace blink | 529 } // namespace blink |
| 541 | 530 |
| 542 #ifndef NDEBUG | 531 #ifndef NDEBUG |
| 543 // Outside the WebCore namespace for ease of invocation from gdb. | 532 // Outside the WebCore namespace for ease of invocation from gdb. |
| 544 void showLayerTree(const blink::RenderLayer*); | 533 void showLayerTree(const blink::RenderLayer*); |
| 545 void showLayerTree(const blink::RenderObject*); | 534 void showLayerTree(const blink::RenderObject*); |
| 546 #endif | 535 #endif |
| 547 | 536 |
| 548 #endif // SKY_ENGINE_CORE_RENDERING_RENDERLAYER_H_ | 537 #endif // SKY_ENGINE_CORE_RENDERING_RENDERLAYER_H_ |
| OLD | NEW |