| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |