https://bugs.webkit.org/show_bug.cgi?id=66244
authorbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Aug 2011 00:29:27 +0000 (00:29 +0000)
committerbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Aug 2011 00:29:27 +0000 (00:29 +0000)
commit86346768fa8c06fde71b415701cbf1db612aea96
tree698b9d0f7bd048a323ff9d945eb02721e4c7d0bc
parente9e58ca48dfffd8b9f52a1fff688f1019193f308
https://bugs.webkit.org/show_bug.cgi?id=66244
Cached pages don't fully update when going back after changing the display scale
factor
-and corresponding-
<rdar://problem/9955656>

Reviewed by Darin Adler.

This patch adds a generalized concept of needing a full style recalc to the
BackForwardController. So when the display scale factor is changed, the
BackForwardController can be informed that all pages will need a full style recalc
when they come out of the cache. This same mechanism is also used to fix a long-
standing bug with full-page/text zoom.

Iterate through the HistoryItems and mark all CachedPages as needing a full style
recalc.
* history/BackForwardController.cpp:
(WebCore::BackForwardController::markPagesForFullStyleRecalc):
* history/BackForwardController.h:

ChachedPage has a new bool -- m_needsFullStyleRecalc -- to track whether a full
style recalc is needed when the CachedPage is restored.
* history/CachedPage.cpp:
(WebCore::CachedPage::CachedPage):
(WebCore::CachedPage::restore):
(WebCore::CachedPage::clear):
* history/CachedPage.h:
(WebCore::CachedPage::markForFullStyleRecalc):

HistoryItem actually takes care of calling into CachedPage.
* history/HistoryItem.cpp:
(WebCore::HistoryItem::markForFullStyleRecalc):
* history/HistoryItem.h:

Fix style recalc issues for full-page/text zoom by calling our new function on
PageCache.
* page/Frame.cpp:
(WebCore::Frame::setPageAndTextZoomFactors):

Fix style recalc issues for display scale factor changes by calling our new
function on PageCache.
* page/Page.cpp:
(WebCore::Page::setDeviceScaleFactor):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@93669 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/history/BackForwardController.cpp
Source/WebCore/history/BackForwardController.h
Source/WebCore/history/CachedPage.cpp
Source/WebCore/history/CachedPage.h
Source/WebCore/history/HistoryItem.cpp
Source/WebCore/history/HistoryItem.h
Source/WebCore/page/Frame.cpp
Source/WebCore/page/Page.cpp