Title: [165201] branches/safari-537.75-branch
Diff
Modified: branches/safari-537.75-branch/LayoutTests/ChangeLog (165200 => 165201)
--- branches/safari-537.75-branch/LayoutTests/ChangeLog 2014-03-06 19:40:06 UTC (rev 165200)
+++ branches/safari-537.75-branch/LayoutTests/ChangeLog 2014-03-06 19:51:57 UTC (rev 165201)
@@ -1,3 +1,18 @@
+2014-03-06 Matthew Hanson <[email protected]>
+
+ Merge r153788.
+
+ 2013-08-07 Antti Koivisto <[email protected]>
+
+ 2.5% regression on page cycler moz
+ https://bugs.webkit.org/show_bug.cgi?id=102822
+
+ Reviewed by Andreas Kling.
+
+ This is a progression.
+
+ * inspector/timeline/timeline-script-tag-1-expected.txt:
+
2014-03-05 Matthew Hanson <[email protected]>
Merge r158724.
Modified: branches/safari-537.75-branch/LayoutTests/inspector/timeline/timeline-script-tag-1-expected.txt (165200 => 165201)
--- branches/safari-537.75-branch/LayoutTests/inspector/timeline/timeline-script-tag-1-expected.txt 2014-03-06 19:40:06 UTC (rev 165200)
+++ branches/safari-537.75-branch/LayoutTests/inspector/timeline/timeline-script-tag-1-expected.txt 2014-03-06 19:51:57 UTC (rev 165201)
@@ -3,10 +3,8 @@
ParseHTML
-----> ScheduleStyleRecalculation
----> InvalidateLayout
ParseHTML
-----> ScheduleStyleRecalculation
----> EvaluateScript
--------> TimeStamp : SCRIPT TAG
----> InvalidateLayout
Modified: branches/safari-537.75-branch/Source/WebCore/ChangeLog (165200 => 165201)
--- branches/safari-537.75-branch/Source/WebCore/ChangeLog 2014-03-06 19:40:06 UTC (rev 165200)
+++ branches/safari-537.75-branch/Source/WebCore/ChangeLog 2014-03-06 19:51:57 UTC (rev 165201)
@@ -1,5 +1,41 @@
2014-03-06 Matthew Hanson <[email protected]>
+ Merge r153788.
+
+ 2013-08-07 Antti Koivisto <[email protected]>
+
+ 2.5% regression on page cycler moz
+ https://bugs.webkit.org/show_bug.cgi?id=102822
+
+ Reviewed by Andreas Kling.
+
+ DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache() triggers a style recalc for quirks mode
+ documents in the beginning of document parsing via Document::setCompatibilityMode. This often coalesces
+ with style recalc triggered by stylesheet loading. However on very simple documents it can generate genuinely
+ unnecessary work.
+
+ * dom/DocumentStyleSheetCollection.cpp:
+ (WebCore::DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache):
+
+ Check that we actually have cached injected stylesheets before triggering style recalc.
+
+ * page/PageGroup.cpp:
+ (WebCore::PageGroup::addUserStyleSheetToWorld):
+ (WebCore::PageGroup::removeUserStyleSheetFromWorld):
+ (WebCore::PageGroup::removeUserStyleSheetsFromWorld):
+ (WebCore::PageGroup::removeAllUserContent):
+
+ Fix a misspelling.
+
+ (WebCore::PageGroup::invalidateInjectedStyleSheetCacheInAllFrames):
+
+ Always invalidate style when user sheets change since we don't do that in
+ DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache anymore.
+
+ * page/PageGroup.h:
+
+2014-03-06 Matthew Hanson <[email protected]>
+
Merge r155071.
2013-09-04 Pratik Solanki <[email protected]>
Modified: branches/safari-537.75-branch/Source/WebCore/dom/DocumentStyleSheetCollection.cpp (165200 => 165201)
--- branches/safari-537.75-branch/Source/WebCore/dom/DocumentStyleSheetCollection.cpp 2014-03-06 19:40:06 UTC (rev 165200)
+++ branches/safari-537.75-branch/Source/WebCore/dom/DocumentStyleSheetCollection.cpp 2014-03-06 19:51:57 UTC (rev 165201)
@@ -187,7 +187,11 @@
void DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache()
{
+ if (!m_injectedStyleSheetCacheValid)
+ return;
m_injectedStyleSheetCacheValid = false;
+ if (m_injectedUserStyleSheets.isEmpty() && m_injectedAuthorStyleSheets.isEmpty())
+ return;
m_document->styleResolverChanged(DeferRecalcStyle);
}
Modified: branches/safari-537.75-branch/Source/WebCore/page/PageGroup.cpp (165200 => 165201)
--- branches/safari-537.75-branch/Source/WebCore/page/PageGroup.cpp 2014-03-06 19:40:06 UTC (rev 165200)
+++ branches/safari-537.75-branch/Source/WebCore/page/PageGroup.cpp 2014-03-06 19:51:57 UTC (rev 165201)
@@ -305,7 +305,7 @@
styleSheetsInWorld->append(userStyleSheet.release());
if (injectionTime == InjectInExistingDocuments)
- invalidatedInjectedStyleSheetCacheInAllFrames();
+ invalidateInjectedStyleSheetCacheInAllFrames();
}
void PageGroup::removeUserScriptFromWorld(DOMWrapperWorld* world, const KURL& url)
@@ -355,7 +355,7 @@
if (stylesheets->isEmpty())
m_userStyleSheets->remove(it);
- invalidatedInjectedStyleSheetCacheInAllFrames();
+ invalidateInjectedStyleSheetCacheInAllFrames();
}
void PageGroup::removeUserScriptsFromWorld(DOMWrapperWorld* world)
@@ -385,7 +385,7 @@
m_userStyleSheets->remove(it);
- invalidatedInjectedStyleSheetCacheInAllFrames();
+ invalidateInjectedStyleSheetCacheInAllFrames();
}
void PageGroup::removeAllUserContent()
@@ -394,17 +394,19 @@
if (m_userStyleSheets) {
m_userStyleSheets.clear();
- invalidatedInjectedStyleSheetCacheInAllFrames();
+ invalidateInjectedStyleSheetCacheInAllFrames();
}
}
-void PageGroup::invalidatedInjectedStyleSheetCacheInAllFrames()
+void PageGroup::invalidateInjectedStyleSheetCacheInAllFrames()
{
// Clear our cached sheets and have them just reparse.
HashSet<Page*>::const_iterator end = m_pages.end();
for (HashSet<Page*>::const_iterator it = m_pages.begin(); it != end; ++it) {
- for (Frame* frame = (*it)->mainFrame(); frame; frame = frame->tree()->traverseNext())
+ for (Frame* frame = (*it)->mainFrame(); frame; frame = frame->tree()->traverseNext()) {
frame->document()->styleSheetCollection()->invalidateInjectedStyleSheetCache();
+ frame->document()->styleResolverChanged(DeferRecalcStyle);
+ }
}
}
Modified: branches/safari-537.75-branch/Source/WebCore/page/PageGroup.h (165200 => 165201)
--- branches/safari-537.75-branch/Source/WebCore/page/PageGroup.h 2014-03-06 19:40:06 UTC (rev 165200)
+++ branches/safari-537.75-branch/Source/WebCore/page/PageGroup.h 2014-03-06 19:51:57 UTC (rev 165201)
@@ -119,7 +119,7 @@
PageGroup(Page*);
void addVisitedLink(LinkHash);
- void invalidatedInjectedStyleSheetCacheInAllFrames();
+ void invalidateInjectedStyleSheetCacheInAllFrames();
String m_name;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes