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

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: Another rebase 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
« no previous file with comments | « Source/core/platform/ScrollView.h ('k') | Source/core/rendering/TextAutosizer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2416 matching lines...) Expand 10 before | Expand all | Expand 10 after
2427 m_rootContentLayer->setMasksToBounds(true); 2427 m_rootContentLayer->setMasksToBounds(true);
2428 } 2428 }
2429 2429
2430 if (!m_overflowControlsHostLayer) { 2430 if (!m_overflowControlsHostLayer) {
2431 ASSERT(!m_scrollLayer); 2431 ASSERT(!m_scrollLayer);
2432 ASSERT(!m_containerLayer); 2432 ASSERT(!m_containerLayer);
2433 2433
2434 // Create a layer to host the clipping layer and the overflow controls l ayers. 2434 // Create a layer to host the clipping layer and the overflow controls l ayers.
2435 m_overflowControlsHostLayer = GraphicsLayer::create(graphicsLayerFactory (), this); 2435 m_overflowControlsHostLayer = GraphicsLayer::create(graphicsLayerFactory (), this);
2436 2436
2437 // Create a clipping layer if this is an iframe 2437 // Create a clipping layer if this is an iframe or settings require to c lip.
2438 m_containerLayer = GraphicsLayer::create(graphicsLayerFactory(), this); 2438 m_containerLayer = GraphicsLayer::create(graphicsLayerFactory(), this);
2439 if (!isMainFrame()) 2439 bool containerMasksToBounds = !isMainFrame();
2440 m_containerLayer->setMasksToBounds(true); 2440 if (Settings* settings = m_renderView->document().settings()) {
2441 if (settings->mainFrameClipsContent())
2442 containerMasksToBounds = true;
2443 }
2444 m_containerLayer->setMasksToBounds(containerMasksToBounds);
2441 2445
2442 m_scrollLayer = GraphicsLayer::create(graphicsLayerFactory(), this); 2446 m_scrollLayer = GraphicsLayer::create(graphicsLayerFactory(), this);
2443 if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordina tor()) 2447 if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordina tor())
2444 scrollingCoordinator->setLayerIsContainerForFixedPositionLayers(m_sc rollLayer.get(), true); 2448 scrollingCoordinator->setLayerIsContainerForFixedPositionLayers(m_sc rollLayer.get(), true);
2445 2449
2446 // Hook them up 2450 // Hook them up
2447 m_overflowControlsHostLayer->addChild(m_containerLayer.get()); 2451 m_overflowControlsHostLayer->addChild(m_containerLayer.get());
2448 m_containerLayer->addChild(m_scrollLayer.get()); 2452 m_containerLayer->addChild(m_scrollLayer.get());
2449 m_scrollLayer->addChild(m_rootContentLayer.get()); 2453 m_scrollLayer->addChild(m_rootContentLayer.get());
2450 2454
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
2787 } else if (graphicsLayer == m_scrollLayer.get()) { 2791 } else if (graphicsLayer == m_scrollLayer.get()) {
2788 name = "Frame Scrolling Layer"; 2792 name = "Frame Scrolling Layer";
2789 } else { 2793 } else {
2790 ASSERT_NOT_REACHED(); 2794 ASSERT_NOT_REACHED();
2791 } 2795 }
2792 2796
2793 return name; 2797 return name;
2794 } 2798 }
2795 2799
2796 } // namespace WebCore 2800 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/platform/ScrollView.h ('k') | Source/core/rendering/TextAutosizer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698