Move seamless stylesheet collecting to DocumentStyleSheetCollection
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 Oct 2012 12:37:57 +0000 (12:37 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 Oct 2012 12:37:57 +0000 (12:37 +0000)
commit36b6ab988e3bf04455491e4d66050a0d5853e8ea
tree934ca953982014106c7f2de6977ae883ad11b90c
parentf26aabbb4836b71bfa0068b10dc5f6f78b50b14a
Move seamless stylesheet collecting to DocumentStyleSheetCollection
https://bugs.webkit.org/show_bug.cgi?id=100655

Reviewed by Andreas Kling.

Move the code from StyleResolver to DocumentStyleSheetCollection. StyleResolver should focus on resolving style.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::StyleResolver):

    Use standard create() pattern.

(WebCore):
* css/StyleResolver.h:
(StyleResolver):
* dom/Document.cpp:
(WebCore::Document::Document):
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::collectActiveCSSStyleSheetsFromSeamlessParents):

    Since parent activeAuthorStyleSheets() contains all seamlessly inherited sheets too, this does not need to
    iterate to ancestors anymore.

(WebCore):
(WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
* dom/DocumentStyleSheetCollection.h:
(WebCore::DocumentStyleSheetCollection::create):
(DocumentStyleSheetCollection):
(WebCore::DocumentStyleSheetCollection::styleSheetsForStyleSheetList):
(WebCore::DocumentStyleSheetCollection::activeAuthorStyleSheets):

    activeAuthorStyleSheets() now includes the stylesheets inherited from the seamless parent too.

(WebCore::DocumentStyleSheetCollection::needsUpdateActiveStylesheetsOnStyleRecalc):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@132787 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/css/StyleResolver.h
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/DocumentStyleSheetCollection.cpp
Source/WebCore/dom/DocumentStyleSheetCollection.h