Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: Source/core/rendering/RenderLayerCompositor.cpp

Issue 146023008: Add layout states to DocumentLifecycle state machine (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Whitelist one more transition' Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 2399 matching lines...) Expand 10 before | Expand all | Expand 10 after
2410 Frame& frame = m_renderView->frameView()->frame(); 2410 Frame& frame = m_renderView->frameView()->frame();
2411 Page* page = frame.page(); 2411 Page* page = frame.page();
2412 if (!page) 2412 if (!page)
2413 return; 2413 return;
2414 page->chrome().client().attachRootGraphicsLayer(&frame, rootGraphics Layer()); 2414 page->chrome().client().attachRootGraphicsLayer(&frame, rootGraphics Layer());
2415 break; 2415 break;
2416 } 2416 }
2417 case RootLayerAttachedViaEnclosingFrame: { 2417 case RootLayerAttachedViaEnclosingFrame: {
2418 // The layer will get hooked up via CompositedLayerMapping::updateGr aphicsLayerConfiguration() 2418 // The layer will get hooked up via CompositedLayerMapping::updateGr aphicsLayerConfiguration()
2419 // for the frame's renderer in the parent document. 2419 // for the frame's renderer in the parent document.
2420 DocumentLifecycle::DeprecatedTransition marker(DocumentLifecycle::Af terPerformLayout, DocumentLifecycle::StyleRecalcPending);
2420 m_renderView->document().ownerElement()->scheduleLayerUpdate(); 2421 m_renderView->document().ownerElement()->scheduleLayerUpdate();
2421 break; 2422 break;
2422 } 2423 }
2423 } 2424 }
2424 2425
2425 m_rootLayerAttachment = attachment; 2426 m_rootLayerAttachment = attachment;
2426 } 2427 }
2427 2428
2428 void RenderLayerCompositor::detachRootLayer() 2429 void RenderLayerCompositor::detachRootLayer()
2429 { 2430 {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
2471 2472
2472 // IFrames are special, because we hook compositing layers together across ifram e boundaries 2473 // IFrames are special, because we hook compositing layers together across ifram e boundaries
2473 // when both parent and iframe content are composited. So when this frame become s composited, we have 2474 // when both parent and iframe content are composited. So when this frame become s composited, we have
2474 // to use a synthetic style change to get the iframes into RenderLayers in order to allow them to composite. 2475 // to use a synthetic style change to get the iframes into RenderLayers in order to allow them to composite.
2475 void RenderLayerCompositor::notifyIFramesOfCompositingChange() 2476 void RenderLayerCompositor::notifyIFramesOfCompositingChange()
2476 { 2477 {
2477 if (!m_renderView->frameView()) 2478 if (!m_renderView->frameView())
2478 return; 2479 return;
2479 Frame& frame = m_renderView->frameView()->frame(); 2480 Frame& frame = m_renderView->frameView()->frame();
2480 2481
2482 DocumentLifecycle::DeprecatedTransition marker(DocumentLifecycle::AfterPerfo rmLayout, DocumentLifecycle::StyleRecalcPending);
2483
2481 for (Frame* child = frame.tree().firstChild(); child; child = child->tree(). traverseNext(&frame)) { 2484 for (Frame* child = frame.tree().firstChild(); child; child = child->tree(). traverseNext(&frame)) {
2482 if (child->document() && child->document()->ownerElement()) 2485 if (child->document() && child->document()->ownerElement())
2483 child->document()->ownerElement()->scheduleLayerUpdate(); 2486 child->document()->ownerElement()->scheduleLayerUpdate();
2484 } 2487 }
2485 2488
2486 // Compositing also affects the answer to RenderIFrame::requiresAcceleratedC ompositing(), so 2489 // Compositing also affects the answer to RenderIFrame::requiresAcceleratedC ompositing(), so
2487 // we need to schedule a style recalc in our parent document. 2490 // we need to schedule a style recalc in our parent document.
2488 if (HTMLFrameOwnerElement* ownerElement = m_renderView->document().ownerElem ent()) 2491 if (HTMLFrameOwnerElement* ownerElement = m_renderView->document().ownerElem ent())
2489 ownerElement->scheduleLayerUpdate(); 2492 ownerElement->scheduleLayerUpdate();
2490 } 2493 }
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
2639 } else if (graphicsLayer == m_scrollLayer.get()) { 2642 } else if (graphicsLayer == m_scrollLayer.get()) {
2640 name = "Frame Scrolling Layer"; 2643 name = "Frame Scrolling Layer";
2641 } else { 2644 } else {
2642 ASSERT_NOT_REACHED(); 2645 ASSERT_NOT_REACHED();
2643 } 2646 }
2644 2647
2645 return name; 2648 return name;
2646 } 2649 }
2647 2650
2648 } // namespace WebCore 2651 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderLayer.cpp ('k') | Source/core/rendering/RenderMediaControlElements.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698