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

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

Issue 1300393003: Attempt scroll restoration anytime viewport size changes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: s/page()->frameHost()/m_frame->host()/ Created 5 years, 4 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 | « Source/core/loader/FrameLoader.cpp ('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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 { 522 {
523 return m_webView->client() ? m_webView->client()->screenInfo() : WebScreenIn fo(); 523 return m_webView->client() ? m_webView->client()->screenInfo() : WebScreenIn fo();
524 } 524 }
525 525
526 void ChromeClientImpl::contentsSizeChanged(LocalFrame* frame, const IntSize& siz e) const 526 void ChromeClientImpl::contentsSizeChanged(LocalFrame* frame, const IntSize& siz e) const
527 { 527 {
528 m_webView->didChangeContentsSize(); 528 m_webView->didChangeContentsSize();
529 529
530 WebLocalFrameImpl* webframe = WebLocalFrameImpl::fromFrame(frame); 530 WebLocalFrameImpl* webframe = WebLocalFrameImpl::fromFrame(frame);
531 webframe->didChangeContentsSize(size); 531 webframe->didChangeContentsSize(size);
532
533 frame->loader().restoreScrollPositionAndViewState();
534 } 532 }
535 533
536 void ChromeClientImpl::pageScaleFactorChanged() const 534 void ChromeClientImpl::pageScaleFactorChanged() const
537 { 535 {
538 m_webView->pageScaleFactorChanged(); 536 m_webView->pageScaleFactorChanged();
539 } 537 }
540 538
541 float ChromeClientImpl::clampPageScaleFactorToLimits(float scale) const 539 float ChromeClientImpl::clampPageScaleFactorToLimits(float scale) const
542 { 540 {
543 return m_webView->clampPageScaleFactorToLimits(scale); 541 return m_webView->clampPageScaleFactorToLimits(scale);
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
976 for (const auto& observer : observers) 974 for (const auto& observer : observers)
977 observer->willOpenPopup(); 975 observer->willOpenPopup();
978 } 976 }
979 977
980 FloatSize ChromeClientImpl::elasticOverscroll() const 978 FloatSize ChromeClientImpl::elasticOverscroll() const
981 { 979 {
982 return m_webView->elasticOverscroll(); 980 return m_webView->elasticOverscroll();
983 } 981 }
984 982
985 } // namespace blink 983 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/loader/FrameLoader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698