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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayer.h

Issue 1490063002: Implement Paint Containment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove unnecessary adjustStyleForContainment declaration Created 5 years 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
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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 bool hasVisibleNonLayerContent() const { return m_hasVisibleNonLayerContent; } 259 bool hasVisibleNonLayerContent() const { return m_hasVisibleNonLayerContent; }
260 bool hasNonCompositedChild() const { ASSERT(isAllowedToQueryCompositingState ()); return m_hasNonCompositedChild; } 260 bool hasNonCompositedChild() const { ASSERT(isAllowedToQueryCompositingState ()); return m_hasNonCompositedChild; }
261 261
262 // Gets the ancestor layer that serves as the containing block of this layer . It is assumed 262 // Gets the ancestor layer that serves as the containing block of this layer . It is assumed
263 // that this layer is established by an out-of-flow positioned layout object (i.e. either 263 // that this layer is established by an out-of-flow positioned layout object (i.e. either
264 // absolutely or fixed positioned). 264 // absolutely or fixed positioned).
265 // If |ancestor| is specified, |*skippedAncestor| will be set to true if |an cestor| is found in 265 // If |ancestor| is specified, |*skippedAncestor| will be set to true if |an cestor| is found in
266 // the ancestry chain between this layer and the containing block layer; if not found, it will 266 // the ancestry chain between this layer and the containing block layer; if not found, it will
267 // be set to false. Either both |ancestor| and |skippedAncestor| should be n ullptr, or none of 267 // be set to false. Either both |ancestor| and |skippedAncestor| should be n ullptr, or none of
268 // them should. 268 // them should.
269 PaintLayer* enclosingPositionedAncestor(const PaintLayer* ancestor = nullptr , bool* skippedAncestor = nullptr) const; 269 PaintLayer* enclosingPositionedOrContainedAncestor(const PaintLayer* ancesto r = nullptr, bool* skippedAncestor = nullptr) const;
270 270
271 bool isPaintInvalidationContainer() const; 271 bool isPaintInvalidationContainer() const;
272 272
273 // Do *not* call this method unless you know what you are dooing. You probab ly want to call enclosingCompositingLayerForPaintInvalidation() instead. 273 // Do *not* call this method unless you know what you are dooing. You probab ly want to call enclosingCompositingLayerForPaintInvalidation() instead.
274 // If includeSelf is true, may return this. 274 // If includeSelf is true, may return this.
275 PaintLayer* enclosingLayerWithCompositedLayerMapping(IncludeSelfOrNot) const ; 275 PaintLayer* enclosingLayerWithCompositedLayerMapping(IncludeSelfOrNot) const ;
276 276
277 // 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 277 // 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
278 // GraphicsLayer backing, but is nevertheless the root for a call to the Lay er::paint*() methods. 278 // GraphicsLayer backing, but is nevertheless the root for a call to the Lay er::paint*() methods.
279 PaintLayer* enclosingLayerForPaintInvalidation() const; 279 PaintLayer* enclosingLayerForPaintInvalidation() const;
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 PaintLayerScrollableArea* scrollableArea() const { return m_scrollableArea.g et(); } 456 PaintLayerScrollableArea* scrollableArea() const { return m_scrollableArea.g et(); }
457 PaintLayerClipper& clipper() { return m_clipper; } 457 PaintLayerClipper& clipper() { return m_clipper; }
458 const PaintLayerClipper& clipper() const { return m_clipper; } 458 const PaintLayerClipper& clipper() const { return m_clipper; }
459 459
460 inline bool isPositionedContainer() const 460 inline bool isPositionedContainer() const
461 { 461 {
462 // FIXME: This is not in sync with containingBlock. 462 // FIXME: This is not in sync with containingBlock.
463 // LayoutObject::canContainFixedPositionObjects() should probably be use d 463 // LayoutObject::canContainFixedPositionObjects() should probably be use d
464 // instead. 464 // instead.
465 LayoutBoxModelObject* layerlayoutObject = layoutObject(); 465 LayoutBoxModelObject* layerlayoutObject = layoutObject();
466 return isRootLayer() || layerlayoutObject->isPositioned() || hasTransfor mRelatedProperty(); 466 return isRootLayer() || layerlayoutObject->isPositioned() || hasTransfor mRelatedProperty() || layerlayoutObject->style()->containsPaint();
chrishtr 2015/12/09 01:41:46 It's not really positioned..
leviw_travelin_and_unemployed 2015/12/09 21:09:24 That's because this method and its one caller, des
467 } 467 }
468 468
469 bool scrollsOverflow() const; 469 bool scrollsOverflow() const;
470 470
471 CompositingReasons potentialCompositingReasonsFromStyle() const { return m_p otentialCompositingReasonsFromStyle; } 471 CompositingReasons potentialCompositingReasonsFromStyle() const { return m_p otentialCompositingReasonsFromStyle; }
472 void setPotentialCompositingReasonsFromStyle(CompositingReasons reasons) { A SSERT(reasons == (reasons & CompositingReasonComboAllStyleDeterminedReasons)); m _potentialCompositingReasonsFromStyle = reasons; } 472 void setPotentialCompositingReasonsFromStyle(CompositingReasons reasons) { A SSERT(reasons == (reasons & CompositingReasonComboAllStyleDeterminedReasons)); m _potentialCompositingReasonsFromStyle = reasons; }
473 473
474 bool hasStyleDeterminedDirectCompositingReasons() const { return m_potential CompositingReasonsFromStyle & CompositingReasonComboAllDirectStyleDeterminedReas ons; } 474 bool hasStyleDeterminedDirectCompositingReasons() const { return m_potential CompositingReasonsFromStyle & CompositingReasonComboAllDirectStyleDeterminedReas ons; }
475 475
476 class AncestorDependentCompositingInputs { 476 class AncestorDependentCompositingInputs {
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 816
817 } // namespace blink 817 } // namespace blink
818 818
819 #ifndef NDEBUG 819 #ifndef NDEBUG
820 // Outside the WebCore namespace for ease of invocation from gdb. 820 // Outside the WebCore namespace for ease of invocation from gdb.
821 void showLayerTree(const blink::PaintLayer*); 821 void showLayerTree(const blink::PaintLayer*);
822 void showLayerTree(const blink::LayoutObject*); 822 void showLayerTree(const blink::LayoutObject*);
823 #endif 823 #endif
824 824
825 #endif // Layer_h 825 #endif // Layer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698