Track rem unit usage in StyleSheetInternal
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Apr 2012 21:23:13 +0000 (21:23 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Apr 2012 21:23:13 +0000 (21:23 +0000)
commit87bb183cea810bc7465723a78eb8bad5dd0bb3a1
tree1ba167be3aabe6b714742117138ab628026f159c
parentddd250e18af3dbbdf860042f1edd7e15bd4653c4
Track rem unit usage in StyleSheetInternal
https://bugs.webkit.org/show_bug.cgi?id=83923

Reviewed by Andreas Kling.

Currently CSSParser sets usesRemUnits flag directly to Document. It should be set to
the stylesheet instead so parser does not need to know about the document. This also
avoids setting the flag unnecessarily when the stylesheet is not used.

* css/CSSGrammar.y:
* css/CSSStyleSheet.cpp:
(WebCore::StyleSheetInternal::StyleSheetInternal):
* css/CSSStyleSheet.h:
(WebCore::StyleSheetInternal::parserSetUsesRemUnits):
(WebCore::StyleSheetInternal::usesRemUnits):
(StyleSheetInternal):
* dom/Document.cpp:
(WebCore):
(WebCore::checkUsesRemUnits):
(WebCore::Document::updateActiveStylesheets):
* dom/Document.h:
(WebCore::Document::usesRemUnits):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114168 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/css/CSSGrammar.y
Source/WebCore/css/CSSStyleSheet.cpp
Source/WebCore/css/CSSStyleSheet.h
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h