Skip to content
Permalink
Browse files
New MainFrame views should inherit fixed layout settings from existin…
…g MainFrame view in Chromium.

https://bugs.webkit.org/show_bug.cgi?id=66780

Fixed layout mode is set from WebViewImpl, but new main FrameViews are created on loading new pages. The new page's FrameView should get its
fixed layout settings from the current page.

Reviewed by Darin Fisher.

* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::createFrameView):


Canonical link: https://commits.webkit.org/82598@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@93622 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Fady Samuel committed Aug 23, 2011
1 parent 95224b0 commit 6b9b70486b9728a08bc3a4c9767f5f91702ff5a7
Showing 2 changed files with 25 additions and 1 deletion.
@@ -1,3 +1,16 @@
2011-08-23 Fady Samuel <fsamuel@chromium.org>

New MainFrame views should inherit fixed layout settings from existing MainFrame view in Chromium.
https://bugs.webkit.org/show_bug.cgi?id=66780

Fixed layout mode is set from WebViewImpl, but new main FrameViews are created on loading new pages. The new page's FrameView should get its
fixed layout settings from the current page.

Reviewed by Darin Fisher.

* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::createFrameView):

2011-08-23 Matt Falkenhagen <falken@chromium.org>

[chromium] Update WebSettings to support per-script font settings
@@ -1979,8 +1979,15 @@ void WebFrameImpl::createFrameView()
ASSERT(page->mainFrame());

bool isMainFrame = m_frame == page->mainFrame();
if (isMainFrame && m_frame->view())
bool useFixedLayout = false;
IntSize fixedLayoutSize;
if (isMainFrame && m_frame->view()) {
m_frame->view()->setParentVisible(false);
// Save the fixed layout information before destroying the
// existing FrameView of this frame.
useFixedLayout = m_frame->view()->useFixedLayout();
fixedLayoutSize = m_frame->view()->fixedLayoutSize();
}

m_frame->setView(0);

@@ -2011,6 +2018,10 @@ void WebFrameImpl::createFrameView()
#if ENABLE(GESTURE_RECOGNIZER)
webView->resetGestureRecognizer();
#endif

// Restore the saved fixed layout information.
view->setUseFixedLayout(useFixedLayout);
view->setFixedLayoutSize(fixedLayoutSize);
}

WebFrameImpl* WebFrameImpl::fromFrame(Frame* frame)

0 comments on commit 6b9b704

Please sign in to comment.