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

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

Issue 2651253003: Revert of Fix shouldPaint issue when a composited floating iframe becomes non-self-painting (Closed)
Patch Set: Created 3 years, 11 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
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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 PaintLayer* removeChild(PaintLayer*); 243 PaintLayer* removeChild(PaintLayer*);
244 244
245 void removeOnlyThisLayerAfterStyleChange(); 245 void removeOnlyThisLayerAfterStyleChange();
246 void insertOnlyThisLayerAfterStyleChange(); 246 void insertOnlyThisLayerAfterStyleChange();
247 247
248 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle); 248 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle);
249 249
250 // FIXME: Many people call this function while it has out-of-date information. 250 // FIXME: Many people call this function while it has out-of-date information.
251 bool isSelfPaintingLayer() const { return m_isSelfPaintingLayer; } 251 bool isSelfPaintingLayer() const { return m_isSelfPaintingLayer; }
252 252
253 // PaintLayers which represent LayoutParts may become self-painting due to
254 // being composited. If this is the case, this method returns true.
255 bool isSelfPaintingOnlyBecauseIsCompositedPart() const;
256
253 bool isTransparent() const { 257 bool isTransparent() const {
254 return layoutObject()->isTransparent() || 258 return layoutObject()->isTransparent() ||
255 layoutObject()->style()->hasBlendMode() || layoutObject()->hasMask(); 259 layoutObject()->style()->hasBlendMode() || layoutObject()->hasMask();
256 } 260 }
257 261
258 const PaintLayer* root() const { 262 const PaintLayer* root() const {
259 const PaintLayer* curr = this; 263 const PaintLayer* curr = this;
260 while (curr->parent()) 264 while (curr->parent())
261 curr = curr->parent(); 265 curr = curr->parent();
262 return curr; 266 return curr;
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after
977 m_clipRectsCache = WTF::wrapUnique(new ClipRectsCache); 981 m_clipRectsCache = WTF::wrapUnique(new ClipRectsCache);
978 return *m_clipRectsCache; 982 return *m_clipRectsCache;
979 } 983 }
980 void clearClipRectsCache() const { m_clipRectsCache.reset(); } 984 void clearClipRectsCache() const { m_clipRectsCache.reset(); }
981 985
982 bool has3DTransformedDescendant() const { 986 bool has3DTransformedDescendant() const {
983 DCHECK(!m_needsDescendantDependentFlagsUpdate); 987 DCHECK(!m_needsDescendantDependentFlagsUpdate);
984 return m_has3DTransformedDescendant; 988 return m_has3DTransformedDescendant;
985 } 989 }
986 990
987 // Whether the value of isSelfPaintingLayer() changed since the last clearing
988 // (which happens after the flag is chedked during compositing update).
989 bool selfPaintingStatusChanged() const {
990 DCHECK(!RuntimeEnabledFeatures::slimmingPaintV2Enabled());
991 return m_selfPaintingStatusChanged;
992 }
993 void clearSelfPaintingStatusChanged() {
994 DCHECK(!RuntimeEnabledFeatures::slimmingPaintV2Enabled());
995 m_selfPaintingStatusChanged = false;
996 }
997
998 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS 991 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS
999 void endShouldKeepAliveAllClientsRecursive(); 992 void endShouldKeepAliveAllClientsRecursive();
1000 #endif 993 #endif
1001 994
1002 private: 995 private:
1003 void setNeedsCompositingInputsUpdateInternal(); 996 void setNeedsCompositingInputsUpdateInternal();
1004 997
1005 void update3DTransformedDescendantStatus(); 998 void update3DTransformedDescendantStatus();
1006 999
1007 // Bounding box in the coordinates of this layer. 1000 // Bounding box in the coordinates of this layer.
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
1115 } 1108 }
1116 1109
1117 void mergeNeedsPaintPhaseFlagsFrom(const PaintLayer& layer) { 1110 void mergeNeedsPaintPhaseFlagsFrom(const PaintLayer& layer) {
1118 m_needsPaintPhaseDescendantOutlines |= 1111 m_needsPaintPhaseDescendantOutlines |=
1119 layer.m_needsPaintPhaseDescendantOutlines; 1112 layer.m_needsPaintPhaseDescendantOutlines;
1120 m_needsPaintPhaseFloat |= layer.m_needsPaintPhaseFloat; 1113 m_needsPaintPhaseFloat |= layer.m_needsPaintPhaseFloat;
1121 m_needsPaintPhaseDescendantBlockBackgrounds |= 1114 m_needsPaintPhaseDescendantBlockBackgrounds |=
1122 layer.m_needsPaintPhaseDescendantBlockBackgrounds; 1115 layer.m_needsPaintPhaseDescendantBlockBackgrounds;
1123 } 1116 }
1124 1117
1118 bool isSelfPaintingLayerForIntrinsicOrScrollingReasons() const;
1119
1125 bool shouldFragmentCompositedBounds(const PaintLayer* compositingLayer) const; 1120 bool shouldFragmentCompositedBounds(const PaintLayer* compositingLayer) const;
1126 1121
1127 void expandRectForStackingChildren(const PaintLayer& compositedLayer, 1122 void expandRectForStackingChildren(const PaintLayer& compositedLayer,
1128 LayoutRect& result, 1123 LayoutRect& result,
1129 PaintLayer::CalculateBoundsOptions) const; 1124 PaintLayer::CalculateBoundsOptions) const;
1130 1125
1131 // The return value is in the space of |stackingParent|, if non-null, or 1126 // The return value is in the space of |stackingParent|, if non-null, or
1132 // |this| otherwise. 1127 // |this| otherwise.
1133 LayoutRect boundingBoxForCompositingInternal( 1128 LayoutRect boundingBoxForCompositingInternal(
1134 const PaintLayer& compositedLayer, 1129 const PaintLayer& compositedLayer,
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
1197 unsigned m_needsPaintPhaseDescendantBlockBackgrounds : 1; 1192 unsigned m_needsPaintPhaseDescendantBlockBackgrounds : 1;
1198 unsigned m_previousPaintPhaseDescendantBlockBackgroundsWasEmpty : 1; 1193 unsigned m_previousPaintPhaseDescendantBlockBackgroundsWasEmpty : 1;
1199 1194
1200 // These bitfields are part of ancestor/descendant dependent compositing 1195 // These bitfields are part of ancestor/descendant dependent compositing
1201 // inputs. 1196 // inputs.
1202 unsigned m_hasDescendantWithClipPath : 1; 1197 unsigned m_hasDescendantWithClipPath : 1;
1203 unsigned m_hasNonIsolatedDescendantWithBlendMode : 1; 1198 unsigned m_hasNonIsolatedDescendantWithBlendMode : 1;
1204 unsigned m_hasAncestorWithClipPath : 1; 1199 unsigned m_hasAncestorWithClipPath : 1;
1205 unsigned m_hasRootScrollerAsDescendant : 1; 1200 unsigned m_hasRootScrollerAsDescendant : 1;
1206 1201
1207 unsigned m_selfPaintingStatusChanged : 1;
1208
1209 LayoutBoxModelObject* m_layoutObject; 1202 LayoutBoxModelObject* m_layoutObject;
1210 1203
1211 PaintLayer* m_parent; 1204 PaintLayer* m_parent;
1212 PaintLayer* m_previous; 1205 PaintLayer* m_previous;
1213 PaintLayer* m_next; 1206 PaintLayer* m_next;
1214 PaintLayer* m_first; 1207 PaintLayer* m_first;
1215 PaintLayer* m_last; 1208 PaintLayer* m_last;
1216 1209
1217 // Our (x,y) coordinates are in our parent layer's coordinate space. 1210 // Our (x,y) coordinates are in our parent layer's coordinate space.
1218 LayoutPoint m_location; 1211 LayoutPoint m_location;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
1252 1245
1253 } // namespace blink 1246 } // namespace blink
1254 1247
1255 #ifndef NDEBUG 1248 #ifndef NDEBUG
1256 // Outside the WebCore namespace for ease of invocation from gdb. 1249 // Outside the WebCore namespace for ease of invocation from gdb.
1257 CORE_EXPORT void showLayerTree(const blink::PaintLayer*); 1250 CORE_EXPORT void showLayerTree(const blink::PaintLayer*);
1258 CORE_EXPORT void showLayerTree(const blink::LayoutObject*); 1251 CORE_EXPORT void showLayerTree(const blink::LayoutObject*);
1259 #endif 1252 #endif
1260 1253
1261 #endif // Layer_h 1254 #endif // Layer_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/BlockFlowPainter.cpp ('k') | third_party/WebKit/Source/core/paint/PaintLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698