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 * | 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 if (!isHTMLVideoElement(fullscreenElement)) | 197 if (!isHTMLVideoElement(fullscreenElement)) |
198 return 0; | 198 return 0; |
199 RenderObject* renderer = fullscreenElement->renderer(); | 199 RenderObject* renderer = fullscreenElement->renderer(); |
200 if (!renderer) | 200 if (!renderer) |
201 return 0; | 201 return 0; |
202 return toRenderVideo(renderer); | 202 return toRenderVideo(renderer); |
203 } | 203 } |
204 | 204 |
205 void RenderLayerCompositor::updateIfNeededRecursive() | 205 void RenderLayerCompositor::updateIfNeededRecursive() |
206 { | 206 { |
207 for (LocalFrame* child = m_renderView.frameView()->frame().tree().firstChild
(); child; child = child->tree().nextSibling()) | 207 for (Frame* child = m_renderView.frameView()->frame().tree().firstChild(); c
hild; child = child->tree().nextSibling()) { |
208 child->contentRenderer()->compositor()->updateIfNeededRecursive(); | 208 if (child->isLocalFrame()) |
| 209 toLocalFrame(child)->contentRenderer()->compositor()->updateIfNeeded
Recursive(); |
| 210 } |
209 | 211 |
210 TRACE_EVENT0("blink_rendering", "RenderLayerCompositor::updateIfNeededRecurs
ive"); | 212 TRACE_EVENT0("blink_rendering", "RenderLayerCompositor::updateIfNeededRecurs
ive"); |
211 | 213 |
212 ASSERT(!m_renderView.needsLayout()); | 214 ASSERT(!m_renderView.needsLayout()); |
213 | 215 |
214 ScriptForbiddenScope forbidScript; | 216 ScriptForbiddenScope forbidScript; |
215 | 217 |
216 lifecycle().advanceTo(DocumentLifecycle::InCompositingUpdate); | 218 lifecycle().advanceTo(DocumentLifecycle::InCompositingUpdate); |
217 | 219 |
218 updateIfNeeded(); | 220 updateIfNeeded(); |
219 | 221 |
220 lifecycle().advanceTo(DocumentLifecycle::CompositingClean); | 222 lifecycle().advanceTo(DocumentLifecycle::CompositingClean); |
221 | 223 |
222 DocumentAnimations::startPendingAnimations(m_renderView.document()); | 224 DocumentAnimations::startPendingAnimations(m_renderView.document()); |
223 // TODO: Figure out why this fails on Chrome OS login page. crbug.com/365507 | 225 // TODO: Figure out why this fails on Chrome OS login page. crbug.com/365507 |
224 // ASSERT(lifecycle().state() == DocumentLifecycle::CompositingClean); | 226 // ASSERT(lifecycle().state() == DocumentLifecycle::CompositingClean); |
225 | 227 |
226 #if ASSERT_ENABLED | 228 #if ASSERT_ENABLED |
227 assertNoUnresolvedDirtyBits(); | 229 assertNoUnresolvedDirtyBits(); |
228 for (LocalFrame* child = m_renderView.frameView()->frame().tree().firstChild
(); child; child = child->tree().nextSibling()) | 230 for (Frame* child = m_renderView.frameView()->frame().tree().firstChild(); c
hild; child = child->tree().nextSibling()) { |
229 child->contentRenderer()->compositor()->assertNoUnresolvedDirtyBits(); | 231 if (child->isLocalFrame()) |
| 232 toLocalFrame(child)->contentRenderer()->compositor()->assertNoUnreso
lvedDirtyBits(); |
| 233 } |
230 #endif | 234 #endif |
231 } | 235 } |
232 | 236 |
233 void RenderLayerCompositor::setNeedsCompositingUpdate(CompositingUpdateType upda
teType) | 237 void RenderLayerCompositor::setNeedsCompositingUpdate(CompositingUpdateType upda
teType) |
234 { | 238 { |
235 ASSERT(updateType != CompositingUpdateNone); | 239 ASSERT(updateType != CompositingUpdateNone); |
236 | 240 |
237 // FIXME: This function should only set dirty bits. We shouldn't | 241 // FIXME: This function should only set dirty bits. We shouldn't |
238 // enable compositing mode here. | 242 // enable compositing mode here. |
239 // We check needsLayout here because we don't know if we need to enable | 243 // We check needsLayout here because we don't know if we need to enable |
(...skipping 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1309 } else if (graphicsLayer == m_scrollLayer.get()) { | 1313 } else if (graphicsLayer == m_scrollLayer.get()) { |
1310 name = "LocalFrame Scrolling Layer"; | 1314 name = "LocalFrame Scrolling Layer"; |
1311 } else { | 1315 } else { |
1312 ASSERT_NOT_REACHED(); | 1316 ASSERT_NOT_REACHED(); |
1313 } | 1317 } |
1314 | 1318 |
1315 return name; | 1319 return name; |
1316 } | 1320 } |
1317 | 1321 |
1318 } // namespace WebCore | 1322 } // namespace WebCore |
OLD | NEW |