| 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 3450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |