Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2014 Google Inc. All rights reserved. | 3 * Copyright (C) 2014 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 49 compositingState != PaintsIntoGroupedBacking) { | 49 compositingState != PaintsIntoGroupedBacking) { |
| 50 m_compositingAncestor = &layer; | 50 m_compositingAncestor = &layer; |
| 51 if (layer.stackingNode()->isStackingContext()) | 51 if (layer.stackingNode()->isStackingContext()) |
| 52 m_compositingStackingContext = &layer; | 52 m_compositingStackingContext = &layer; |
| 53 } | 53 } |
| 54 } | 54 } |
| 55 | 55 |
| 56 const PaintLayer* compositingContainer(const PaintLayer& layer) const { | 56 const PaintLayer* compositingContainer(const PaintLayer& layer) const { |
| 57 if (layer.stackingNode()->isStacked()) | 57 if (layer.stackingNode()->isStacked()) |
| 58 return m_compositingStackingContext; | 58 return m_compositingStackingContext; |
| 59 | |
| 60 // TODO(wangxianzhu, chrishtr): This is incorrect if m_compositingAncestor | |
| 61 // is inline and there is any non-layer floating object between layer and | |
| 62 // m_compositingAncestor. Should use the logic in PaintLayer:: | |
| 63 // containingLayer(). | |
| 64 if (layer.layoutObject().isFloatingWithNonContainingBlockParent()) | |
| 65 return layer.enclosingLayerWithCompositedLayerMapping(ExcludeSelf); | |
|
Xianzhu
2017/03/30 22:23:12
The test (PaintLayerTest.CompositingContainerUnder
chrishtr
2017/03/31 00:12:28
The sequence of patches here was:
https://coderev
Xianzhu
2017/03/31 04:14:43
I just review the above CLs and my later related c
| |
| 66 | |
| 67 return m_compositingAncestor; | 59 return m_compositingAncestor; |
| 68 } | 60 } |
| 69 | 61 |
| 70 const PaintLayer* compositingStackingContext() const { | 62 const PaintLayer* compositingStackingContext() const { |
| 71 return m_compositingStackingContext; | 63 return m_compositingStackingContext; |
| 72 } | 64 } |
| 73 | 65 |
| 74 private: | 66 private: |
| 75 const PaintLayer* m_compositingStackingContext; | 67 const PaintLayer* m_compositingStackingContext; |
| 76 const PaintLayer* m_compositingAncestor; | 68 const PaintLayer* m_compositingAncestor; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 132 ->assertNeedsToUpdateGraphicsLayerBitsCleared(); | 124 ->assertNeedsToUpdateGraphicsLayerBitsCleared(); |
| 133 | 125 |
| 134 for (PaintLayer* child = layer.firstChild(); child; | 126 for (PaintLayer* child = layer.firstChild(); child; |
| 135 child = child->nextSibling()) | 127 child = child->nextSibling()) |
| 136 assertNeedsToUpdateGraphicsLayerBitsCleared(*child); | 128 assertNeedsToUpdateGraphicsLayerBitsCleared(*child); |
| 137 } | 129 } |
| 138 | 130 |
| 139 #endif | 131 #endif |
| 140 | 132 |
| 141 } // namespace blink | 133 } // namespace blink |
| OLD | NEW |