Diff
Modified: branches/safari-601.1.32-branch/Source/WebCore/ChangeLog (184482 => 184483)
--- branches/safari-601.1.32-branch/Source/WebCore/ChangeLog 2015-05-18 14:23:24 UTC (rev 184482)
+++ branches/safari-601.1.32-branch/Source/WebCore/ChangeLog 2015-05-18 14:23:35 UTC (rev 184483)
@@ -1,5 +1,35 @@
2015-05-18 Matthew Hanson <matthew_han...@apple.com>
+ Merge r184304. rdar://problem/19790341
+
+ 2015-05-13 Timothy Horton <timothy_hor...@apple.com>
+
+ Going back after resizing causes scroll knob to appear in the middle of the page
+ https://bugs.webkit.org/show_bug.cgi?id=144968
+ <rdar://problem/18299827>
+
+ Reviewed by Beth Dakin.
+
+ * history/CachedPage.cpp:
+ (WebCore::CachedPage::restore):
+ (WebCore::CachedPage::clear):
+ * history/CachedPage.h:
+ (WebCore::CachedPage::markForContentsSizeChanged):
+ * history/PageCache.cpp:
+ (WebCore::PageCache::markPagesForContentsSizeChanged):
+ * history/PageCache.h:
+ Add a flag that will cause us to call updateContentsSize() after a page
+ comes out of the page cache, if necessary.
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::setContentsSize):
+ * page/FrameView.h:
+ Mark all cached pages for this frame as needing updateContentsSize()
+ when setContentsSize happens. This will ensure that scrollbar layers
+ are repositioned when coming out of the page cache.
+
+2015-05-18 Matthew Hanson <matthew_han...@apple.com>
+
Merge r184296. rdar://problem/20100706
2015-05-13 Brent Fulgham <bfulg...@apple.com>
Modified: branches/safari-601.1.32-branch/Source/WebCore/history/CachedPage.cpp (184482 => 184483)
--- branches/safari-601.1.32-branch/Source/WebCore/history/CachedPage.cpp 2015-05-18 14:23:24 UTC (rev 184482)
+++ branches/safari-601.1.32-branch/Source/WebCore/history/CachedPage.cpp 2015-05-18 14:23:35 UTC (rev 184483)
@@ -116,6 +116,11 @@
page.captionPreferencesChanged();
#endif
+ if (m_needsUpdateContentsSize) {
+ if (FrameView* frameView = page.mainFrame().view())
+ frameView->updateContentsSize();
+ }
+
clear();
}
@@ -130,6 +135,7 @@
m_needsCaptionPreferencesChanged = false;
#endif
m_needsDeviceOrPageScaleChanged = false;
+ m_needsUpdateContentsSize = false;
}
bool CachedPage::hasExpired() const
Modified: branches/safari-601.1.32-branch/Source/WebCore/history/CachedPage.h (184482 => 184483)
--- branches/safari-601.1.32-branch/Source/WebCore/history/CachedPage.h 2015-05-18 14:23:24 UTC (rev 184482)
+++ branches/safari-601.1.32-branch/Source/WebCore/history/CachedPage.h 2015-05-18 14:23:35 UTC (rev 184483)
@@ -57,6 +57,8 @@
void markForDeviceOrPageScaleChanged() { m_needsDeviceOrPageScaleChanged = true; }
+ void markForContentsSizeChanged() { m_needsUpdateContentsSize = true; }
+
private:
double m_expirationTime;
std::unique_ptr<CachedFrame> m_cachedMainFrame;
@@ -66,6 +68,7 @@
bool m_needsCaptionPreferencesChanged { false };
#endif
bool m_needsDeviceOrPageScaleChanged { false };
+ bool m_needsUpdateContentsSize { false };
};
} // namespace WebCore
Modified: branches/safari-601.1.32-branch/Source/WebCore/history/PageCache.cpp (184482 => 184483)
--- branches/safari-601.1.32-branch/Source/WebCore/history/PageCache.cpp 2015-05-18 14:23:24 UTC (rev 184482)
+++ branches/safari-601.1.32-branch/Source/WebCore/history/PageCache.cpp 2015-05-18 14:23:35 UTC (rev 184483)
@@ -399,6 +399,15 @@
}
}
+void PageCache::markPagesForContentsSizeChanged(Page& page)
+{
+ for (auto& item : m_items) {
+ CachedPage& cachedPage = *item->m_cachedPage;
+ if (&page.mainFrame() == &cachedPage.cachedMainFrame()->view()->frame())
+ cachedPage.markForContentsSizeChanged();
+ }
+}
+
#if ENABLE(VIDEO_TRACK)
void PageCache::markPagesForCaptionPreferencesChanged()
{
Modified: branches/safari-601.1.32-branch/Source/WebCore/history/PageCache.h (184482 => 184483)
--- branches/safari-601.1.32-branch/Source/WebCore/history/PageCache.h 2015-05-18 14:23:24 UTC (rev 184482)
+++ branches/safari-601.1.32-branch/Source/WebCore/history/PageCache.h 2015-05-18 14:23:35 UTC (rev 184483)
@@ -65,6 +65,7 @@
// Will mark all cached pages associated with the given page as needing style recalc.
void markPagesForFullStyleRecalc(Page&);
void markPagesForDeviceOrPageScaleChanged(Page&);
+ void markPagesForContentsSizeChanged(Page&);
#if ENABLE(VIDEO_TRACK)
void markPagesForCaptionPreferencesChanged();
#endif
Modified: branches/safari-601.1.32-branch/Source/WebCore/page/FrameView.cpp (184482 => 184483)
--- branches/safari-601.1.32-branch/Source/WebCore/page/FrameView.cpp 2015-05-18 14:23:24 UTC (rev 184482)
+++ branches/safari-601.1.32-branch/Source/WebCore/page/FrameView.cpp 2015-05-18 14:23:35 UTC (rev 184483)
@@ -61,6 +61,7 @@
#include "MemoryCache.h"
#include "MemoryPressureHandler.h"
#include "OverflowEvent.h"
+#include "PageCache.h"
#include "PageOverlayController.h"
#include "ProgressTracker.h"
#include "RenderEmbeddedObject.h"
@@ -575,8 +576,10 @@
page->chrome().contentsSizeChanged(&frame(), size); // Notify only.
- if (frame().isMainFrame())
+ if (frame().isMainFrame()) {
frame().mainFrame().pageOverlayController().didChangeDocumentSize();
+ PageCache::singleton().markPagesForContentsSizeChanged(*page);
+ }
ASSERT(m_deferSetNeedsLayoutCount);
m_deferSetNeedsLayoutCount--;
Modified: branches/safari-601.1.32-branch/Source/WebCore/page/FrameView.h (184482 => 184483)
--- branches/safari-601.1.32-branch/Source/WebCore/page/FrameView.h 2015-05-18 14:23:24 UTC (rev 184482)
+++ branches/safari-601.1.32-branch/Source/WebCore/page/FrameView.h 2015-05-18 14:23:35 UTC (rev 184483)
@@ -104,6 +104,7 @@
virtual bool avoidScrollbarCreation() const override;
virtual void setContentsSize(const IntSize&) override;
+ virtual void updateContentsSize() override;
void layout(bool allowSubtree = true);
WEBCORE_EXPORT bool didFirstLayout() const;
@@ -602,7 +603,6 @@
WEBCORE_EXPORT void adjustTiledBackingCoverage();
virtual void repaintContentRectangle(const IntRect&) override;
- virtual void updateContentsSize() override;
virtual void addedOrRemovedScrollbar() override;
virtual void delegatesScrollingDidChange() override;