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

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

Issue 351303003: [DevTools] Switch from DIP to CSS pixels in device mode. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed comments Created 6 years, 5 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/devtools/protocol.json ('k') | no next file » | 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) 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 3653 matching lines...) Expand 10 before | Expand all | Expand 10 after
3664 3664
3665 void WebViewImpl::didChangeContentsSize() 3665 void WebViewImpl::didChangeContentsSize()
3666 { 3666 {
3667 m_pageScaleConstraintsSet.didChangeContentsSize(contentsSize(), pageScaleFac tor()); 3667 m_pageScaleConstraintsSet.didChangeContentsSize(contentsSize(), pageScaleFac tor());
3668 } 3668 }
3669 3669
3670 void WebViewImpl::deviceOrPageScaleFactorChanged() 3670 void WebViewImpl::deviceOrPageScaleFactorChanged()
3671 { 3671 {
3672 m_pageScaleConstraintsSet.setNeedsReset(false); 3672 m_pageScaleConstraintsSet.setNeedsReset(false);
3673 updateLayerTreeViewport(); 3673 updateLayerTreeViewport();
3674 m_page->inspectorController().deviceOrPageScaleFactorChanged();
3674 } 3675 }
3675 3676
3676 bool WebViewImpl::useExternalPopupMenus() 3677 bool WebViewImpl::useExternalPopupMenus()
3677 { 3678 {
3678 return shouldUseExternalPopupMenus; 3679 return shouldUseExternalPopupMenus;
3679 } 3680 }
3680 3681
3681 void WebViewImpl::startDragging(LocalFrame* frame, 3682 void WebViewImpl::startDragging(LocalFrame* frame,
3682 const WebDragData& dragData, 3683 const WebDragData& dragData,
3683 WebDragOperationsMask mask, 3684 WebDragOperationsMask mask,
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
4153 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); 4154 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints();
4154 4155
4155 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) 4156 if (!mainFrameImpl() || !mainFrameImpl()->frameView())
4156 return false; 4157 return false;
4157 4158
4158 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4159 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4159 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4160 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4160 } 4161 }
4161 4162
4162 } // namespace blink 4163 } // namespace blink
OLDNEW
« no previous file with comments | « Source/devtools/protocol.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698