Page Scale Factor broken when navigating history on pages with child frames
[WebKit-https.git] / Source / WebCore / loader / HistoryController.cpp
index 53d64d8ac77f6f99916f275fc86238c921969d66..f053a98e8fc3ba6d36f5224dd2514b04cc8401e0 100644 (file)
@@ -125,7 +125,8 @@ void HistoryController::restoreScrollPositionAndViewState()
     if (FrameView* view = m_frame->view()) {
         if (!view->wasScrolledByUser()) {
             view->setScrollPosition(m_currentItem->scrollPoint());
-            if (Page* page = m_frame->page())
+            Page* page = m_frame->page();
+            if (page && page->mainFrame() == m_frame)
                 page->setPageScaleFactor(m_currentItem->pageScaleFactor(), m_currentItem->scrollPoint());
         }
     }