Dispatch updateViewportArguments(), when Document is finished
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Feb 2012 22:44:00 +0000 (22:44 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Feb 2012 22:44:00 +0000 (22:44 +0000)
restoring from page cache.

https://bugs.webkit.org/show_bug.cgi?id=77943

Patch by Zalan Bujtas <zbujtas@gmail.com> on 2012-02-08
Reviewed by Kenneth Rohde Christiansen.

Move updateViewportArguments() call from setPageInCache() to
documentDidResumeFromPageCache() to ensure, that the Document is
fully resumed from the page cache and attached to the mainframe,
when the viewport arguments are updated.

No tests. No change in behaviour.

* dom/Document.cpp:
(WebCore::Document::setInPageCache):
(WebCore::Document::documentDidResumeFromPageCache):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@107135 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp

index 1232dae..8f8ca81 100644 (file)
@@ -1,3 +1,23 @@
+2012-02-08  Zalan Bujtas  <zbujtas@gmail.com>
+
+        Dispatch updateViewportArguments(), when Document is finished
+        restoring from page cache.
+
+        https://bugs.webkit.org/show_bug.cgi?id=77943
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Move updateViewportArguments() call from setPageInCache() to
+        documentDidResumeFromPageCache() to ensure, that the Document is
+        fully resumed from the page cache and attached to the mainframe,
+        when the viewport arguments are updated.
+
+        No tests. No change in behaviour.
+
+        * dom/Document.cpp:
+        (WebCore::Document::setInPageCache):
+        (WebCore::Document::documentDidResumeFromPageCache):
+
 2012-02-08  Shawn Singh  <shawnsingh@chromium.org>
 
         [chromium] Remove incorrect early exit in CCDamageTracker
index 39a97b2..7e92936 100644 (file)
@@ -4085,8 +4085,6 @@ void Document::setInPageCache(bool flag)
         setRenderer(m_savedRenderer);
         m_savedRenderer = 0;
 
-        updateViewportArguments();
-
         if (childNeedsStyleRecalc())
             scheduleStyleRecalc();
     }
@@ -4127,6 +4125,8 @@ void Document::documentDidResumeFromPageCache()
 
     ASSERT(m_frame);
     m_frame->loader()->client()->dispatchDidBecomeFrameset(isFrameSet());
+
+    updateViewportArguments();
 }
 
 void Document::registerForPageCacheSuspensionCallbacks(Element* e)