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

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

Issue 1885043011: [DevTools] Do not reset page scale to 1.0, rely on setNeedsReset. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « no previous file | 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 3450 matching lines...) Expand 10 before | Expand all | Expand 10 after
3461 return pageScaleConstraintsSet().finalConstraints().minimumScale; 3461 return pageScaleConstraintsSet().finalConstraints().minimumScale;
3462 } 3462 }
3463 3463
3464 float WebViewImpl::maximumPageScaleFactor() const 3464 float WebViewImpl::maximumPageScaleFactor() const
3465 { 3465 {
3466 return pageScaleConstraintsSet().finalConstraints().maximumScale; 3466 return pageScaleConstraintsSet().finalConstraints().maximumScale;
3467 } 3467 }
3468 3468
3469 void WebViewImpl::resetScaleStateImmediately() 3469 void WebViewImpl::resetScaleStateImmediately()
3470 { 3470 {
3471 page()->frameHost().visualViewport().setScale(1);
3472 pageScaleConstraintsSet().setNeedsReset(true); 3471 pageScaleConstraintsSet().setNeedsReset(true);
3473 } 3472 }
3474 3473
3475 void WebViewImpl::resetScrollAndScaleState() 3474 void WebViewImpl::resetScrollAndScaleState()
3476 { 3475 {
3477 page()->frameHost().visualViewport().reset(); 3476 page()->frameHost().visualViewport().reset();
3478 3477
3479 if (!page()->mainFrame()->isLocalFrame()) 3478 if (!page()->mainFrame()->isLocalFrame())
3480 return; 3479 return;
3481 3480
(...skipping 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after
4595 { 4594 {
4596 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than 4595 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than
4597 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. 4596 // page's scale factor, which can be 1 in use-zoom-for-dsf mode.
4598 if (!page()) 4597 if (!page())
4599 return 1; 4598 return 1;
4600 4599
4601 return page()->deviceScaleFactor(); 4600 return page()->deviceScaleFactor();
4602 } 4601 }
4603 4602
4604 } // namespace blink 4603 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698