Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(368)

Side by Side Diff: Source/core/rendering/RenderLayer.h

Issue 620753006: Rendering API cleanup (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/rendering/RenderInline.cpp ('k') | Source/core/rendering/RenderLayer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 void didUpdateNeedsCompositedScrolling(); 518 void didUpdateNeedsCompositedScrolling();
523 519
524 void setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants(); 520 void setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants();
525 521
526 private: 522 private:
527 // Bounding box in the coordinates of this layer. 523 // Bounding box in the coordinates of this layer.
528 LayoutRect logicalBoundingBox() const; 524 LayoutRect logicalBoundingBox() const;
529 525
530 bool hasOverflowControls() const; 526 bool hasOverflowControls() const;
531 527
532 void setAncestorChainHasSelfPaintingLayerDescendant();
533 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); 528 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus();
534 529
535 void clipToRect(const LayerPaintingInfo&, GraphicsContext*, const ClipRect&, PaintLayerFlags, BorderRadiusClippingRule = IncludeSelfForBorderRadius); 530 void clipToRect(const LayerPaintingInfo&, GraphicsContext*, const ClipRect&, PaintLayerFlags, BorderRadiusClippingRule = IncludeSelfForBorderRadius);
536 void restoreClip(GraphicsContext*, const LayoutRect& paintDirtyRect, const C lipRect&); 531 void restoreClip(GraphicsContext*, const LayoutRect& paintDirtyRect, const C lipRect&);
537 532
538 void updateLayerPositionRecursive(); 533 void updateLayerPositionRecursive();
539 534
540 void setNextSibling(RenderLayer* next) { m_next = next; } 535 void setNextSibling(RenderLayer* next) { m_next = next; }
541 void setPreviousSibling(RenderLayer* prev) { m_previous = prev; } 536 void setPreviousSibling(RenderLayer* prev) { m_previous = prev; }
542 void setFirstChild(RenderLayer* first) { m_first = first; } 537 void setFirstChild(RenderLayer* first) { m_first = first; }
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 735
741 } // namespace blink 736 } // namespace blink
742 737
743 #ifndef NDEBUG 738 #ifndef NDEBUG
744 // Outside the WebCore namespace for ease of invocation from gdb. 739 // Outside the WebCore namespace for ease of invocation from gdb.
745 void showLayerTree(const blink::RenderLayer*); 740 void showLayerTree(const blink::RenderLayer*);
746 void showLayerTree(const blink::RenderObject*); 741 void showLayerTree(const blink::RenderObject*);
747 #endif 742 #endif
748 743
749 #endif // RenderLayer_h 744 #endif // RenderLayer_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderInline.cpp ('k') | Source/core/rendering/RenderLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698