| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 class ElementDataCache; | 77 class ElementDataCache; |
| 78 class Event; | 78 class Event; |
| 79 class EventListener; | 79 class EventListener; |
| 80 class ExceptionState; | 80 class ExceptionState; |
| 81 class FloatQuad; | 81 class FloatQuad; |
| 82 class FloatRect; | 82 class FloatRect; |
| 83 class Frame; | 83 class Frame; |
| 84 class FrameHost; | 84 class FrameHost; |
| 85 class FrameView; | 85 class FrameView; |
| 86 class HitTestRequest; | 86 class HitTestRequest; |
| 87 class HTMLDocumentParser; | |
| 88 class HTMLElement; | 87 class HTMLElement; |
| 89 class HTMLImport; | |
| 90 class HTMLImportLoader; | |
| 91 class HTMLImportsController; | |
| 92 class HTMLScriptElement; | |
| 93 class LayoutPoint; | 88 class LayoutPoint; |
| 94 class LocalDOMWindow; | 89 class LocalDOMWindow; |
| 95 class LocalFrame; | 90 class LocalFrame; |
| 96 class Location; | 91 class Location; |
| 97 class MediaQueryListListener; | 92 class MediaQueryListListener; |
| 98 class MediaQueryMatcher; | 93 class MediaQueryMatcher; |
| 99 class Page; | 94 class Page; |
| 100 class Picture; | 95 class Picture; |
| 101 class QualifiedName; | 96 class QualifiedName; |
| 102 class Range; | 97 class Range; |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 bool hasListenerType(ListenerType listenerType) const { return (m_listenerTy
pes & listenerType); } | 341 bool hasListenerType(ListenerType listenerType) const { return (m_listenerTy
pes & listenerType); } |
| 347 void addListenerTypeIfNeeded(const AtomicString& eventType); | 342 void addListenerTypeIfNeeded(const AtomicString& eventType); |
| 348 | 343 |
| 349 bool hasMutationObserversOfType(MutationObserver::MutationType type) const | 344 bool hasMutationObserversOfType(MutationObserver::MutationType type) const |
| 350 { | 345 { |
| 351 return m_mutationObserverTypes & type; | 346 return m_mutationObserverTypes & type; |
| 352 } | 347 } |
| 353 bool hasMutationObservers() const { return m_mutationObserverTypes; } | 348 bool hasMutationObservers() const { return m_mutationObserverTypes; } |
| 354 void addMutationObserverTypes(MutationObserverOptions types) { m_mutationObs
erverTypes |= types; } | 349 void addMutationObserverTypes(MutationObserverOptions types) { m_mutationObs
erverTypes |= types; } |
| 355 | 350 |
| 356 String title() const { return m_title; } | |
| 357 void setTitle(const String&); | |
| 358 | |
| 359 Element* titleElement() const { return m_titleElement.get(); } | |
| 360 void setTitleElement(Element*); | |
| 361 void removeTitle(Element* titleElement); | |
| 362 | |
| 363 const AtomicString& dir(); | 351 const AtomicString& dir(); |
| 364 void setDir(const AtomicString&); | 352 void setDir(const AtomicString&); |
| 365 | 353 |
| 366 const AtomicString& referrer() const; | 354 const AtomicString& referrer() const; |
| 367 | 355 |
| 368 String domain() const; | 356 String domain() const; |
| 369 void setDomain(const String& newDomain, ExceptionState&); | 357 void setDomain(const String& newDomain, ExceptionState&); |
| 370 | 358 |
| 371 // The following implements the rule from HTML 4 for what valid names are. | 359 // The following implements the rule from HTML 4 for what valid names are. |
| 372 // To get this right for all the XML cases, we probably have to improve this
or move it | 360 // To get this right for all the XML cases, we probably have to improve this
or move it |
| 373 // and make it sensitive to the type of document. | 361 // and make it sensitive to the type of document. |
| 374 static bool isValidName(const String&); | 362 static bool isValidName(const String&); |
| 375 | 363 |
| 376 // The following breaks a qualified name into a prefix and a local name. | 364 // The following breaks a qualified name into a prefix and a local name. |
| 377 // It also does a validity check, and returns false if the qualified name | 365 // It also does a validity check, and returns false if the qualified name |
| 378 // is invalid. It also sets ExceptionCode when name is invalid. | 366 // is invalid. It also sets ExceptionCode when name is invalid. |
| 379 static bool parseQualifiedName(const AtomicString& qualifiedName, AtomicStri
ng& prefix, AtomicString& localName, ExceptionState&); | 367 static bool parseQualifiedName(const AtomicString& qualifiedName, AtomicStri
ng& prefix, AtomicString& localName, ExceptionState&); |
| 380 | 368 |
| 381 DocumentMarkerController& markers() const { return *m_markers; } | 369 DocumentMarkerController& markers() const { return *m_markers; } |
| 382 | 370 |
| 383 KURL openSearchDescriptionURL(); | 371 KURL openSearchDescriptionURL(); |
| 384 | 372 |
| 385 Document& topDocument() const; | 373 Document& topDocument() const; |
| 386 WeakPtr<Document> contextDocument(); | 374 WeakPtr<Document> contextDocument(); |
| 387 | 375 |
| 388 HTMLScriptElement* currentScript() const { return !m_currentScriptStack.isEm
pty() ? m_currentScriptStack.last().get() : 0; } | |
| 389 void pushCurrentScript(PassRefPtr<HTMLScriptElement>); | |
| 390 void popCurrentScript(); | |
| 391 | |
| 392 void finishedParsing(); | 376 void finishedParsing(); |
| 393 | 377 |
| 394 const WTF::TextEncoding& encoding() const { return WTF::UTF8Encoding(); } | 378 const WTF::TextEncoding& encoding() const { return WTF::UTF8Encoding(); } |
| 395 | 379 |
| 396 virtual void removeAllEventListeners() override final; | 380 virtual void removeAllEventListeners() override final; |
| 397 | 381 |
| 398 bool allowExecutingScripts(Node*); | 382 bool allowExecutingScripts(Node*); |
| 399 | 383 |
| 400 enum LoadEventProgress { | 384 enum LoadEventProgress { |
| 401 LoadEventNotRun, | 385 LoadEventNotRun, |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 void serviceScriptedAnimations(double monotonicAnimationStartTime); | 417 void serviceScriptedAnimations(double monotonicAnimationStartTime); |
| 434 | 418 |
| 435 virtual EventTarget* errorEventTarget() override final; | 419 virtual EventTarget* errorEventTarget() override final; |
| 436 virtual void logExceptionToConsole(const String& errorMessage, int scriptId,
const String& sourceURL, int lineNumber, int columnNumber, PassRefPtr<ScriptCal
lStack>) override final; | 420 virtual void logExceptionToConsole(const String& errorMessage, int scriptId,
const String& sourceURL, int lineNumber, int columnNumber, PassRefPtr<ScriptCal
lStack>) override final; |
| 437 | 421 |
| 438 IntSize initialViewportSize() const; | 422 IntSize initialViewportSize() const; |
| 439 | 423 |
| 440 void registerElement(const AtomicString& name, PassRefPtr<DartValue> type, E
xceptionState&); | 424 void registerElement(const AtomicString& name, PassRefPtr<DartValue> type, E
xceptionState&); |
| 441 CustomElementRegistry& elementRegistry() const { return *m_elementRegistry;
} | 425 CustomElementRegistry& elementRegistry() const { return *m_elementRegistry;
} |
| 442 | 426 |
| 443 void setImportsController(HTMLImportsController*); | |
| 444 HTMLImportsController* importsController() const { return m_importsControlle
r; } | |
| 445 HTMLImportsController& ensureImportsController(); | |
| 446 HTMLImportLoader* importLoader() const; | |
| 447 HTMLImport* import() const; | |
| 448 | |
| 449 bool haveImportsLoaded() const; | |
| 450 void didLoadAllImports(); | |
| 451 | |
| 452 unsigned activeParserCount() { return m_activeParserCount; } | 427 unsigned activeParserCount() { return m_activeParserCount; } |
| 453 void incrementActiveParserCount() { ++m_activeParserCount; } | 428 void incrementActiveParserCount() { ++m_activeParserCount; } |
| 454 void decrementActiveParserCount(); | 429 void decrementActiveParserCount(); |
| 455 | 430 |
| 456 ElementDataCache* elementDataCache() { return m_elementDataCache.get(); } | 431 ElementDataCache* elementDataCache() { return m_elementDataCache.get(); } |
| 457 | 432 |
| 458 void didLoadAllParserBlockingResources(); | 433 void didLoadAllParserBlockingResources(); |
| 459 | 434 |
| 460 bool inStyleRecalc() const { return m_lifecycle.state() == DocumentLifecycle
::InStyleRecalc; } | 435 bool inStyleRecalc() const { return m_lifecycle.state() == DocumentLifecycle
::InStyleRecalc; } |
| 461 | 436 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 virtual void derefExecutionContext() override final { deref(); } | 523 virtual void derefExecutionContext() override final { deref(); } |
| 549 #endif | 524 #endif |
| 550 | 525 |
| 551 virtual const KURL& virtualURL() const override final; // Same as url(), but
needed for ExecutionContext to implement it without a performance loss for dire
ct calls. | 526 virtual const KURL& virtualURL() const override final; // Same as url(), but
needed for ExecutionContext to implement it without a performance loss for dire
ct calls. |
| 552 virtual KURL virtualCompleteURL(const String&) const override final; // Same
as completeURL() for the same reason as above. | 527 virtual KURL virtualCompleteURL(const String&) const override final; // Same
as completeURL() for the same reason as above. |
| 553 | 528 |
| 554 virtual void reportBlockedScriptExecutionToInspector(const String& directive
Text) override final; | 529 virtual void reportBlockedScriptExecutionToInspector(const String& directive
Text) override final; |
| 555 | 530 |
| 556 virtual double timerAlignmentInterval() const override final; | 531 virtual double timerAlignmentInterval() const override final; |
| 557 | 532 |
| 558 void updateTitle(const String&); | |
| 559 void updateBaseURL(); | 533 void updateBaseURL(); |
| 560 | 534 |
| 561 void resumeParserWaitingForResourcesTimerFired(Timer<Document>*); | 535 void resumeParserWaitingForResourcesTimerFired(Timer<Document>*); |
| 562 | 536 |
| 563 void loadEventDelayTimerFired(Timer<Document>*); | 537 void loadEventDelayTimerFired(Timer<Document>*); |
| 564 | 538 |
| 565 PageVisibilityState pageVisibilityState() const; | 539 PageVisibilityState pageVisibilityState() const; |
| 566 | 540 |
| 567 // Note that dispatching a window load event may cause the LocalDOMWindow to
be detached from | 541 // Note that dispatching a window load event may cause the LocalDOMWindow to
be detached from |
| 568 // the LocalFrame, so callers should take a reference to the LocalDOMWindow
(which owns us) to | 542 // the LocalFrame, so callers should take a reference to the LocalDOMWindow
(which owns us) to |
| 569 // prevent the Document from getting blown away from underneath them. | 543 // prevent the Document from getting blown away from underneath them. |
| 570 void dispatchWindowLoadEvent(); | 544 void dispatchWindowLoadEvent(); |
| 571 | 545 |
| 572 void addListenerType(ListenerType listenerType) { m_listenerTypes |= listene
rType; } | 546 void addListenerType(ListenerType listenerType) { m_listenerTypes |= listene
rType; } |
| 573 | 547 |
| 574 void clearFocusedElementSoon(); | 548 void clearFocusedElementSoon(); |
| 575 void clearFocusedElementTimerFired(Timer<Document>*); | 549 void clearFocusedElementTimerFired(Timer<Document>*); |
| 576 | 550 |
| 577 void setHoverNode(PassRefPtr<Node>); | 551 void setHoverNode(PassRefPtr<Node>); |
| 578 Node* hoverNode() const { return m_hoverNode.get(); } | 552 Node* hoverNode() const { return m_hoverNode.get(); } |
| 579 | 553 |
| 580 DocumentLifecycle m_lifecycle; | 554 DocumentLifecycle m_lifecycle; |
| 581 | 555 |
| 582 AbstractModule* m_module; | 556 AbstractModule* m_module; |
| 583 | 557 |
| 584 bool m_evaluateMediaQueriesOnStyleRecalc; | 558 bool m_evaluateMediaQueriesOnStyleRecalc; |
| 585 | 559 |
| 586 LocalFrame* m_frame; | 560 LocalFrame* m_frame; |
| 587 RawPtr<LocalDOMWindow> m_domWindow; | 561 RawPtr<LocalDOMWindow> m_domWindow; |
| 588 // FIXME: oilpan: when we get rid of the transition types change the | |
| 589 // HTMLImportsController to not be a DocumentSupplement since it is | |
| 590 // redundant with oilpan. | |
| 591 RawPtr<HTMLImportsController> m_importsController; | |
| 592 | 562 |
| 593 RefPtr<ResourceFetcher> m_fetcher; | 563 RefPtr<ResourceFetcher> m_fetcher; |
| 594 RefPtr<DocumentParser> m_parser; | |
| 595 unsigned m_activeParserCount; | 564 unsigned m_activeParserCount; |
| 596 | 565 |
| 597 // Document URLs. | 566 // Document URLs. |
| 598 KURL m_url; // Document.URL: The URL from which this document was retrieved. | 567 KURL m_url; // Document.URL: The URL from which this document was retrieved. |
| 599 KURL m_baseURL; // Node.baseURI: The URL to use when resolving relative URLs
. | 568 KURL m_baseURL; // Node.baseURI: The URL to use when resolving relative URLs
. |
| 600 | 569 |
| 601 // Mime-type of the document in case it was cloned or created by XHR. | 570 // Mime-type of the document in case it was cloned or created by XHR. |
| 602 AtomicString m_mimeType; | 571 AtomicString m_mimeType; |
| 603 | 572 |
| 604 RefPtr<CSSStyleSheet> m_elemSheet; | 573 RefPtr<CSSStyleSheet> m_elemSheet; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 620 | 589 |
| 621 OwnPtr<StyleEngine> m_styleEngine; | 590 OwnPtr<StyleEngine> m_styleEngine; |
| 622 | 591 |
| 623 TextLinkColors m_textLinkColors; | 592 TextLinkColors m_textLinkColors; |
| 624 | 593 |
| 625 ReadyState m_readyState; | 594 ReadyState m_readyState; |
| 626 bool m_isParsing; | 595 bool m_isParsing; |
| 627 | 596 |
| 628 bool m_containsValidityStyleRules; | 597 bool m_containsValidityStyleRules; |
| 629 | 598 |
| 630 String m_title; | |
| 631 String m_rawTitle; | |
| 632 RefPtr<Element> m_titleElement; | |
| 633 | |
| 634 OwnPtr<DocumentMarkerController> m_markers; | 599 OwnPtr<DocumentMarkerController> m_markers; |
| 635 | 600 |
| 636 LoadEventProgress m_loadEventProgress; | 601 LoadEventProgress m_loadEventProgress; |
| 637 | 602 |
| 638 double m_startTime; | 603 double m_startTime; |
| 639 | 604 |
| 640 Vector<RefPtr<HTMLScriptElement> > m_currentScriptStack; | |
| 641 | |
| 642 AtomicString m_contentLanguage; | 605 AtomicString m_contentLanguage; |
| 643 | 606 |
| 644 OwnPtr<SelectorQueryCache> m_selectorQueryCache; | 607 OwnPtr<SelectorQueryCache> m_selectorQueryCache; |
| 645 | 608 |
| 646 RenderView* m_renderView; | 609 RenderView* m_renderView; |
| 647 | 610 |
| 648 #if !ENABLE(OILPAN) | 611 #if !ENABLE(OILPAN) |
| 649 WeakPtrFactory<Document> m_weakFactory; | 612 WeakPtrFactory<Document> m_weakFactory; |
| 650 #endif | 613 #endif |
| 651 WeakPtr<Document> m_contextDocument; | 614 WeakPtr<Document> m_contextDocument; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 716 } | 679 } |
| 717 | 680 |
| 718 } // namespace blink | 681 } // namespace blink |
| 719 | 682 |
| 720 #ifndef NDEBUG | 683 #ifndef NDEBUG |
| 721 // Outside the WebCore namespace for ease of invocation from gdb. | 684 // Outside the WebCore namespace for ease of invocation from gdb. |
| 722 void showLiveDocumentInstances(); | 685 void showLiveDocumentInstances(); |
| 723 #endif | 686 #endif |
| 724 | 687 |
| 725 #endif // SKY_ENGINE_CORE_DOM_DOCUMENT_H_ | 688 #endif // SKY_ENGINE_CORE_DOM_DOCUMENT_H_ |
| OLD | NEW |