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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 if (child->isBox()) | 162 if (child->isBox()) |
163 toRenderBox(child)->clearOverrideSize(); | 163 toRenderBox(child)->clearOverrideSize(); |
164 child->remove(); | 164 child->remove(); |
165 parent()->addChild(child, this); | 165 parent()->addChild(child, this); |
166 parent()->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(
); | 166 parent()->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(
); |
167 } | 167 } |
168 } | 168 } |
169 if (placeholder()) | 169 if (placeholder()) |
170 placeholder()->remove(); | 170 placeholder()->remove(); |
171 remove(); | 171 remove(); |
172 FullscreenElementStack::from(document()).setFullScreenRenderer(0); | 172 destroy(); |
173 } | 173 } |
174 | 174 |
175 void RenderFullScreen::setPlaceholder(RenderBlock* placeholder) | 175 void RenderFullScreen::setPlaceholder(RenderBlock* placeholder) |
176 { | 176 { |
177 m_placeholder = placeholder; | 177 m_placeholder = placeholder; |
178 } | 178 } |
179 | 179 |
180 void RenderFullScreen::createPlaceholder(PassRefPtr<RenderStyle> style, const La
youtRect& frameRect) | 180 void RenderFullScreen::createPlaceholder(PassRefPtr<RenderStyle> style, const La
youtRect& frameRect) |
181 { | 181 { |
182 if (style->width().isAuto()) | 182 if (style->width().isAuto()) |
183 style->setWidth(Length(frameRect.width(), Fixed)); | 183 style->setWidth(Length(frameRect.width(), Fixed)); |
184 if (style->height().isAuto()) | 184 if (style->height().isAuto()) |
185 style->setHeight(Length(frameRect.height(), Fixed)); | 185 style->setHeight(Length(frameRect.height(), Fixed)); |
186 | 186 |
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 |