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

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

Issue 23187005: [DevTools] Use device metrics emulation implemented in content. (Closed) Base URL: svn://svn.chromium.org/blink/trunk/
Patch Set: Reupload Created 7 years, 2 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 2413 matching lines...) Expand 10 before | Expand all | Expand 10 after
2424 m_rootContentLayer->setMasksToBounds(true); 2424 m_rootContentLayer->setMasksToBounds(true);
2425 } 2425 }
2426 2426
2427 if (!m_overflowControlsHostLayer) { 2427 if (!m_overflowControlsHostLayer) {
2428 ASSERT(!m_scrollLayer); 2428 ASSERT(!m_scrollLayer);
2429 ASSERT(!m_containerLayer); 2429 ASSERT(!m_containerLayer);
2430 2430
2431 // Create a layer to host the clipping layer and the overflow controls l ayers. 2431 // Create a layer to host the clipping layer and the overflow controls l ayers.
2432 m_overflowControlsHostLayer = GraphicsLayer::create(graphicsLayerFactory (), this); 2432 m_overflowControlsHostLayer = GraphicsLayer::create(graphicsLayerFactory (), this);
2433 2433
2434 // Create a clipping layer if this is an iframe 2434 // Create a clipping layer if this is an iframe or settings require to c lip.
2435 m_containerLayer = GraphicsLayer::create(graphicsLayerFactory(), this); 2435 m_containerLayer = GraphicsLayer::create(graphicsLayerFactory(), this);
2436 if (!isMainFrame()) 2436 bool containerMasksToBounds = !isMainFrame();
2437 m_containerLayer->setMasksToBounds(true); 2437 if (Settings* settings = m_renderView->document().settings()) {
2438 if (settings->rootLayerClipsContent())
2439 containerMasksToBounds = true;
2440 }
2441 m_containerLayer->setMasksToBounds(containerMasksToBounds);
2438 2442
2439 m_scrollLayer = GraphicsLayer::create(graphicsLayerFactory(), this); 2443 m_scrollLayer = GraphicsLayer::create(graphicsLayerFactory(), this);
2440 if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordina tor()) 2444 if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordina tor())
2441 scrollingCoordinator->setLayerIsContainerForFixedPositionLayers(m_sc rollLayer.get(), true); 2445 scrollingCoordinator->setLayerIsContainerForFixedPositionLayers(m_sc rollLayer.get(), true);
2442 2446
2443 // Hook them up 2447 // Hook them up
2444 m_overflowControlsHostLayer->addChild(m_containerLayer.get()); 2448 m_overflowControlsHostLayer->addChild(m_containerLayer.get());
2445 m_containerLayer->addChild(m_scrollLayer.get()); 2449 m_containerLayer->addChild(m_scrollLayer.get());
2446 m_scrollLayer->addChild(m_rootContentLayer.get()); 2450 m_scrollLayer->addChild(m_rootContentLayer.get());
2447 2451
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
2784 } else if (graphicsLayer == m_scrollLayer.get()) { 2788 } else if (graphicsLayer == m_scrollLayer.get()) {
2785 name = "Frame Scrolling Layer"; 2789 name = "Frame Scrolling Layer";
2786 } else { 2790 } else {
2787 ASSERT_NOT_REACHED(); 2791 ASSERT_NOT_REACHED();
2788 } 2792 }
2789 2793
2790 return name; 2794 return name;
2791 } 2795 }
2792 2796
2793 } // namespace WebCore 2797 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698