| 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 ImageDocumentClass = 1 << 2, | 205 ImageDocumentClass = 1 << 2, |
| 206 PluginDocumentClass = 1 << 3, | 206 PluginDocumentClass = 1 << 3, |
| 207 MediaDocumentClass = 1 << 4, | 207 MediaDocumentClass = 1 << 4, |
| 208 SVGDocumentClass = 1 << 5, | 208 SVGDocumentClass = 1 << 5, |
| 209 XMLDocumentClass = 1 << 6, | 209 XMLDocumentClass = 1 << 6, |
| 210 }; | 210 }; |
| 211 | 211 |
| 212 using DocumentClassFlags = unsigned char; | 212 using DocumentClassFlags = unsigned char; |
| 213 | 213 |
| 214 class CORE_EXPORT Document : public ContainerNode, public TreeScope, public Secu
rityContext, public ExecutionContext | 214 class CORE_EXPORT Document : public ContainerNode, public TreeScope, public Secu
rityContext, public ExecutionContext |
| 215 , public WillBeHeapSupplementable<Document>, public DocumentLifecycleNotifie
r { | 215 , public HeapSupplementable<Document>, public DocumentLifecycleNotifier { |
| 216 DEFINE_WRAPPERTYPEINFO(); | 216 DEFINE_WRAPPERTYPEINFO(); |
| 217 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Document); | 217 USING_GARBAGE_COLLECTED_MIXIN(Document); |
| 218 public: | 218 public: |
| 219 static PassRefPtrWillBeRawPtr<Document> create(const DocumentInit& initializ
er = DocumentInit()) | 219 static RawPtr<Document> create(const DocumentInit& initializer = DocumentIni
t()) |
| 220 { | 220 { |
| 221 return adoptRefWillBeNoop(new Document(initializer)); | 221 return new Document(initializer); |
| 222 } | 222 } |
| 223 ~Document() override; | 223 ~Document() override; |
| 224 | 224 |
| 225 MediaQueryMatcher& mediaQueryMatcher(); | 225 MediaQueryMatcher& mediaQueryMatcher(); |
| 226 | 226 |
| 227 void mediaQueryAffectingValueChanged(); | 227 void mediaQueryAffectingValueChanged(); |
| 228 | 228 |
| 229 #if !ENABLE(OILPAN) | 229 #if !ENABLE(OILPAN) |
| 230 using ContainerNode::ref; | 230 using ContainerNode::ref; |
| 231 using ContainerNode::deref; | 231 using ContainerNode::deref; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 260 DEFINE_ATTRIBUTE_EVENT_LISTENER(wheel); | 260 DEFINE_ATTRIBUTE_EVENT_LISTENER(wheel); |
| 261 | 261 |
| 262 bool shouldMergeWithLegacyDescription(ViewportDescription::Type); | 262 bool shouldMergeWithLegacyDescription(ViewportDescription::Type); |
| 263 bool shouldOverrideLegacyDescription(ViewportDescription::Type); | 263 bool shouldOverrideLegacyDescription(ViewportDescription::Type); |
| 264 void setViewportDescription(const ViewportDescription&); | 264 void setViewportDescription(const ViewportDescription&); |
| 265 const ViewportDescription& viewportDescription() const { return m_viewportDe
scription; } | 265 const ViewportDescription& viewportDescription() const { return m_viewportDe
scription; } |
| 266 Length viewportDefaultMinWidth() const { return m_viewportDefaultMinWidth; } | 266 Length viewportDefaultMinWidth() const { return m_viewportDefaultMinWidth; } |
| 267 | 267 |
| 268 String outgoingReferrer() const; | 268 String outgoingReferrer() const; |
| 269 | 269 |
| 270 void setDoctype(PassRefPtrWillBeRawPtr<DocumentType>); | 270 void setDoctype(RawPtr<DocumentType>); |
| 271 DocumentType* doctype() const { return m_docType.get(); } | 271 DocumentType* doctype() const { return m_docType.get(); } |
| 272 | 272 |
| 273 DOMImplementation& implementation(); | 273 DOMImplementation& implementation(); |
| 274 | 274 |
| 275 Element* documentElement() const | 275 Element* documentElement() const |
| 276 { | 276 { |
| 277 return m_documentElement.get(); | 277 return m_documentElement.get(); |
| 278 } | 278 } |
| 279 | 279 |
| 280 // Returns whether the Document has an AppCache manifest. | 280 // Returns whether the Document has an AppCache manifest. |
| 281 bool hasAppCacheManifest() const; | 281 bool hasAppCacheManifest() const; |
| 282 | 282 |
| 283 Location* location() const; | 283 Location* location() const; |
| 284 | 284 |
| 285 PassRefPtrWillBeRawPtr<Element> createElement(const AtomicString& name, Exce
ptionState&); | 285 RawPtr<Element> createElement(const AtomicString& name, ExceptionState&); |
| 286 PassRefPtrWillBeRawPtr<DocumentFragment> createDocumentFragment(); | 286 RawPtr<DocumentFragment> createDocumentFragment(); |
| 287 PassRefPtrWillBeRawPtr<Text> createTextNode(const String& data); | 287 RawPtr<Text> createTextNode(const String& data); |
| 288 PassRefPtrWillBeRawPtr<Comment> createComment(const String& data); | 288 RawPtr<Comment> createComment(const String& data); |
| 289 PassRefPtrWillBeRawPtr<CDATASection> createCDATASection(const String& data,
ExceptionState&); | 289 RawPtr<CDATASection> createCDATASection(const String& data, ExceptionState&)
; |
| 290 PassRefPtrWillBeRawPtr<ProcessingInstruction> createProcessingInstruction(co
nst String& target, const String& data, ExceptionState&); | 290 RawPtr<ProcessingInstruction> createProcessingInstruction(const String& targ
et, const String& data, ExceptionState&); |
| 291 PassRefPtrWillBeRawPtr<Attr> createAttribute(const AtomicString& name, Excep
tionState&); | 291 RawPtr<Attr> createAttribute(const AtomicString& name, ExceptionState&); |
| 292 PassRefPtrWillBeRawPtr<Attr> createAttributeNS(const AtomicString& namespace
URI, const AtomicString& qualifiedName, ExceptionState&, bool shouldIgnoreNamesp
aceChecks = false); | 292 RawPtr<Attr> createAttributeNS(const AtomicString& namespaceURI, const Atomi
cString& qualifiedName, ExceptionState&, bool shouldIgnoreNamespaceChecks = fals
e); |
| 293 PassRefPtrWillBeRawPtr<Node> importNode(Node* importedNode, bool deep, Excep
tionState&); | 293 RawPtr<Node> importNode(Node* importedNode, bool deep, ExceptionState&); |
| 294 PassRefPtrWillBeRawPtr<Element> createElementNS(const AtomicString& namespac
eURI, const AtomicString& qualifiedName, ExceptionState&); | 294 RawPtr<Element> createElementNS(const AtomicString& namespaceURI, const Atom
icString& qualifiedName, ExceptionState&); |
| 295 PassRefPtrWillBeRawPtr<Element> createElement(const QualifiedName&, bool cre
atedByParser); | 295 RawPtr<Element> createElement(const QualifiedName&, bool createdByParser); |
| 296 | 296 |
| 297 Element* elementFromPoint(int x, int y) const; | 297 Element* elementFromPoint(int x, int y) const; |
| 298 WillBeHeapVector<RawPtrWillBeMember<Element>> elementsFromPoint(int x, int y
) const; | 298 HeapVector<Member<Element>> elementsFromPoint(int x, int y) const; |
| 299 PassRefPtrWillBeRawPtr<Range> caretRangeFromPoint(int x, int y); | 299 RawPtr<Range> caretRangeFromPoint(int x, int y); |
| 300 Element* scrollingElement(); | 300 Element* scrollingElement(); |
| 301 | 301 |
| 302 String readyState() const; | 302 String readyState() const; |
| 303 | 303 |
| 304 AtomicString characterSet() const { return Document::encodingName(); } | 304 AtomicString characterSet() const { return Document::encodingName(); } |
| 305 | 305 |
| 306 AtomicString encodingName() const; | 306 AtomicString encodingName() const; |
| 307 | 307 |
| 308 void setContent(const String&); | 308 void setContent(const String&); |
| 309 | 309 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 327 void setHasXMLDeclaration(bool hasXMLDeclaration) { m_hasXMLDeclaration = ha
sXMLDeclaration ? 1 : 0; } | 327 void setHasXMLDeclaration(bool hasXMLDeclaration) { m_hasXMLDeclaration = ha
sXMLDeclaration ? 1 : 0; } |
| 328 | 328 |
| 329 String origin() const { return getSecurityOrigin()->toString(); } | 329 String origin() const { return getSecurityOrigin()->toString(); } |
| 330 String suborigin() const { return getSecurityOrigin()->hasSuborigin() ? getS
ecurityOrigin()->suborigin()->name() : String(); } | 330 String suborigin() const { return getSecurityOrigin()->hasSuborigin() ? getS
ecurityOrigin()->suborigin()->name() : String(); } |
| 331 | 331 |
| 332 String visibilityState() const; | 332 String visibilityState() const; |
| 333 PageVisibilityState pageVisibilityState() const; | 333 PageVisibilityState pageVisibilityState() const; |
| 334 bool hidden() const; | 334 bool hidden() const; |
| 335 void didChangeVisibilityState(); | 335 void didChangeVisibilityState(); |
| 336 | 336 |
| 337 PassRefPtrWillBeRawPtr<Node> adoptNode(PassRefPtrWillBeRawPtr<Node> source,
ExceptionState&); | 337 RawPtr<Node> adoptNode(RawPtr<Node> source, ExceptionState&); |
| 338 | 338 |
| 339 PassRefPtrWillBeRawPtr<HTMLCollection> images(); | 339 RawPtr<HTMLCollection> images(); |
| 340 PassRefPtrWillBeRawPtr<HTMLCollection> embeds(); | 340 RawPtr<HTMLCollection> embeds(); |
| 341 PassRefPtrWillBeRawPtr<HTMLCollection> applets(); | 341 RawPtr<HTMLCollection> applets(); |
| 342 PassRefPtrWillBeRawPtr<HTMLCollection> links(); | 342 RawPtr<HTMLCollection> links(); |
| 343 PassRefPtrWillBeRawPtr<HTMLCollection> forms(); | 343 RawPtr<HTMLCollection> forms(); |
| 344 PassRefPtrWillBeRawPtr<HTMLCollection> anchors(); | 344 RawPtr<HTMLCollection> anchors(); |
| 345 PassRefPtrWillBeRawPtr<HTMLCollection> scripts(); | 345 RawPtr<HTMLCollection> scripts(); |
| 346 PassRefPtrWillBeRawPtr<HTMLAllCollection> allForBinding(); | 346 RawPtr<HTMLAllCollection> allForBinding(); |
| 347 PassRefPtrWillBeRawPtr<HTMLAllCollection> all(); | 347 RawPtr<HTMLAllCollection> all(); |
| 348 | 348 |
| 349 PassRefPtrWillBeRawPtr<HTMLCollection> windowNamedItems(const AtomicString&
name); | 349 RawPtr<HTMLCollection> windowNamedItems(const AtomicString& name); |
| 350 PassRefPtrWillBeRawPtr<DocumentNameCollection> documentNamedItems(const Atom
icString& name); | 350 RawPtr<DocumentNameCollection> documentNamedItems(const AtomicString& name); |
| 351 | 351 |
| 352 bool isHTMLDocument() const { return m_documentClasses & HTMLDocumentClass;
} | 352 bool isHTMLDocument() const { return m_documentClasses & HTMLDocumentClass;
} |
| 353 bool isXHTMLDocument() const { return m_documentClasses & XHTMLDocumentClass
; } | 353 bool isXHTMLDocument() const { return m_documentClasses & XHTMLDocumentClass
; } |
| 354 bool isXMLDocument() const { return m_documentClasses & XMLDocumentClass; } | 354 bool isXMLDocument() const { return m_documentClasses & XMLDocumentClass; } |
| 355 bool isImageDocument() const { return m_documentClasses & ImageDocumentClass
; } | 355 bool isImageDocument() const { return m_documentClasses & ImageDocumentClass
; } |
| 356 bool isSVGDocument() const { return m_documentClasses & SVGDocumentClass; } | 356 bool isSVGDocument() const { return m_documentClasses & SVGDocumentClass; } |
| 357 bool isPluginDocument() const { return m_documentClasses & PluginDocumentCla
ss; } | 357 bool isPluginDocument() const { return m_documentClasses & PluginDocumentCla
ss; } |
| 358 bool isMediaDocument() const { return m_documentClasses & MediaDocumentClass
; } | 358 bool isMediaDocument() const { return m_documentClasses & MediaDocumentClass
; } |
| 359 | 359 |
| 360 bool hasSVGRootNode() const; | 360 bool hasSVGRootNode() const; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 void setStateForNewFormElements(const Vector<String>&); | 403 void setStateForNewFormElements(const Vector<String>&); |
| 404 | 404 |
| 405 FrameView* view() const; // can be null | 405 FrameView* view() const; // can be null |
| 406 LocalFrame* frame() const { return m_frame; } // can be null | 406 LocalFrame* frame() const { return m_frame; } // can be null |
| 407 FrameHost* frameHost() const; // can be null | 407 FrameHost* frameHost() const; // can be null |
| 408 Page* page() const; // can be null | 408 Page* page() const; // can be null |
| 409 Settings* settings() const; // can be null | 409 Settings* settings() const; // can be null |
| 410 | 410 |
| 411 float devicePixelRatio() const; | 411 float devicePixelRatio() const; |
| 412 | 412 |
| 413 PassRefPtrWillBeRawPtr<Range> createRange(); | 413 RawPtr<Range> createRange(); |
| 414 | 414 |
| 415 PassRefPtrWillBeRawPtr<NodeIterator> createNodeIterator(Node* root, unsigned
whatToShow, PassRefPtrWillBeRawPtr<NodeFilter>); | 415 RawPtr<NodeIterator> createNodeIterator(Node* root, unsigned whatToShow, Raw
Ptr<NodeFilter>); |
| 416 PassRefPtrWillBeRawPtr<TreeWalker> createTreeWalker(Node* root, unsigned wha
tToShow, PassRefPtrWillBeRawPtr<NodeFilter>); | 416 RawPtr<TreeWalker> createTreeWalker(Node* root, unsigned whatToShow, RawPtr<
NodeFilter>); |
| 417 | 417 |
| 418 // Special support for editing | 418 // Special support for editing |
| 419 PassRefPtrWillBeRawPtr<Text> createEditingTextNode(const String&); | 419 RawPtr<Text> createEditingTextNode(const String&); |
| 420 | 420 |
| 421 void setupFontBuilder(ComputedStyle& documentStyle); | 421 void setupFontBuilder(ComputedStyle& documentStyle); |
| 422 | 422 |
| 423 bool needsLayoutTreeUpdate() const; | 423 bool needsLayoutTreeUpdate() const; |
| 424 bool needsLayoutTreeUpdateForNode(const Node&) const; | 424 bool needsLayoutTreeUpdateForNode(const Node&) const; |
| 425 // Update ComputedStyles and attach LayoutObjects if necessary, but don't | 425 // Update ComputedStyles and attach LayoutObjects if necessary, but don't |
| 426 // lay out. | 426 // lay out. |
| 427 void updateLayoutTree(); | 427 void updateLayoutTree(); |
| 428 // Same as updateLayoutTree() except ignoring pending stylesheets. | 428 // Same as updateLayoutTree() except ignoring pending stylesheets. |
| 429 void updateLayoutTreeIgnorePendingStylesheets(); | 429 void updateLayoutTreeIgnorePendingStylesheets(); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 // to get visually ordered hebrew and arabic pages right | 466 // to get visually ordered hebrew and arabic pages right |
| 467 bool visuallyOrdered() const { return m_visuallyOrdered; } | 467 bool visuallyOrdered() const { return m_visuallyOrdered; } |
| 468 | 468 |
| 469 DocumentLoader* loader() const; | 469 DocumentLoader* loader() const; |
| 470 | 470 |
| 471 // This is the DOM API document.open(). enteredDocument is the responsible | 471 // This is the DOM API document.open(). enteredDocument is the responsible |
| 472 // document of the entry settings object. | 472 // document of the entry settings object. |
| 473 void open(Document* enteredDocument, ExceptionState&); | 473 void open(Document* enteredDocument, ExceptionState&); |
| 474 // This is used internally and does not handle exceptions. | 474 // This is used internally and does not handle exceptions. |
| 475 void open(); | 475 void open(); |
| 476 PassRefPtrWillBeRawPtr<DocumentParser> implicitOpen(ParserSynchronizationPol
icy); | 476 RawPtr<DocumentParser> implicitOpen(ParserSynchronizationPolicy); |
| 477 | 477 |
| 478 // This is the DOM API document.close() | 478 // This is the DOM API document.close() |
| 479 void close(ExceptionState&); | 479 void close(ExceptionState&); |
| 480 // This is used internally and does not handle exceptions. | 480 // This is used internally and does not handle exceptions. |
| 481 void close(); | 481 void close(); |
| 482 // implicitClose() actually does the work of closing the input stream. | 482 // implicitClose() actually does the work of closing the input stream. |
| 483 void implicitClose(); | 483 void implicitClose(); |
| 484 | 484 |
| 485 bool dispatchBeforeUnloadEvent(ChromeClient&, bool isReload, bool& didAllowN
avigation); | 485 bool dispatchBeforeUnloadEvent(ChromeClient&, bool isReload, bool& didAllowN
avigation); |
| 486 void dispatchUnloadEvents(); | 486 void dispatchUnloadEvents(); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 528 // Determines which base URL should be used given specified override. | 528 // Determines which base URL should be used given specified override. |
| 529 // If override is empty or is about:blank url and parent document exists | 529 // If override is empty or is about:blank url and parent document exists |
| 530 // base URL of parent will be returned, passed base URL override otherwise. | 530 // base URL of parent will be returned, passed base URL override otherwise. |
| 531 const KURL& baseURLForOverride(const KURL& baseURLOverride) const; | 531 const KURL& baseURLForOverride(const KURL& baseURLOverride) const; |
| 532 | 532 |
| 533 String userAgent() const final; | 533 String userAgent() const final; |
| 534 void disableEval(const String& errorMessage) final; | 534 void disableEval(const String& errorMessage) final; |
| 535 | 535 |
| 536 CSSStyleSheet& elementSheet(); | 536 CSSStyleSheet& elementSheet(); |
| 537 | 537 |
| 538 virtual PassRefPtrWillBeRawPtr<DocumentParser> createParser(); | 538 virtual RawPtr<DocumentParser> createParser(); |
| 539 DocumentParser* parser() const { return m_parser.get(); } | 539 DocumentParser* parser() const { return m_parser.get(); } |
| 540 ScriptableDocumentParser* scriptableDocumentParser() const; | 540 ScriptableDocumentParser* scriptableDocumentParser() const; |
| 541 | 541 |
| 542 bool printing() const { return m_printing; } | 542 bool printing() const { return m_printing; } |
| 543 void setPrinting(bool isPrinting) { m_printing = isPrinting; } | 543 void setPrinting(bool isPrinting) { m_printing = isPrinting; } |
| 544 bool wasPrinting() const { return m_wasPrinting; } | 544 bool wasPrinting() const { return m_wasPrinting; } |
| 545 | 545 |
| 546 bool paginatedForScreen() const { return m_paginatedForScreen; } | 546 bool paginatedForScreen() const { return m_paginatedForScreen; } |
| 547 void setPaginatedForScreen(bool p) { m_paginatedForScreen = p; } | 547 void setPaginatedForScreen(bool p) { m_paginatedForScreen = p; } |
| 548 | 548 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 586 MouseEventWithHitTestResults prepareMouseEvent(const HitTestRequest&, const
LayoutPoint&, const PlatformMouseEvent&); | 586 MouseEventWithHitTestResults prepareMouseEvent(const HitTestRequest&, const
LayoutPoint&, const PlatformMouseEvent&); |
| 587 | 587 |
| 588 /* Newly proposed CSS3 mechanism for selecting alternate | 588 /* Newly proposed CSS3 mechanism for selecting alternate |
| 589 stylesheets using the DOM. May be subject to change as | 589 stylesheets using the DOM. May be subject to change as |
| 590 spec matures. - dwh | 590 spec matures. - dwh |
| 591 */ | 591 */ |
| 592 String preferredStylesheetSet() const; | 592 String preferredStylesheetSet() const; |
| 593 String selectedStylesheetSet() const; | 593 String selectedStylesheetSet() const; |
| 594 void setSelectedStylesheetSet(const String&); | 594 void setSelectedStylesheetSet(const String&); |
| 595 | 595 |
| 596 bool setFocusedElement(PassRefPtrWillBeRawPtr<Element>, const FocusParams&); | 596 bool setFocusedElement(RawPtr<Element>, const FocusParams&); |
| 597 void clearFocusedElement(); | 597 void clearFocusedElement(); |
| 598 Element* focusedElement() const { return m_focusedElement.get(); } | 598 Element* focusedElement() const { return m_focusedElement.get(); } |
| 599 UserActionElementSet& userActionElements() { return m_userActionElements; } | 599 UserActionElementSet& userActionElements() { return m_userActionElements; } |
| 600 const UserActionElementSet& userActionElements() const { return m_userAction
Elements; } | 600 const UserActionElementSet& userActionElements() const { return m_userAction
Elements; } |
| 601 void setNeedsFocusedElementCheck(); | 601 void setNeedsFocusedElementCheck(); |
| 602 void setAutofocusElement(Element*); | 602 void setAutofocusElement(Element*); |
| 603 Element* autofocusElement() const { return m_autofocusElement.get(); } | 603 Element* autofocusElement() const { return m_autofocusElement.get(); } |
| 604 void setSequentialFocusNavigationStartingPoint(Node*); | 604 void setSequentialFocusNavigationStartingPoint(Node*); |
| 605 Element* sequentialFocusNavigationStartingPoint(WebFocusType) const; | 605 Element* sequentialFocusNavigationStartingPoint(WebFocusType) const; |
| 606 | 606 |
| 607 void setActiveHoverElement(PassRefPtrWillBeRawPtr<Element>); | 607 void setActiveHoverElement(RawPtr<Element>); |
| 608 Element* activeHoverElement() const { return m_activeHoverElement.get(); } | 608 Element* activeHoverElement() const { return m_activeHoverElement.get(); } |
| 609 | 609 |
| 610 Node* hoverNode() const { return m_hoverNode.get(); } | 610 Node* hoverNode() const { return m_hoverNode.get(); } |
| 611 | 611 |
| 612 void removeFocusedElementOfSubtree(Node*, bool amongChildrenOnly = false); | 612 void removeFocusedElementOfSubtree(Node*, bool amongChildrenOnly = false); |
| 613 void hoveredNodeDetached(Element&); | 613 void hoveredNodeDetached(Element&); |
| 614 void activeChainNodeDetached(Element&); | 614 void activeChainNodeDetached(Element&); |
| 615 | 615 |
| 616 void updateHoverActiveState(const HitTestRequest&, Element*); | 616 void updateHoverActiveState(const HitTestRequest&, Element*); |
| 617 | 617 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 646 | 646 |
| 647 void didInsertText(Node*, unsigned offset, unsigned length); | 647 void didInsertText(Node*, unsigned offset, unsigned length); |
| 648 void didRemoveText(Node*, unsigned offset, unsigned length); | 648 void didRemoveText(Node*, unsigned offset, unsigned length); |
| 649 void didMergeTextNodes(Text& oldNode, unsigned offset); | 649 void didMergeTextNodes(Text& oldNode, unsigned offset); |
| 650 void didSplitTextNode(Text& oldNode); | 650 void didSplitTextNode(Text& oldNode); |
| 651 | 651 |
| 652 void clearDOMWindow() { m_domWindow = nullptr; } | 652 void clearDOMWindow() { m_domWindow = nullptr; } |
| 653 LocalDOMWindow* domWindow() const { return m_domWindow; } | 653 LocalDOMWindow* domWindow() const { return m_domWindow; } |
| 654 | 654 |
| 655 // Helper functions for forwarding LocalDOMWindow event related tasks to the
LocalDOMWindow if it exists. | 655 // Helper functions for forwarding LocalDOMWindow event related tasks to the
LocalDOMWindow if it exists. |
| 656 void setWindowAttributeEventListener(const AtomicString& eventType, PassRefP
trWillBeRawPtr<EventListener>); | 656 void setWindowAttributeEventListener(const AtomicString& eventType, RawPtr<E
ventListener>); |
| 657 EventListener* getWindowAttributeEventListener(const AtomicString& eventType
); | 657 EventListener* getWindowAttributeEventListener(const AtomicString& eventType
); |
| 658 | 658 |
| 659 static void registerEventFactory(PassOwnPtr<EventFactoryBase>); | 659 static void registerEventFactory(PassOwnPtr<EventFactoryBase>); |
| 660 static PassRefPtrWillBeRawPtr<Event> createEvent(ExecutionContext*, const St
ring& eventType, ExceptionState&); | 660 static RawPtr<Event> createEvent(ExecutionContext*, const String& eventType,
ExceptionState&); |
| 661 | 661 |
| 662 // keep track of what types of event listeners are registered, so we don't | 662 // keep track of what types of event listeners are registered, so we don't |
| 663 // dispatch events unnecessarily | 663 // dispatch events unnecessarily |
| 664 enum ListenerType { | 664 enum ListenerType { |
| 665 DOMSUBTREEMODIFIED_LISTENER = 1, | 665 DOMSUBTREEMODIFIED_LISTENER = 1, |
| 666 DOMNODEINSERTED_LISTENER = 1 << 1, | 666 DOMNODEINSERTED_LISTENER = 1 << 1, |
| 667 DOMNODEREMOVED_LISTENER = 1 << 2, | 667 DOMNODEREMOVED_LISTENER = 1 << 2, |
| 668 DOMNODEREMOVEDFROMDOCUMENT_LISTENER = 1 << 3, | 668 DOMNODEREMOVEDFROMDOCUMENT_LISTENER = 1 << 3, |
| 669 DOMNODEINSERTEDINTODOCUMENT_LISTENER = 1 << 4, | 669 DOMNODEINSERTEDINTODOCUMENT_LISTENER = 1 << 4, |
| 670 DOMCHARACTERDATAMODIFIED_LISTENER = 1 << 5, | 670 DOMCHARACTERDATAMODIFIED_LISTENER = 1 << 5, |
| 671 ANIMATIONEND_LISTENER = 1 << 6, | 671 ANIMATIONEND_LISTENER = 1 << 6, |
| 672 ANIMATIONSTART_LISTENER = 1 << 7, | 672 ANIMATIONSTART_LISTENER = 1 << 7, |
| 673 ANIMATIONITERATION_LISTENER = 1 << 8, | 673 ANIMATIONITERATION_LISTENER = 1 << 8, |
| 674 TRANSITIONEND_LISTENER = 1 << 9, | 674 TRANSITIONEND_LISTENER = 1 << 9, |
| 675 SCROLL_LISTENER = 1 << 10 | 675 SCROLL_LISTENER = 1 << 10 |
| 676 // 5 bits remaining | 676 // 5 bits remaining |
| 677 }; | 677 }; |
| 678 | 678 |
| 679 bool hasListenerType(ListenerType listenerType) const { return (m_listenerTy
pes & listenerType); } | 679 bool hasListenerType(ListenerType listenerType) const { return (m_listenerTy
pes & listenerType); } |
| 680 void addListenerTypeIfNeeded(const AtomicString& eventType); | 680 void addListenerTypeIfNeeded(const AtomicString& eventType); |
| 681 | 681 |
| 682 bool hasMutationObserversOfType(MutationObserver::MutationType type) const | 682 bool hasMutationObserversOfType(MutationObserver::MutationType type) const |
| 683 { | 683 { |
| 684 return m_mutationObserverTypes & type; | 684 return m_mutationObserverTypes & type; |
| 685 } | 685 } |
| 686 bool hasMutationObservers() const { return m_mutationObserverTypes; } | 686 bool hasMutationObservers() const { return m_mutationObserverTypes; } |
| 687 void addMutationObserverTypes(MutationObserverOptions types) { m_mutationObs
erverTypes |= types; } | 687 void addMutationObserverTypes(MutationObserverOptions types) { m_mutationObs
erverTypes |= types; } |
| 688 | 688 |
| 689 WeakPtrWillBeRawPtr<Document> createWeakPtr(); | 689 RawPtr<Document> createWeakPtr(); |
| 690 | 690 |
| 691 IntersectionObserverController* intersectionObserverController(); | 691 IntersectionObserverController* intersectionObserverController(); |
| 692 IntersectionObserverController& ensureIntersectionObserverController(); | 692 IntersectionObserverController& ensureIntersectionObserverController(); |
| 693 NodeIntersectionObserverData& ensureIntersectionObserverData(); | 693 NodeIntersectionObserverData& ensureIntersectionObserverData(); |
| 694 | 694 |
| 695 void updateViewportDescription(); | 695 void updateViewportDescription(); |
| 696 void processReferrerPolicy(const String& policy); | 696 void processReferrerPolicy(const String& policy); |
| 697 | 697 |
| 698 // Returns the owning element in the parent document. | 698 // Returns the owning element in the parent document. |
| 699 // Returns nullptr if this is the top level document. | 699 // Returns nullptr if this is the top level document. |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 753 static bool hasValidNamespaceForAttributes(const QualifiedName&); | 753 static bool hasValidNamespaceForAttributes(const QualifiedName&); |
| 754 | 754 |
| 755 // "body element" as defined by HTML5 (https://html.spec.whatwg.org/multipag
e/dom.html#the-body-element-2). | 755 // "body element" as defined by HTML5 (https://html.spec.whatwg.org/multipag
e/dom.html#the-body-element-2). |
| 756 // That is, the first body or frameset child of the document element. | 756 // That is, the first body or frameset child of the document element. |
| 757 HTMLElement* body() const; | 757 HTMLElement* body() const; |
| 758 | 758 |
| 759 // "HTML body element" as defined by CSSOM View spec (http://dev.w3.org/cssw
g/cssom-view/#the-html-body-element). | 759 // "HTML body element" as defined by CSSOM View spec (http://dev.w3.org/cssw
g/cssom-view/#the-html-body-element). |
| 760 // That is, the first body child of the document element. | 760 // That is, the first body child of the document element. |
| 761 HTMLBodyElement* firstBodyElement() const; | 761 HTMLBodyElement* firstBodyElement() const; |
| 762 | 762 |
| 763 void setBody(PassRefPtrWillBeRawPtr<HTMLElement>, ExceptionState&); | 763 void setBody(RawPtr<HTMLElement>, ExceptionState&); |
| 764 | 764 |
| 765 HTMLHeadElement* head() const; | 765 HTMLHeadElement* head() const; |
| 766 | 766 |
| 767 // Decide which element is to define the viewport's overflow policy. If |roo
tStyle| is set, use | 767 // Decide which element is to define the viewport's overflow policy. If |roo
tStyle| is set, use |
| 768 // that as the style for the root element, rather than obtaining it on our o
wn. The reason for | 768 // that as the style for the root element, rather than obtaining it on our o
wn. The reason for |
| 769 // this is that style may not have been associated with the elements yet - i
n which case it may | 769 // this is that style may not have been associated with the elements yet - i
n which case it may |
| 770 // have been calculated on the fly (without associating it with the actual e
lement) somewhere. | 770 // have been calculated on the fly (without associating it with the actual e
lement) somewhere. |
| 771 Element* viewportDefiningElement(const ComputedStyle* rootStyle = nullptr) c
onst; | 771 Element* viewportDefiningElement(const ComputedStyle* rootStyle = nullptr) c
onst; |
| 772 | 772 |
| 773 DocumentMarkerController& markers() const { return *m_markers; } | 773 DocumentMarkerController& markers() const { return *m_markers; } |
| 774 | 774 |
| 775 bool execCommand(const String& command, bool showUI, const String& value, Ex
ceptionState&); | 775 bool execCommand(const String& command, bool showUI, const String& value, Ex
ceptionState&); |
| 776 bool isRunningExecCommand() const { return m_isRunningExecCommand; } | 776 bool isRunningExecCommand() const { return m_isRunningExecCommand; } |
| 777 bool queryCommandEnabled(const String& command, ExceptionState&); | 777 bool queryCommandEnabled(const String& command, ExceptionState&); |
| 778 bool queryCommandIndeterm(const String& command, ExceptionState&); | 778 bool queryCommandIndeterm(const String& command, ExceptionState&); |
| 779 bool queryCommandState(const String& command, ExceptionState&); | 779 bool queryCommandState(const String& command, ExceptionState&); |
| 780 bool queryCommandSupported(const String& command, ExceptionState&); | 780 bool queryCommandSupported(const String& command, ExceptionState&); |
| 781 String queryCommandValue(const String& command, ExceptionState&); | 781 String queryCommandValue(const String& command, ExceptionState&); |
| 782 | 782 |
| 783 KURL openSearchDescriptionURL(); | 783 KURL openSearchDescriptionURL(); |
| 784 | 784 |
| 785 // designMode support | 785 // designMode support |
| 786 bool inDesignMode() const { return m_designMode; } | 786 bool inDesignMode() const { return m_designMode; } |
| 787 String designMode() const; | 787 String designMode() const; |
| 788 void setDesignMode(const String&); | 788 void setDesignMode(const String&); |
| 789 | 789 |
| 790 Document* parentDocument() const; | 790 Document* parentDocument() const; |
| 791 Document& topDocument() const; | 791 Document& topDocument() const; |
| 792 WeakPtrWillBeRawPtr<Document> contextDocument(); | 792 RawPtr<Document> contextDocument(); |
| 793 | 793 |
| 794 ScriptRunner* scriptRunner() { return m_scriptRunner.get(); } | 794 ScriptRunner* scriptRunner() { return m_scriptRunner.get(); } |
| 795 | 795 |
| 796 HTMLScriptElement* currentScript() const { return !m_currentScriptStack.isEm
pty() ? m_currentScriptStack.last().get() : nullptr; } | 796 HTMLScriptElement* currentScript() const { return !m_currentScriptStack.isEm
pty() ? m_currentScriptStack.last().get() : nullptr; } |
| 797 void pushCurrentScript(PassRefPtrWillBeRawPtr<HTMLScriptElement>); | 797 void pushCurrentScript(RawPtr<HTMLScriptElement>); |
| 798 void popCurrentScript(); | 798 void popCurrentScript(); |
| 799 | 799 |
| 800 void setTransformSource(PassOwnPtr<TransformSource>); | 800 void setTransformSource(PassOwnPtr<TransformSource>); |
| 801 TransformSource* transformSource() const { return m_transformSource.get(); } | 801 TransformSource* transformSource() const { return m_transformSource.get(); } |
| 802 | 802 |
| 803 void incDOMTreeVersion() { ASSERT(m_lifecycle.stateAllowsTreeMutations()); m
_domTreeVersion = ++s_globalTreeVersion; } | 803 void incDOMTreeVersion() { ASSERT(m_lifecycle.stateAllowsTreeMutations()); m
_domTreeVersion = ++s_globalTreeVersion; } |
| 804 uint64_t domTreeVersion() const { return m_domTreeVersion; } | 804 uint64_t domTreeVersion() const { return m_domTreeVersion; } |
| 805 | 805 |
| 806 uint64_t styleVersion() const { return m_styleVersion; } | 806 uint64_t styleVersion() const { return m_styleVersion; } |
| 807 | 807 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 853 bool hasAnnotatedRegions () const { return m_hasAnnotatedRegions; } | 853 bool hasAnnotatedRegions () const { return m_hasAnnotatedRegions; } |
| 854 void setHasAnnotatedRegions(bool f) { m_hasAnnotatedRegions = f; } | 854 void setHasAnnotatedRegions(bool f) { m_hasAnnotatedRegions = f; } |
| 855 const Vector<AnnotatedRegionValue>& annotatedRegions() const; | 855 const Vector<AnnotatedRegionValue>& annotatedRegions() const; |
| 856 void setAnnotatedRegions(const Vector<AnnotatedRegionValue>&); | 856 void setAnnotatedRegions(const Vector<AnnotatedRegionValue>&); |
| 857 | 857 |
| 858 void removeAllEventListeners() final; | 858 void removeAllEventListeners() final; |
| 859 | 859 |
| 860 const SVGDocumentExtensions* svgExtensions(); | 860 const SVGDocumentExtensions* svgExtensions(); |
| 861 SVGDocumentExtensions& accessSVGExtensions(); | 861 SVGDocumentExtensions& accessSVGExtensions(); |
| 862 | 862 |
| 863 void initContentSecurityPolicy(PassRefPtrWillBeRawPtr<ContentSecurityPolicy>
= nullptr); | 863 void initContentSecurityPolicy(RawPtr<ContentSecurityPolicy> = nullptr); |
| 864 | 864 |
| 865 bool isSecureTransitionTo(const KURL&) const; | 865 bool isSecureTransitionTo(const KURL&) const; |
| 866 | 866 |
| 867 bool allowInlineEventHandlers(Node*, EventListener*, const String& contextUR
L, const WTF::OrdinalNumber& contextLine); | 867 bool allowInlineEventHandlers(Node*, EventListener*, const String& contextUR
L, const WTF::OrdinalNumber& contextLine); |
| 868 bool allowExecutingScripts(Node*); | 868 bool allowExecutingScripts(Node*); |
| 869 | 869 |
| 870 void enforceSandboxFlags(SandboxFlags mask) override; | 870 void enforceSandboxFlags(SandboxFlags mask) override; |
| 871 | 871 |
| 872 void statePopped(PassRefPtr<SerializedScriptValue>); | 872 void statePopped(PassRefPtr<SerializedScriptValue>); |
| 873 | 873 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 893 bool containsPlugins() const { return m_containsPlugins; } | 893 bool containsPlugins() const { return m_containsPlugins; } |
| 894 | 894 |
| 895 bool isContextThread() const final; | 895 bool isContextThread() const final; |
| 896 bool isJSExecutionForbidden() const final { return false; } | 896 bool isJSExecutionForbidden() const final { return false; } |
| 897 | 897 |
| 898 bool containsValidityStyleRules() const { return m_containsValidityStyleRule
s; } | 898 bool containsValidityStyleRules() const { return m_containsValidityStyleRule
s; } |
| 899 void setContainsValidityStyleRules() { m_containsValidityStyleRules = true;
} | 899 void setContainsValidityStyleRules() { m_containsValidityStyleRules = true;
} |
| 900 | 900 |
| 901 void enqueueResizeEvent(); | 901 void enqueueResizeEvent(); |
| 902 void enqueueScrollEventForNode(Node*); | 902 void enqueueScrollEventForNode(Node*); |
| 903 void enqueueAnimationFrameEvent(PassRefPtrWillBeRawPtr<Event>); | 903 void enqueueAnimationFrameEvent(RawPtr<Event>); |
| 904 // Only one event for a target/event type combination will be dispatched per
frame. | 904 // Only one event for a target/event type combination will be dispatched per
frame. |
| 905 void enqueueUniqueAnimationFrameEvent(PassRefPtrWillBeRawPtr<Event>); | 905 void enqueueUniqueAnimationFrameEvent(RawPtr<Event>); |
| 906 void enqueueMediaQueryChangeListeners(WillBeHeapVector<RefPtrWillBeMember<Me
diaQueryListListener>>&); | 906 void enqueueMediaQueryChangeListeners(HeapVector<Member<MediaQueryListListen
er>>&); |
| 907 | 907 |
| 908 void dispatchEventsForPrinting(); | 908 void dispatchEventsForPrinting(); |
| 909 | 909 |
| 910 bool hasFullscreenSupplement() const { return m_hasFullscreenSupplement; } | 910 bool hasFullscreenSupplement() const { return m_hasFullscreenSupplement; } |
| 911 void setHasFullscreenSupplement() { m_hasFullscreenSupplement = true; } | 911 void setHasFullscreenSupplement() { m_hasFullscreenSupplement = true; } |
| 912 | 912 |
| 913 void exitPointerLock(); | 913 void exitPointerLock(); |
| 914 Element* pointerLockElement() const; | 914 Element* pointerLockElement() const; |
| 915 | 915 |
| 916 // Used to allow element that loads data without going through a FrameLoader
to delay the 'load' event. | 916 // Used to allow element that loads data without going through a FrameLoader
to delay the 'load' event. |
| 917 void incrementLoadEventDelayCount() { ++m_loadEventDelayCount; } | 917 void incrementLoadEventDelayCount() { ++m_loadEventDelayCount; } |
| 918 void decrementLoadEventDelayCount(); | 918 void decrementLoadEventDelayCount(); |
| 919 void checkLoadEventSoon(); | 919 void checkLoadEventSoon(); |
| 920 bool isDelayingLoadEvent(); | 920 bool isDelayingLoadEvent(); |
| 921 void loadPluginsSoon(); | 921 void loadPluginsSoon(); |
| 922 | 922 |
| 923 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; | 923 RawPtr<Touch> createTouch(DOMWindow*, EventTarget*, int identifier, double p
ageX, double pageY, double screenX, double screenY, double radiusX, double radiu
sY, float rotationAngle, float force) const; |
| 924 PassRefPtrWillBeRawPtr<TouchList> createTouchList(WillBeHeapVector<RefPtrWil
lBeMember<Touch>>&) const; | 924 RawPtr<TouchList> createTouchList(HeapVector<Member<Touch>>&) const; |
| 925 | 925 |
| 926 const DocumentTiming& timing() const { return m_documentTiming; } | 926 const DocumentTiming& timing() const { return m_documentTiming; } |
| 927 | 927 |
| 928 int requestAnimationFrame(FrameRequestCallback*); | 928 int requestAnimationFrame(FrameRequestCallback*); |
| 929 void cancelAnimationFrame(int id); | 929 void cancelAnimationFrame(int id); |
| 930 void serviceScriptedAnimations(double monotonicAnimationStartTime); | 930 void serviceScriptedAnimations(double monotonicAnimationStartTime); |
| 931 | 931 |
| 932 int requestIdleCallback(IdleRequestCallback*, const IdleRequestOptions&); | 932 int requestIdleCallback(IdleRequestCallback*, const IdleRequestOptions&); |
| 933 void cancelIdleCallback(int id); | 933 void cancelIdleCallback(int id); |
| 934 | 934 |
| 935 EventTarget* errorEventTarget() final; | 935 EventTarget* errorEventTarget() final; |
| 936 void logExceptionToConsole(const String& errorMessage, int scriptId, const S
tring& sourceURL, int lineNumber, int columnNumber, PassRefPtr<ScriptCallStack>)
final; | 936 void logExceptionToConsole(const String& errorMessage, int scriptId, const S
tring& sourceURL, int lineNumber, int columnNumber, PassRefPtr<ScriptCallStack>)
final; |
| 937 | 937 |
| 938 void initDNSPrefetch(); | 938 void initDNSPrefetch(); |
| 939 | 939 |
| 940 bool isInDocumentWrite() { return m_writeRecursionDepth > 0; } | 940 bool isInDocumentWrite() { return m_writeRecursionDepth > 0; } |
| 941 | 941 |
| 942 TextAutosizer* textAutosizer(); | 942 TextAutosizer* textAutosizer(); |
| 943 | 943 |
| 944 PassRefPtrWillBeRawPtr<Element> createElement(const AtomicString& localName,
const AtomicString& typeExtension, ExceptionState&); | 944 RawPtr<Element> createElement(const AtomicString& localName, const AtomicStr
ing& typeExtension, ExceptionState&); |
| 945 PassRefPtrWillBeRawPtr<Element> createElementNS(const AtomicString& namespac
eURI, const AtomicString& qualifiedName, const AtomicString& typeExtension, Exce
ptionState&); | 945 RawPtr<Element> createElementNS(const AtomicString& namespaceURI, const Atom
icString& qualifiedName, const AtomicString& typeExtension, ExceptionState&); |
| 946 ScriptValue registerElement(ScriptState*, const AtomicString& name, const El
ementRegistrationOptions&, ExceptionState&, CustomElement::NameSet validNames =
CustomElement::StandardNames); | 946 ScriptValue registerElement(ScriptState*, const AtomicString& name, const El
ementRegistrationOptions&, ExceptionState&, CustomElement::NameSet validNames =
CustomElement::StandardNames); |
| 947 CustomElementRegistrationContext* registrationContext() { return m_registrat
ionContext.get(); } | 947 CustomElementRegistrationContext* registrationContext() { return m_registrat
ionContext.get(); } |
| 948 CustomElementMicrotaskRunQueue* customElementMicrotaskRunQueue(); | 948 CustomElementMicrotaskRunQueue* customElementMicrotaskRunQueue(); |
| 949 | 949 |
| 950 void setImportsController(HTMLImportsController*); | 950 void setImportsController(HTMLImportsController*); |
| 951 HTMLImportsController* importsController() const { return m_importsControlle
r; } | 951 HTMLImportsController* importsController() const { return m_importsControlle
r; } |
| 952 HTMLImportLoader* importLoader() const; | 952 HTMLImportLoader* importLoader() const; |
| 953 | 953 |
| 954 bool haveImportsLoaded() const; | 954 bool haveImportsLoaded() const; |
| 955 void didLoadAllImports(); | 955 void didLoadAllImports(); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 969 | 969 |
| 970 // Return a Locale for the default locale if the argument is null or empty. | 970 // Return a Locale for the default locale if the argument is null or empty. |
| 971 Locale& getCachedLocale(const AtomicString& locale = nullAtom); | 971 Locale& getCachedLocale(const AtomicString& locale = nullAtom); |
| 972 | 972 |
| 973 AnimationClock& animationClock(); | 973 AnimationClock& animationClock(); |
| 974 AnimationTimeline& timeline() const { return *m_timeline; } | 974 AnimationTimeline& timeline() const { return *m_timeline; } |
| 975 CompositorPendingAnimations& compositorPendingAnimations() { return *m_compo
sitorPendingAnimations; } | 975 CompositorPendingAnimations& compositorPendingAnimations() { return *m_compo
sitorPendingAnimations; } |
| 976 | 976 |
| 977 void addToTopLayer(Element*, const Element* before = nullptr); | 977 void addToTopLayer(Element*, const Element* before = nullptr); |
| 978 void removeFromTopLayer(Element*); | 978 void removeFromTopLayer(Element*); |
| 979 const WillBeHeapVector<RefPtrWillBeMember<Element>>& topLayerElements() cons
t { return m_topLayerElements; } | 979 const HeapVector<Member<Element>>& topLayerElements() const { return m_topLa
yerElements; } |
| 980 HTMLDialogElement* activeModalDialog() const; | 980 HTMLDialogElement* activeModalDialog() const; |
| 981 | 981 |
| 982 // A non-null m_templateDocumentHost implies that |this| was created by ensu
reTemplateDocument(). | 982 // A non-null m_templateDocumentHost implies that |this| was created by ensu
reTemplateDocument(). |
| 983 bool isTemplateDocument() const { return !!m_templateDocumentHost; } | 983 bool isTemplateDocument() const { return !!m_templateDocumentHost; } |
| 984 Document& ensureTemplateDocument(); | 984 Document& ensureTemplateDocument(); |
| 985 Document* templateDocumentHost() { return m_templateDocumentHost; } | 985 Document* templateDocumentHost() { return m_templateDocumentHost; } |
| 986 | 986 |
| 987 // TODO(thestig): Rename these and related functions, since we can call them | 987 // TODO(thestig): Rename these and related functions, since we can call them |
| 988 // for labels and input fields outside of forms as well. | 988 // for labels and input fields outside of forms as well. |
| 989 void didAssociateFormControl(Element*); | 989 void didAssociateFormControl(Element*); |
| 990 void removeFormAssociation(Element*); | 990 void removeFormAssociation(Element*); |
| 991 | 991 |
| 992 void addConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMessage>) final; | 992 void addConsoleMessage(RawPtr<ConsoleMessage>) final; |
| 993 | 993 |
| 994 LocalDOMWindow* executingWindow() final; | 994 LocalDOMWindow* executingWindow() final; |
| 995 LocalFrame* executingFrame(); | 995 LocalFrame* executingFrame(); |
| 996 | 996 |
| 997 DocumentLifecycle& lifecycle() { return m_lifecycle; } | 997 DocumentLifecycle& lifecycle() { return m_lifecycle; } |
| 998 bool isActive() const { return m_lifecycle.isActive(); } | 998 bool isActive() const { return m_lifecycle.isActive(); } |
| 999 bool isDetached() const { return m_lifecycle.state() >= DocumentLifecycle::S
topping; } | 999 bool isDetached() const { return m_lifecycle.state() >= DocumentLifecycle::S
topping; } |
| 1000 bool isStopped() const { return m_lifecycle.state() == DocumentLifecycle::St
opped; } | 1000 bool isStopped() const { return m_lifecycle.state() == DocumentLifecycle::St
opped; } |
| 1001 bool isDisposed() const { return m_lifecycle.state() == DocumentLifecycle::D
isposed; } | 1001 bool isDisposed() const { return m_lifecycle.state() == DocumentLifecycle::D
isposed; } |
| 1002 | 1002 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1047 static bool threadedParsingEnabledForTesting(); | 1047 static bool threadedParsingEnabledForTesting(); |
| 1048 | 1048 |
| 1049 void incrementNodeCount() { m_nodeCount++; } | 1049 void incrementNodeCount() { m_nodeCount++; } |
| 1050 void decrementNodeCount() | 1050 void decrementNodeCount() |
| 1051 { | 1051 { |
| 1052 ASSERT(m_nodeCount > 0); | 1052 ASSERT(m_nodeCount > 0); |
| 1053 m_nodeCount--; | 1053 m_nodeCount--; |
| 1054 } | 1054 } |
| 1055 int nodeCount() const { return m_nodeCount; } | 1055 int nodeCount() const { return m_nodeCount; } |
| 1056 | 1056 |
| 1057 using WeakDocumentSet = WillBeHeapHashSet<RawPtrWillBeWeakMember<Document>>; | 1057 using WeakDocumentSet = HeapHashSet<WeakMember<Document>>; |
| 1058 static WeakDocumentSet& liveDocumentSet(); | 1058 static WeakDocumentSet& liveDocumentSet(); |
| 1059 | 1059 |
| 1060 WebTaskRunner* loadingTaskRunner() const; | 1060 WebTaskRunner* loadingTaskRunner() const; |
| 1061 WebTaskRunner* timerTaskRunner() const; | 1061 WebTaskRunner* timerTaskRunner() const; |
| 1062 | 1062 |
| 1063 void enforceStrictMixedContentChecking(); | 1063 void enforceStrictMixedContentChecking(); |
| 1064 | 1064 |
| 1065 protected: | 1065 protected: |
| 1066 Document(const DocumentInit&, DocumentClassFlags = DefaultDocumentClass); | 1066 Document(const DocumentInit&, DocumentClassFlags = DefaultDocumentClass); |
| 1067 | 1067 |
| 1068 void didUpdateSecurityOrigin() final; | 1068 void didUpdateSecurityOrigin() final; |
| 1069 | 1069 |
| 1070 void clearXMLVersion() { m_xmlVersion = String(); } | 1070 void clearXMLVersion() { m_xmlVersion = String(); } |
| 1071 | 1071 |
| 1072 #if !ENABLE(OILPAN) | 1072 #if !ENABLE(OILPAN) |
| 1073 void dispose() override; | 1073 void dispose() override; |
| 1074 #endif | 1074 #endif |
| 1075 | 1075 |
| 1076 virtual PassRefPtrWillBeRawPtr<Document> cloneDocumentWithoutChildren(); | 1076 virtual RawPtr<Document> cloneDocumentWithoutChildren(); |
| 1077 | 1077 |
| 1078 bool importContainerNodeChildren(ContainerNode* oldContainerNode, PassRefPtr
WillBeRawPtr<ContainerNode> newContainerNode, ExceptionState&); | 1078 bool importContainerNodeChildren(ContainerNode* oldContainerNode, RawPtr<Con
tainerNode> newContainerNode, ExceptionState&); |
| 1079 void lockCompatibilityMode() { m_compatibilityModeLocked = true; } | 1079 void lockCompatibilityMode() { m_compatibilityModeLocked = true; } |
| 1080 ParserSynchronizationPolicy getParserSynchronizationPolicy() const { return
m_parserSyncPolicy; } | 1080 ParserSynchronizationPolicy getParserSynchronizationPolicy() const { return
m_parserSyncPolicy; } |
| 1081 | 1081 |
| 1082 private: | 1082 private: |
| 1083 friend class DocumentOriginTrialContextTest; | 1083 friend class DocumentOriginTrialContextTest; |
| 1084 friend class IgnoreDestructiveWriteCountIncrementer; | 1084 friend class IgnoreDestructiveWriteCountIncrementer; |
| 1085 friend class NthIndexCache; | 1085 friend class NthIndexCache; |
| 1086 | 1086 |
| 1087 bool isDocumentFragment() const = delete; // This will catch anyone doing an
unnecessary check. | 1087 bool isDocumentFragment() const = delete; // This will catch anyone doing an
unnecessary check. |
| 1088 bool isDocumentNode() const = delete; // This will catch anyone doing an unn
ecessary check. | 1088 bool isDocumentNode() const = delete; // This will catch anyone doing an unn
ecessary check. |
| (...skipping 25 matching lines...) Expand all Loading... |
| 1114 | 1114 |
| 1115 void detachParser(); | 1115 void detachParser(); |
| 1116 | 1116 |
| 1117 bool isDocument() const final { return true; } | 1117 bool isDocument() const final { return true; } |
| 1118 | 1118 |
| 1119 void childrenChanged(const ChildrenChange&) override; | 1119 void childrenChanged(const ChildrenChange&) override; |
| 1120 | 1120 |
| 1121 String nodeName() const final; | 1121 String nodeName() const final; |
| 1122 NodeType getNodeType() const final; | 1122 NodeType getNodeType() const final; |
| 1123 bool childTypeAllowed(NodeType) const final; | 1123 bool childTypeAllowed(NodeType) const final; |
| 1124 PassRefPtrWillBeRawPtr<Node> cloneNode(bool deep) final; | 1124 RawPtr<Node> cloneNode(bool deep) final; |
| 1125 void cloneDataFromDocument(const Document&); | 1125 void cloneDataFromDocument(const Document&); |
| 1126 bool isSecureContextImpl(String* errorMessage, const SecureContextCheck priv
iligeContextCheck) const; | 1126 bool isSecureContextImpl(String* errorMessage, const SecureContextCheck priv
iligeContextCheck) const; |
| 1127 | 1127 |
| 1128 #if !ENABLE(OILPAN) | 1128 #if !ENABLE(OILPAN) |
| 1129 void refExecutionContext() final { ref(); } | 1129 void refExecutionContext() final { ref(); } |
| 1130 void derefExecutionContext() final { deref(); } | 1130 void derefExecutionContext() final { deref(); } |
| 1131 #endif | 1131 #endif |
| 1132 | 1132 |
| 1133 const KURL& virtualURL() const final; // Same as url(), but needed for Execu
tionContext to implement it without a performance loss for direct calls. | 1133 const KURL& virtualURL() const final; // Same as url(), but needed for Execu
tionContext to implement it without a performance loss for direct calls. |
| 1134 KURL virtualCompleteURL(const String&) const final; // Same as completeURL()
for the same reason as above. | 1134 KURL virtualCompleteURL(const String&) const final; // Same as completeURL()
for the same reason as above. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1148 void addMutationEventListenerTypeIfEnabled(ListenerType); | 1148 void addMutationEventListenerTypeIfEnabled(ListenerType); |
| 1149 | 1149 |
| 1150 void didAssociateFormControlsTimerFired(Timer<Document>*); | 1150 void didAssociateFormControlsTimerFired(Timer<Document>*); |
| 1151 | 1151 |
| 1152 void clearFocusedElementSoon(); | 1152 void clearFocusedElementSoon(); |
| 1153 void clearFocusedElementTimerFired(Timer<Document>*); | 1153 void clearFocusedElementTimerFired(Timer<Document>*); |
| 1154 | 1154 |
| 1155 bool haveStylesheetsLoaded() const; | 1155 bool haveStylesheetsLoaded() const; |
| 1156 void styleResolverMayHaveChanged(); | 1156 void styleResolverMayHaveChanged(); |
| 1157 | 1157 |
| 1158 void setHoverNode(PassRefPtrWillBeRawPtr<Node>); | 1158 void setHoverNode(RawPtr<Node>); |
| 1159 | 1159 |
| 1160 using EventFactorySet = HashSet<OwnPtr<EventFactoryBase>>; | 1160 using EventFactorySet = HashSet<OwnPtr<EventFactoryBase>>; |
| 1161 static EventFactorySet& eventFactories(); | 1161 static EventFactorySet& eventFactories(); |
| 1162 | 1162 |
| 1163 void setNthIndexCache(NthIndexCache* nthIndexCache) { ASSERT(!m_nthIndexCach
e || !nthIndexCache); m_nthIndexCache = nthIndexCache; } | 1163 void setNthIndexCache(NthIndexCache* nthIndexCache) { ASSERT(!m_nthIndexCach
e || !nthIndexCache); m_nthIndexCache = nthIndexCache; } |
| 1164 | 1164 |
| 1165 const OriginAccessEntry& accessEntryFromURL(); | 1165 const OriginAccessEntry& accessEntryFromURL(); |
| 1166 | 1166 |
| 1167 PassOwnPtrWillBeRawPtr<OriginTrialContext> createOriginTrialContext() overri
de; | 1167 RawPtr<OriginTrialContext> createOriginTrialContext() override; |
| 1168 | 1168 |
| 1169 DocumentLifecycle m_lifecycle; | 1169 DocumentLifecycle m_lifecycle; |
| 1170 | 1170 |
| 1171 bool m_hasNodesWithPlaceholderStyle; | 1171 bool m_hasNodesWithPlaceholderStyle; |
| 1172 bool m_evaluateMediaQueriesOnStyleRecalc; | 1172 bool m_evaluateMediaQueriesOnStyleRecalc; |
| 1173 | 1173 |
| 1174 // If we do ignore the pending stylesheet count, then we need to add a boole
an | 1174 // If we do ignore the pending stylesheet count, then we need to add a boole
an |
| 1175 // to track that this happened so that we can do a full repaint when the sty
lesheets | 1175 // to track that this happened so that we can do a full repaint when the sty
lesheets |
| 1176 // do eventually load. | 1176 // do eventually load. |
| 1177 PendingSheetLayout m_pendingSheetLayout; | 1177 PendingSheetLayout m_pendingSheetLayout; |
| 1178 | 1178 |
| 1179 RawPtrWillBeMember<LocalFrame> m_frame; | 1179 Member<LocalFrame> m_frame; |
| 1180 RawPtrWillBeMember<LocalDOMWindow> m_domWindow; | 1180 Member<LocalDOMWindow> m_domWindow; |
| 1181 // FIXME: oilpan: when we get rid of the transition types change the | 1181 // FIXME: oilpan: when we get rid of the transition types change the |
| 1182 // HTMLImportsController to not be a DocumentSupplement since it is | 1182 // HTMLImportsController to not be a DocumentSupplement since it is |
| 1183 // redundant with oilpan. | 1183 // redundant with oilpan. |
| 1184 RawPtrWillBeMember<HTMLImportsController> m_importsController; | 1184 Member<HTMLImportsController> m_importsController; |
| 1185 | 1185 |
| 1186 PersistentWillBeMember<ResourceFetcher> m_fetcher; | 1186 Member<ResourceFetcher> m_fetcher; |
| 1187 RefPtrWillBeMember<DocumentParser> m_parser; | 1187 Member<DocumentParser> m_parser; |
| 1188 RefPtrWillBeMember<ContextFeatures> m_contextFeatures; | 1188 Member<ContextFeatures> m_contextFeatures; |
| 1189 | 1189 |
| 1190 bool m_wellFormed; | 1190 bool m_wellFormed; |
| 1191 | 1191 |
| 1192 // Document URLs. | 1192 // Document URLs. |
| 1193 KURL m_url; // Document.URL: The URL from which this document was retrieved. | 1193 KURL m_url; // Document.URL: The URL from which this document was retrieved. |
| 1194 KURL m_baseURL; // Node.baseURI: The URL to use when resolving relative URLs
. | 1194 KURL m_baseURL; // Node.baseURI: The URL to use when resolving relative URLs
. |
| 1195 KURL m_baseURLOverride; // An alternative base URL that takes precedence ove
r m_baseURL (but not m_baseElementURL). | 1195 KURL m_baseURLOverride; // An alternative base URL that takes precedence ove
r m_baseURL (but not m_baseElementURL). |
| 1196 KURL m_baseElementURL; // The URL set by the <base> element. | 1196 KURL m_baseElementURL; // The URL set by the <base> element. |
| 1197 KURL m_cookieURL; // The URL to use for cookie access. | 1197 KURL m_cookieURL; // The URL to use for cookie access. |
| 1198 OwnPtr<OriginAccessEntry> m_accessEntryFromURL; | 1198 OwnPtr<OriginAccessEntry> m_accessEntryFromURL; |
| 1199 | 1199 |
| 1200 AtomicString m_baseTarget; | 1200 AtomicString m_baseTarget; |
| 1201 | 1201 |
| 1202 // Mime-type of the document in case it was cloned or created by XHR. | 1202 // Mime-type of the document in case it was cloned or created by XHR. |
| 1203 AtomicString m_mimeType; | 1203 AtomicString m_mimeType; |
| 1204 | 1204 |
| 1205 RefPtrWillBeMember<DocumentType> m_docType; | 1205 Member<DocumentType> m_docType; |
| 1206 OwnPtrWillBeMember<DOMImplementation> m_implementation; | 1206 Member<DOMImplementation> m_implementation; |
| 1207 | 1207 |
| 1208 RefPtrWillBeMember<CSSStyleSheet> m_elemSheet; | 1208 Member<CSSStyleSheet> m_elemSheet; |
| 1209 | 1209 |
| 1210 bool m_printing; | 1210 bool m_printing; |
| 1211 bool m_wasPrinting; | 1211 bool m_wasPrinting; |
| 1212 bool m_paginatedForScreen; | 1212 bool m_paginatedForScreen; |
| 1213 | 1213 |
| 1214 CompatibilityMode m_compatibilityMode; | 1214 CompatibilityMode m_compatibilityMode; |
| 1215 bool m_compatibilityModeLocked; // This is cheaper than making setCompatibil
ityMode virtual. | 1215 bool m_compatibilityModeLocked; // This is cheaper than making setCompatibil
ityMode virtual. |
| 1216 | 1216 |
| 1217 OwnPtr<CancellableTaskFactory> m_executeScriptsWaitingForResourcesTask; | 1217 OwnPtr<CancellableTaskFactory> m_executeScriptsWaitingForResourcesTask; |
| 1218 | 1218 |
| 1219 bool m_hasAutofocused; | 1219 bool m_hasAutofocused; |
| 1220 Timer<Document> m_clearFocusedElementTimer; | 1220 Timer<Document> m_clearFocusedElementTimer; |
| 1221 RefPtrWillBeMember<Element> m_autofocusElement; | 1221 Member<Element> m_autofocusElement; |
| 1222 RefPtrWillBeMember<Element> m_focusedElement; | 1222 Member<Element> m_focusedElement; |
| 1223 RefPtrWillBeMember<Range> m_sequentialFocusNavigationStartingPoint; | 1223 Member<Range> m_sequentialFocusNavigationStartingPoint; |
| 1224 RefPtrWillBeMember<Node> m_hoverNode; | 1224 Member<Node> m_hoverNode; |
| 1225 RefPtrWillBeMember<Element> m_activeHoverElement; | 1225 Member<Element> m_activeHoverElement; |
| 1226 RefPtrWillBeMember<Element> m_documentElement; | 1226 Member<Element> m_documentElement; |
| 1227 UserActionElementSet m_userActionElements; | 1227 UserActionElementSet m_userActionElements; |
| 1228 | 1228 |
| 1229 uint64_t m_domTreeVersion; | 1229 uint64_t m_domTreeVersion; |
| 1230 static uint64_t s_globalTreeVersion; | 1230 static uint64_t s_globalTreeVersion; |
| 1231 | 1231 |
| 1232 uint64_t m_styleVersion; | 1232 uint64_t m_styleVersion; |
| 1233 | 1233 |
| 1234 WillBeHeapHashSet<RawPtrWillBeWeakMember<NodeIterator>> m_nodeIterators; | 1234 HeapHashSet<WeakMember<NodeIterator>> m_nodeIterators; |
| 1235 using AttachedRangeSet = WillBeHeapHashSet<RawPtrWillBeWeakMember<Range>>; | 1235 using AttachedRangeSet = HeapHashSet<WeakMember<Range>>; |
| 1236 AttachedRangeSet m_ranges; | 1236 AttachedRangeSet m_ranges; |
| 1237 | 1237 |
| 1238 unsigned short m_listenerTypes; | 1238 unsigned short m_listenerTypes; |
| 1239 | 1239 |
| 1240 MutationObserverOptions m_mutationObserverTypes; | 1240 MutationObserverOptions m_mutationObserverTypes; |
| 1241 | 1241 |
| 1242 OwnPtrWillBeMember<StyleEngine> m_styleEngine; | 1242 Member<StyleEngine> m_styleEngine; |
| 1243 RefPtrWillBeMember<StyleSheetList> m_styleSheetList; | 1243 Member<StyleSheetList> m_styleSheetList; |
| 1244 | 1244 |
| 1245 OwnPtrWillBeMember<FormController> m_formController; | 1245 Member<FormController> m_formController; |
| 1246 | 1246 |
| 1247 TextLinkColors m_textLinkColors; | 1247 TextLinkColors m_textLinkColors; |
| 1248 const OwnPtrWillBeMember<VisitedLinkState> m_visitedLinkState; | 1248 const Member<VisitedLinkState> m_visitedLinkState; |
| 1249 | 1249 |
| 1250 bool m_visuallyOrdered; | 1250 bool m_visuallyOrdered; |
| 1251 ReadyState m_readyState; | 1251 ReadyState m_readyState; |
| 1252 ParsingState m_parsingState; | 1252 ParsingState m_parsingState; |
| 1253 | 1253 |
| 1254 bool m_gotoAnchorNeededAfterStylesheetsLoad; | 1254 bool m_gotoAnchorNeededAfterStylesheetsLoad; |
| 1255 bool m_isDNSPrefetchEnabled; | 1255 bool m_isDNSPrefetchEnabled; |
| 1256 bool m_haveExplicitlyDisabledDNSPrefetch; | 1256 bool m_haveExplicitlyDisabledDNSPrefetch; |
| 1257 bool m_containsValidityStyleRules; | 1257 bool m_containsValidityStyleRules; |
| 1258 bool m_containsPlugins; | 1258 bool m_containsPlugins; |
| 1259 SelectionBehaviorOnFocus m_updateFocusAppearanceSelectionBahavior; | 1259 SelectionBehaviorOnFocus m_updateFocusAppearanceSelectionBahavior; |
| 1260 | 1260 |
| 1261 // http://www.whatwg.org/specs/web-apps/current-work/#ignore-destructive-wri
tes-counter | 1261 // http://www.whatwg.org/specs/web-apps/current-work/#ignore-destructive-wri
tes-counter |
| 1262 unsigned m_ignoreDestructiveWriteCount; | 1262 unsigned m_ignoreDestructiveWriteCount; |
| 1263 | 1263 |
| 1264 String m_title; | 1264 String m_title; |
| 1265 String m_rawTitle; | 1265 String m_rawTitle; |
| 1266 RefPtrWillBeMember<Element> m_titleElement; | 1266 Member<Element> m_titleElement; |
| 1267 | 1267 |
| 1268 PersistentWillBeMember<AXObjectCache> m_axObjectCache; | 1268 Member<AXObjectCache> m_axObjectCache; |
| 1269 OwnPtrWillBeMember<DocumentMarkerController> m_markers; | 1269 Member<DocumentMarkerController> m_markers; |
| 1270 | 1270 |
| 1271 Timer<Document> m_updateFocusAppearanceTimer; | 1271 Timer<Document> m_updateFocusAppearanceTimer; |
| 1272 | 1272 |
| 1273 RawPtrWillBeMember<Element> m_cssTarget; | 1273 Member<Element> m_cssTarget; |
| 1274 | 1274 |
| 1275 LoadEventProgress m_loadEventProgress; | 1275 LoadEventProgress m_loadEventProgress; |
| 1276 | 1276 |
| 1277 double m_startTime; | 1277 double m_startTime; |
| 1278 | 1278 |
| 1279 OwnPtrWillBeMember<ScriptRunner> m_scriptRunner; | 1279 Member<ScriptRunner> m_scriptRunner; |
| 1280 | 1280 |
| 1281 WillBeHeapVector<RefPtrWillBeMember<HTMLScriptElement>> m_currentScriptStack
; | 1281 HeapVector<Member<HTMLScriptElement>> m_currentScriptStack; |
| 1282 | 1282 |
| 1283 OwnPtr<TransformSource> m_transformSource; | 1283 OwnPtr<TransformSource> m_transformSource; |
| 1284 | 1284 |
| 1285 String m_xmlEncoding; | 1285 String m_xmlEncoding; |
| 1286 String m_xmlVersion; | 1286 String m_xmlVersion; |
| 1287 unsigned m_xmlStandalone : 2; | 1287 unsigned m_xmlStandalone : 2; |
| 1288 unsigned m_hasXMLDeclaration : 1; | 1288 unsigned m_hasXMLDeclaration : 1; |
| 1289 | 1289 |
| 1290 AtomicString m_contentLanguage; | 1290 AtomicString m_contentLanguage; |
| 1291 | 1291 |
| 1292 DocumentEncodingData m_encodingData; | 1292 DocumentEncodingData m_encodingData; |
| 1293 | 1293 |
| 1294 bool m_designMode; | 1294 bool m_designMode; |
| 1295 bool m_isRunningExecCommand; | 1295 bool m_isRunningExecCommand; |
| 1296 | 1296 |
| 1297 WillBeHeapHashSet<RawPtrWillBeWeakMember<const LiveNodeListBase>> m_listsInv
alidatedAtDocument; | 1297 HeapHashSet<WeakMember<const LiveNodeListBase>> m_listsInvalidatedAtDocument
; |
| 1298 #if ENABLE(OILPAN) | 1298 #if ENABLE(OILPAN) |
| 1299 // Oilpan keeps track of all registered NodeLists. | 1299 // Oilpan keeps track of all registered NodeLists. |
| 1300 // | 1300 // |
| 1301 // FIXME: Oilpan: improve - only need to know if a NodeList | 1301 // FIXME: Oilpan: improve - only need to know if a NodeList |
| 1302 // is currently alive or not for the different types. | 1302 // is currently alive or not for the different types. |
| 1303 HeapHashSet<WeakMember<const LiveNodeListBase>> m_nodeLists[numNodeListInval
idationTypes]; | 1303 HeapHashSet<WeakMember<const LiveNodeListBase>> m_nodeLists[numNodeListInval
idationTypes]; |
| 1304 #else | 1304 #else |
| 1305 unsigned m_nodeListCounts[numNodeListInvalidationTypes]; | 1305 unsigned m_nodeListCounts[numNodeListInvalidationTypes]; |
| 1306 #endif | 1306 #endif |
| 1307 | 1307 |
| 1308 OwnPtrWillBeMember<SVGDocumentExtensions> m_svgExtensions; | 1308 Member<SVGDocumentExtensions> m_svgExtensions; |
| 1309 | 1309 |
| 1310 Vector<AnnotatedRegionValue> m_annotatedRegions; | 1310 Vector<AnnotatedRegionValue> m_annotatedRegions; |
| 1311 bool m_hasAnnotatedRegions; | 1311 bool m_hasAnnotatedRegions; |
| 1312 bool m_annotatedRegionsDirty; | 1312 bool m_annotatedRegionsDirty; |
| 1313 | 1313 |
| 1314 OwnPtr<SelectorQueryCache> m_selectorQueryCache; | 1314 OwnPtr<SelectorQueryCache> m_selectorQueryCache; |
| 1315 | 1315 |
| 1316 // It is safe to keep a raw, untraced pointer to this stack-allocated | 1316 // It is safe to keep a raw, untraced pointer to this stack-allocated |
| 1317 // cache object: it is set upon the cache object being allocated on | 1317 // cache object: it is set upon the cache object being allocated on |
| 1318 // the stack and cleared upon leaving its allocated scope. Hence it | 1318 // the stack and cleared upon leaving its allocated scope. Hence it |
| 1319 // is acceptable not to trace it -- should a conservative GC occur, | 1319 // is acceptable not to trace it -- should a conservative GC occur, |
| 1320 // the cache object's references will be traced by a stack walk. | 1320 // the cache object's references will be traced by a stack walk. |
| 1321 GC_PLUGIN_IGNORE("461878") | 1321 GC_PLUGIN_IGNORE("461878") |
| 1322 NthIndexCache* m_nthIndexCache = nullptr; | 1322 NthIndexCache* m_nthIndexCache = nullptr; |
| 1323 | 1323 |
| 1324 bool m_useSecureKeyboardEntryWhenActive; | 1324 bool m_useSecureKeyboardEntryWhenActive; |
| 1325 | 1325 |
| 1326 DocumentClassFlags m_documentClasses; | 1326 DocumentClassFlags m_documentClasses; |
| 1327 | 1327 |
| 1328 bool m_isViewSource; | 1328 bool m_isViewSource; |
| 1329 bool m_sawElementsInKnownNamespaces; | 1329 bool m_sawElementsInKnownNamespaces; |
| 1330 bool m_isSrcdocDocument; | 1330 bool m_isSrcdocDocument; |
| 1331 bool m_isMobileDocument; | 1331 bool m_isMobileDocument; |
| 1332 | 1332 |
| 1333 LayoutView* m_layoutView; | 1333 LayoutView* m_layoutView; |
| 1334 | 1334 |
| 1335 #if !ENABLE(OILPAN) | 1335 #if !ENABLE(OILPAN) |
| 1336 WeakPtrFactory<Document> m_weakFactory; | 1336 WeakPtrFactory<Document> m_weakFactory; |
| 1337 #endif | 1337 #endif |
| 1338 WeakPtrWillBeWeakMember<Document> m_contextDocument; | 1338 WeakMember<Document> m_contextDocument; |
| 1339 | 1339 |
| 1340 bool m_hasFullscreenSupplement; // For early return in Fullscreen::fromIfExi
sts() | 1340 bool m_hasFullscreenSupplement; // For early return in Fullscreen::fromIfExi
sts() |
| 1341 | 1341 |
| 1342 WillBeHeapVector<RefPtrWillBeMember<Element>> m_topLayerElements; | 1342 HeapVector<Member<Element>> m_topLayerElements; |
| 1343 | 1343 |
| 1344 int m_loadEventDelayCount; | 1344 int m_loadEventDelayCount; |
| 1345 Timer<Document> m_loadEventDelayTimer; | 1345 Timer<Document> m_loadEventDelayTimer; |
| 1346 Timer<Document> m_pluginLoadingTimer; | 1346 Timer<Document> m_pluginLoadingTimer; |
| 1347 | 1347 |
| 1348 ViewportDescription m_viewportDescription; | 1348 ViewportDescription m_viewportDescription; |
| 1349 ViewportDescription m_legacyViewportDescription; | 1349 ViewportDescription m_legacyViewportDescription; |
| 1350 Length m_viewportDefaultMinWidth; | 1350 Length m_viewportDefaultMinWidth; |
| 1351 | 1351 |
| 1352 ReferrerPolicy m_referrerPolicy; | 1352 ReferrerPolicy m_referrerPolicy; |
| 1353 | 1353 |
| 1354 DocumentTiming m_documentTiming; | 1354 DocumentTiming m_documentTiming; |
| 1355 RefPtrWillBeMember<MediaQueryMatcher> m_mediaQueryMatcher; | 1355 Member<MediaQueryMatcher> m_mediaQueryMatcher; |
| 1356 bool m_writeRecursionIsTooDeep; | 1356 bool m_writeRecursionIsTooDeep; |
| 1357 unsigned m_writeRecursionDepth; | 1357 unsigned m_writeRecursionDepth; |
| 1358 | 1358 |
| 1359 RefPtrWillBeMember<ScriptedAnimationController> m_scriptedAnimationControlle
r; | 1359 Member<ScriptedAnimationController> m_scriptedAnimationController; |
| 1360 RefPtrWillBeMember<ScriptedIdleTaskController> m_scriptedIdleTaskController; | 1360 Member<ScriptedIdleTaskController> m_scriptedIdleTaskController; |
| 1361 OwnPtrWillBeMember<MainThreadTaskRunner> m_taskRunner; | 1361 Member<MainThreadTaskRunner> m_taskRunner; |
| 1362 OwnPtrWillBeMember<TextAutosizer> m_textAutosizer; | 1362 Member<TextAutosizer> m_textAutosizer; |
| 1363 | 1363 |
| 1364 RefPtrWillBeMember<CustomElementRegistrationContext> m_registrationContext; | 1364 Member<CustomElementRegistrationContext> m_registrationContext; |
| 1365 RefPtrWillBeMember<CustomElementMicrotaskRunQueue> m_customElementMicrotaskR
unQueue; | 1365 Member<CustomElementMicrotaskRunQueue> m_customElementMicrotaskRunQueue; |
| 1366 | 1366 |
| 1367 void elementDataCacheClearTimerFired(Timer<Document>*); | 1367 void elementDataCacheClearTimerFired(Timer<Document>*); |
| 1368 Timer<Document> m_elementDataCacheClearTimer; | 1368 Timer<Document> m_elementDataCacheClearTimer; |
| 1369 | 1369 |
| 1370 OwnPtrWillBeMember<ElementDataCache> m_elementDataCache; | 1370 Member<ElementDataCache> m_elementDataCache; |
| 1371 | 1371 |
| 1372 using LocaleIdentifierToLocaleMap = HashMap<AtomicString, OwnPtr<Locale>>; | 1372 using LocaleIdentifierToLocaleMap = HashMap<AtomicString, OwnPtr<Locale>>; |
| 1373 LocaleIdentifierToLocaleMap m_localeCache; | 1373 LocaleIdentifierToLocaleMap m_localeCache; |
| 1374 | 1374 |
| 1375 PersistentWillBeMember<AnimationTimeline> m_timeline; | 1375 Member<AnimationTimeline> m_timeline; |
| 1376 PersistentWillBeMember<CompositorPendingAnimations> m_compositorPendingAnima
tions; | 1376 Member<CompositorPendingAnimations> m_compositorPendingAnimations; |
| 1377 | 1377 |
| 1378 RefPtrWillBeMember<Document> m_templateDocument; | 1378 Member<Document> m_templateDocument; |
| 1379 // With Oilpan the templateDocument and the templateDocumentHost | 1379 // With Oilpan the templateDocument and the templateDocumentHost |
| 1380 // live and die together. Without Oilpan, the templateDocumentHost | 1380 // live and die together. Without Oilpan, the templateDocumentHost |
| 1381 // is a manually managed backpointer from m_templateDocument. | 1381 // is a manually managed backpointer from m_templateDocument. |
| 1382 RawPtrWillBeMember<Document> m_templateDocumentHost; | 1382 Member<Document> m_templateDocumentHost; |
| 1383 | 1383 |
| 1384 Timer<Document> m_didAssociateFormControlsTimer; | 1384 Timer<Document> m_didAssociateFormControlsTimer; |
| 1385 WillBeHeapHashSet<RefPtrWillBeMember<Element>> m_associatedFormControls; | 1385 HeapHashSet<Member<Element>> m_associatedFormControls; |
| 1386 | 1386 |
| 1387 WillBeHeapHashSet<RawPtrWillBeMember<SVGUseElement>> m_useElementsNeedingUpd
ate; | 1387 HeapHashSet<Member<SVGUseElement>> m_useElementsNeedingUpdate; |
| 1388 WillBeHeapHashSet<RawPtrWillBeMember<Element>> m_layerUpdateSVGFilterElement
s; | 1388 HeapHashSet<Member<Element>> m_layerUpdateSVGFilterElements; |
| 1389 | 1389 |
| 1390 DOMTimerCoordinator m_timers; | 1390 DOMTimerCoordinator m_timers; |
| 1391 | 1391 |
| 1392 bool m_hasViewportUnits; | 1392 bool m_hasViewportUnits; |
| 1393 | 1393 |
| 1394 using DocumentVisibilityObserverSet = WillBeHeapHashSet<RawPtrWillBeWeakMemb
er<DocumentVisibilityObserver>>; | 1394 using DocumentVisibilityObserverSet = HeapHashSet<WeakMember<DocumentVisibil
ityObserver>>; |
| 1395 DocumentVisibilityObserverSet m_visibilityObservers; | 1395 DocumentVisibilityObserverSet m_visibilityObservers; |
| 1396 | 1396 |
| 1397 ParserSynchronizationPolicy m_parserSyncPolicy; | 1397 ParserSynchronizationPolicy m_parserSyncPolicy; |
| 1398 | 1398 |
| 1399 OriginsUsingFeatures::Value m_originsUsingFeaturesValue; | 1399 OriginsUsingFeatures::Value m_originsUsingFeaturesValue; |
| 1400 | 1400 |
| 1401 ClientHintsPreferences m_clientHintsPreferences; | 1401 ClientHintsPreferences m_clientHintsPreferences; |
| 1402 | 1402 |
| 1403 PersistentWillBeMember<CanvasFontCache> m_canvasFontCache; | 1403 Member<CanvasFontCache> m_canvasFontCache; |
| 1404 | 1404 |
| 1405 PersistentWillBeMember<IntersectionObserverController> m_intersectionObserve
rController; | 1405 Member<IntersectionObserverController> m_intersectionObserverController; |
| 1406 PersistentWillBeMember<NodeIntersectionObserverData> m_intersectionObserverD
ata; | 1406 Member<NodeIntersectionObserverData> m_intersectionObserverData; |
| 1407 | 1407 |
| 1408 int m_nodeCount; | 1408 int m_nodeCount; |
| 1409 }; | 1409 }; |
| 1410 | 1410 |
| 1411 extern template class CORE_EXTERN_TEMPLATE_EXPORT WillBeHeapSupplement<Document>
; | 1411 extern template class CORE_EXTERN_TEMPLATE_EXPORT HeapSupplement<Document>; |
| 1412 | 1412 |
| 1413 inline bool Document::shouldOverrideLegacyDescription(ViewportDescription::Type
origin) | 1413 inline bool Document::shouldOverrideLegacyDescription(ViewportDescription::Type
origin) |
| 1414 { | 1414 { |
| 1415 // The different (legacy) meta tags have different priorities based on the t
ype | 1415 // The different (legacy) meta tags have different priorities based on the t
ype |
| 1416 // regardless of which order they appear in the DOM. The priority is given b
y the | 1416 // regardless of which order they appear in the DOM. The priority is given b
y the |
| 1417 // ViewportDescription::Type enum. | 1417 // ViewportDescription::Type enum. |
| 1418 return origin >= m_legacyViewportDescription.type; | 1418 return origin >= m_legacyViewportDescription.type; |
| 1419 } | 1419 } |
| 1420 | 1420 |
| 1421 inline void Document::scheduleLayoutTreeUpdateIfNeeded() | 1421 inline void Document::scheduleLayoutTreeUpdateIfNeeded() |
| (...skipping 26 matching lines...) Expand all Loading... |
| 1448 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true); | 1448 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true); |
| 1449 | 1449 |
| 1450 } // namespace blink | 1450 } // namespace blink |
| 1451 | 1451 |
| 1452 #ifndef NDEBUG | 1452 #ifndef NDEBUG |
| 1453 // Outside the WebCore namespace for ease of invocation from gdb. | 1453 // Outside the WebCore namespace for ease of invocation from gdb. |
| 1454 CORE_EXPORT void showLiveDocumentInstances(); | 1454 CORE_EXPORT void showLiveDocumentInstances(); |
| 1455 #endif | 1455 #endif |
| 1456 | 1456 |
| 1457 #endif // Document_h | 1457 #endif // Document_h |
| OLD | NEW |