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