| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 CompositingState compositingState = layer.compositingState(); | 51 CompositingState compositingState = layer.compositingState(); |
| 52 if (compositingState != NotComposited && compositingState != PaintsIntoG
roupedBacking) { | 52 if (compositingState != NotComposited && compositingState != PaintsIntoG
roupedBacking) { |
| 53 m_compositingAncestor = &layer; | 53 m_compositingAncestor = &layer; |
| 54 if (layer.stackingNode()->isStackingContext()) | 54 if (layer.stackingNode()->isStackingContext()) |
| 55 m_compositingStackingContext = &layer; | 55 m_compositingStackingContext = &layer; |
| 56 } | 56 } |
| 57 } | 57 } |
| 58 | 58 |
| 59 const DeprecatedPaintLayer* compositingContainer(const DeprecatedPaintLayer&
layer) const | 59 const DeprecatedPaintLayer* compositingContainer(const DeprecatedPaintLayer&
layer) const |
| 60 { | 60 { |
| 61 return layer.stackingNode()->isNormalFlowOnly() ? m_compositingAncestor
: m_compositingStackingContext; | 61 return layer.stackingNode()->isTreatedAsStackingContextForPainting() ? m
_compositingStackingContext : m_compositingAncestor; |
| 62 } | 62 } |
| 63 | 63 |
| 64 const DeprecatedPaintLayer* compositingStackingContext() const | 64 const DeprecatedPaintLayer* compositingStackingContext() const |
| 65 { | 65 { |
| 66 return m_compositingStackingContext; | 66 return m_compositingStackingContext; |
| 67 } | 67 } |
| 68 | 68 |
| 69 private: | 69 private: |
| 70 const DeprecatedPaintLayer* m_compositingStackingContext; | 70 const DeprecatedPaintLayer* m_compositingStackingContext; |
| 71 const DeprecatedPaintLayer* m_compositingAncestor; | 71 const DeprecatedPaintLayer* m_compositingAncestor; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 if (layer.hasCompositedDeprecatedPaintLayerMapping()) | 121 if (layer.hasCompositedDeprecatedPaintLayerMapping()) |
| 122 layer.compositedDeprecatedPaintLayerMapping()->assertNeedsToUpdateGraphi
csLayerBitsCleared(); | 122 layer.compositedDeprecatedPaintLayerMapping()->assertNeedsToUpdateGraphi
csLayerBitsCleared(); |
| 123 | 123 |
| 124 for (DeprecatedPaintLayer* child = layer.firstChild(); child; child = child-
>nextSibling()) | 124 for (DeprecatedPaintLayer* child = layer.firstChild(); child; child = child-
>nextSibling()) |
| 125 assertNeedsToUpdateGraphicsLayerBitsCleared(*child); | 125 assertNeedsToUpdateGraphicsLayerBitsCleared(*child); |
| 126 } | 126 } |
| 127 | 127 |
| 128 #endif | 128 #endif |
| 129 | 129 |
| 130 } // namespace blink | 130 } // namespace blink |
| OLD | NEW |