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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
330 bool hasVisibleBoxDecorations() const; | 330 bool hasVisibleBoxDecorations() const; |
331 // True if this layer container layoutObjects that paint. | 331 // True if this layer container layoutObjects that paint. |
332 bool hasNonEmptyChildLayoutObjects() const; | 332 bool hasNonEmptyChildLayoutObjects() const; |
333 | 333 |
334 // Will ensure that isAllScrollingContentComposited() is up to date. | 334 // Will ensure that isAllScrollingContentComposited() is up to date. |
335 void updateScrollingStateAfterCompositingChange(); | 335 void updateScrollingStateAfterCompositingChange(); |
336 bool isAllScrollingContentComposited() const { | 336 bool isAllScrollingContentComposited() const { |
337 return m_isAllScrollingContentComposited; | 337 return m_isAllScrollingContentComposited; |
338 } | 338 } |
339 | 339 |
340 // Gets the ancestor layer that serves as the containing block of this layer. | 340 // Gets the ancestor layer that serves as the containing block (in the sense |
341 // This is either another out of flow positioned layer, or one that contains | 341 // of LayoutObject::container() instead of LayoutObject::containingBlock()) |
342 // paint. If |ancestor| is specified, |*skippedAncestor| will be set to true | 342 // of this layer. Normally the parent layer is the containing layer, except |
343 // if |ancestor| is found in the ancestry chain between this layer and the | 343 // for out of flow positioned, floating and multicol spanner layers whose |
344 // parent layer might not be the containing block. | |
chrishtr
2017/01/25 21:06:40
I think "might not be the containing block" is inc
Xianzhu
2017/01/25 22:14:10
I think it's correct, but may be confusing. Would
chrishtr
2017/01/27 00:36:22
Oh. You're saying parent() != container() in some
| |
345 // If |ancestor| is specified, |*skippedAncestor| will be set to true if | |
346 // |ancestor| is found in the ancestry chain between this layer and the | |
344 // containing block layer; if not found, it will be set to false. Either both | 347 // containing block layer; if not found, it will be set to false. Either both |
345 // |ancestor| and |skippedAncestor| should be nullptr, or none of them should. | 348 // |ancestor| and |skippedAncestor| should be nullptr, or none of them should. |
346 PaintLayer* containingLayerForOutOfFlowPositioned( | 349 PaintLayer* containingLayer(const PaintLayer* ancestor = nullptr, |
347 const PaintLayer* ancestor = nullptr, | 350 bool* skippedAncestor = nullptr) const; |
348 bool* skippedAncestor = nullptr) const; | |
349 | 351 |
350 bool isPaintInvalidationContainer() const; | 352 bool isPaintInvalidationContainer() const; |
351 | 353 |
352 // Do *not* call this method unless you know what you are dooing. You probably | 354 // Do *not* call this method unless you know what you are dooing. You probably |
353 // want to call enclosingCompositingLayerForPaintInvalidation() instead. | 355 // want to call enclosingCompositingLayerForPaintInvalidation() instead. |
354 // If includeSelf is true, may return this. | 356 // If includeSelf is true, may return this. |
355 PaintLayer* enclosingLayerWithCompositedLayerMapping(IncludeSelfOrNot) const; | 357 PaintLayer* enclosingLayerWithCompositedLayerMapping(IncludeSelfOrNot) const; |
356 | 358 |
357 // Returns the enclosing layer root into which this layer paints, inclusive of | 359 // Returns the enclosing layer root into which this layer paints, inclusive of |
358 // this one. Note that the enclosing layer may or may not have its own | 360 // this one. Note that the enclosing layer may or may not have its own |
(...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1200 unsigned m_hasRootScrollerAsDescendant : 1; | 1202 unsigned m_hasRootScrollerAsDescendant : 1; |
1201 | 1203 |
1202 LayoutBoxModelObject* m_layoutObject; | 1204 LayoutBoxModelObject* m_layoutObject; |
1203 | 1205 |
1204 PaintLayer* m_parent; | 1206 PaintLayer* m_parent; |
1205 PaintLayer* m_previous; | 1207 PaintLayer* m_previous; |
1206 PaintLayer* m_next; | 1208 PaintLayer* m_next; |
1207 PaintLayer* m_first; | 1209 PaintLayer* m_first; |
1208 PaintLayer* m_last; | 1210 PaintLayer* m_last; |
1209 | 1211 |
1210 // Our (x,y) coordinates are in our parent layer's coordinate space. | 1212 // Our (x,y) coordinates are in our containing layer's coordinate space. |
1211 LayoutPoint m_location; | 1213 LayoutPoint m_location; |
1212 | 1214 |
1213 // The layer's size. | 1215 // The layer's size. |
1214 // | 1216 // |
1215 // If the associated LayoutBoxModelObject is a LayoutBox, it's its border | 1217 // If the associated LayoutBoxModelObject is a LayoutBox, it's its border |
1216 // box. Otherwise, this is the LayoutInline's lines' bounding box. | 1218 // box. Otherwise, this is the LayoutInline's lines' bounding box. |
1217 IntSize m_size; | 1219 IntSize m_size; |
1218 | 1220 |
1219 // Cached normal flow values for absolute positioned elements with static | 1221 // Cached normal flow values for absolute positioned elements with static |
1220 // left/top values. | 1222 // left/top values. |
(...skipping 24 matching lines...) Expand all Loading... | |
1245 | 1247 |
1246 } // namespace blink | 1248 } // namespace blink |
1247 | 1249 |
1248 #ifndef NDEBUG | 1250 #ifndef NDEBUG |
1249 // Outside the WebCore namespace for ease of invocation from gdb. | 1251 // Outside the WebCore namespace for ease of invocation from gdb. |
1250 CORE_EXPORT void showLayerTree(const blink::PaintLayer*); | 1252 CORE_EXPORT void showLayerTree(const blink::PaintLayer*); |
1251 CORE_EXPORT void showLayerTree(const blink::LayoutObject*); | 1253 CORE_EXPORT void showLayerTree(const blink::LayoutObject*); |
1252 #endif | 1254 #endif |
1253 | 1255 |
1254 #endif // Layer_h | 1256 #endif // Layer_h |
OLD | NEW |