diff options
author | Shimeng (Simon) Wang <swang@google.com> | 2010-08-25 11:30:59 -0700 |
---|---|---|
committer | Shimeng (Simon) Wang <swang@google.com> | 2010-08-25 12:44:51 -0700 |
commit | 5c54c95ab6356ebcbf2ef44a299c3765d97eed6e (patch) | |
tree | 08b4d8489600a88d4ee053f423eaa3eae53dc5f8 /WebKit | |
parent | 0e3cef9385f336c311854b7c362810de999f3e78 (diff) | |
download | external_webkit-5c54c95ab6356ebcbf2ef44a299c3765d97eed6e.zip external_webkit-5c54c95ab6356ebcbf2ef44a299c3765d97eed6e.tar.gz external_webkit-5c54c95ab6356ebcbf2ef44a299c3765d97eed6e.tar.bz2 |
Preserve the zoomFactor when a new frameview is created.
Currently if the default font size is set "LARGE", it'll be ignored when a page is loaded,
since it's lost in the new frameview.
Change-Id: If4579459cb679fdc9666dda25cd557761f4820b5
Diffstat (limited to 'WebKit')
-rw-r--r-- | WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp index 95673d7..d4f45a8 100644 --- a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp +++ b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp @@ -909,8 +909,12 @@ void FrameLoaderClientAndroid::transitionToCommittedForNewPage() { IntRect visBounds = oldWebFrameView->getVisibleBounds(); IntRect windowBounds = oldWebFrameView->getWindowBounds(); WebCore::FrameView* oldFrameView = oldWebFrameView->view(); + const float oldZoomFactor = oldFrameView->zoomFactor(); m_frame->createView(bounds.size(), oldFrameView->baseBackgroundColor(), oldFrameView->isTransparent(), oldFrameView->fixedLayoutSize(), oldFrameView->useFixedLayout()); + if (oldZoomFactor != 1.0f && oldZoomFactor != m_frame->view()->zoomFactor()) { + m_frame->view()->setZoomFactor(oldZoomFactor, ZoomTextOnly); + } // Create a new WebFrameView for the new FrameView WebFrameView* newFrameView = new WebFrameView(m_frame->view(), webViewCore); |