diff options
Diffstat (limited to 'WebCore/dom/Document.h')
-rw-r--r-- | WebCore/dom/Document.h | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/WebCore/dom/Document.h b/WebCore/dom/Document.h index 0aba06c..7f6c9d7 100644 --- a/WebCore/dom/Document.h +++ b/WebCore/dom/Document.h @@ -76,6 +76,8 @@ class Element; class EntityReference; class Event; class EventListener; +class EventQueue; +class FormAssociatedElement; class Frame; class FrameView; class HTMLCanvasElement; @@ -490,8 +492,8 @@ public: bool hasStateForNewFormElements() const; bool takeStateForFormElement(AtomicStringImpl* name, AtomicStringImpl* type, String& state); - void registerFormElementWithFormAttribute(Element*); - void unregisterFormElementWithFormAttribute(Element*); + void registerFormElementWithFormAttribute(FormAssociatedElement*); + void unregisterFormElementWithFormAttribute(FormAssociatedElement*); void resetFormElementsOwner(HTMLFormElement*); FrameView* view() const; // can be NULL @@ -1017,7 +1019,7 @@ public: bool processingLoadEvent() const { return m_processingLoadEvent; } #if ENABLE(DATABASE) - virtual bool isDatabaseReadOnly() const; + virtual bool allowDatabaseAccess() const; virtual void databaseExceededQuota(const String& name); #endif @@ -1038,10 +1040,11 @@ public: bool containsValidityStyleRules() const { return m_containsValidityStyleRules; } void setContainsValidityStyleRules() { m_containsValidityStyleRules = true; } - void enqueueEvent(PassRefPtr<Event>); + void enqueueWindowEvent(PassRefPtr<Event>); void enqueuePageshowEvent(PageshowEventPersistence); void enqueueHashchangeEvent(const String& oldURL, const String& newURL); void enqueuePopstateEvent(PassRefPtr<SerializedScriptValue> stateObject); + EventQueue* eventQueue() const { return m_eventQueue.get(); } void addMediaCanStartListener(MediaCanStartListener*); void removeMediaCanStartListener(MediaCanStartListener*); @@ -1076,6 +1079,8 @@ public: bool mayCauseFlashOfUnstyledContent() const; + void initDNSPrefetch(); + protected: Document(Frame*, const KURL& url, bool isXHTML, bool isHTML, const KURL& baseURL = KURL()); @@ -1129,8 +1134,6 @@ private: virtual const KURL& virtualURL() const; // Same as url(), but needed for ScriptExecutionContext to implement it without a performance loss for direct calls. virtual KURL virtualCompleteURL(const String&) const; // Same as completeURL() for the same reason as above. - void initDNSPrefetch(); - String encoding() const; void updateTitle(); @@ -1141,8 +1144,6 @@ private: void createStyleSelector(); - void pendingEventTimerFired(Timer<Document>*); - PassRefPtr<NodeList> handleZeroPadding(const HitTestRequest&, HitTestResult&) const; void loadEventDelayTimerFired(Timer<Document>*); @@ -1174,10 +1175,10 @@ private: RefPtr<DocumentType> m_docType; mutable RefPtr<DOMImplementation> m_implementation; - // Track the number of currently loading top-level stylesheets. Sheets - // loaded using the @import directive are not included in this count. + // Track the number of currently loading top-level stylesheets needed for rendering. + // Sheets loaded using the @import directive are not included in this count. // We use this count of pending sheets to detect when we can begin attaching - // elements. + // elements and when it is safe to execute scripts. int m_pendingStylesheets; // But sometimes you need to ignore pending stylesheet count to @@ -1229,7 +1230,8 @@ private: typedef ListHashSet<Element*, 64> FormElementListHashSet; FormElementListHashSet m_formElementsWithState; - FormElementListHashSet m_formElementsWithFormAttribute; + typedef ListHashSet<FormAssociatedElement*, 32> FormAssociatedElementListHashSet; + FormAssociatedElementListHashSet m_formElementsWithFormAttribute; typedef HashMap<FormElementKey, Vector<String>, FormElementKeyHash, FormElementKeyHashTraits> FormElementStateMap; FormElementStateMap m_stateForNewFormElements; @@ -1369,9 +1371,8 @@ private: #endif bool m_usingGeolocation; - - Timer<Document> m_pendingEventTimer; - Vector<RefPtr<Event> > m_pendingEventQueue; + + OwnPtr<EventQueue> m_eventQueue; #if ENABLE(WML) bool m_containsWMLContent; |