OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r
ights reserved. |
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
9 * Copyright (C) 2011 Google Inc. All rights reserved. | 9 * Copyright (C) 2011 Google Inc. All rights reserved. |
10 * | 10 * |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 DEFINE_ATTRIBUTE_EVENT_LISTENER(touchmove); | 282 DEFINE_ATTRIBUTE_EVENT_LISTENER(touchmove); |
283 DEFINE_ATTRIBUTE_EVENT_LISTENER(touchend); | 283 DEFINE_ATTRIBUTE_EVENT_LISTENER(touchend); |
284 DEFINE_ATTRIBUTE_EVENT_LISTENER(touchcancel); | 284 DEFINE_ATTRIBUTE_EVENT_LISTENER(touchcancel); |
285 DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitfullscreenchange); | 285 DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitfullscreenchange); |
286 DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitfullscreenerror); | 286 DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitfullscreenerror); |
287 DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitpointerlockchange); | 287 DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitpointerlockchange); |
288 DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitpointerlockerror); | 288 DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitpointerlockerror); |
289 DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitvisibilitychange); | 289 DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitvisibilitychange); |
290 DEFINE_ATTRIBUTE_EVENT_LISTENER(securitypolicyviolation); | 290 DEFINE_ATTRIBUTE_EVENT_LISTENER(securitypolicyviolation); |
291 | 291 |
| 292 bool shouldOverrideLegacyViewport(ViewportArguments::Type); |
292 void setViewportArguments(const ViewportArguments&); | 293 void setViewportArguments(const ViewportArguments&); |
293 const ViewportArguments& viewportArguments() const { return m_viewportArgume
nts; } | 294 const ViewportArguments& viewportArguments() const { return m_viewportArgume
nts; } |
294 #ifndef NDEBUG | 295 #ifndef NDEBUG |
295 bool didDispatchViewportPropertiesChanged() const { return m_didDispatchView
portPropertiesChanged; } | 296 bool didDispatchViewportPropertiesChanged() const { return m_didDispatchView
portPropertiesChanged; } |
296 #endif | 297 #endif |
297 bool hasLegacyViewportTag() const { return m_legacyViewportArguments.isLegac
yViewportType(); } | 298 bool hasLegacyViewportTag() const { return m_legacyViewportArguments.isLegac
yViewportType(); } |
298 | 299 |
299 void setReferrerPolicy(ReferrerPolicy referrerPolicy) { m_referrerPolicy = r
eferrerPolicy; } | 300 void setReferrerPolicy(ReferrerPolicy referrerPolicy) { m_referrerPolicy = r
eferrerPolicy; } |
300 ReferrerPolicy referrerPolicy() const { return m_referrerPolicy; } | 301 ReferrerPolicy referrerPolicy() const { return m_referrerPolicy; } |
301 | 302 |
(...skipping 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1397 | 1398 |
1398 inline const Document* Document::templateDocument() const | 1399 inline const Document* Document::templateDocument() const |
1399 { | 1400 { |
1400 // If DOCUMENT does not have a browsing context, Let TEMPLATE CONTENTS OWNER
be DOCUMENT and abort these steps. | 1401 // If DOCUMENT does not have a browsing context, Let TEMPLATE CONTENTS OWNER
be DOCUMENT and abort these steps. |
1401 if (!m_frame) | 1402 if (!m_frame) |
1402 return this; | 1403 return this; |
1403 | 1404 |
1404 return m_templateDocument.get(); | 1405 return m_templateDocument.get(); |
1405 } | 1406 } |
1406 | 1407 |
1407 inline void Document::setViewportArguments(const ViewportArguments& viewportArgu
ments) | 1408 inline bool Document::shouldOverrideLegacyViewport(ViewportArguments::Type origi
n) |
1408 { | 1409 { |
1409 // If the legacy viewport tag has higher priority than the cascaded @viewpor
t | 1410 // The different (legacy) meta tags have different priorities based on the t
ype |
1410 // descriptors, use the values from the legacy tag. | 1411 // regardless of which order they appear in the DOM. The priority is given b
y the |
1411 if (viewportArguments.type < m_legacyViewportArguments.type) | 1412 // ViewportArguments::Type enum. |
1412 m_viewportArguments = m_legacyViewportArguments; | 1413 return origin >= m_legacyViewportArguments.type; |
1413 else | |
1414 m_viewportArguments = viewportArguments; | |
1415 updateViewportArguments(); | |
1416 } | 1414 } |
1417 | 1415 |
1418 inline Document* toDocument(ScriptExecutionContext* scriptExecutionContext) | 1416 inline Document* toDocument(ScriptExecutionContext* scriptExecutionContext) |
1419 { | 1417 { |
1420 ASSERT_WITH_SECURITY_IMPLICATION(!scriptExecutionContext || scriptExecutionC
ontext->isDocument()); | 1418 ASSERT_WITH_SECURITY_IMPLICATION(!scriptExecutionContext || scriptExecutionC
ontext->isDocument()); |
1421 return static_cast<Document*>(scriptExecutionContext); | 1419 return static_cast<Document*>(scriptExecutionContext); |
1422 } | 1420 } |
1423 | 1421 |
1424 inline const Document* toDocument(const ScriptExecutionContext* scriptExecutionC
ontext) | 1422 inline const Document* toDocument(const ScriptExecutionContext* scriptExecutionC
ontext) |
1425 { | 1423 { |
(...skipping 21 matching lines...) Expand all Loading... |
1447 inline bool Node::isDocumentNode() const | 1445 inline bool Node::isDocumentNode() const |
1448 { | 1446 { |
1449 return this == documentInternal(); | 1447 return this == documentInternal(); |
1450 } | 1448 } |
1451 | 1449 |
1452 Node* eventTargetNodeForDocument(Document*); | 1450 Node* eventTargetNodeForDocument(Document*); |
1453 | 1451 |
1454 } // namespace WebCore | 1452 } // namespace WebCore |
1455 | 1453 |
1456 #endif // Document_h | 1454 #endif // Document_h |
OLD | NEW |