[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
luiz at webkit.org
luiz at webkit.org
Wed Dec 22 13:45:00 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit e0514c5b22acd3b1bf3887404563bd82d51591c9
Author: luiz at webkit.org <luiz at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Sep 24 21:54:25 2010 +0000
2010-09-24 Luiz Agostini <luiz.agostini at openbossa.org>
Reviewed by Kenneth Rohde Christiansen.
Keep viewport information in Document
https://bugs.webkit.org/show_bug.cgi?id=46385
The viewport meta data (layout viewport, scale) needs to be set again when bringing
back a page from the page cache. As the viewport metadata is only retrieved while parsing
the document, we need to store it in the Document class.
* fast/viewport/viewport-128-expected.txt: Copied from LayoutTests/fast/viewport/viewport-19-expected.txt.
* fast/viewport/viewport-128.html: Added.
2010-09-24 Luiz Agostini <luiz.agostini at openbossa.org>
Reviewed by Kenneth Rohde Christiansen.
Keep viewport information in Document
https://bugs.webkit.org/show_bug.cgi?id=46385
The viewport meta data (layout viewport, scale) needs to be set again when bringing
back a page from the page cache. As the viewport metadata is only retrieved while parsing
the document, we need to store it in the Document class.
Test: fast/viewport/viewport-128.html
* WebCore.xcodeproj/project.pbxproj:
* dom/Document.cpp:
(WebCore::Document::processViewport):
(WebCore::Document::setInPageCache):
* dom/Document.h:
(WebCore::Document::viewportArguments):
2010-09-24 Luiz Agostini <luiz.agostini at openbossa.org>
Reviewed by Kenneth Rohde Christiansen.
Keep viewport information in Document
https://bugs.webkit.org/show_bug.cgi?id=46385
The viewport meta data (layout viewport, scale) needs to be set again when bringing
back a page from the page cache. As the viewport metadata is only retrieved while parsing
the document, we need to store it in the Document class.
* Api/qwebframe.cpp:
(QWebFramePrivate::viewportArguments):
* Api/qwebframe_p.h:
* Api/qwebpage.cpp:
(QWebPage::viewportConfigurationForSize):
* WebCoreSupport/ChromeClientQt.cpp:
(WebCore::ChromeClientQt::didReceiveViewportArguments):
* WebCoreSupport/DumpRenderTreeSupportQt.cpp:
(DumpRenderTreeSupportQt::viewportAsText):
* WebCoreSupport/FrameLoaderClientQt.cpp:
(WebCore::FrameLoaderClientQt::dispatchDidCommitLoad):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68292 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 773a50b..0c73f36 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,17 @@
+2010-09-24 Luiz Agostini <luiz.agostini at openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Keep viewport information in Document
+ https://bugs.webkit.org/show_bug.cgi?id=46385
+
+ The viewport meta data (layout viewport, scale) needs to be set again when bringing
+ back a page from the page cache. As the viewport metadata is only retrieved while parsing
+ the document, we need to store it in the Document class.
+
+ * fast/viewport/viewport-128-expected.txt: Copied from LayoutTests/fast/viewport/viewport-19-expected.txt.
+ * fast/viewport/viewport-128.html: Added.
+
2010-09-24 Stephen White <senorblanco at chromium.org>
Unreviewed; new test baselines and test_expectations update.
diff --git a/LayoutTests/fast/viewport/viewport-19-expected.txt b/LayoutTests/fast/viewport/viewport-128-expected.txt
similarity index 100%
copy from LayoutTests/fast/viewport/viewport-19-expected.txt
copy to LayoutTests/fast/viewport/viewport-128-expected.txt
diff --git a/LayoutTests/fast/viewport/viewport-128.html b/LayoutTests/fast/viewport/viewport-128.html
new file mode 100644
index 0000000..5e07e0e
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-128.html
@@ -0,0 +1,33 @@
+<html>
+ <head>
+ <title>Viewport meta data stored in page cache.</title>
+ <meta name="viewport" content="width=100, initial-scale=2">
+
+ <script>
+ // The objective is to test if the viewport meta tag information is stored in page cache
+
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.waitUntilDone();
+ layoutTestController.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
+ }
+
+ function pageshow(evt)
+ {
+ if (!evt.persisted) {
+ // this will run only when the page is loaded for the first time.
+ setTimeout('window.location = "data:text/html,<script>history.back()<" + "/script>"', 0);
+
+ } else {
+ // if this point is reached the page is comming from the page cache.
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ setTimeout(function() { if (window.layoutTestController) layoutTestController.notifyDone(); }, 0);
+
+ }
+ }
+
+ window.onpageshow = pageshow;
+ </script>
+ </head>
+</html>
+
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index e40d167..093f48d 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,23 @@
+2010-09-24 Luiz Agostini <luiz.agostini at openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Keep viewport information in Document
+ https://bugs.webkit.org/show_bug.cgi?id=46385
+
+ The viewport meta data (layout viewport, scale) needs to be set again when bringing
+ back a page from the page cache. As the viewport metadata is only retrieved while parsing
+ the document, we need to store it in the Document class.
+
+ Test: fast/viewport/viewport-128.html
+
+ * WebCore.xcodeproj/project.pbxproj:
+ * dom/Document.cpp:
+ (WebCore::Document::processViewport):
+ (WebCore::Document::setInPageCache):
+ * dom/Document.h:
+ (WebCore::Document::viewportArguments):
+
2010-09-24 David Hyatt <hyatt at apple.com>
Reviewed by Sam Weinig.
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index 3abe3d3..4e5b70a 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -5172,7 +5172,7 @@
CEA3949C11D45CDA003094CF /* StaticHashSetNodeList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CEA3949A11D45CDA003094CF /* StaticHashSetNodeList.cpp */; };
CEA3949D11D45CDA003094CF /* StaticHashSetNodeList.h in Headers */ = {isa = PBXBuildFile; fileRef = CEA3949B11D45CDA003094CF /* StaticHashSetNodeList.h */; };
CEF418CE1179678C009D112C /* ViewportArguments.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CEF418CC1179678C009D112C /* ViewportArguments.cpp */; };
- CEF418CF1179678C009D112C /* ViewportArguments.h in Headers */ = {isa = PBXBuildFile; fileRef = CEF418CD1179678C009D112C /* ViewportArguments.h */; };
+ CEF418CF1179678C009D112C /* ViewportArguments.h in Headers */ = {isa = PBXBuildFile; fileRef = CEF418CD1179678C009D112C /* ViewportArguments.h */; settings = {ATTRIBUTES = (Private, ); }; };
D000EBA211BDAFD400C47726 /* FrameLoaderStateMachine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D000EBA011BDAFD400C47726 /* FrameLoaderStateMachine.cpp */; };
D000EBA311BDAFD400C47726 /* FrameLoaderStateMachine.h in Headers */ = {isa = PBXBuildFile; fileRef = D000EBA111BDAFD400C47726 /* FrameLoaderStateMachine.h */; settings = {ATTRIBUTES = (Private, ); }; };
D000ED2711C1B9CD00C47726 /* SubframeLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D000ED2511C1B9CD00C47726 /* SubframeLoader.cpp */; };
diff --git a/WebCore/dom/Document.cpp b/WebCore/dom/Document.cpp
index 21a73d7..c3feae4 100644
--- a/WebCore/dom/Document.cpp
+++ b/WebCore/dom/Document.cpp
@@ -129,7 +129,6 @@
#include "TreeWalker.h"
#include "UIEvent.h"
#include "UserContentURLPattern.h"
-#include "ViewportArguments.h"
#include "WebKitAnimationEvent.h"
#include "WebKitTransitionEvent.h"
#include "WheelEvent.h"
@@ -2590,16 +2589,14 @@ void Document::processViewport(const String& features)
{
ASSERT(!features.isNull());
+ m_viewportArguments = ViewportArguments();
+ processArguments(features, (void*)&m_viewportArguments, &setViewportFeature);
+
Frame* frame = this->frame();
- if (!frame)
+ if (!frame || !frame->page())
return;
- if (frame->page()) {
- ViewportArguments arguments;
- processArguments(features, (void*)&arguments, &setViewportFeature);
-
- frame->page()->chrome()->client()->didReceiveViewportArguments(frame, arguments);
- }
+ frame->page()->chrome()->client()->didReceiveViewportArguments(frame, m_viewportArguments);
}
MouseEventWithHitTestResults Document::prepareMouseEvent(const HitTestRequest& request, const IntPoint& documentPoint, const PlatformMouseEvent& event)
@@ -3815,6 +3812,10 @@ void Document::setInPageCache(bool flag)
ASSERT(m_renderArena);
setRenderer(m_savedRenderer);
m_savedRenderer = 0;
+
+ if (frame() && frame()->page())
+ frame()->page()->chrome()->client()->didReceiveViewportArguments(frame(), m_viewportArguments);
+
if (childNeedsStyleRecalc())
scheduleStyleRecalc();
}
diff --git a/WebCore/dom/Document.h b/WebCore/dom/Document.h
index 82d8239..1ad7ecd 100644
--- a/WebCore/dom/Document.h
+++ b/WebCore/dom/Document.h
@@ -36,6 +36,7 @@
#include "QualifiedName.h"
#include "ScriptExecutionContext.h"
#include "Timer.h"
+#include "ViewportArguments.h"
#include <wtf/FixedArray.h>
#include <wtf/HashCountedSet.h>
#include <wtf/OwnPtr.h>
@@ -276,6 +277,8 @@ public:
DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitfullscreenchange);
#endif
+ ViewportArguments viewportArguments() const { return m_viewportArguments; }
+
DocumentType* doctype() const { return m_docType.get(); }
DOMImplementation* implementation() const;
@@ -1314,6 +1317,8 @@ private:
#endif
int m_loadEventDelayCount;
+
+ ViewportArguments m_viewportArguments;
};
inline bool Document::hasElementWithId(AtomicStringImpl* id) const
diff --git a/WebKit/qt/Api/qwebframe.cpp b/WebKit/qt/Api/qwebframe.cpp
index 46580bb..7295b82 100644
--- a/WebKit/qt/Api/qwebframe.cpp
+++ b/WebKit/qt/Api/qwebframe.cpp
@@ -230,6 +230,14 @@ void QWebFramePrivate::init(QWebFrame *qframe, QWebFrameData *frameData)
frame->init();
}
+WebCore::ViewportArguments QWebFramePrivate::viewportArguments()
+{
+ if (!frame || !frame->document())
+ return WebCore::ViewportArguments();
+
+ return frame->document()->viewportArguments();
+}
+
void QWebFramePrivate::setPage(QWebPage* newPage)
{
if (page == newPage)
diff --git a/WebKit/qt/Api/qwebframe_p.h b/WebKit/qt/Api/qwebframe_p.h
index 6d6eca1..5ba3f52 100644
--- a/WebKit/qt/Api/qwebframe_p.h
+++ b/WebKit/qt/Api/qwebframe_p.h
@@ -90,6 +90,8 @@ public:
void renderFromTiledBackingStore(WebCore::GraphicsContext*, const QRegion& clip);
#endif
+ WebCore::ViewportArguments viewportArguments();
+
QWebFrame *q;
Qt::ScrollBarPolicy horizontalScrollBarPolicy;
Qt::ScrollBarPolicy verticalScrollBarPolicy;
@@ -101,7 +103,6 @@ public:
int marginWidth;
int marginHeight;
bool zoomTextOnly;
- WebCore::ViewportArguments viewportArguments;
};
class QWebHitTestResultPrivate {
diff --git a/WebKit/qt/Api/qwebpage.cpp b/WebKit/qt/Api/qwebpage.cpp
index 9aa1a3b..573500e 100644
--- a/WebKit/qt/Api/qwebpage.cpp
+++ b/WebKit/qt/Api/qwebpage.cpp
@@ -2348,7 +2348,7 @@ QWebPage::ViewportConfiguration QWebPage::viewportConfigurationForSize(QSize ava
int deviceWidth = rect.width();
int deviceHeight = rect.height();
- WebCore::ViewportConfiguration conf = WebCore::findConfigurationForViewportData(mainFrame()->d->viewportArguments, desktopWidth, deviceWidth, deviceHeight, deviceDPI, availableSize);
+ WebCore::ViewportConfiguration conf = WebCore::findConfigurationForViewportData(mainFrame()->d->viewportArguments(), desktopWidth, deviceWidth, deviceHeight, deviceDPI, availableSize);
ViewportConfiguration result;
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index 08052c5..faed12f 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,26 @@
+2010-09-24 Luiz Agostini <luiz.agostini at openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Keep viewport information in Document
+ https://bugs.webkit.org/show_bug.cgi?id=46385
+
+ The viewport meta data (layout viewport, scale) needs to be set again when bringing
+ back a page from the page cache. As the viewport metadata is only retrieved while parsing
+ the document, we need to store it in the Document class.
+
+ * Api/qwebframe.cpp:
+ (QWebFramePrivate::viewportArguments):
+ * Api/qwebframe_p.h:
+ * Api/qwebpage.cpp:
+ (QWebPage::viewportConfigurationForSize):
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::didReceiveViewportArguments):
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::viewportAsText):
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::dispatchDidCommitLoad):
+
2010-09-23 Ademar de Souza Reis Jr <ademar.reis at openbossa.org>
Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
index a5dfdc7..9fbc5e5 100644
--- a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
@@ -644,8 +644,6 @@ QWebSelectMethod* ChromeClientQt::createSelectPopup() const
void ChromeClientQt::didReceiveViewportArguments(Frame* frame, const ViewportArguments& arguments) const
{
- m_webPage->mainFrame()->d->viewportArguments = arguments;
-
emit m_webPage->viewportChangeRequested();
}
diff --git a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
index ed7ac32..836df49 100644
--- a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
+++ b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
@@ -631,7 +631,7 @@ void DumpRenderTreeSupportQt::dumpNotification(bool b)
QString DumpRenderTreeSupportQt::viewportAsText(QWebPage* page, const QSize& availableSize)
{
- WebCore::ViewportArguments args = page->mainFrame()->d->viewportArguments;
+ WebCore::ViewportArguments args = page->mainFrame()->d->viewportArguments();
WebCore::ViewportConfiguration conf = WebCore::findConfigurationForViewportData(args,
/* desktop-width */ 980,
/* device-width */ 320,
diff --git a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
index 4aadeb0..378041c 100644
--- a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
@@ -442,9 +442,6 @@ void FrameLoaderClientQt::dispatchDidCommitLoad()
if (m_frame->tree()->parent() || !m_webFrame)
return;
- // Clear the viewport arguments.
- m_webFrame->d->viewportArguments = WebCore::ViewportArguments();
-
emit m_webFrame->urlChanged(m_webFrame->url());
m_webFrame->page()->d->updateNavigationActions();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list