Title: [98453] trunk/Source/WebCore
- Revision
- 98453
- Author
- [email protected]
- Date
- 2011-10-26 01:52:42 -0700 (Wed, 26 Oct 2011)
Log Message
Page Scale Factor broken when navigating history on pages with child frames
https://bugs.webkit.org/show_bug.cgi?id=70459
Reviewed by Darin Fisher.
With frameScaleFactor now always returning 1.0 for subframes and pageScaleFactor for the mainFrame,
and there being only a single pageScaleFactor, history for scaling is broken. Scaling history is
saved on a per frame basis but restored, overriding the per-page pageScaleFactor multiple times.
As a result, sometimes pages that have subframes end up getting a scale factor of 1.0 instead
of the correct scale factor that was assigned to the main frame.
No new tests because I don't know how to test this.
* loader/HistoryController.cpp:
(WebCore::HistoryController::restoreScrollPositionAndViewState):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (98452 => 98453)
--- trunk/Source/WebCore/ChangeLog 2011-10-26 08:52:40 UTC (rev 98452)
+++ trunk/Source/WebCore/ChangeLog 2011-10-26 08:52:42 UTC (rev 98453)
@@ -1,3 +1,21 @@
+2011-10-26 Fady Samuel <[email protected]>
+
+ Page Scale Factor broken when navigating history on pages with child frames
+ https://bugs.webkit.org/show_bug.cgi?id=70459
+
+ Reviewed by Darin Fisher.
+
+ With frameScaleFactor now always returning 1.0 for subframes and pageScaleFactor for the mainFrame,
+ and there being only a single pageScaleFactor, history for scaling is broken. Scaling history is
+ saved on a per frame basis but restored, overriding the per-page pageScaleFactor multiple times.
+ As a result, sometimes pages that have subframes end up getting a scale factor of 1.0 instead
+ of the correct scale factor that was assigned to the main frame.
+
+ No new tests because I don't know how to test this.
+
+ * loader/HistoryController.cpp:
+ (WebCore::HistoryController::restoreScrollPositionAndViewState):
+
2011-10-26 Sheriff Bot <[email protected]>
Unreviewed, rolling out r98429.
Modified: trunk/Source/WebCore/loader/HistoryController.cpp (98452 => 98453)
--- trunk/Source/WebCore/loader/HistoryController.cpp 2011-10-26 08:52:40 UTC (rev 98452)
+++ trunk/Source/WebCore/loader/HistoryController.cpp 2011-10-26 08:52:42 UTC (rev 98453)
@@ -125,7 +125,8 @@
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());
}
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes