| 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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 bool hasVisibleContent() const { ASSERT(!m_visibleContentStatusDirty); retur
n m_hasVisibleContent; } | 174 bool hasVisibleContent() const { ASSERT(!m_visibleContentStatusDirty); retur
n m_hasVisibleContent; } |
| 175 | 175 |
| 176 // FIXME: hasVisibleDescendant() should call updateDescendantDependentFlags(
) if m_visibleDescendantStatusDirty. | 176 // FIXME: hasVisibleDescendant() should call updateDescendantDependentFlags(
) if m_visibleDescendantStatusDirty. |
| 177 bool hasVisibleDescendant() const { ASSERT(!m_visibleDescendantStatusDirty);
return m_hasVisibleDescendant; } | 177 bool hasVisibleDescendant() const { ASSERT(!m_visibleDescendantStatusDirty);
return m_hasVisibleDescendant; } |
| 178 | 178 |
| 179 void dirtyVisibleContentStatus(); | 179 void dirtyVisibleContentStatus(); |
| 180 void potentiallyDirtyVisibleContentStatus(EVisibility); | 180 void potentiallyDirtyVisibleContentStatus(EVisibility); |
| 181 | 181 |
| 182 bool hasBoxDecorationsOrBackground() const; | 182 bool hasBoxDecorationsOrBackground() const; |
| 183 bool hasVisibleBoxDecorations() const; | 183 bool hasVisibleBoxDecorations() const; |
| 184 // Returns true if this layer has visible content (ignoring any child layers
). | |
| 185 bool isVisuallyNonEmpty() const; | |
| 186 // True if this layer container renderers that paint. | 184 // True if this layer container renderers that paint. |
| 187 bool hasNonEmptyChildRenderers() const; | 185 bool hasNonEmptyChildRenderers() const; |
| 188 | 186 |
| 189 // Will ensure that hasNonCompositiedChild are up to date. | 187 // Will ensure that hasNonCompositiedChild are up to date. |
| 190 void updateScrollingStateAfterCompositingChange(); | 188 void updateScrollingStateAfterCompositingChange(); |
| 191 bool hasVisibleNonLayerContent() const { return m_hasVisibleNonLayerContent;
} | 189 bool hasVisibleNonLayerContent() const { return m_hasVisibleNonLayerContent;
} |
| 192 bool hasNonCompositedChild() const { ASSERT(isAllowedToQueryCompositingState
()); return m_hasNonCompositedChild; } | 190 bool hasNonCompositedChild() const { ASSERT(isAllowedToQueryCompositingState
()); return m_hasNonCompositedChild; } |
| 193 | 191 |
| 194 bool usedTransparency() const { return m_usedTransparency; } | 192 bool usedTransparency() const { return m_usedTransparency; } |
| 195 | 193 |
| 196 // Gets the nearest enclosing positioned ancestor layer (also includes | 194 // Gets the nearest enclosing positioned ancestor layer (also includes |
| 197 // the <html> layer and the root layer). | 195 // the <html> layer and the root layer). |
| 198 RenderLayer* enclosingPositionedAncestor() const; | 196 RenderLayer* enclosingPositionedAncestor() const; |
| 199 | 197 |
| 200 RenderLayer* enclosingOverflowClipLayer(IncludeSelfOrNot = IncludeSelf) cons
t; | |
| 201 | |
| 202 bool isPaintInvalidationContainer() const; | 198 bool isPaintInvalidationContainer() const; |
| 203 | 199 |
| 204 // Do *not* call this method unless you know what you are dooing. You probab
ly want to call enclosingCompositingLayerForPaintInvalidation() instead. | 200 // Do *not* call this method unless you know what you are dooing. You probab
ly want to call enclosingCompositingLayerForPaintInvalidation() instead. |
| 205 // If includeSelf is true, may return this. | 201 // If includeSelf is true, may return this. |
| 206 RenderLayer* enclosingLayerWithCompositedLayerMapping(IncludeSelfOrNot) cons
t; | 202 RenderLayer* enclosingLayerWithCompositedLayerMapping(IncludeSelfOrNot) cons
t; |
| 207 | 203 |
| 208 // Returns the enclosing layer root into which this layer paints, inclusive
of this one. Note that the enclosing layer may or may not have its own | 204 // Returns the enclosing layer root into which this layer paints, inclusive
of this one. Note that the enclosing layer may or may not have its own |
| 209 // GraphicsLayer backing, but is nevertheless the root for a call to the Ren
derLayer::paint*() methods. | 205 // GraphicsLayer backing, but is nevertheless the root for a call to the Ren
derLayer::paint*() methods. |
| 210 RenderLayer* enclosingLayerForPaintInvalidation() const; | 206 RenderLayer* enclosingLayerForPaintInvalidation() const; |
| 211 | 207 |
| 212 RenderLayer* enclosingLayerForPaintInvalidationCrossingFrameBoundaries() con
st; | 208 RenderLayer* enclosingLayerForPaintInvalidationCrossingFrameBoundaries() con
st; |
| 213 | 209 |
| 214 bool hasAncestorWithFilterOutsets() const; | 210 bool hasAncestorWithFilterOutsets() const; |
| 215 | 211 |
| 216 bool canUseConvertToLayerCoords() const | 212 bool canUseConvertToLayerCoords() const |
| 217 { | 213 { |
| 218 // These RenderObjects have an impact on their layers without the render
ers knowing about it. | 214 // These RenderObjects have an impact on their layers without the render
ers knowing about it. |
| 219 return !renderer()->hasColumns() && !renderer()->hasTransform() && !rend
erer()->isSVGRoot(); | 215 return !renderer()->hasColumns() && !renderer()->hasTransform() && !rend
erer()->isSVGRoot(); |
| 220 } | 216 } |
| 221 | 217 |
| 222 void convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutPoint&) co
nst; | 218 void convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutPoint&) co
nst; |
| 223 void convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutRect&) con
st; | |
| 224 | 219 |
| 225 // The two main functions that use the layer system. The paint method | 220 // The two main functions that use the layer system. The paint method |
| 226 // paints the layers that intersect the damage rect from back to | 221 // paints the layers that intersect the damage rect from back to |
| 227 // front. The hitTest method looks for mouse events by walking | 222 // front. The hitTest method looks for mouse events by walking |
| 228 // layers that intersect the point from front to back. | 223 // layers that intersect the point from front to back. |
| 229 // paint() assumes that the caller will clip to the bounds of damageRect if
necessary. | 224 // paint() assumes that the caller will clip to the bounds of damageRect if
necessary. |
| 230 void paint(GraphicsContext*, const LayoutRect& damageRect, PaintBehavior = P
aintBehaviorNormal, RenderObject* paintingRoot = 0, PaintLayerFlags = 0); | 225 void paint(GraphicsContext*, const LayoutRect& damageRect, PaintBehavior = P
aintBehaviorNormal, RenderObject* paintingRoot = 0, PaintLayerFlags = 0); |
| 231 bool hitTest(const HitTestRequest&, HitTestResult&); | 226 bool hitTest(const HitTestRequest&, HitTestResult&); |
| 232 bool hitTest(const HitTestRequest&, const HitTestLocation&, HitTestResult&); | 227 bool hitTest(const HitTestRequest&, const HitTestLocation&, HitTestResult&); |
| 233 void paintOverlayScrollbars(GraphicsContext*, const LayoutRect& damageRect,
PaintBehavior, RenderObject* paintingRoot = 0); | 228 void paintOverlayScrollbars(GraphicsContext*, const LayoutRect& damageRect,
PaintBehavior, RenderObject* paintingRoot = 0); |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 void didUpdateNeedsCompositedScrolling(); | 517 void didUpdateNeedsCompositedScrolling(); |
| 523 | 518 |
| 524 void setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants(); | 519 void setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants(); |
| 525 | 520 |
| 526 private: | 521 private: |
| 527 // Bounding box in the coordinates of this layer. | 522 // Bounding box in the coordinates of this layer. |
| 528 LayoutRect logicalBoundingBox() const; | 523 LayoutRect logicalBoundingBox() const; |
| 529 | 524 |
| 530 bool hasOverflowControls() const; | 525 bool hasOverflowControls() const; |
| 531 | 526 |
| 532 void setAncestorChainHasSelfPaintingLayerDescendant(); | |
| 533 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); | 527 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); |
| 534 | 528 |
| 535 void clipToRect(const LayerPaintingInfo&, GraphicsContext*, const ClipRect&,
PaintLayerFlags, BorderRadiusClippingRule = IncludeSelfForBorderRadius); | 529 void clipToRect(const LayerPaintingInfo&, GraphicsContext*, const ClipRect&,
PaintLayerFlags, BorderRadiusClippingRule = IncludeSelfForBorderRadius); |
| 536 void restoreClip(GraphicsContext*, const LayoutRect& paintDirtyRect, const C
lipRect&); | 530 void restoreClip(GraphicsContext*, const LayoutRect& paintDirtyRect, const C
lipRect&); |
| 537 | 531 |
| 538 void updateLayerPositionRecursive(); | 532 void updateLayerPositionRecursive(); |
| 539 | 533 |
| 540 void setNextSibling(RenderLayer* next) { m_next = next; } | 534 void setNextSibling(RenderLayer* next) { m_next = next; } |
| 541 void setPreviousSibling(RenderLayer* prev) { m_previous = prev; } | 535 void setPreviousSibling(RenderLayer* prev) { m_previous = prev; } |
| 542 void setFirstChild(RenderLayer* first) { m_first = first; } | 536 void setFirstChild(RenderLayer* first) { m_first = first; } |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 740 | 734 |
| 741 } // namespace blink | 735 } // namespace blink |
| 742 | 736 |
| 743 #ifndef NDEBUG | 737 #ifndef NDEBUG |
| 744 // Outside the WebCore namespace for ease of invocation from gdb. | 738 // Outside the WebCore namespace for ease of invocation from gdb. |
| 745 void showLayerTree(const blink::RenderLayer*); | 739 void showLayerTree(const blink::RenderLayer*); |
| 746 void showLayerTree(const blink::RenderObject*); | 740 void showLayerTree(const blink::RenderObject*); |
| 747 #endif | 741 #endif |
| 748 | 742 |
| 749 #endif // RenderLayer_h | 743 #endif // RenderLayer_h |
| OLD | NEW |