Title: [119235] trunk/Source/WebCore
- Revision
- 119235
- Author
- [email protected]
- Date
- 2012-06-01 08:45:00 -0700 (Fri, 01 Jun 2012)
Log Message
Don't set scroll position twice in HistoryController::restoreScrollPositionAndViewState
https://bugs.webkit.org/show_bug.cgi?id=88068
Patch by John Mellor <[email protected]> on 2012-06-01
Reviewed by Adam Barth.
In the case where pageScaleFactor changes, we were calling
setScrollPosition with an incorrect scroll position (i.e. a scroll
position scaled by the pageScaleFactor we hadn't yet applied), then
fixing it by setting the pageScaleFactor and scroll position together,
overwriting the old scroll position. It's cleaner to just set the
pageScaleFactor and scroll position together.
No new tests as this isn't expected to change the ultimate behavior, just clean up how it happens.
* loader/HistoryController.cpp:
(WebCore::HistoryController::restoreScrollPositionAndViewState):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (119234 => 119235)
--- trunk/Source/WebCore/ChangeLog 2012-06-01 15:43:03 UTC (rev 119234)
+++ trunk/Source/WebCore/ChangeLog 2012-06-01 15:45:00 UTC (rev 119235)
@@ -1,3 +1,22 @@
+2012-06-01 John Mellor <[email protected]>
+
+ Don't set scroll position twice in HistoryController::restoreScrollPositionAndViewState
+ https://bugs.webkit.org/show_bug.cgi?id=88068
+
+ Reviewed by Adam Barth.
+
+ In the case where pageScaleFactor changes, we were calling
+ setScrollPosition with an incorrect scroll position (i.e. a scroll
+ position scaled by the pageScaleFactor we hadn't yet applied), then
+ fixing it by setting the pageScaleFactor and scroll position together,
+ overwriting the old scroll position. It's cleaner to just set the
+ pageScaleFactor and scroll position together.
+
+ No new tests as this isn't expected to change the ultimate behavior, just clean up how it happens.
+
+ * loader/HistoryController.cpp:
+ (WebCore::HistoryController::restoreScrollPositionAndViewState):
+
2012-06-01 Thiago Marcos P. Santos <[email protected]>
[Qt] Remove deprecated to/fromAscii()
Modified: trunk/Source/WebCore/loader/HistoryController.cpp (119234 => 119235)
--- trunk/Source/WebCore/loader/HistoryController.cpp 2012-06-01 15:43:03 UTC (rev 119234)
+++ trunk/Source/WebCore/loader/HistoryController.cpp 2012-06-01 15:45:00 UTC (rev 119235)
@@ -124,10 +124,11 @@
if (FrameView* view = m_frame->view()) {
if (!view->wasScrolledByUser()) {
- view->setScrollPosition(m_currentItem->scrollPoint());
Page* page = m_frame->page();
if (page && page->mainFrame() == m_frame && m_currentItem->pageScaleFactor())
page->setPageScaleFactor(m_currentItem->pageScaleFactor(), m_currentItem->scrollPoint());
+ else
+ view->setScrollPosition(m_currentItem->scrollPoint());
}
}
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes