Collect user style sheets in DocumentStyleSheetCollection
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Nov 2012 11:36:58 +0000 (11:36 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Nov 2012 11:36:58 +0000 (11:36 +0000)
commit07423f7e81e59d63ce038403cd901730953adb02
tree8fd84ab9f4b228e6966dd2de21444c8c527a2760
parente9347996452d890205a23e818b14bda6e7de5b56
Collect user style sheets in DocumentStyleSheetCollection
https://bugs.webkit.org/show_bug.cgi?id=102683

Reviewed by Andreas Kling.

Move the user stylesheet collection logic from StyleResolver to DocumentStyleSheetCollection.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::StyleResolver):
(WebCore::StyleResolver::collectRulesFromUserStyleSheets):
(WebCore::collectCSSOMWrappers):
* css/StyleResolver.h:
(StyleResolver):
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::~DocumentStyleSheetCollection):
(WebCore::DocumentStyleSheetCollection::pageUserStyleSheet):
(WebCore::DocumentStyleSheetCollection::clearPageUserStyleSheet):
(WebCore::DocumentStyleSheetCollection::updatePageUserStyleSheet):
(WebCore::DocumentStyleSheetCollection::analyzeStyleSheetChange):
(WebCore::collectActiveStyleSheetsFromSeamlessParents):
(WebCore::DocumentStyleSheetCollection::updateStyleResolver):

    Factor the StyleResolver updating code to function.

(WebCore):
(WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):

    Collect the user style sheets. Some renaming and other minor refactoring.

(WebCore::DocumentStyleSheetCollection::reportMemoryUsage):
* dom/DocumentStyleSheetCollection.h:
(WebCore::DocumentStyleSheetCollection::activeUserStyleSheets):

    Add activeUserStyleSheets vector that contains all user stylesheets from different sources,
    similar to activeAuthorStyleSheets.

(DocumentStyleSheetCollection):
(WebCore::DocumentStyleSheetCollection::documentUserStyleSheets):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@135271 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
Source/WebCore/page/Page.cpp