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.type != ViewportArguments::UserAgentStyleSheet; } | |
kenneth.r.christiansen
2013/09/03 08:55:57
What about the CSSDeviceAdaptation type (which I t
rune
2013/09/03 09:25:00
Done.
| |
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 WeakPtr<Document> m_contextDocument; | 1321 WeakPtr<Document> m_contextDocument; |
1319 | 1322 |
1320 QualifiedName m_idAttributeName; | 1323 QualifiedName m_idAttributeName; |
1321 | 1324 |
1322 bool m_hasFullscreenElementStack; // For early return in FullscreenElementSt ack::fromIfExists() | 1325 bool m_hasFullscreenElementStack; // For early return in FullscreenElementSt ack::fromIfExists() |
1323 | 1326 |
1324 Vector<RefPtr<Element> > m_topLayerElements; | 1327 Vector<RefPtr<Element> > m_topLayerElements; |
1325 | 1328 |
1326 int m_loadEventDelayCount; | 1329 int m_loadEventDelayCount; |
1327 Timer<Document> m_loadEventDelayTimer; | 1330 Timer<Document> m_loadEventDelayTimer; |
1328 | 1331 |
1329 ViewportArguments m_viewportArguments; | 1332 ViewportArguments m_viewportArguments; |
1333 ViewportArguments m_legacyViewportArguments; | |
1330 | 1334 |
1331 ReferrerPolicy m_referrerPolicy; | 1335 ReferrerPolicy m_referrerPolicy; |
1332 | 1336 |
1333 bool m_directionSetOnDocumentElement; | 1337 bool m_directionSetOnDocumentElement; |
1334 bool m_writingModeSetOnDocumentElement; | 1338 bool m_writingModeSetOnDocumentElement; |
1335 | 1339 |
1336 bool m_didAllowNavigationViaBeforeUnloadConfirmationPanel; | 1340 bool m_didAllowNavigationViaBeforeUnloadConfirmationPanel; |
1337 | 1341 |
1338 DocumentTiming m_documentTiming; | 1342 DocumentTiming m_documentTiming; |
1339 RefPtr<MediaQueryMatcher> m_mediaQueryMatcher; | 1343 RefPtr<MediaQueryMatcher> m_mediaQueryMatcher; |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1393 | 1397 |
1394 inline const Document* Document::templateDocument() const | 1398 inline const Document* Document::templateDocument() const |
1395 { | 1399 { |
1396 // If DOCUMENT does not have a browsing context, Let TEMPLATE CONTENTS OWNER be DOCUMENT and abort these steps. | 1400 // If DOCUMENT does not have a browsing context, Let TEMPLATE CONTENTS OWNER be DOCUMENT and abort these steps. |
1397 if (!m_frame) | 1401 if (!m_frame) |
1398 return this; | 1402 return this; |
1399 | 1403 |
1400 return m_templateDocument.get(); | 1404 return m_templateDocument.get(); |
1401 } | 1405 } |
1402 | 1406 |
1407 inline void Document::setViewportArguments(const ViewportArguments& viewportArgu ments) | |
1408 { | |
1409 // If the legacy viewport tag has higher priority than the cascaded @viewpor t | |
1410 // descriptors, use the values from the legacy tag. | |
1411 if (viewportArguments.type < m_legacyViewportArguments.type) | |
1412 m_viewportArguments = m_legacyViewportArguments; | |
1413 else | |
1414 m_viewportArguments = viewportArguments; | |
1415 updateViewportArguments(); | |
1416 } | |
1417 | |
1403 inline Document* toDocument(ScriptExecutionContext* scriptExecutionContext) | 1418 inline Document* toDocument(ScriptExecutionContext* scriptExecutionContext) |
1404 { | 1419 { |
1405 ASSERT_WITH_SECURITY_IMPLICATION(!scriptExecutionContext || scriptExecutionC ontext->isDocument()); | 1420 ASSERT_WITH_SECURITY_IMPLICATION(!scriptExecutionContext || scriptExecutionC ontext->isDocument()); |
1406 return static_cast<Document*>(scriptExecutionContext); | 1421 return static_cast<Document*>(scriptExecutionContext); |
1407 } | 1422 } |
1408 | 1423 |
1409 inline const Document* toDocument(const ScriptExecutionContext* scriptExecutionC ontext) | 1424 inline const Document* toDocument(const ScriptExecutionContext* scriptExecutionC ontext) |
1410 { | 1425 { |
1411 ASSERT_WITH_SECURITY_IMPLICATION(!scriptExecutionContext || scriptExecutionC ontext->isDocument()); | 1426 ASSERT_WITH_SECURITY_IMPLICATION(!scriptExecutionContext || scriptExecutionC ontext->isDocument()); |
1412 return static_cast<const Document*>(scriptExecutionContext); | 1427 return static_cast<const Document*>(scriptExecutionContext); |
(...skipping 19 matching lines...) Expand all Loading... | |
1432 inline bool Node::isDocumentNode() const | 1447 inline bool Node::isDocumentNode() const |
1433 { | 1448 { |
1434 return this == documentInternal(); | 1449 return this == documentInternal(); |
1435 } | 1450 } |
1436 | 1451 |
1437 Node* eventTargetNodeForDocument(Document*); | 1452 Node* eventTargetNodeForDocument(Document*); |
1438 | 1453 |
1439 } // namespace WebCore | 1454 } // namespace WebCore |
1440 | 1455 |
1441 #endif // Document_h | 1456 #endif // Document_h |
OLD | NEW |