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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp

Issue 2237433004: Adds DevTools commands for forced viewport override. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adress Dmitry's comments + sync. Created 4 years, 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 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 932 matching lines...) Expand 10 before | Expand all | Expand 10 after
943 if (m_renderingContext3d == context) 943 if (m_renderingContext3d == context)
944 return; 944 return;
945 945
946 m_renderingContext3d = context; 946 m_renderingContext3d = context;
947 m_layer->layer()->setRenderingContext(context); 947 m_layer->layer()->setRenderingContext(context);
948 948
949 if (m_contentsLayer) 949 if (m_contentsLayer)
950 m_contentsLayer->setRenderingContext(m_renderingContext3d); 950 m_contentsLayer->setRenderingContext(m_renderingContext3d);
951 } 951 }
952 952
953 bool GraphicsLayer::masksToBounds() const
954 {
955 return m_layer->layer()->masksToBounds();
956 }
957
953 void GraphicsLayer::setMasksToBounds(bool masksToBounds) 958 void GraphicsLayer::setMasksToBounds(bool masksToBounds)
954 { 959 {
955 m_layer->layer()->setMasksToBounds(masksToBounds); 960 m_layer->layer()->setMasksToBounds(masksToBounds);
956 } 961 }
957 962
958 void GraphicsLayer::setDrawsContent(bool drawsContent) 963 void GraphicsLayer::setDrawsContent(bool drawsContent)
959 { 964 {
960 // Note carefully this early-exit is only correct because we also properly c all 965 // Note carefully this early-exit is only correct because we also properly c all
961 // WebLayer::setDrawsContent whenever m_contentsLayer is set to a new layer in setupContentsLayer(). 966 // WebLayer::setDrawsContent whenever m_contentsLayer is set to a new layer in setupContentsLayer().
962 if (drawsContent == m_drawsContent) 967 if (drawsContent == m_drawsContent)
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
1351 { 1356 {
1352 if (!layer) { 1357 if (!layer) {
1353 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); 1358 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n");
1354 return; 1359 return;
1355 } 1360 }
1356 1361
1357 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); 1362 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo);
1358 fprintf(stderr, "%s\n", output.utf8().data()); 1363 fprintf(stderr, "%s\n", output.utf8().data());
1359 } 1364 }
1360 #endif 1365 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698