diff options
Diffstat (limited to 'WebCore/dom')
| -rw-r--r-- | WebCore/dom/Document.cpp | 8 | ||||
| -rw-r--r-- | WebCore/dom/Document.h | 19 |
2 files changed, 13 insertions, 14 deletions
diff --git a/WebCore/dom/Document.cpp b/WebCore/dom/Document.cpp index 85966d7..13c2fae 100644 --- a/WebCore/dom/Document.cpp +++ b/WebCore/dom/Document.cpp @@ -371,9 +371,6 @@ Document::Document(Frame* frame, bool isXHTML) , m_hasOpenDatabases(false) #endif , m_usingGeolocation(false) -#ifdef ANDROID_MOBILE - , mExtraLayoutDelay(0) -#endif #if ENABLE(WML) , m_containsWMLContent(false) #endif @@ -431,6 +428,7 @@ Document::Document(Frame* frame, bool isXHTML) m_processingLoadEvent = false; m_startTime = currentTime(); m_overMinimumLayoutThreshold = false; + m_extraLayoutDelay = 0; initSecurityContext(); initDNSPrefetch(); @@ -1880,13 +1878,13 @@ bool Document::shouldScheduleLayout() int Document::minimumLayoutDelay() { if (m_overMinimumLayoutThreshold) - return 0; + return m_extraLayoutDelay; int elapsed = elapsedTime(); m_overMinimumLayoutThreshold = elapsed > cLayoutScheduleThreshold; // We'll want to schedule the timer to fire at the minimum layout threshold. - return max(0, cLayoutScheduleThreshold - elapsed); + return max(0, cLayoutScheduleThreshold - elapsed) + m_extraLayoutDelay; } int Document::elapsedTime() const diff --git a/WebCore/dom/Document.h b/WebCore/dom/Document.h index 3d0582c..f2125b1 100644 --- a/WebCore/dom/Document.h +++ b/WebCore/dom/Document.h @@ -523,6 +523,10 @@ public: void setParsing(bool); bool parsing() const { return m_bParsing; } int minimumLayoutDelay(); + + // This method is used by Android. + void setExtraLayoutDelay(int delay) { m_extraLayoutDelay = delay; } + bool shouldScheduleLayout(); int elapsedTime() const; @@ -815,11 +819,6 @@ public: void updateFocusAppearanceSoon(); void cancelFocusAppearanceUpdate(); -#ifdef ANDROID_MOBILE - void setExtraLayoutDelay(int delay) { mExtraLayoutDelay = delay; } - int extraLayoutDelay() { return mExtraLayoutDelay; } -#endif - // FF method for accessing the selection added for compatability. DOMSelection* getSelection() const; @@ -1091,9 +1090,11 @@ private: typedef std::pair<Vector<DocumentMarker>, Vector<IntRect> > MarkerMapVectorPair; typedef HashMap<RefPtr<Node>, MarkerMapVectorPair*> MarkerMap; MarkerMap m_markers; + #if !PLATFORM(ANDROID) mutable AXObjectCache* m_axObjectCache; #endif + Timer<Document> m_updateFocusAppearanceTimer; Element* m_cssTarget; @@ -1103,6 +1104,10 @@ private: HashSet<RefPtr<HistoryItem> > m_associatedHistoryItems; double m_startTime; bool m_overMinimumLayoutThreshold; + // This is used to increase the minimum delay between re-layouts. It is set + // using setExtraLayoutDelay to modify the minimum delay used at different + // points during the lifetime of the Document. + int m_extraLayoutDelay; Vector<std::pair<ScriptElementData*, CachedResourceHandle<CachedScript> > > m_scriptsToExecuteSoon; Timer<Document> m_executeScriptSoonTimer; @@ -1195,10 +1200,6 @@ private: bool m_usingGeolocation; -#ifdef ANDROID_MOBILE - int mExtraLayoutDelay; -#endif - #if ENABLE(WML) bool m_containsWMLContent; #endif |
