| 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 void setViewportArguments(const ViewportArguments& viewportArguments) { m_vi
ewportArguments = viewportArguments; } | 292 void setViewportArguments(const ViewportArguments&); |
| 293 const ViewportArguments& viewportArguments() const { return m_viewportArgume
nts; } | 293 const ViewportArguments& viewportArguments() const { return m_viewportArgume
nts; } |
| 294 #ifndef NDEBUG | 294 #ifndef NDEBUG |
| 295 bool didDispatchViewportPropertiesChanged() const { return m_didDispatchView
portPropertiesChanged; } | 295 bool didDispatchViewportPropertiesChanged() const { return m_didDispatchView
portPropertiesChanged; } |
| 296 #endif | 296 #endif |
| 297 bool hasLegacyViewportTag() const { return m_legacyViewportArguments.isLegac
yViewportType(); } |
| 297 | 298 |
| 298 void setReferrerPolicy(ReferrerPolicy referrerPolicy) { m_referrerPolicy = r
eferrerPolicy; } | 299 void setReferrerPolicy(ReferrerPolicy referrerPolicy) { m_referrerPolicy = r
eferrerPolicy; } |
| 299 ReferrerPolicy referrerPolicy() const { return m_referrerPolicy; } | 300 ReferrerPolicy referrerPolicy() const { return m_referrerPolicy; } |
| 300 | 301 |
| 301 void setDoctype(PassRefPtr<DocumentType>); | 302 void setDoctype(PassRefPtr<DocumentType>); |
| 302 DocumentType* doctype() const { return m_docType.get(); } | 303 DocumentType* doctype() const { return m_docType.get(); } |
| 303 | 304 |
| 304 DOMImplementation* implementation(); | 305 DOMImplementation* implementation(); |
| 305 | 306 |
| 306 Element* documentElement() const | 307 Element* documentElement() const |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 bool isImageDocument() const { return m_documentClasses & ImageDocumentClass
; } | 411 bool isImageDocument() const { return m_documentClasses & ImageDocumentClass
; } |
| 411 bool isSVGDocument() const { return m_documentClasses & SVGDocumentClass; } | 412 bool isSVGDocument() const { return m_documentClasses & SVGDocumentClass; } |
| 412 bool isPluginDocument() const { return m_documentClasses & PluginDocumentCla
ss; } | 413 bool isPluginDocument() const { return m_documentClasses & PluginDocumentCla
ss; } |
| 413 bool isMediaDocument() const { return m_documentClasses & MediaDocumentClass
; } | 414 bool isMediaDocument() const { return m_documentClasses & MediaDocumentClass
; } |
| 414 | 415 |
| 415 bool hasSVGRootNode() const; | 416 bool hasSVGRootNode() const; |
| 416 | 417 |
| 417 bool isFrameSet() const; | 418 bool isFrameSet() const; |
| 418 | 419 |
| 419 bool isSrcdocDocument() const { return m_isSrcdocDocument; } | 420 bool isSrcdocDocument() const { return m_isSrcdocDocument; } |
| 421 bool isMobileDocument() const { return m_isMobileDocument; } |
| 420 | 422 |
| 421 StyleResolver* styleResolverIfExists() const { return m_styleResolver.get();
} | 423 StyleResolver* styleResolverIfExists() const { return m_styleResolver.get();
} |
| 422 | 424 |
| 423 bool isViewSource() const { return m_isViewSource; } | 425 bool isViewSource() const { return m_isViewSource; } |
| 424 void setIsViewSource(bool); | 426 void setIsViewSource(bool); |
| 425 | 427 |
| 426 bool sawElementsInKnownNamespaces() const { return m_sawElementsInKnownNames
paces; } | 428 bool sawElementsInKnownNamespaces() const { return m_sawElementsInKnownNames
paces; } |
| 427 | 429 |
| 428 StyleResolver* styleResolver() | 430 StyleResolver* styleResolver() |
| 429 { | 431 { |
| (...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1303 | 1305 |
| 1304 OwnPtr<SelectorQueryCache> m_selectorQueryCache; | 1306 OwnPtr<SelectorQueryCache> m_selectorQueryCache; |
| 1305 | 1307 |
| 1306 bool m_useSecureKeyboardEntryWhenActive; | 1308 bool m_useSecureKeyboardEntryWhenActive; |
| 1307 | 1309 |
| 1308 DocumentClassFlags m_documentClasses; | 1310 DocumentClassFlags m_documentClasses; |
| 1309 | 1311 |
| 1310 bool m_isViewSource; | 1312 bool m_isViewSource; |
| 1311 bool m_sawElementsInKnownNamespaces; | 1313 bool m_sawElementsInKnownNamespaces; |
| 1312 bool m_isSrcdocDocument; | 1314 bool m_isSrcdocDocument; |
| 1315 bool m_isMobileDocument; |
| 1313 | 1316 |
| 1314 RenderObject* m_renderer; | 1317 RenderObject* m_renderer; |
| 1315 RefPtr<DocumentEventQueue> m_eventQueue; | 1318 RefPtr<DocumentEventQueue> m_eventQueue; |
| 1316 | 1319 |
| 1317 WeakPtrFactory<Document> m_weakFactory; | 1320 WeakPtrFactory<Document> m_weakFactory; |
| 1318 | 1321 |
| 1319 QualifiedName m_idAttributeName; | 1322 QualifiedName m_idAttributeName; |
| 1320 | 1323 |
| 1321 bool m_hasFullscreenElementStack; // For early return in FullscreenElementSt
ack::fromIfExists() | 1324 bool m_hasFullscreenElementStack; // For early return in FullscreenElementSt
ack::fromIfExists() |
| 1322 | 1325 |
| 1323 Vector<RefPtr<Element> > m_topLayerElements; | 1326 Vector<RefPtr<Element> > m_topLayerElements; |
| 1324 | 1327 |
| 1325 int m_loadEventDelayCount; | 1328 int m_loadEventDelayCount; |
| 1326 Timer<Document> m_loadEventDelayTimer; | 1329 Timer<Document> m_loadEventDelayTimer; |
| 1327 | 1330 |
| 1328 ViewportArguments m_viewportArguments; | 1331 ViewportArguments m_viewportArguments; |
| 1332 ViewportArguments m_legacyViewportArguments; |
| 1329 | 1333 |
| 1330 ReferrerPolicy m_referrerPolicy; | 1334 ReferrerPolicy m_referrerPolicy; |
| 1331 | 1335 |
| 1332 bool m_directionSetOnDocumentElement; | 1336 bool m_directionSetOnDocumentElement; |
| 1333 bool m_writingModeSetOnDocumentElement; | 1337 bool m_writingModeSetOnDocumentElement; |
| 1334 | 1338 |
| 1335 bool m_didAllowNavigationViaBeforeUnloadConfirmationPanel; | 1339 bool m_didAllowNavigationViaBeforeUnloadConfirmationPanel; |
| 1336 | 1340 |
| 1337 DocumentTiming m_documentTiming; | 1341 DocumentTiming m_documentTiming; |
| 1338 RefPtr<MediaQueryMatcher> m_mediaQueryMatcher; | 1342 RefPtr<MediaQueryMatcher> m_mediaQueryMatcher; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1392 | 1396 |
| 1393 inline const Document* Document::templateDocument() const | 1397 inline const Document* Document::templateDocument() const |
| 1394 { | 1398 { |
| 1395 // If DOCUMENT does not have a browsing context, Let TEMPLATE CONTENTS OWNER
be DOCUMENT and abort these steps. | 1399 // If DOCUMENT does not have a browsing context, Let TEMPLATE CONTENTS OWNER
be DOCUMENT and abort these steps. |
| 1396 if (!m_frame) | 1400 if (!m_frame) |
| 1397 return this; | 1401 return this; |
| 1398 | 1402 |
| 1399 return m_templateDocument.get(); | 1403 return m_templateDocument.get(); |
| 1400 } | 1404 } |
| 1401 | 1405 |
| 1406 inline void Document::setViewportArguments(const ViewportArguments& viewportArgu
ments) |
| 1407 { |
| 1408 // If the legacy viewport tag has higher priority than the cascaded @viewpor
t |
| 1409 // descriptors, use the values from the legacy tag. |
| 1410 if (viewportArguments.type < m_legacyViewportArguments.type) |
| 1411 m_viewportArguments = m_legacyViewportArguments; |
| 1412 else |
| 1413 m_viewportArguments = viewportArguments; |
| 1414 updateViewportArguments(); |
| 1415 } |
| 1416 |
| 1402 inline Document* toDocument(ScriptExecutionContext* scriptExecutionContext) | 1417 inline Document* toDocument(ScriptExecutionContext* scriptExecutionContext) |
| 1403 { | 1418 { |
| 1404 ASSERT_WITH_SECURITY_IMPLICATION(!scriptExecutionContext || scriptExecutionC
ontext->isDocument()); | 1419 ASSERT_WITH_SECURITY_IMPLICATION(!scriptExecutionContext || scriptExecutionC
ontext->isDocument()); |
| 1405 return static_cast<Document*>(scriptExecutionContext); | 1420 return static_cast<Document*>(scriptExecutionContext); |
| 1406 } | 1421 } |
| 1407 | 1422 |
| 1408 inline const Document* toDocument(const ScriptExecutionContext* scriptExecutionC
ontext) | 1423 inline const Document* toDocument(const ScriptExecutionContext* scriptExecutionC
ontext) |
| 1409 { | 1424 { |
| 1410 ASSERT_WITH_SECURITY_IMPLICATION(!scriptExecutionContext || scriptExecutionC
ontext->isDocument()); | 1425 ASSERT_WITH_SECURITY_IMPLICATION(!scriptExecutionContext || scriptExecutionC
ontext->isDocument()); |
| 1411 return static_cast<const Document*>(scriptExecutionContext); | 1426 return static_cast<const Document*>(scriptExecutionContext); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 1431 inline bool Node::isDocumentNode() const | 1446 inline bool Node::isDocumentNode() const |
| 1432 { | 1447 { |
| 1433 return this == documentInternal(); | 1448 return this == documentInternal(); |
| 1434 } | 1449 } |
| 1435 | 1450 |
| 1436 Node* eventTargetNodeForDocument(Document*); | 1451 Node* eventTargetNodeForDocument(Document*); |
| 1437 | 1452 |
| 1438 } // namespace WebCore | 1453 } // namespace WebCore |
| 1439 | 1454 |
| 1440 #endif // Document_h | 1455 #endif // Document_h |
| OLD | NEW |