OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. |
3 * | 3 * |
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
5 * | 5 * |
6 * Other contributors: | 6 * Other contributors: |
7 * Robert O'Callahan <roc+@cs.cmu.edu> | 7 * Robert O'Callahan <roc+@cs.cmu.edu> |
8 * David Baron <dbaron@fas.harvard.edu> | 8 * David Baron <dbaron@fas.harvard.edu> |
9 * Christian Biesinger <cbiesinger@web.de> | 9 * Christian Biesinger <cbiesinger@web.de> |
10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 | 56 |
57 namespace blink { | 57 namespace blink { |
58 | 58 |
59 DeprecatedPaintLayerReflectionInfo::DeprecatedPaintLayerReflectionInfo(LayoutBox
& layoutObject) | 59 DeprecatedPaintLayerReflectionInfo::DeprecatedPaintLayerReflectionInfo(LayoutBox
& layoutObject) |
60 : m_box(&layoutObject) | 60 : m_box(&layoutObject) |
61 , m_isPaintingInsideReflection(false) | 61 , m_isPaintingInsideReflection(false) |
62 { | 62 { |
63 UseCounter::count(box().document(), UseCounter::Reflection); | 63 UseCounter::count(box().document(), UseCounter::Reflection); |
64 | 64 |
65 m_reflection = LayoutReplica::createAnonymous(&box().document()); | 65 m_reflection = LayoutReplica::createAnonymous(&box().document()); |
66 m_reflection->setParent(m_box); // We create a 1-way connection. | 66 m_reflection->setDangerousOneWayParent(m_box); |
67 } | 67 } |
68 | 68 |
69 void DeprecatedPaintLayerReflectionInfo::destroy() | 69 void DeprecatedPaintLayerReflectionInfo::destroy() |
70 { | 70 { |
71 if (!m_reflection->documentBeingDestroyed()) | 71 if (!m_reflection->documentBeingDestroyed()) |
72 m_reflection->removeLayers(box().layer()); | 72 m_reflection->removeLayers(box().layer()); |
73 | 73 |
74 m_reflection->setParent(0); | 74 m_reflection->setDangerousOneWayParent(nullptr); |
75 m_reflection->destroy(); | 75 m_reflection->destroy(); |
76 m_reflection = nullptr; | 76 m_reflection = nullptr; |
77 } | 77 } |
78 | 78 |
79 DeprecatedPaintLayer* DeprecatedPaintLayerReflectionInfo::reflectionLayer() cons
t | 79 DeprecatedPaintLayer* DeprecatedPaintLayerReflectionInfo::reflectionLayer() cons
t |
80 { | 80 { |
81 return m_reflection->layer(); | 81 return m_reflection->layer(); |
82 } | 82 } |
83 | 83 |
84 void DeprecatedPaintLayerReflectionInfo::updateAfterStyleChange(const ComputedSt
yle* oldStyle) | 84 void DeprecatedPaintLayerReflectionInfo::updateAfterStyleChange(const ComputedSt
yle* oldStyle) |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 if (m_isPaintingInsideReflection) | 134 if (m_isPaintingInsideReflection) |
135 return; | 135 return; |
136 | 136 |
137 // Mark that we are now inside replica painting. | 137 // Mark that we are now inside replica painting. |
138 m_isPaintingInsideReflection = true; | 138 m_isPaintingInsideReflection = true; |
139 DeprecatedPaintLayerPainter(*reflectionLayer()).paintLayer(context, painting
Info, flags); | 139 DeprecatedPaintLayerPainter(*reflectionLayer()).paintLayer(context, painting
Info, flags); |
140 m_isPaintingInsideReflection = false; | 140 m_isPaintingInsideReflection = false; |
141 } | 141 } |
142 | 142 |
143 } // namespace blink | 143 } // namespace blink |
OLD | NEW |