[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

steveblock at google.com steveblock at google.com
Thu Apr 8 00:57:06 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 01b09c85f58c7b95aee959e585f6b0b47bee0491
Author: steveblock at google.com <steveblock at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jan 7 12:16:25 2010 +0000

    Android requires ability to increase layout delay
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52919 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index acb1fe9..e022169 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-01-07  Steve Block  <steveblock at google.com>
+
+        Reviewed by Darin Adler.
+
+        Adds the ability to increase the delay used when scheduling layout.
+        https://bugs.webkit.org/show_bug.cgi?id=32875
+
+        No new tests possible.
+
+        * dom/Document.cpp: Modified.
+        (WebCore::Document::Document): Modified. Initializes extra layout delay to zero.
+        (WebCore::Document::minimumLayoutDelay): Modified. Adds extra layout delay when calculating minimum layout delay.
+        * dom/Document.h: Modified.
+        (WebCore::Document::setExtraLayoutDelay): Added. Sets the extra layout delay.
+
 2010-01-07  Kent Tamura  <tkent at chromium.org>
 
         Reviewed by Eric Seidel.
diff --git a/WebCore/dom/Document.cpp b/WebCore/dom/Document.cpp
index c080340..e3c5463 100644
--- a/WebCore/dom/Document.cpp
+++ b/WebCore/dom/Document.cpp
@@ -407,6 +407,7 @@ Document::Document(Frame* frame, bool isXHTML)
     m_processingLoadEvent = false;
     m_startTime = currentTime();
     m_overMinimumLayoutThreshold = false;
+    m_extraLayoutDelay = 0;
     
     initSecurityContext();
     initDNSPrefetch();
@@ -1818,13 +1819,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 96089de..8e6ab1f 100644
--- a/WebCore/dom/Document.h
+++ b/WebCore/dom/Document.h
@@ -531,6 +531,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;
     
@@ -1089,6 +1093,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;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list