summaryrefslogtreecommitdiff
path: root/Source/WebCore/dom/Document.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-06-01 22:05:29 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-06-01 22:05:29 +0200
commit0bb233d1f7c4317bb772d72cc3f92cbcdb4027de (patch)
tree47b40aab26fdaa15ec446b7d6de9bdf7efd7bbbb /Source/WebCore/dom/Document.cpp
parentb1e9e47fa11f608ae16bc07f97a2acf95bf80272 (diff)
downloadqtwebkit-0bb233d1f7c4317bb772d72cc3f92cbcdb4027de.tar.gz
Imported WebKit commit f2da9451cbccb8b7921d55483aa0bc656ff9cf53 (http://svn.webkit.org/repository/webkit/trunk@119269)
New snapshot that includes fix for using -Werror only in developer builds
Diffstat (limited to 'Source/WebCore/dom/Document.cpp')
-rw-r--r--Source/WebCore/dom/Document.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/Source/WebCore/dom/Document.cpp b/Source/WebCore/dom/Document.cpp
index af40173c7..60c1823e9 100644
--- a/Source/WebCore/dom/Document.cpp
+++ b/Source/WebCore/dom/Document.cpp
@@ -782,7 +782,7 @@ void Document::setDocType(PassRefPtr<DocumentType> docType)
#if USE(LEGACY_VIEWPORT_ADAPTION)
ASSERT(m_viewportArguments.type == ViewportArguments::Implicit);
if (m_docType->publicId().startsWith("-//wapforum//dtd xhtml mobile 1.", /* caseSensitive */ false))
- processViewport("width=device-width, height=device-height, initial-scale=1");
+ processViewport("width=device-width, height=device-height", ViewportArguments::XHTMLMobileProfile);
#endif
}
// Doctype affects the interpretation of the stylesheets.
@@ -3036,11 +3036,14 @@ void Document::processArguments(const String& features, void* data, ArgumentsCal
}
}
-void Document::processViewport(const String& features)
+void Document::processViewport(const String& features, ViewportArguments::Type origin)
{
ASSERT(!features.isNull());
- m_viewportArguments = ViewportArguments(ViewportArguments::ViewportMeta);
+ if (origin < m_viewportArguments.type)
+ return;
+
+ m_viewportArguments = ViewportArguments(origin);
processArguments(features, (void*)&m_viewportArguments, &setViewportFeature);
updateViewportArguments();
@@ -5040,9 +5043,14 @@ void Document::initContentSecurityPolicy()
contentSecurityPolicy()->copyStateFrom(m_frame->tree()->parent()->document()->contentSecurityPolicy());
}
-void Document::setSecurityOrigin(PassRefPtr<SecurityOrigin> origin)
+void Document::didUpdateSecurityOrigin()
{
- SecurityContext::setSecurityOrigin(origin);
+ if (!m_frame)
+ return;
+ // FIXME: We should remove DOMWindow::m_securityOrigin so that we don't need to keep them in sync.
+ // See <https://bugs.webkit.org/show_bug.cgi?id=75793>.
+ m_frame->domWindow()->setSecurityOrigin(securityOrigin());
+ m_frame->script()->updateSecurityOrigin();
}
bool Document::isContextThread() const