Changeset 153788 in webkit
- Timestamp:
- Aug 7, 2013 8:02:39 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r153784 r153788 1 2013-08-07 Antti Koivisto <antti@apple.com> 2 3 2.5% regression on page cycler moz 4 https://bugs.webkit.org/show_bug.cgi?id=102822 5 6 Reviewed by Andreas Kling. 7 8 This is a progression. 9 10 * inspector/timeline/timeline-script-tag-1-expected.txt: 11 1 12 2013-08-07 Mirela Budaes <mbudaes@adobe.com> 2 13 -
trunk/LayoutTests/inspector/timeline/timeline-script-tag-1-expected.txt
r135082 r153788 4 4 5 5 ParseHTML 6 ----> ScheduleStyleRecalculation7 6 ----> InvalidateLayout 8 7 ParseHTML 9 ----> ScheduleStyleRecalculation10 8 ----> EvaluateScript 11 9 --------> TimeStamp : SCRIPT TAG -
trunk/Source/WebCore/ChangeLog
r153787 r153788 1 2013-08-07 Antti Koivisto <antti@apple.com> 2 3 2.5% regression on page cycler moz 4 https://bugs.webkit.org/show_bug.cgi?id=102822 5 6 Reviewed by Andreas Kling. 7 8 DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache() triggers a style recalc for quirks mode 9 documents in the beginning of document parsing via Document::setCompatibilityMode. This often coalesces 10 with style recalc triggered by stylesheet loading. However on very simple documents it can generate genuinely 11 unnecessary work. 12 13 * dom/DocumentStyleSheetCollection.cpp: 14 (WebCore::DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache): 15 16 Check that we actually have cached injected stylesheets before triggering style recalc. 17 18 * page/PageGroup.cpp: 19 (WebCore::PageGroup::addUserStyleSheetToWorld): 20 (WebCore::PageGroup::removeUserStyleSheetFromWorld): 21 (WebCore::PageGroup::removeUserStyleSheetsFromWorld): 22 (WebCore::PageGroup::removeAllUserContent): 23 24 Fix a misspelling. 25 26 (WebCore::PageGroup::invalidateInjectedStyleSheetCacheInAllFrames): 27 28 Always invalidate style when user sheets change since we don't do that in 29 DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache anymore. 30 31 * page/PageGroup.h: 32 1 33 2013-08-07 Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk> 2 34 -
trunk/Source/WebCore/dom/DocumentStyleSheetCollection.cpp
r153641 r153788 188 188 void DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache() 189 189 { 190 if (!m_injectedStyleSheetCacheValid) 191 return; 190 192 m_injectedStyleSheetCacheValid = false; 193 if (m_injectedUserStyleSheets.isEmpty() && m_injectedAuthorStyleSheets.isEmpty()) 194 return; 191 195 m_document->styleResolverChanged(DeferRecalcStyle); 192 196 } -
trunk/Source/WebCore/page/PageGroup.cpp
r152004 r153788 306 306 307 307 if (injectionTime == InjectInExistingDocuments) 308 invalidate dInjectedStyleSheetCacheInAllFrames();308 invalidateInjectedStyleSheetCacheInAllFrames(); 309 309 } 310 310 … … 356 356 m_userStyleSheets->remove(it); 357 357 358 invalidate dInjectedStyleSheetCacheInAllFrames();358 invalidateInjectedStyleSheetCacheInAllFrames(); 359 359 } 360 360 … … 386 386 m_userStyleSheets->remove(it); 387 387 388 invalidate dInjectedStyleSheetCacheInAllFrames();388 invalidateInjectedStyleSheetCacheInAllFrames(); 389 389 } 390 390 … … 395 395 if (m_userStyleSheets) { 396 396 m_userStyleSheets.clear(); 397 invalidate dInjectedStyleSheetCacheInAllFrames();398 } 399 } 400 401 void PageGroup::invalidate dInjectedStyleSheetCacheInAllFrames()397 invalidateInjectedStyleSheetCacheInAllFrames(); 398 } 399 } 400 401 void PageGroup::invalidateInjectedStyleSheetCacheInAllFrames() 402 402 { 403 403 // Clear our cached sheets and have them just reparse. 404 404 HashSet<Page*>::const_iterator end = m_pages.end(); 405 405 for (HashSet<Page*>::const_iterator it = m_pages.begin(); it != end; ++it) { 406 for (Frame* frame = (*it)->mainFrame(); frame; frame = frame->tree()->traverseNext()) 406 for (Frame* frame = (*it)->mainFrame(); frame; frame = frame->tree()->traverseNext()) { 407 407 frame->document()->styleSheetCollection()->invalidateInjectedStyleSheetCache(); 408 frame->document()->styleResolverChanged(DeferRecalcStyle); 409 } 408 410 } 409 411 } -
trunk/Source/WebCore/page/PageGroup.h
r149840 r153788 120 120 121 121 void addVisitedLink(LinkHash); 122 void invalidate dInjectedStyleSheetCacheInAllFrames();122 void invalidateInjectedStyleSheetCacheInAllFrames(); 123 123 124 124 String m_name;
Note: See TracChangeset
for help on using the changeset viewer.