| 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 23 matching lines...) Expand all Loading... |
| 34 #include "core/animation/CompositorPendingAnimations.h" | 34 #include "core/animation/CompositorPendingAnimations.h" |
| 35 #include "core/dom/ContainerNode.h" | 35 #include "core/dom/ContainerNode.h" |
| 36 #include "core/dom/DocumentInit.h" | 36 #include "core/dom/DocumentInit.h" |
| 37 #include "core/dom/DocumentLifecycle.h" | 37 #include "core/dom/DocumentLifecycle.h" |
| 38 #include "core/dom/DocumentSupplementable.h" | 38 #include "core/dom/DocumentSupplementable.h" |
| 39 #include "core/dom/ExecutionContext.h" | 39 #include "core/dom/ExecutionContext.h" |
| 40 #include "core/dom/MutationObserver.h" | 40 #include "core/dom/MutationObserver.h" |
| 41 #include "core/dom/TextLinkColors.h" | 41 #include "core/dom/TextLinkColors.h" |
| 42 #include "core/dom/TreeScope.h" | 42 #include "core/dom/TreeScope.h" |
| 43 #include "core/dom/UserActionElementSet.h" | 43 #include "core/dom/UserActionElementSet.h" |
| 44 #include "core/dom/ViewportDescription.h" | |
| 45 #include "core/dom/custom/CustomElement.h" | 44 #include "core/dom/custom/CustomElement.h" |
| 46 #include "core/fetch/ResourceClient.h" | 45 #include "core/fetch/ResourceClient.h" |
| 47 #include "core/loader/DocumentLoadTiming.h" | 46 #include "core/loader/DocumentLoadTiming.h" |
| 48 #include "core/page/FocusType.h" | 47 #include "core/page/FocusType.h" |
| 49 #include "core/page/PageVisibilityState.h" | 48 #include "core/page/PageVisibilityState.h" |
| 50 #include "platform/Length.h" | 49 #include "platform/Length.h" |
| 51 #include "platform/Timer.h" | 50 #include "platform/Timer.h" |
| 52 #include "platform/heap/Handle.h" | 51 #include "platform/heap/Handle.h" |
| 53 #include "platform/weborigin/KURL.h" | 52 #include "platform/weborigin/KURL.h" |
| 54 #include "platform/weborigin/ReferrerPolicy.h" | 53 #include "platform/weborigin/ReferrerPolicy.h" |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 virtual bool canContainRangeEndPoint() const override { return true; } | 195 virtual bool canContainRangeEndPoint() const override { return true; } |
| 197 | 196 |
| 198 SelectorQueryCache& selectorQueryCache(); | 197 SelectorQueryCache& selectorQueryCache(); |
| 199 | 198 |
| 200 // Focus Management. | 199 // Focus Management. |
| 201 Element* activeElement() const; | 200 Element* activeElement() const; |
| 202 bool hasFocus() const; | 201 bool hasFocus() const; |
| 203 | 202 |
| 204 // DOM methods & attributes for Document | 203 // DOM methods & attributes for Document |
| 205 | 204 |
| 206 bool shouldOverrideLegacyDescription(ViewportDescription::Type); | |
| 207 void setViewportDescription(const ViewportDescription&); | |
| 208 const ViewportDescription& viewportDescription() const { return m_viewportDe
scription; } | |
| 209 Length viewportDefaultMinWidth() const { return m_viewportDefaultMinWidth; } | 205 Length viewportDefaultMinWidth() const { return m_viewportDefaultMinWidth; } |
| 210 | 206 |
| 211 void setReferrerPolicy(ReferrerPolicy); | 207 void setReferrerPolicy(ReferrerPolicy); |
| 212 ReferrerPolicy referrerPolicy() const { return m_referrerPolicy; } | 208 ReferrerPolicy referrerPolicy() const { return m_referrerPolicy; } |
| 213 | 209 |
| 214 String outgoingReferrer(); | 210 String outgoingReferrer(); |
| 215 | 211 |
| 216 DOMImplementation& implementation(); | 212 DOMImplementation& implementation(); |
| 217 | 213 |
| 218 Element* documentElement() const | 214 Element* documentElement() const |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 * Handles a HTTP header equivalent set by a meta tag using <meta http-equiv
="..." content="...">. This is called | 456 * Handles a HTTP header equivalent set by a meta tag using <meta http-equiv
="..." content="...">. This is called |
| 461 * when a meta tag is encountered during document parsing, and also when a s
cript dynamically changes or adds a meta | 457 * when a meta tag is encountered during document parsing, and also when a s
cript dynamically changes or adds a meta |
| 462 * tag. This enables scripts to use meta tags to perform refreshes and set e
xpiry dates in addition to them being | 458 * tag. This enables scripts to use meta tags to perform refreshes and set e
xpiry dates in addition to them being |
| 463 * specified in a HTML file. | 459 * specified in a HTML file. |
| 464 * | 460 * |
| 465 * @param equiv The http header name (value of the meta tag's "equiv" attrib
ute) | 461 * @param equiv The http header name (value of the meta tag's "equiv" attrib
ute) |
| 466 * @param content The header value (value of the meta tag's "content" attrib
ute) | 462 * @param content The header value (value of the meta tag's "content" attrib
ute) |
| 467 * @param inDocumentHeadElement Is the element in the document's <head> elem
ent? | 463 * @param inDocumentHeadElement Is the element in the document's <head> elem
ent? |
| 468 */ | 464 */ |
| 469 void processHttpEquiv(const AtomicString& equiv, const AtomicString& content
, bool inDocumentHeadElement); | 465 void processHttpEquiv(const AtomicString& equiv, const AtomicString& content
, bool inDocumentHeadElement); |
| 470 void updateViewportDescription(); | |
| 471 void processReferrerPolicy(const String& policy); | 466 void processReferrerPolicy(const String& policy); |
| 472 | 467 |
| 473 String title() const { return m_title; } | 468 String title() const { return m_title; } |
| 474 void setTitle(const String&); | 469 void setTitle(const String&); |
| 475 | 470 |
| 476 Element* titleElement() const { return m_titleElement.get(); } | 471 Element* titleElement() const { return m_titleElement.get(); } |
| 477 void setTitleElement(Element*); | 472 void setTitleElement(Element*); |
| 478 void removeTitle(Element* titleElement); | 473 void removeTitle(Element* titleElement); |
| 479 | 474 |
| 480 const AtomicString& dir(); | 475 const AtomicString& dir(); |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 841 RenderView* m_renderView; | 836 RenderView* m_renderView; |
| 842 | 837 |
| 843 #if !ENABLE(OILPAN) | 838 #if !ENABLE(OILPAN) |
| 844 WeakPtrFactory<Document> m_weakFactory; | 839 WeakPtrFactory<Document> m_weakFactory; |
| 845 #endif | 840 #endif |
| 846 WeakPtrWillBeWeakMember<Document> m_contextDocument; | 841 WeakPtrWillBeWeakMember<Document> m_contextDocument; |
| 847 | 842 |
| 848 int m_loadEventDelayCount; | 843 int m_loadEventDelayCount; |
| 849 Timer<Document> m_loadEventDelayTimer; | 844 Timer<Document> m_loadEventDelayTimer; |
| 850 | 845 |
| 851 ViewportDescription m_viewportDescription; | |
| 852 ViewportDescription m_legacyViewportDescription; | |
| 853 Length m_viewportDefaultMinWidth; | 846 Length m_viewportDefaultMinWidth; |
| 854 | 847 |
| 855 bool m_didSetReferrerPolicy; | 848 bool m_didSetReferrerPolicy; |
| 856 ReferrerPolicy m_referrerPolicy; | 849 ReferrerPolicy m_referrerPolicy; |
| 857 | 850 |
| 858 bool m_directionSetOnDocumentElement; | 851 bool m_directionSetOnDocumentElement; |
| 859 bool m_writingModeSetOnDocumentElement; | 852 bool m_writingModeSetOnDocumentElement; |
| 860 | 853 |
| 861 RefPtrWillBeMember<MediaQueryMatcher> m_mediaQueryMatcher; | 854 RefPtrWillBeMember<MediaQueryMatcher> m_mediaQueryMatcher; |
| 862 | 855 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 885 | 878 |
| 886 bool m_hasViewportUnits; | 879 bool m_hasViewportUnits; |
| 887 | 880 |
| 888 typedef WillBeHeapHashSet<RawPtrWillBeWeakMember<DocumentVisibilityObserver>
> DocumentVisibilityObserverSet; | 881 typedef WillBeHeapHashSet<RawPtrWillBeWeakMember<DocumentVisibilityObserver>
> DocumentVisibilityObserverSet; |
| 889 DocumentVisibilityObserverSet m_visibilityObservers; | 882 DocumentVisibilityObserverSet m_visibilityObservers; |
| 890 | 883 |
| 891 int m_styleRecalcElementCounter; | 884 int m_styleRecalcElementCounter; |
| 892 mutable DocumentLoadTiming m_documentLoadTiming; | 885 mutable DocumentLoadTiming m_documentLoadTiming; |
| 893 }; | 886 }; |
| 894 | 887 |
| 895 inline bool Document::shouldOverrideLegacyDescription(ViewportDescription::Type
origin) | |
| 896 { | |
| 897 // The different (legacy) meta tags have different priorities based on the t
ype | |
| 898 // regardless of which order they appear in the DOM. The priority is given b
y the | |
| 899 // ViewportDescription::Type enum. | |
| 900 return origin >= m_legacyViewportDescription.type; | |
| 901 } | |
| 902 | |
| 903 inline void Document::scheduleRenderTreeUpdateIfNeeded() | 888 inline void Document::scheduleRenderTreeUpdateIfNeeded() |
| 904 { | 889 { |
| 905 // Inline early out to avoid the function calls below. | 890 // Inline early out to avoid the function calls below. |
| 906 if (hasPendingStyleRecalc()) | 891 if (hasPendingStyleRecalc()) |
| 907 return; | 892 return; |
| 908 if (shouldScheduleRenderTreeUpdate() && needsRenderTreeUpdate()) | 893 if (shouldScheduleRenderTreeUpdate() && needsRenderTreeUpdate()) |
| 909 scheduleRenderTreeUpdate(); | 894 scheduleRenderTreeUpdate(); |
| 910 } | 895 } |
| 911 | 896 |
| 912 DEFINE_TYPE_CASTS(Document, ExecutionContextClient, client, client->isDocument()
, client.isDocument()); | 897 DEFINE_TYPE_CASTS(Document, ExecutionContextClient, client, client->isDocument()
, client.isDocument()); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 929 Node* eventTargetNodeForDocument(Document*); | 914 Node* eventTargetNodeForDocument(Document*); |
| 930 | 915 |
| 931 } // namespace blink | 916 } // namespace blink |
| 932 | 917 |
| 933 #ifndef NDEBUG | 918 #ifndef NDEBUG |
| 934 // Outside the WebCore namespace for ease of invocation from gdb. | 919 // Outside the WebCore namespace for ease of invocation from gdb. |
| 935 void showLiveDocumentInstances(); | 920 void showLiveDocumentInstances(); |
| 936 #endif | 921 #endif |
| 937 | 922 |
| 938 #endif // Document_h | 923 #endif // Document_h |
| OLD | NEW |