| Index: Source/core/dom/Document.h
|
| diff --git a/Source/core/dom/Document.h b/Source/core/dom/Document.h
|
| index 2ae94a168745b15e378a5ae9b8c814e78ba24f8a..3f64812e17fb64ab2c9b25314a48d6edb1b1e988 100644
|
| --- a/Source/core/dom/Document.h
|
| +++ b/Source/core/dom/Document.h
|
| @@ -289,11 +289,12 @@ public:
|
| DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitvisibilitychange);
|
| DEFINE_ATTRIBUTE_EVENT_LISTENER(securitypolicyviolation);
|
|
|
| - void setViewportArguments(const ViewportArguments& viewportArguments) { m_viewportArguments = viewportArguments; }
|
| + void setViewportArguments(const ViewportArguments&);
|
| const ViewportArguments& viewportArguments() const { return m_viewportArguments; }
|
| #ifndef NDEBUG
|
| bool didDispatchViewportPropertiesChanged() const { return m_didDispatchViewportPropertiesChanged; }
|
| #endif
|
| + bool hasLegacyViewportTag() const { return m_legacyViewportArguments.isLegacyViewportType(); }
|
|
|
| void setReferrerPolicy(ReferrerPolicy referrerPolicy) { m_referrerPolicy = referrerPolicy; }
|
| ReferrerPolicy referrerPolicy() const { return m_referrerPolicy; }
|
| @@ -417,6 +418,7 @@ public:
|
| bool isFrameSet() const;
|
|
|
| bool isSrcdocDocument() const { return m_isSrcdocDocument; }
|
| + bool isMobileDocument() const { return m_isMobileDocument; }
|
|
|
| StyleResolver* styleResolverIfExists() const { return m_styleResolver.get(); }
|
|
|
| @@ -1310,6 +1312,7 @@ private:
|
| bool m_isViewSource;
|
| bool m_sawElementsInKnownNamespaces;
|
| bool m_isSrcdocDocument;
|
| + bool m_isMobileDocument;
|
|
|
| RenderObject* m_renderer;
|
| RefPtr<DocumentEventQueue> m_eventQueue;
|
| @@ -1326,6 +1329,7 @@ private:
|
| Timer<Document> m_loadEventDelayTimer;
|
|
|
| ViewportArguments m_viewportArguments;
|
| + ViewportArguments m_legacyViewportArguments;
|
|
|
| ReferrerPolicy m_referrerPolicy;
|
|
|
| @@ -1399,6 +1403,17 @@ inline const Document* Document::templateDocument() const
|
| return m_templateDocument.get();
|
| }
|
|
|
| +inline void Document::setViewportArguments(const ViewportArguments& viewportArguments)
|
| +{
|
| + // If the legacy viewport tag has higher priority than the cascaded @viewport
|
| + // descriptors, use the values from the legacy tag.
|
| + if (viewportArguments.type < m_legacyViewportArguments.type)
|
| + m_viewportArguments = m_legacyViewportArguments;
|
| + else
|
| + m_viewportArguments = viewportArguments;
|
| + updateViewportArguments();
|
| +}
|
| +
|
| inline Document* toDocument(ScriptExecutionContext* scriptExecutionContext)
|
| {
|
| ASSERT_WITH_SECURITY_IMPLICATION(!scriptExecutionContext || scriptExecutionContext->isDocument());
|
|
|