Title: [152246] branches/safari-537-branch/Source/WebCore
- Revision
- 152246
- Author
- [email protected]
- Date
- 2013-07-01 13:38:23 -0700 (Mon, 01 Jul 2013)
Log Message
Merged r152194. <rdar://problem/14261627>
Modified Paths
Diff
Modified: branches/safari-537-branch/Source/WebCore/ChangeLog (152245 => 152246)
--- branches/safari-537-branch/Source/WebCore/ChangeLog 2013-07-01 20:36:24 UTC (rev 152245)
+++ branches/safari-537-branch/Source/WebCore/ChangeLog 2013-07-01 20:38:23 UTC (rev 152246)
@@ -1,5 +1,40 @@
2013-07-01 Lucas Forschler <[email protected]>
+ Merge r152194
+
+ 2013-06-28 Beth Dakin <[email protected]>
+
+ Cached pages don't update their backing scale factor when it changes
+ https://bugs.webkit.org/show_bug.cgi?id=118206
+ -and-
+ <rdar://problem/14261627>
+
+ Reviewed by Tim Horton.
+
+ It is not sufficient to mark pages in the PageCache as needing a full style
+ recalc. We also need to ensure that the RenderLayerCompositors for the CachesPages
+ get updated.
+
+ Keep track of whether device scale has been updated with
+ m_needsDeviceScaleChanged. If that has been marked true, then restore() will call
+ Frame::deviceOrPageScaleFactorChanged().
+ * history/CachedPage.cpp:
+ (WebCore::CachedPage::CachedPage):
+ (WebCore::CachedPage::restore):
+ * history/CachedPage.h:
+ (WebCore::CachedPage::markForDeviceScaleChanged):
+
+ Propagate markForDeviceScaleChanged() to all of the CachedPages.
+ * history/PageCache.cpp:
+ (WebCore::PageCache::markPagesForDeviceScaleChanged):
+ * history/PageCache.h:
+
+ Call PageCache::markPagesForDeviceScaleChanged()
+ * page/Page.cpp:
+ (WebCore::Page::setDeviceScaleFactor):
+
+2013-07-01 Lucas Forschler <[email protected]>
+
Merge r152117
2013-06-27 Ruth Fong <[email protected]>
Modified: branches/safari-537-branch/Source/WebCore/history/CachedPage.cpp (152245 => 152246)
--- branches/safari-537-branch/Source/WebCore/history/CachedPage.cpp 2013-07-01 20:36:24 UTC (rev 152245)
+++ branches/safari-537-branch/Source/WebCore/history/CachedPage.cpp 2013-07-01 20:38:23 UTC (rev 152246)
@@ -57,6 +57,7 @@
, m_needStyleRecalcForVisitedLinks(false)
, m_needsFullStyleRecalc(false)
, m_needsCaptionPreferencesChanged(false)
+ , m_needsDeviceScaleChanged(false)
{
#ifndef NDEBUG
cachedPageCounter.increment();
@@ -92,6 +93,13 @@
frame->document()->visitedLinkState()->invalidateStyleForAllLinks();
}
+#if USE(ACCELERATED_COMPOSITING)
+ if (m_needsDeviceScaleChanged) {
+ if (Frame* frame = page->mainFrame())
+ frame->deviceOrPageScaleFactorChanged();
+ }
+#endif
+
if (m_needsFullStyleRecalc)
page->setNeedsRecalcStyleInAllFrames();
Modified: branches/safari-537-branch/Source/WebCore/history/CachedPage.h (152245 => 152246)
--- branches/safari-537-branch/Source/WebCore/history/CachedPage.h 2013-07-01 20:36:24 UTC (rev 152245)
+++ branches/safari-537-branch/Source/WebCore/history/CachedPage.h 2013-07-01 20:38:23 UTC (rev 152246)
@@ -58,6 +58,10 @@
void markForCaptionPreferencesChanged() { m_needsCaptionPreferencesChanged = true; }
#endif
+#if USE(ACCELERATED_COMPOSITING)
+ void markForDeviceScaleChanged() { m_needsDeviceScaleChanged = true; }
+#endif
+
private:
CachedPage(Page*);
@@ -67,6 +71,7 @@
bool m_needStyleRecalcForVisitedLinks;
bool m_needsFullStyleRecalc;
bool m_needsCaptionPreferencesChanged;
+ bool m_needsDeviceScaleChanged;
};
} // namespace WebCore
Modified: branches/safari-537-branch/Source/WebCore/history/PageCache.cpp (152245 => 152246)
--- branches/safari-537-branch/Source/WebCore/history/PageCache.cpp 2013-07-01 20:36:24 UTC (rev 152245)
+++ branches/safari-537-branch/Source/WebCore/history/PageCache.cpp 2013-07-01 20:38:23 UTC (rev 152246)
@@ -406,6 +406,20 @@
}
}
+
+#if USE(ACCELERATED_COMPOSITING)
+void PageCache::markPagesForDeviceScaleChanged(Page* page)
+{
+ Frame* mainFrame = page->mainFrame();
+
+ for (HistoryItem* current = m_head; current; current = current->m_next) {
+ CachedPage* cachedPage = current->m_cachedPage.get();
+ if (cachedPage->cachedMainFrame()->view()->frame() == mainFrame)
+ cachedPage->markForDeviceScaleChanged();
+ }
+}
+#endif
+
#if ENABLE(VIDEO_TRACK)
void PageCache::markPagesForCaptionPreferencesChanged()
{
Modified: branches/safari-537-branch/Source/WebCore/history/PageCache.h (152245 => 152246)
--- branches/safari-537-branch/Source/WebCore/history/PageCache.h 2013-07-01 20:36:24 UTC (rev 152245)
+++ branches/safari-537-branch/Source/WebCore/history/PageCache.h 2013-07-01 20:38:23 UTC (rev 152246)
@@ -67,6 +67,7 @@
#if USE(ACCELERATED_COMPOSITING)
bool shouldClearBackingStores() const { return m_shouldClearBackingStores; }
void setShouldClearBackingStores(bool flag) { m_shouldClearBackingStores = flag; }
+ void markPagesForDeviceScaleChanged(Page*);
#endif
private:
Modified: branches/safari-537-branch/Source/WebCore/page/Page.cpp (152245 => 152246)
--- branches/safari-537-branch/Source/WebCore/page/Page.cpp 2013-07-01 20:36:24 UTC (rev 152245)
+++ branches/safari-537-branch/Source/WebCore/page/Page.cpp 2013-07-01 20:38:23 UTC (rev 152246)
@@ -805,6 +805,8 @@
#if USE(ACCELERATED_COMPOSITING)
if (mainFrame())
mainFrame()->deviceOrPageScaleFactorChanged();
+
+ pageCache()->markPagesForDeviceScaleChanged(this);
#endif
for (Frame* frame = mainFrame(); frame; frame = frame->tree()->traverseNext())
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes