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 1353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1364 } | 1364 } |
1365 | 1365 |
1366 inline bool Document::shouldOverrideLegacyDescription(ViewportDescription::Type
origin) | 1366 inline bool Document::shouldOverrideLegacyDescription(ViewportDescription::Type
origin) |
1367 { | 1367 { |
1368 // The different (legacy) meta tags have different priorities based on the t
ype | 1368 // The different (legacy) meta tags have different priorities based on the t
ype |
1369 // regardless of which order they appear in the DOM. The priority is given b
y the | 1369 // regardless of which order they appear in the DOM. The priority is given b
y the |
1370 // ViewportDescription::Type enum. | 1370 // ViewportDescription::Type enum. |
1371 return origin >= m_legacyViewportDescription.type; | 1371 return origin >= m_legacyViewportDescription.type; |
1372 } | 1372 } |
1373 | 1373 |
| 1374 DEFINE_TYPE_CASTS(Document, ExecutionContextClient, client, client->isDocument()
, client.isDocument()); |
1374 DEFINE_TYPE_CASTS(Document, ExecutionContext, context, context->isDocument(), co
ntext.isDocument()); | 1375 DEFINE_TYPE_CASTS(Document, ExecutionContext, context, context->isDocument(), co
ntext.isDocument()); |
1375 DEFINE_NODE_TYPE_CASTS(Document, isDocumentNode()); | 1376 DEFINE_NODE_TYPE_CASTS(Document, isDocumentNode()); |
1376 | 1377 |
1377 #define DEFINE_DOCUMENT_TYPE_CASTS(thisType) \ | 1378 #define DEFINE_DOCUMENT_TYPE_CASTS(thisType) \ |
1378 DEFINE_TYPE_CASTS(thisType, Document, document, document->is##thisType(), do
cument.is##thisType()) | 1379 DEFINE_TYPE_CASTS(thisType, Document, document, document->is##thisType(), do
cument.is##thisType()) |
1379 | 1380 |
1380 // All these varations are needed to avoid ambiguous overloads with the Node and
TreeScope versions. | 1381 // All these varations are needed to avoid ambiguous overloads with the Node and
TreeScope versions. |
1381 inline bool operator==(const Document& a, const Document& b) { return &a == &b;
} | 1382 inline bool operator==(const Document& a, const Document& b) { return &a == &b;
} |
1382 inline bool operator==(const Document& a, const Document* b) { return &a == b; } | 1383 inline bool operator==(const Document& a, const Document* b) { return &a == b; } |
1383 inline bool operator==(const Document* a, const Document& b) { return a == &b; } | 1384 inline bool operator==(const Document* a, const Document& b) { return a == &b; } |
1384 inline bool operator!=(const Document& a, const Document& b) { return !(a == b);
} | 1385 inline bool operator!=(const Document& a, const Document& b) { return !(a == b);
} |
1385 inline bool operator!=(const Document& a, const Document* b) { return !(a == b);
} | 1386 inline bool operator!=(const Document& a, const Document* b) { return !(a == b);
} |
1386 inline bool operator!=(const Document* a, const Document& b) { return !(a == b);
} | 1387 inline bool operator!=(const Document* a, const Document& b) { return !(a == b);
} |
1387 | 1388 |
1388 // Put these methods here, because they require the Document definition, but we
really want to inline them. | 1389 // Put these methods here, because they require the Document definition, but we
really want to inline them. |
1389 | 1390 |
1390 inline bool Node::isDocumentNode() const | 1391 inline bool Node::isDocumentNode() const |
1391 { | 1392 { |
1392 return this == document(); | 1393 return this == document(); |
1393 } | 1394 } |
1394 | 1395 |
1395 Node* eventTargetNodeForDocument(Document*); | 1396 Node* eventTargetNodeForDocument(Document*); |
1396 | 1397 |
1397 } // namespace WebCore | 1398 } // namespace WebCore |
1398 | 1399 |
1399 #endif // Document_h | 1400 #endif // Document_h |
OLD | NEW |