[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
hyatt at apple.com
hyatt at apple.com
Wed Dec 22 12:39:16 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 9e924286bb3c8110590572b463bb25aff3421dff
Author: hyatt at apple.com <hyatt at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Aug 26 19:33:40 2010 +0000
https://bugs.webkit.org/show_bug.cgi?id=39647, font face loads do a synchronous recalcStyle(Force)
on the whole document. Change these calls to do async recalcStyles instead.
Reviewed by Simon Fraser.
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::fontLoaded):
(WebCore::CSSFontSelector::fontCacheInvalidated):
* dom/Document.cpp:
(WebCore::Document::scheduleForcedStyleRecalc):
(WebCore::Document::styleSelectorChanged):
* dom/Document.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index aec46e4..5765b34 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-08-26 David Hyatt <hyatt at apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=39647, font face loads do a synchronous recalcStyle(Force)
+ on the whole document. Change these calls to do async recalcStyles instead.
+
+ * css/CSSFontSelector.cpp:
+ (WebCore::CSSFontSelector::fontLoaded):
+ (WebCore::CSSFontSelector::fontCacheInvalidated):
+ * dom/Document.cpp:
+ (WebCore::Document::scheduleForcedStyleRecalc):
+ (WebCore::Document::styleSelectorChanged):
+ * dom/Document.h:
+
2010-08-26 Xan Lopez <xlopez at igalia.com>
Reviewed by Martin Robinson.
diff --git a/WebCore/css/CSSFontSelector.cpp b/WebCore/css/CSSFontSelector.cpp
index b98dcae..50627d7 100644
--- a/WebCore/css/CSSFontSelector.cpp
+++ b/WebCore/css/CSSFontSelector.cpp
@@ -356,16 +356,14 @@ void CSSFontSelector::fontLoaded()
{
if (!m_document || m_document->inPageCache() || !m_document->renderer())
return;
- m_document->recalcStyle(Document::Force);
- m_document->renderer()->setNeedsLayoutAndPrefWidthsRecalc();
+ m_document->scheduleForcedStyleRecalc();
}
void CSSFontSelector::fontCacheInvalidated()
{
if (!m_document || m_document->inPageCache() || !m_document->renderer())
return;
- m_document->recalcStyle(Document::Force);
- m_document->renderer()->setNeedsLayoutAndPrefWidthsRecalc();
+ m_document->scheduleForcedStyleRecalc();
}
static FontData* fontDataForGenericFamily(Document* document, const FontDescription& fontDescription, const AtomicString& familyName)
diff --git a/WebCore/dom/Document.cpp b/WebCore/dom/Document.cpp
index 17ce98f..87db378 100644
--- a/WebCore/dom/Document.cpp
+++ b/WebCore/dom/Document.cpp
@@ -1360,6 +1360,12 @@ PassRefPtr<TreeWalker> Document::createTreeWalker(Node* root, unsigned whatToSho
return TreeWalker::create(root, whatToShow, filter, expandEntityReferences);
}
+void Document::scheduleForcedStyleRecalc()
+{
+ m_pendingStyleRecalcShouldForce = true;
+ scheduleStyleRecalc();
+}
+
void Document::scheduleStyleRecalc()
{
if (m_styleRecalcTimer.isActive() || inPageCache())
@@ -2734,8 +2740,7 @@ void Document::styleSelectorChanged(StyleSelectorUpdateFlag updateFlag)
recalcStyleSelector();
if (updateFlag == DeferRecalcStyle) {
- m_pendingStyleRecalcShouldForce = true;
- scheduleStyleRecalc();
+ scheduleForcedStyleRecalc();
return;
}
diff --git a/WebCore/dom/Document.h b/WebCore/dom/Document.h
index 9941c2d..79db798 100644
--- a/WebCore/dom/Document.h
+++ b/WebCore/dom/Document.h
@@ -641,6 +641,7 @@ public:
void setCSSTarget(Element*);
Element* cssTarget() const { return m_cssTarget; }
+ void scheduleForcedStyleRecalc();
void scheduleStyleRecalc();
void unscheduleStyleRecalc();
void styleRecalcTimerFired(Timer<Document>*);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list