OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2010 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 void RenderFullScreen::willBeDestroyed() | 67 void RenderFullScreen::willBeDestroyed() |
68 { | 68 { |
69 if (m_placeholder) { | 69 if (m_placeholder) { |
70 remove(); | 70 remove(); |
71 if (!m_placeholder->beingDestroyed()) | 71 if (!m_placeholder->beingDestroyed()) |
72 m_placeholder->destroy(); | 72 m_placeholder->destroy(); |
73 ASSERT(!m_placeholder); | 73 ASSERT(!m_placeholder); |
74 } | 74 } |
75 | 75 |
76 // RenderObjects are unretained, so notify the document (which holds a point
er to a RenderFullScreen) | 76 // RenderObjects are unretained, so notify the document (which holds a point
er to a RenderFullScreen) |
77 // if it's RenderFullScreen is destroyed. | 77 // if its RenderFullScreen is destroyed. |
78 FullscreenElementStack& controller = FullscreenElementStack::from(document()
); | 78 FullscreenElementStack& fullscreen = FullscreenElementStack::from(document()
); |
79 if (controller.fullScreenRenderer() == this) | 79 if (fullscreen.fullScreenRenderer() == this) |
80 controller.fullScreenRendererDestroyed(); | 80 fullscreen.fullScreenRendererDestroyed(); |
81 | 81 |
82 RenderFlexibleBox::willBeDestroyed(); | 82 RenderFlexibleBox::willBeDestroyed(); |
83 } | 83 } |
84 | 84 |
85 static PassRefPtr<RenderStyle> createFullScreenStyle() | 85 static PassRefPtr<RenderStyle> createFullScreenStyle() |
86 { | 86 { |
87 RefPtr<RenderStyle> fullscreenStyle = RenderStyle::createDefaultStyle(); | 87 RefPtr<RenderStyle> fullscreenStyle = RenderStyle::createDefaultStyle(); |
88 | 88 |
89 // Create a stacking context: | 89 // Create a stacking context: |
90 fullscreenStyle->setZIndex(INT_MAX); | 90 fullscreenStyle->setZIndex(INT_MAX); |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 if (!m_placeholder) { | 187 if (!m_placeholder) { |
188 m_placeholder = new RenderFullScreenPlaceholder(this); | 188 m_placeholder = new RenderFullScreenPlaceholder(this); |
189 m_placeholder->setStyle(style); | 189 m_placeholder->setStyle(style); |
190 if (parent()) { | 190 if (parent()) { |
191 parent()->addChild(m_placeholder, this); | 191 parent()->addChild(m_placeholder, this); |
192 parent()->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(
); | 192 parent()->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(
); |
193 } | 193 } |
194 } else | 194 } else |
195 m_placeholder->setStyle(style); | 195 m_placeholder->setStyle(style); |
196 } | 196 } |
OLD | NEW |