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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 | 225 |
226 class CORE_EXPORT Document : public ContainerNode, public TreeScope, public Secu
rityContext, public ExecutionContext | 226 class CORE_EXPORT Document : public ContainerNode, public TreeScope, public Secu
rityContext, public ExecutionContext |
227 , public WillBeHeapSupplementable<Document>, public DocumentLifecycleNotifie
r { | 227 , public WillBeHeapSupplementable<Document>, public DocumentLifecycleNotifie
r { |
228 DEFINE_WRAPPERTYPEINFO(); | 228 DEFINE_WRAPPERTYPEINFO(); |
229 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Document); | 229 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Document); |
230 public: | 230 public: |
231 static PassRefPtrWillBeRawPtr<Document> create(const DocumentInit& initializ
er = DocumentInit()) | 231 static PassRefPtrWillBeRawPtr<Document> create(const DocumentInit& initializ
er = DocumentInit()) |
232 { | 232 { |
233 return adoptRefWillBeNoop(new Document(initializer)); | 233 return adoptRefWillBeNoop(new Document(initializer)); |
234 } | 234 } |
235 virtual ~Document(); | 235 ~Document() override; |
236 | 236 |
237 MediaQueryMatcher& mediaQueryMatcher(); | 237 MediaQueryMatcher& mediaQueryMatcher(); |
238 | 238 |
239 void mediaQueryAffectingValueChanged(); | 239 void mediaQueryAffectingValueChanged(); |
240 | 240 |
241 #if !ENABLE(OILPAN) | 241 #if !ENABLE(OILPAN) |
242 using ContainerNode::ref; | 242 using ContainerNode::ref; |
243 using ContainerNode::deref; | 243 using ContainerNode::deref; |
244 #endif | 244 #endif |
245 using SecurityContext::securityOrigin; | 245 using SecurityContext::securityOrigin; |
246 using SecurityContext::contentSecurityPolicy; | 246 using SecurityContext::contentSecurityPolicy; |
247 using TreeScope::getElementById; | 247 using TreeScope::getElementById; |
248 | 248 |
249 virtual bool canContainRangeEndPoint() const override { return true; } | 249 bool canContainRangeEndPoint() const override { return true; } |
250 | 250 |
251 SelectorQueryCache& selectorQueryCache(); | 251 SelectorQueryCache& selectorQueryCache(); |
252 | 252 |
253 // Focus Management. | 253 // Focus Management. |
254 Element* activeElement() const; | 254 Element* activeElement() const; |
255 bool hasFocus() const; | 255 bool hasFocus() const; |
256 | 256 |
257 // DOM methods & attributes for Document | 257 // DOM methods & attributes for Document |
258 | 258 |
259 DEFINE_ATTRIBUTE_EVENT_LISTENER(beforecopy); | 259 DEFINE_ATTRIBUTE_EVENT_LISTENER(beforecopy); |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 enum StandaloneStatus { StandaloneUnspecified, Standalone, NotStandalone }; | 341 enum StandaloneStatus { StandaloneUnspecified, Standalone, NotStandalone }; |
342 bool xmlStandalone() const { return m_xmlStandalone == Standalone; } | 342 bool xmlStandalone() const { return m_xmlStandalone == Standalone; } |
343 StandaloneStatus xmlStandaloneStatus() const { return static_cast<Standalone
Status>(m_xmlStandalone); } | 343 StandaloneStatus xmlStandaloneStatus() const { return static_cast<Standalone
Status>(m_xmlStandalone); } |
344 bool hasXMLDeclaration() const { return m_hasXMLDeclaration; } | 344 bool hasXMLDeclaration() const { return m_hasXMLDeclaration; } |
345 | 345 |
346 void setXMLEncoding(const String& encoding) { m_xmlEncoding = encoding; } //
read-only property, only to be set from XMLDocumentParser | 346 void setXMLEncoding(const String& encoding) { m_xmlEncoding = encoding; } //
read-only property, only to be set from XMLDocumentParser |
347 void setXMLVersion(const String&, ExceptionState&); | 347 void setXMLVersion(const String&, ExceptionState&); |
348 void setXMLStandalone(bool, ExceptionState&); | 348 void setXMLStandalone(bool, ExceptionState&); |
349 void setHasXMLDeclaration(bool hasXMLDeclaration) { m_hasXMLDeclaration = ha
sXMLDeclaration ? 1 : 0; } | 349 void setHasXMLDeclaration(bool hasXMLDeclaration) { m_hasXMLDeclaration = ha
sXMLDeclaration ? 1 : 0; } |
350 | 350 |
351 virtual KURL baseURI() const override final; | 351 KURL baseURI() const final; |
352 | 352 |
353 String origin() const { return securityOrigin()->toString(); } | 353 String origin() const { return securityOrigin()->toString(); } |
354 | 354 |
355 String visibilityState() const; | 355 String visibilityState() const; |
356 PageVisibilityState pageVisibilityState() const; | 356 PageVisibilityState pageVisibilityState() const; |
357 bool hidden() const; | 357 bool hidden() const; |
358 void didChangeVisibilityState(); | 358 void didChangeVisibilityState(); |
359 | 359 |
360 PassRefPtrWillBeRawPtr<Node> adoptNode(PassRefPtrWillBeRawPtr<Node> source,
ExceptionState&); | 360 PassRefPtrWillBeRawPtr<Node> adoptNode(PassRefPtrWillBeRawPtr<Node> source,
ExceptionState&); |
361 | 361 |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 const KURL& baseURL() const { return m_baseURL; } | 529 const KURL& baseURL() const { return m_baseURL; } |
530 void setBaseURLOverride(const KURL&); | 530 void setBaseURLOverride(const KURL&); |
531 const KURL& baseURLOverride() const { return m_baseURLOverride; } | 531 const KURL& baseURLOverride() const { return m_baseURLOverride; } |
532 const KURL& baseElementURL() const { return m_baseElementURL; } | 532 const KURL& baseElementURL() const { return m_baseElementURL; } |
533 const AtomicString& baseTarget() const { return m_baseTarget; } | 533 const AtomicString& baseTarget() const { return m_baseTarget; } |
534 void processBaseElement(); | 534 void processBaseElement(); |
535 | 535 |
536 KURL completeURL(const String&) const; | 536 KURL completeURL(const String&) const; |
537 KURL completeURLWithOverride(const String&, const KURL& baseURLOverride) con
st; | 537 KURL completeURLWithOverride(const String&, const KURL& baseURLOverride) con
st; |
538 | 538 |
539 virtual String userAgent(const KURL&) const override final; | 539 String userAgent(const KURL&) const final; |
540 virtual void disableEval(const String& errorMessage) override final; | 540 void disableEval(const String& errorMessage) final; |
541 | 541 |
542 CSSStyleSheet& elementSheet(); | 542 CSSStyleSheet& elementSheet(); |
543 | 543 |
544 virtual PassRefPtrWillBeRawPtr<DocumentParser> createParser(); | 544 virtual PassRefPtrWillBeRawPtr<DocumentParser> createParser(); |
545 DocumentParser* parser() const { return m_parser.get(); } | 545 DocumentParser* parser() const { return m_parser.get(); } |
546 ScriptableDocumentParser* scriptableDocumentParser() const; | 546 ScriptableDocumentParser* scriptableDocumentParser() const; |
547 | 547 |
548 bool printing() const { return m_printing; } | 548 bool printing() const { return m_printing; } |
549 void setPrinting(bool p) { m_printing = p; } | 549 void setPrinting(bool p) { m_printing = p; } |
550 | 550 |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
839 void cancelFocusAppearanceUpdate(); | 839 void cancelFocusAppearanceUpdate(); |
840 | 840 |
841 // Extension for manipulating canvas drawing contexts for use in CSS | 841 // Extension for manipulating canvas drawing contexts for use in CSS |
842 ScriptValue getCSSCanvasContext(ScriptState*, const String& type, const Stri
ng& name, int width, int height); | 842 ScriptValue getCSSCanvasContext(ScriptState*, const String& type, const Stri
ng& name, int width, int height); |
843 HTMLCanvasElement& getCSSCanvasElement(const String& name); | 843 HTMLCanvasElement& getCSSCanvasElement(const String& name); |
844 | 844 |
845 bool isDNSPrefetchEnabled() const { return m_isDNSPrefetchEnabled; } | 845 bool isDNSPrefetchEnabled() const { return m_isDNSPrefetchEnabled; } |
846 void parseDNSPrefetchControlHeader(const String&); | 846 void parseDNSPrefetchControlHeader(const String&); |
847 | 847 |
848 // FIXME(crbug.com/305497): This should be removed once LocalDOMWindow is an
ExecutionContext. | 848 // FIXME(crbug.com/305497): This should be removed once LocalDOMWindow is an
ExecutionContext. |
849 virtual void postTask(const WebTraceLocation&, PassOwnPtr<ExecutionContextTa
sk>) override; // Executes the task on context's thread asynchronously. | 849 void postTask(const WebTraceLocation&, PassOwnPtr<ExecutionContextTask>) ove
rride; // Executes the task on context's thread asynchronously. |
850 void postInspectorTask(const WebTraceLocation&, PassOwnPtr<ExecutionContextT
ask>); | 850 void postInspectorTask(const WebTraceLocation&, PassOwnPtr<ExecutionContextT
ask>); |
851 | 851 |
852 virtual void tasksWereSuspended() override final; | 852 void tasksWereSuspended() final; |
853 virtual void tasksWereResumed() override final; | 853 void tasksWereResumed() final; |
854 virtual void suspendScheduledTasks() override final; | 854 void suspendScheduledTasks() final; |
855 virtual void resumeScheduledTasks() override final; | 855 void resumeScheduledTasks() final; |
856 virtual bool tasksNeedSuspension() override final; | 856 bool tasksNeedSuspension() final; |
857 | 857 |
858 void finishedParsing(); | 858 void finishedParsing(); |
859 | 859 |
860 void setEncodingData(const DocumentEncodingData& newData); | 860 void setEncodingData(const DocumentEncodingData& newData); |
861 const WTF::TextEncoding& encoding() const { return m_encodingData.encoding()
; } | 861 const WTF::TextEncoding& encoding() const { return m_encodingData.encoding()
; } |
862 | 862 |
863 bool encodingWasDetectedHeuristically() const { return m_encodingData.wasDet
ectedHeuristically(); } | 863 bool encodingWasDetectedHeuristically() const { return m_encodingData.wasDet
ectedHeuristically(); } |
864 bool sawDecodingError() const { return m_encodingData.sawDecodingError(); } | 864 bool sawDecodingError() const { return m_encodingData.sawDecodingError(); } |
865 | 865 |
866 void setAnnotatedRegionsDirty(bool f) { m_annotatedRegionsDirty = f; } | 866 void setAnnotatedRegionsDirty(bool f) { m_annotatedRegionsDirty = f; } |
867 bool annotatedRegionsDirty() const { return m_annotatedRegionsDirty; } | 867 bool annotatedRegionsDirty() const { return m_annotatedRegionsDirty; } |
868 bool hasAnnotatedRegions () const { return m_hasAnnotatedRegions; } | 868 bool hasAnnotatedRegions () const { return m_hasAnnotatedRegions; } |
869 void setHasAnnotatedRegions(bool f) { m_hasAnnotatedRegions = f; } | 869 void setHasAnnotatedRegions(bool f) { m_hasAnnotatedRegions = f; } |
870 const Vector<AnnotatedRegionValue>& annotatedRegions() const; | 870 const Vector<AnnotatedRegionValue>& annotatedRegions() const; |
871 void setAnnotatedRegions(const Vector<AnnotatedRegionValue>&); | 871 void setAnnotatedRegions(const Vector<AnnotatedRegionValue>&); |
872 | 872 |
873 virtual void removeAllEventListeners() override final; | 873 void removeAllEventListeners() final; |
874 | 874 |
875 const SVGDocumentExtensions* svgExtensions(); | 875 const SVGDocumentExtensions* svgExtensions(); |
876 SVGDocumentExtensions& accessSVGExtensions(); | 876 SVGDocumentExtensions& accessSVGExtensions(); |
877 | 877 |
878 void initSecurityContext(); | 878 void initSecurityContext(); |
879 void initSecurityContext(const DocumentInit&); | 879 void initSecurityContext(const DocumentInit&); |
880 void initContentSecurityPolicy(PassRefPtr<ContentSecurityPolicy> = nullptr); | 880 void initContentSecurityPolicy(PassRefPtr<ContentSecurityPolicy> = nullptr); |
881 | 881 |
882 bool allowInlineEventHandlers(Node*, EventListener*, const String& contextUR
L, const WTF::OrdinalNumber& contextLine); | 882 bool allowInlineEventHandlers(Node*, EventListener*, const String& contextUR
L, const WTF::OrdinalNumber& contextLine); |
883 bool allowExecutingScripts(Node*); | 883 bool allowExecutingScripts(Node*); |
(...skipping 13 matching lines...) Expand all Loading... |
897 bool loadEventStillNeeded() const { return m_loadEventProgress == LoadEventN
otRun; } | 897 bool loadEventStillNeeded() const { return m_loadEventProgress == LoadEventN
otRun; } |
898 bool processingLoadEvent() const { return m_loadEventProgress == LoadEventIn
Progress; } | 898 bool processingLoadEvent() const { return m_loadEventProgress == LoadEventIn
Progress; } |
899 bool loadEventFinished() const { return m_loadEventProgress >= LoadEventComp
leted; } | 899 bool loadEventFinished() const { return m_loadEventProgress >= LoadEventComp
leted; } |
900 bool unloadStarted() const { return m_loadEventProgress >= PageHideInProgres
s; } | 900 bool unloadStarted() const { return m_loadEventProgress >= PageHideInProgres
s; } |
901 bool processingBeforeUnload() const { return m_loadEventProgress == BeforeUn
loadEventInProgress; } | 901 bool processingBeforeUnload() const { return m_loadEventProgress == BeforeUn
loadEventInProgress; } |
902 void suppressLoadEvent(); | 902 void suppressLoadEvent(); |
903 | 903 |
904 void setContainsPlugins() { m_containsPlugins = true; } | 904 void setContainsPlugins() { m_containsPlugins = true; } |
905 bool containsPlugins() const { return m_containsPlugins; } | 905 bool containsPlugins() const { return m_containsPlugins; } |
906 | 906 |
907 virtual bool isContextThread() const override final; | 907 bool isContextThread() const final; |
908 virtual bool isJSExecutionForbidden() const override final { return false; } | 908 bool isJSExecutionForbidden() const final { return false; } |
909 | 909 |
910 bool containsValidityStyleRules() const { return m_containsValidityStyleRule
s; } | 910 bool containsValidityStyleRules() const { return m_containsValidityStyleRule
s; } |
911 void setContainsValidityStyleRules() { m_containsValidityStyleRules = true;
} | 911 void setContainsValidityStyleRules() { m_containsValidityStyleRules = true;
} |
912 | 912 |
913 void enqueueResizeEvent(); | 913 void enqueueResizeEvent(); |
914 void enqueueScrollEventForNode(Node*); | 914 void enqueueScrollEventForNode(Node*); |
915 void enqueueAnimationFrameEvent(PassRefPtrWillBeRawPtr<Event>); | 915 void enqueueAnimationFrameEvent(PassRefPtrWillBeRawPtr<Event>); |
916 // Only one event for a target/event type combination will be dispatched per
frame. | 916 // Only one event for a target/event type combination will be dispatched per
frame. |
917 void enqueueUniqueAnimationFrameEvent(PassRefPtrWillBeRawPtr<Event>); | 917 void enqueueUniqueAnimationFrameEvent(PassRefPtrWillBeRawPtr<Event>); |
918 void enqueueMediaQueryChangeListeners(WillBeHeapVector<RefPtrWillBeMember<Me
diaQueryListListener>>&); | 918 void enqueueMediaQueryChangeListeners(WillBeHeapVector<RefPtrWillBeMember<Me
diaQueryListListener>>&); |
(...skipping 15 matching lines...) Expand all Loading... |
934 | 934 |
935 PassRefPtrWillBeRawPtr<Touch> createTouch(DOMWindow*, EventTarget*, int iden
tifier, double pageX, double pageY, double screenX, double screenY, double radiu
sX, double radiusY, float rotationAngle, float force) const; | 935 PassRefPtrWillBeRawPtr<Touch> createTouch(DOMWindow*, EventTarget*, int iden
tifier, double pageX, double pageY, double screenX, double screenY, double radiu
sX, double radiusY, float rotationAngle, float force) const; |
936 PassRefPtrWillBeRawPtr<TouchList> createTouchList(WillBeHeapVector<RefPtrWil
lBeMember<Touch>>&) const; | 936 PassRefPtrWillBeRawPtr<TouchList> createTouchList(WillBeHeapVector<RefPtrWil
lBeMember<Touch>>&) const; |
937 | 937 |
938 const DocumentTiming& timing() const { return m_documentTiming; } | 938 const DocumentTiming& timing() const { return m_documentTiming; } |
939 | 939 |
940 int requestAnimationFrame(FrameRequestCallback*); | 940 int requestAnimationFrame(FrameRequestCallback*); |
941 void cancelAnimationFrame(int id); | 941 void cancelAnimationFrame(int id); |
942 void serviceScriptedAnimations(double monotonicAnimationStartTime); | 942 void serviceScriptedAnimations(double monotonicAnimationStartTime); |
943 | 943 |
944 virtual EventTarget* errorEventTarget() override final; | 944 EventTarget* errorEventTarget() final; |
945 virtual void logExceptionToConsole(const String& errorMessage, int scriptId,
const String& sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawP
tr<ScriptCallStack>) override final; | 945 void logExceptionToConsole(const String& errorMessage, int scriptId, const S
tring& sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawPtr<Scrip
tCallStack>) final; |
946 | 946 |
947 void initDNSPrefetch(); | 947 void initDNSPrefetch(); |
948 | 948 |
949 bool isInDocumentWrite() { return m_writeRecursionDepth > 0; } | 949 bool isInDocumentWrite() { return m_writeRecursionDepth > 0; } |
950 | 950 |
951 TextAutosizer* textAutosizer(); | 951 TextAutosizer* textAutosizer(); |
952 | 952 |
953 PassRefPtrWillBeRawPtr<Element> createElement(const AtomicString& localName,
const AtomicString& typeExtension, ExceptionState&); | 953 PassRefPtrWillBeRawPtr<Element> createElement(const AtomicString& localName,
const AtomicString& typeExtension, ExceptionState&); |
954 PassRefPtrWillBeRawPtr<Element> createElementNS(const AtomicString& namespac
eURI, const AtomicString& qualifiedName, const AtomicString& typeExtension, Exce
ptionState&); | 954 PassRefPtrWillBeRawPtr<Element> createElementNS(const AtomicString& namespac
eURI, const AtomicString& qualifiedName, const AtomicString& typeExtension, Exce
ptionState&); |
955 ScriptValue registerElement(ScriptState*, const AtomicString& name, const El
ementRegistrationOptions&, ExceptionState&, CustomElement::NameSet validNames =
CustomElement::StandardNames); | 955 ScriptValue registerElement(ScriptState*, const AtomicString& name, const El
ementRegistrationOptions&, ExceptionState&, CustomElement::NameSet validNames =
CustomElement::StandardNames); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
996 // A non-null m_templateDocumentHost implies that |this| was created by ensu
reTemplateDocument(). | 996 // A non-null m_templateDocumentHost implies that |this| was created by ensu
reTemplateDocument(). |
997 bool isTemplateDocument() const { return !!m_templateDocumentHost; } | 997 bool isTemplateDocument() const { return !!m_templateDocumentHost; } |
998 Document& ensureTemplateDocument(); | 998 Document& ensureTemplateDocument(); |
999 Document* templateDocumentHost() { return m_templateDocumentHost; } | 999 Document* templateDocumentHost() { return m_templateDocumentHost; } |
1000 | 1000 |
1001 // TODO(thestig): Rename these and related functions, since we can call them | 1001 // TODO(thestig): Rename these and related functions, since we can call them |
1002 // for labels and input fields outside of forms as well. | 1002 // for labels and input fields outside of forms as well. |
1003 void didAssociateFormControl(Element*); | 1003 void didAssociateFormControl(Element*); |
1004 void removeFormAssociation(Element*); | 1004 void removeFormAssociation(Element*); |
1005 | 1005 |
1006 virtual void addConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMessage>) overr
ide final; | 1006 void addConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMessage>) final; |
1007 | 1007 |
1008 virtual LocalDOMWindow* executingWindow() override final; | 1008 LocalDOMWindow* executingWindow() final; |
1009 LocalFrame* executingFrame(); | 1009 LocalFrame* executingFrame(); |
1010 | 1010 |
1011 DocumentLifecycle& lifecycle() { return m_lifecycle; } | 1011 DocumentLifecycle& lifecycle() { return m_lifecycle; } |
1012 bool isActive() const { return m_lifecycle.isActive(); } | 1012 bool isActive() const { return m_lifecycle.isActive(); } |
1013 bool isDetached() const { return m_lifecycle.state() >= DocumentLifecycle::S
topping; } | 1013 bool isDetached() const { return m_lifecycle.state() >= DocumentLifecycle::S
topping; } |
1014 bool isStopped() const { return m_lifecycle.state() == DocumentLifecycle::St
opped; } | 1014 bool isStopped() const { return m_lifecycle.state() == DocumentLifecycle::St
opped; } |
1015 bool isDisposed() const { return m_lifecycle.state() == DocumentLifecycle::D
isposed; } | 1015 bool isDisposed() const { return m_lifecycle.state() == DocumentLifecycle::D
isposed; } |
1016 | 1016 |
1017 enum HttpRefreshType { | 1017 enum HttpRefreshType { |
1018 HttpRefreshFromHeader, | 1018 HttpRefreshFromHeader, |
(...skipping 14 matching lines...) Expand all Loading... |
1033 | 1033 |
1034 DECLARE_VIRTUAL_TRACE(); | 1034 DECLARE_VIRTUAL_TRACE(); |
1035 | 1035 |
1036 bool hasSVGFilterElementsRequiringLayerUpdate() const { return m_layerUpdate
SVGFilterElements.size(); } | 1036 bool hasSVGFilterElementsRequiringLayerUpdate() const { return m_layerUpdate
SVGFilterElements.size(); } |
1037 void didRecalculateStyleForElement() { ++m_styleRecalcElementCounter; } | 1037 void didRecalculateStyleForElement() { ++m_styleRecalcElementCounter; } |
1038 | 1038 |
1039 AtomicString convertLocalName(const AtomicString&); | 1039 AtomicString convertLocalName(const AtomicString&); |
1040 | 1040 |
1041 void platformColorsChanged(); | 1041 void platformColorsChanged(); |
1042 | 1042 |
1043 virtual DOMTimerCoordinator* timers() override final; | 1043 DOMTimerCoordinator* timers() final; |
1044 | 1044 |
1045 virtual v8::Local<v8::Object> wrap(v8::Isolate*, v8::Local<v8::Object> creat
ionContext) override; | 1045 v8::Local<v8::Object> wrap(v8::Isolate*, v8::Local<v8::Object> creationConte
xt) override; |
1046 virtual v8::Local<v8::Object> associateWithWrapper(v8::Isolate*, const Wrapp
erTypeInfo*, v8::Local<v8::Object> wrapper) override; | 1046 v8::Local<v8::Object> associateWithWrapper(v8::Isolate*, const WrapperTypeIn
fo*, v8::Local<v8::Object> wrapper) override; |
1047 | 1047 |
1048 OriginsUsingFeatures::Value& originsUsingFeaturesValue() { return m_originsU
singFeaturesValue; } | 1048 OriginsUsingFeatures::Value& originsUsingFeaturesValue() { return m_originsU
singFeaturesValue; } |
1049 | 1049 |
1050 NthIndexCache* nthIndexCache() const { return m_nthIndexCache; } | 1050 NthIndexCache* nthIndexCache() const { return m_nthIndexCache; } |
1051 | 1051 |
1052 bool isPrivilegedContext(String& errorMessage, const PrivilegeContextCheck =
StandardPrivilegeCheck) const override; | 1052 bool isPrivilegedContext(String& errorMessage, const PrivilegeContextCheck =
StandardPrivilegeCheck) const override; |
1053 | 1053 |
1054 void setClientHintsPreferences(const ClientHintsPreferences& preferences) {
m_clientHintsPreferences.set(preferences); } | 1054 void setClientHintsPreferences(const ClientHintsPreferences& preferences) {
m_clientHintsPreferences.set(preferences); } |
1055 const ClientHintsPreferences& clientHintsPreferences() const { return m_clie
ntHintsPreferences; } | 1055 const ClientHintsPreferences& clientHintsPreferences() const { return m_clie
ntHintsPreferences; } |
1056 | 1056 |
1057 protected: | 1057 protected: |
1058 Document(const DocumentInit&, DocumentClassFlags = DefaultDocumentClass); | 1058 Document(const DocumentInit&, DocumentClassFlags = DefaultDocumentClass); |
1059 | 1059 |
1060 virtual void didUpdateSecurityOrigin() override final; | 1060 void didUpdateSecurityOrigin() final; |
1061 | 1061 |
1062 void clearXMLVersion() { m_xmlVersion = String(); } | 1062 void clearXMLVersion() { m_xmlVersion = String(); } |
1063 | 1063 |
1064 #if !ENABLE(OILPAN) | 1064 #if !ENABLE(OILPAN) |
1065 virtual void dispose() override; | 1065 void dispose() override; |
1066 #endif | 1066 #endif |
1067 | 1067 |
1068 virtual PassRefPtrWillBeRawPtr<Document> cloneDocumentWithoutChildren(); | 1068 virtual PassRefPtrWillBeRawPtr<Document> cloneDocumentWithoutChildren(); |
1069 | 1069 |
1070 bool importContainerNodeChildren(ContainerNode* oldContainerNode, PassRefPtr
WillBeRawPtr<ContainerNode> newContainerNode, ExceptionState&); | 1070 bool importContainerNodeChildren(ContainerNode* oldContainerNode, PassRefPtr
WillBeRawPtr<ContainerNode> newContainerNode, ExceptionState&); |
1071 void lockCompatibilityMode() { m_compatibilityModeLocked = true; } | 1071 void lockCompatibilityMode() { m_compatibilityModeLocked = true; } |
1072 ParserSynchronizationPolicy parserSynchronizationPolicy() const { return m_p
arserSyncPolicy; } | 1072 ParserSynchronizationPolicy parserSynchronizationPolicy() const { return m_p
arserSyncPolicy; } |
1073 | 1073 |
1074 private: | 1074 private: |
1075 friend class IgnoreDestructiveWriteCountIncrementer; | 1075 friend class IgnoreDestructiveWriteCountIncrementer; |
1076 friend class NthIndexCache; | 1076 friend class NthIndexCache; |
1077 | 1077 |
1078 bool isDocumentFragment() const = delete; // This will catch anyone doing an
unnecessary check. | 1078 bool isDocumentFragment() const = delete; // This will catch anyone doing an
unnecessary check. |
1079 bool isDocumentNode() const = delete; // This will catch anyone doing an unn
ecessary check. | 1079 bool isDocumentNode() const = delete; // This will catch anyone doing an unn
ecessary check. |
1080 bool isElementNode() const = delete; // This will catch anyone doing an unne
cessary check. | 1080 bool isElementNode() const = delete; // This will catch anyone doing an unne
cessary check. |
1081 | 1081 |
1082 ScriptedAnimationController& ensureScriptedAnimationController(); | 1082 ScriptedAnimationController& ensureScriptedAnimationController(); |
1083 virtual SecurityContext& securityContext() override final { return *this; } | 1083 SecurityContext& securityContext() final { return *this; } |
1084 virtual EventQueue* eventQueue() const override final; | 1084 EventQueue* eventQueue() const final; |
1085 | 1085 |
1086 // FIXME: Rename the StyleRecalc state to LayoutTreeUpdate. | 1086 // FIXME: Rename the StyleRecalc state to LayoutTreeUpdate. |
1087 bool hasPendingStyleRecalc() const { return m_lifecycle.state() == DocumentL
ifecycle::VisualUpdatePending; } | 1087 bool hasPendingStyleRecalc() const { return m_lifecycle.state() == DocumentL
ifecycle::VisualUpdatePending; } |
1088 | 1088 |
1089 bool shouldScheduleLayoutTreeUpdate() const; | 1089 bool shouldScheduleLayoutTreeUpdate() const; |
1090 void scheduleLayoutTreeUpdate(); | 1090 void scheduleLayoutTreeUpdate(); |
1091 | 1091 |
1092 bool needsFullLayoutTreeUpdate() const; | 1092 bool needsFullLayoutTreeUpdate() const; |
1093 | 1093 |
1094 void inheritHtmlAndBodyElementStyles(StyleRecalcChange); | 1094 void inheritHtmlAndBodyElementStyles(StyleRecalcChange); |
1095 | 1095 |
1096 bool dirtyElementsForLayerUpdate(); | 1096 bool dirtyElementsForLayerUpdate(); |
1097 | 1097 |
1098 void updateUseShadowTreesIfNeeded(); | 1098 void updateUseShadowTreesIfNeeded(); |
1099 void evaluateMediaQueryListIfNeeded(); | 1099 void evaluateMediaQueryListIfNeeded(); |
1100 | 1100 |
1101 void updateLayoutTree(StyleRecalcChange); | 1101 void updateLayoutTree(StyleRecalcChange); |
1102 void updateStyle(StyleRecalcChange); | 1102 void updateStyle(StyleRecalcChange); |
1103 void notifyLayoutTreeOfSubtreeChanges(); | 1103 void notifyLayoutTreeOfSubtreeChanges(); |
1104 | 1104 |
1105 void detachParser(); | 1105 void detachParser(); |
1106 | 1106 |
1107 virtual bool isDocument() const override final { return true; } | 1107 bool isDocument() const final { return true; } |
1108 | 1108 |
1109 virtual void childrenChanged(const ChildrenChange&) override; | 1109 void childrenChanged(const ChildrenChange&) override; |
1110 | 1110 |
1111 virtual String nodeName() const override final; | 1111 String nodeName() const final; |
1112 virtual NodeType nodeType() const override final; | 1112 NodeType nodeType() const final; |
1113 virtual bool childTypeAllowed(NodeType) const override final; | 1113 bool childTypeAllowed(NodeType) const final; |
1114 virtual PassRefPtrWillBeRawPtr<Node> cloneNode(bool deep = true) override fi
nal; | 1114 PassRefPtrWillBeRawPtr<Node> cloneNode(bool deep = true) final; |
1115 void cloneDataFromDocument(const Document&); | 1115 void cloneDataFromDocument(const Document&); |
1116 | 1116 |
1117 #if !ENABLE(OILPAN) | 1117 #if !ENABLE(OILPAN) |
1118 virtual void refExecutionContext() override final { ref(); } | 1118 void refExecutionContext() final { ref(); } |
1119 virtual void derefExecutionContext() override final { deref(); } | 1119 void derefExecutionContext() final { deref(); } |
1120 #endif | 1120 #endif |
1121 | 1121 |
1122 virtual const KURL& virtualURL() const override final; // Same as url(), but
needed for ExecutionContext to implement it without a performance loss for dire
ct calls. | 1122 const KURL& virtualURL() const final; // Same as url(), but needed for Execu
tionContext to implement it without a performance loss for direct calls. |
1123 virtual KURL virtualCompleteURL(const String&) const override final; // Same
as completeURL() for the same reason as above. | 1123 KURL virtualCompleteURL(const String&) const final; // Same as completeURL()
for the same reason as above. |
1124 | 1124 |
1125 virtual void reportBlockedScriptExecutionToInspector(const String& directive
Text) override final; | 1125 void reportBlockedScriptExecutionToInspector(const String& directiveText) fi
nal; |
1126 | 1126 |
1127 virtual double timerAlignmentInterval() const override final; | 1127 double timerAlignmentInterval() const final; |
1128 | 1128 |
1129 void updateTitle(const String&); | 1129 void updateTitle(const String&); |
1130 void updateFocusAppearanceTimerFired(Timer<Document>*); | 1130 void updateFocusAppearanceTimerFired(Timer<Document>*); |
1131 void updateBaseURL(); | 1131 void updateBaseURL(); |
1132 | 1132 |
1133 void executeScriptsWaitingForResourcesTimerFired(Timer<Document>*); | 1133 void executeScriptsWaitingForResourcesTimerFired(Timer<Document>*); |
1134 | 1134 |
1135 void loadEventDelayTimerFired(Timer<Document>*); | 1135 void loadEventDelayTimerFired(Timer<Document>*); |
1136 void pluginLoadingTimerFired(Timer<Document>*); | 1136 void pluginLoadingTimerFired(Timer<Document>*); |
1137 | 1137 |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1440 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true); | 1440 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true); |
1441 | 1441 |
1442 } // namespace blink | 1442 } // namespace blink |
1443 | 1443 |
1444 #ifndef NDEBUG | 1444 #ifndef NDEBUG |
1445 // Outside the WebCore namespace for ease of invocation from gdb. | 1445 // Outside the WebCore namespace for ease of invocation from gdb. |
1446 CORE_EXPORT void showLiveDocumentInstances(); | 1446 CORE_EXPORT void showLiveDocumentInstances(); |
1447 #endif | 1447 #endif |
1448 | 1448 |
1449 #endif // Document_h | 1449 #endif // Document_h |
OLD | NEW |