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 // When no author style for @viewport is present, and a meta tag for definin g the | |
295 // viewport is present, apply the meta tag viewport arguments instead of the UA styles. | |
296 bool useLegacyViewportArguments(); | |
kenneth.r.christiansen
2013/09/02 11:55:28
We should really rename this ViewportArgument clas
rune
2013/09/02 12:05:53
How about just useLegacyViewport() ?
rune
2013/09/03 08:27:10
Method now removed.
| |
294 #ifndef NDEBUG | 297 #ifndef NDEBUG |
295 bool didDispatchViewportPropertiesChanged() const { return m_didDispatchView portPropertiesChanged; } | 298 bool didDispatchViewportPropertiesChanged() const { return m_didDispatchView portPropertiesChanged; } |
296 #endif | 299 #endif |
297 | 300 |
298 void setReferrerPolicy(ReferrerPolicy referrerPolicy) { m_referrerPolicy = r eferrerPolicy; } | 301 void setReferrerPolicy(ReferrerPolicy referrerPolicy) { m_referrerPolicy = r eferrerPolicy; } |
299 ReferrerPolicy referrerPolicy() const { return m_referrerPolicy; } | 302 ReferrerPolicy referrerPolicy() const { return m_referrerPolicy; } |
300 | 303 |
301 void setDoctype(PassRefPtr<DocumentType>); | 304 void setDoctype(PassRefPtr<DocumentType>); |
302 DocumentType* doctype() const { return m_docType.get(); } | 305 DocumentType* doctype() const { return m_docType.get(); } |
303 | 306 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
410 bool isImageDocument() const { return m_documentClasses & ImageDocumentClass ; } | 413 bool isImageDocument() const { return m_documentClasses & ImageDocumentClass ; } |
411 bool isSVGDocument() const { return m_documentClasses & SVGDocumentClass; } | 414 bool isSVGDocument() const { return m_documentClasses & SVGDocumentClass; } |
412 bool isPluginDocument() const { return m_documentClasses & PluginDocumentCla ss; } | 415 bool isPluginDocument() const { return m_documentClasses & PluginDocumentCla ss; } |
413 bool isMediaDocument() const { return m_documentClasses & MediaDocumentClass ; } | 416 bool isMediaDocument() const { return m_documentClasses & MediaDocumentClass ; } |
414 | 417 |
415 bool hasSVGRootNode() const; | 418 bool hasSVGRootNode() const; |
416 | 419 |
417 bool isFrameSet() const; | 420 bool isFrameSet() const; |
418 | 421 |
419 bool isSrcdocDocument() const { return m_isSrcdocDocument; } | 422 bool isSrcdocDocument() const { return m_isSrcdocDocument; } |
423 bool isMobileDocument() const { return m_isMobileDocument; } | |
420 | 424 |
421 StyleResolver* styleResolverIfExists() const { return m_styleResolver.get(); } | 425 StyleResolver* styleResolverIfExists() const { return m_styleResolver.get(); } |
422 | 426 |
423 bool isViewSource() const { return m_isViewSource; } | 427 bool isViewSource() const { return m_isViewSource; } |
424 void setIsViewSource(bool); | 428 void setIsViewSource(bool); |
425 | 429 |
426 bool sawElementsInKnownNamespaces() const { return m_sawElementsInKnownNames paces; } | 430 bool sawElementsInKnownNamespaces() const { return m_sawElementsInKnownNames paces; } |
427 | 431 |
428 StyleResolver* styleResolver() | 432 StyleResolver* styleResolver() |
429 { | 433 { |
(...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1301 | 1305 |
1302 OwnPtr<SelectorQueryCache> m_selectorQueryCache; | 1306 OwnPtr<SelectorQueryCache> m_selectorQueryCache; |
1303 | 1307 |
1304 bool m_useSecureKeyboardEntryWhenActive; | 1308 bool m_useSecureKeyboardEntryWhenActive; |
1305 | 1309 |
1306 DocumentClassFlags m_documentClasses; | 1310 DocumentClassFlags m_documentClasses; |
1307 | 1311 |
1308 bool m_isViewSource; | 1312 bool m_isViewSource; |
1309 bool m_sawElementsInKnownNamespaces; | 1313 bool m_sawElementsInKnownNamespaces; |
1310 bool m_isSrcdocDocument; | 1314 bool m_isSrcdocDocument; |
1315 bool m_isMobileDocument; | |
1311 | 1316 |
1312 RenderObject* m_renderer; | 1317 RenderObject* m_renderer; |
1313 RefPtr<DocumentEventQueue> m_eventQueue; | 1318 RefPtr<DocumentEventQueue> m_eventQueue; |
1314 | 1319 |
1315 WeakPtrFactory<Document> m_weakFactory; | 1320 WeakPtrFactory<Document> m_weakFactory; |
1316 | 1321 |
1317 QualifiedName m_idAttributeName; | 1322 QualifiedName m_idAttributeName; |
1318 | 1323 |
1319 bool m_hasFullscreenElementStack; // For early return in FullscreenElementSt ack::fromIfExists() | 1324 bool m_hasFullscreenElementStack; // For early return in FullscreenElementSt ack::fromIfExists() |
1320 | 1325 |
1321 Vector<RefPtr<Element> > m_topLayerElements; | 1326 Vector<RefPtr<Element> > m_topLayerElements; |
1322 | 1327 |
1323 int m_loadEventDelayCount; | 1328 int m_loadEventDelayCount; |
1324 Timer<Document> m_loadEventDelayTimer; | 1329 Timer<Document> m_loadEventDelayTimer; |
1325 | 1330 |
1326 ViewportArguments m_viewportArguments; | 1331 ViewportArguments m_viewportArguments; |
1332 ViewportArguments m_legacyViewportArguments; | |
1327 | 1333 |
1328 ReferrerPolicy m_referrerPolicy; | 1334 ReferrerPolicy m_referrerPolicy; |
1329 | 1335 |
1330 bool m_directionSetOnDocumentElement; | 1336 bool m_directionSetOnDocumentElement; |
1331 bool m_writingModeSetOnDocumentElement; | 1337 bool m_writingModeSetOnDocumentElement; |
1332 | 1338 |
1333 bool m_didAllowNavigationViaBeforeUnloadConfirmationPanel; | 1339 bool m_didAllowNavigationViaBeforeUnloadConfirmationPanel; |
1334 | 1340 |
1335 DocumentTiming m_documentTiming; | 1341 DocumentTiming m_documentTiming; |
1336 RefPtr<MediaQueryMatcher> m_mediaQueryMatcher; | 1342 RefPtr<MediaQueryMatcher> m_mediaQueryMatcher; |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1390 | 1396 |
1391 inline const Document* Document::templateDocument() const | 1397 inline const Document* Document::templateDocument() const |
1392 { | 1398 { |
1393 // 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. |
1394 if (!m_frame) | 1400 if (!m_frame) |
1395 return this; | 1401 return this; |
1396 | 1402 |
1397 return m_templateDocument.get(); | 1403 return m_templateDocument.get(); |
1398 } | 1404 } |
1399 | 1405 |
1406 inline void Document::setViewportArguments(const ViewportArguments& viewportArgu ments) | |
1407 { | |
1408 m_viewportArguments = viewportArguments; | |
1409 updateViewportArguments(); | |
1410 } | |
1411 | |
1412 inline bool Document::useLegacyViewportArguments() | |
1413 { | |
1414 if (m_legacyViewportArguments.type == ViewportArguments::UserAgentStyleSheet ) | |
1415 return false; | |
1416 | |
1417 setViewportArguments(m_legacyViewportArguments); | |
1418 return true; | |
1419 } | |
1420 | |
1400 inline Document* toDocument(ScriptExecutionContext* scriptExecutionContext) | 1421 inline Document* toDocument(ScriptExecutionContext* scriptExecutionContext) |
1401 { | 1422 { |
1402 ASSERT_WITH_SECURITY_IMPLICATION(!scriptExecutionContext || scriptExecutionC ontext->isDocument()); | 1423 ASSERT_WITH_SECURITY_IMPLICATION(!scriptExecutionContext || scriptExecutionC ontext->isDocument()); |
1403 return static_cast<Document*>(scriptExecutionContext); | 1424 return static_cast<Document*>(scriptExecutionContext); |
1404 } | 1425 } |
1405 | 1426 |
1406 inline const Document* toDocument(const ScriptExecutionContext* scriptExecutionC ontext) | 1427 inline const Document* toDocument(const ScriptExecutionContext* scriptExecutionC ontext) |
1407 { | 1428 { |
1408 ASSERT_WITH_SECURITY_IMPLICATION(!scriptExecutionContext || scriptExecutionC ontext->isDocument()); | 1429 ASSERT_WITH_SECURITY_IMPLICATION(!scriptExecutionContext || scriptExecutionC ontext->isDocument()); |
1409 return static_cast<const Document*>(scriptExecutionContext); | 1430 return static_cast<const Document*>(scriptExecutionContext); |
(...skipping 19 matching lines...) Expand all Loading... | |
1429 inline bool Node::isDocumentNode() const | 1450 inline bool Node::isDocumentNode() const |
1430 { | 1451 { |
1431 return this == documentInternal(); | 1452 return this == documentInternal(); |
1432 } | 1453 } |
1433 | 1454 |
1434 Node* eventTargetNodeForDocument(Document*); | 1455 Node* eventTargetNodeForDocument(Document*); |
1435 | 1456 |
1436 } // namespace WebCore | 1457 } // namespace WebCore |
1437 | 1458 |
1438 #endif // Document_h | 1459 #endif // Document_h |
OLD | NEW |