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

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

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