Chromium Code Reviews| 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 bool useLegacyViewportArguments(); | |
|
kenneth.r.christiansen
2013/09/02 09:10:49
Might need a comment explaining what that actually
rune
2013/09/02 11:53:39
Done.
| |
| 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 | 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 |
| (...skipping 106 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 871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1301 | 1303 |
| 1302 OwnPtr<SelectorQueryCache> m_selectorQueryCache; | 1304 OwnPtr<SelectorQueryCache> m_selectorQueryCache; |
| 1303 | 1305 |
| 1304 bool m_useSecureKeyboardEntryWhenActive; | 1306 bool m_useSecureKeyboardEntryWhenActive; |
| 1305 | 1307 |
| 1306 DocumentClassFlags m_documentClasses; | 1308 DocumentClassFlags m_documentClasses; |
| 1307 | 1309 |
| 1308 bool m_isViewSource; | 1310 bool m_isViewSource; |
| 1309 bool m_sawElementsInKnownNamespaces; | 1311 bool m_sawElementsInKnownNamespaces; |
| 1310 bool m_isSrcdocDocument; | 1312 bool m_isSrcdocDocument; |
| 1313 bool m_isMobileDocument; | |
| 1311 | 1314 |
| 1312 RenderObject* m_renderer; | 1315 RenderObject* m_renderer; |
| 1313 RefPtr<DocumentEventQueue> m_eventQueue; | 1316 RefPtr<DocumentEventQueue> m_eventQueue; |
| 1314 | 1317 |
| 1315 WeakPtrFactory<Document> m_weakFactory; | 1318 WeakPtrFactory<Document> m_weakFactory; |
| 1316 | 1319 |
| 1317 QualifiedName m_idAttributeName; | 1320 QualifiedName m_idAttributeName; |
| 1318 | 1321 |
| 1319 bool m_hasFullscreenElementStack; // For early return in FullscreenElementSt ack::fromIfExists() | 1322 bool m_hasFullscreenElementStack; // For early return in FullscreenElementSt ack::fromIfExists() |
| 1320 | 1323 |
| 1321 Vector<RefPtr<Element> > m_topLayerElements; | 1324 Vector<RefPtr<Element> > m_topLayerElements; |
| 1322 | 1325 |
| 1323 int m_loadEventDelayCount; | 1326 int m_loadEventDelayCount; |
| 1324 Timer<Document> m_loadEventDelayTimer; | 1327 Timer<Document> m_loadEventDelayTimer; |
| 1325 | 1328 |
| 1326 ViewportArguments m_viewportArguments; | 1329 ViewportArguments m_viewportArguments; |
| 1330 ViewportArguments m_legacyViewportArguments; | |
| 1327 | 1331 |
| 1328 ReferrerPolicy m_referrerPolicy; | 1332 ReferrerPolicy m_referrerPolicy; |
| 1329 | 1333 |
| 1330 bool m_directionSetOnDocumentElement; | 1334 bool m_directionSetOnDocumentElement; |
| 1331 bool m_writingModeSetOnDocumentElement; | 1335 bool m_writingModeSetOnDocumentElement; |
| 1332 | 1336 |
| 1333 bool m_didAllowNavigationViaBeforeUnloadConfirmationPanel; | 1337 bool m_didAllowNavigationViaBeforeUnloadConfirmationPanel; |
| 1334 | 1338 |
| 1335 DocumentTiming m_documentTiming; | 1339 DocumentTiming m_documentTiming; |
| 1336 RefPtr<MediaQueryMatcher> m_mediaQueryMatcher; | 1340 RefPtr<MediaQueryMatcher> m_mediaQueryMatcher; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1390 | 1394 |
| 1391 inline const Document* Document::templateDocument() const | 1395 inline const Document* Document::templateDocument() const |
| 1392 { | 1396 { |
| 1393 // If DOCUMENT does not have a browsing context, Let TEMPLATE CONTENTS OWNER be DOCUMENT and abort these steps. | 1397 // If DOCUMENT does not have a browsing context, Let TEMPLATE CONTENTS OWNER be DOCUMENT and abort these steps. |
| 1394 if (!m_frame) | 1398 if (!m_frame) |
| 1395 return this; | 1399 return this; |
| 1396 | 1400 |
| 1397 return m_templateDocument.get(); | 1401 return m_templateDocument.get(); |
| 1398 } | 1402 } |
| 1399 | 1403 |
| 1404 inline void Document::setViewportArguments(const ViewportArguments& viewportArgu ments) | |
| 1405 { | |
| 1406 m_viewportArguments = viewportArguments; | |
| 1407 updateViewportArguments(); | |
| 1408 } | |
| 1409 | |
| 1410 inline bool Document::useLegacyViewportArguments() | |
| 1411 { | |
| 1412 if (m_legacyViewportArguments.type == ViewportArguments::UserAgent) | |
| 1413 return false; | |
| 1414 | |
| 1415 setViewportArguments(m_legacyViewportArguments); | |
| 1416 return true; | |
| 1417 } | |
| 1418 | |
| 1400 inline Document* toDocument(ScriptExecutionContext* scriptExecutionContext) | 1419 inline Document* toDocument(ScriptExecutionContext* scriptExecutionContext) |
| 1401 { | 1420 { |
| 1402 ASSERT_WITH_SECURITY_IMPLICATION(!scriptExecutionContext || scriptExecutionC ontext->isDocument()); | 1421 ASSERT_WITH_SECURITY_IMPLICATION(!scriptExecutionContext || scriptExecutionC ontext->isDocument()); |
| 1403 return static_cast<Document*>(scriptExecutionContext); | 1422 return static_cast<Document*>(scriptExecutionContext); |
| 1404 } | 1423 } |
| 1405 | 1424 |
| 1406 inline const Document* toDocument(const ScriptExecutionContext* scriptExecutionC ontext) | 1425 inline const Document* toDocument(const ScriptExecutionContext* scriptExecutionC ontext) |
| 1407 { | 1426 { |
| 1408 ASSERT_WITH_SECURITY_IMPLICATION(!scriptExecutionContext || scriptExecutionC ontext->isDocument()); | 1427 ASSERT_WITH_SECURITY_IMPLICATION(!scriptExecutionContext || scriptExecutionC ontext->isDocument()); |
| 1409 return static_cast<const Document*>(scriptExecutionContext); | 1428 return static_cast<const Document*>(scriptExecutionContext); |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 1429 inline bool Node::isDocumentNode() const | 1448 inline bool Node::isDocumentNode() const |
| 1430 { | 1449 { |
| 1431 return this == documentInternal(); | 1450 return this == documentInternal(); |
| 1432 } | 1451 } |
| 1433 | 1452 |
| 1434 Node* eventTargetNodeForDocument(Document*); | 1453 Node* eventTargetNodeForDocument(Document*); |
| 1435 | 1454 |
| 1436 } // namespace WebCore | 1455 } // namespace WebCore |
| 1437 | 1456 |
| 1438 #endif // Document_h | 1457 #endif // Document_h |
| OLD | NEW |