[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.18-1-697-g2f78b87
steveblock at google.com
steveblock at google.com
Wed Jan 20 22:15:39 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit bf5f3259ad6687323ef6a49c31792802a0631732
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