Skip to content
  • antti@apple.com's avatar
    2.5% regression on page cycler moz · dacb7b8e
    antti@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=102822
    
    Source/WebCore: 
    
    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:
    
    LayoutTests: 
    
    Reviewed by Andreas Kling.
            
    This is a progression.
    
    * inspector/timeline/timeline-script-tag-1-expected.txt:
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153788 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    dacb7b8e