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

Side by Side Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 1586923002: [UseZoomForDSF] Guest view support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 3067 matching lines...) Expand 10 before | Expand all | Expand 10 after
3078 else if (zoomLevel > m_maximumZoomLevel) 3078 else if (zoomLevel > m_maximumZoomLevel)
3079 m_zoomLevel = m_maximumZoomLevel; 3079 m_zoomLevel = m_maximumZoomLevel;
3080 else 3080 else
3081 m_zoomLevel = zoomLevel; 3081 m_zoomLevel = zoomLevel;
3082 3082
3083 // TODO(nasko): Setting zoom level needs to be refactored to support 3083 // TODO(nasko): Setting zoom level needs to be refactored to support
3084 // out-of-process iframes. See https://crbug.com/528407. 3084 // out-of-process iframes. See https://crbug.com/528407.
3085 if (mainFrame()->isWebRemoteFrame()) 3085 if (mainFrame()->isWebRemoteFrame())
3086 return m_zoomLevel; 3086 return m_zoomLevel;
3087 3087
3088 LocalFrame* frame = mainFrameImpl()->frame(); 3088 LocalFrame* frame = mainFrameImpl() ? mainFrameImpl()->frame() : nullptr;
kenrb 2016/01/15 20:09:12 It isn't clear to me why mainFrameImpl() would ret
oshima 2016/01/15 22:24:10 It was crashing when I made the original version o
3089 if (!WebLocalFrameImpl::pluginContainerFromFrame(frame)) { 3089 if (frame && !WebLocalFrameImpl::pluginContainerFromFrame(frame)) {
3090 float zoomFactor = m_zoomFactorOverride ? m_zoomFactorOverride : static_ cast<float>(zoomLevelToZoomFactor(m_zoomLevel)); 3090 float zoomFactor = m_zoomFactorOverride ? m_zoomFactorOverride : static_ cast<float>(zoomLevelToZoomFactor(m_zoomLevel));
3091 zoomFactor *= m_zoomFactorForDeviceScaleFactor; 3091 zoomFactor *= m_zoomFactorForDeviceScaleFactor;
3092 frame->setPageZoomFactor(zoomFactor); 3092 frame->setPageZoomFactor(zoomFactor);
3093 } 3093 }
3094 3094
3095 return m_zoomLevel; 3095 return m_zoomLevel;
3096 } 3096 }
3097 3097
3098 void WebViewImpl::zoomLimitsChanged(double minimumZoomLevel, 3098 void WebViewImpl::zoomLimitsChanged(double minimumZoomLevel,
3099 double maximumZoomLevel) 3099 double maximumZoomLevel)
(...skipping 1520 matching lines...) Expand 10 before | Expand all | Expand 10 after
4620 void WebViewImpl::detachPaintArtifactCompositor() 4620 void WebViewImpl::detachPaintArtifactCompositor()
4621 { 4621 {
4622 if (!m_layerTreeView) 4622 if (!m_layerTreeView)
4623 return; 4623 return;
4624 4624
4625 m_layerTreeView->setDeferCommits(true); 4625 m_layerTreeView->setDeferCommits(true);
4626 m_layerTreeView->clearRootLayer(); 4626 m_layerTreeView->clearRootLayer();
4627 } 4627 }
4628 4628
4629 } // namespace blink 4629 } // namespace blink
OLDNEW
« content/renderer/browser_plugin/browser_plugin.h ('K') | « content/renderer/render_frame_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698