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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 // TODO(chrishtr) this is not very performant for floats, but they should | 57 // TODO(chrishtr) this is not very performant for floats, but they should |
58 // be uncommon enough, and SPv2 will remove this code. | 58 // be uncommon enough, and SPv2 will remove this code. |
59 if (layer.layoutObject()->isFloating() && layer.layoutObject()->parent() && | 59 if (layer.layoutObject()->isFloating() && layer.layoutObject()->parent() && |
60 !layer.layoutObject()->parent()->isLayoutBlockFlow()) | 60 !layer.layoutObject()->parent()->isLayoutBlockFlow()) { |
61 return layer.layoutObject()->containingBlock()->enclosingLayer(); | 61 return layer.enclosingLayerWithCompositedLayerMapping(ExcludeSelf); |
| 62 } |
62 return layer.stackingNode()->isStacked() ? m_compositingStackingContext | 63 return layer.stackingNode()->isStacked() ? m_compositingStackingContext |
63 : m_compositingAncestor; | 64 : m_compositingAncestor; |
64 } | 65 } |
65 | 66 |
66 const PaintLayer* compositingStackingContext() const { | 67 const PaintLayer* compositingStackingContext() const { |
67 return m_compositingStackingContext; | 68 return m_compositingStackingContext; |
68 } | 69 } |
69 | 70 |
70 private: | 71 private: |
71 const PaintLayer* m_compositingStackingContext; | 72 const PaintLayer* m_compositingStackingContext; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 ->assertNeedsToUpdateGraphicsLayerBitsCleared(); | 129 ->assertNeedsToUpdateGraphicsLayerBitsCleared(); |
129 | 130 |
130 for (PaintLayer* child = layer.firstChild(); child; | 131 for (PaintLayer* child = layer.firstChild(); child; |
131 child = child->nextSibling()) | 132 child = child->nextSibling()) |
132 assertNeedsToUpdateGraphicsLayerBitsCleared(*child); | 133 assertNeedsToUpdateGraphicsLayerBitsCleared(*child); |
133 } | 134 } |
134 | 135 |
135 #endif | 136 #endif |
136 | 137 |
137 } // namespace blink | 138 } // namespace blink |
OLD | NEW |