[REGRESSION] Crash when copying a StyleRuleMedia with a NULL m_mediaQueries
authorapavlov@chromium.org <apavlov@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Jul 2012 14:44:19 +0000 (14:44 +0000)
committerapavlov@chromium.org <apavlov@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Jul 2012 14:44:19 +0000 (14:44 +0000)
commit2e9f1a919230f619ab97370d0943d1306a9008bf
treeaec5752fe0de3e6798a4a9205336ab129a2214a6
parent7288bd8048399dd8a8eed2728705ff783d634144
[REGRESSION] Crash when copying a StyleRuleMedia with a NULL m_mediaQueries
https://bugs.webkit.org/show_bug.cgi?id=90459

Reviewed by Andreas Kling.

Source/WebCore:

Create StyleRuleMedia with a non-NULL MediaQuerySet. The respective NULL checks for it were all over the code,
except the copy constructor. Added the check, just in case.

* css/CSSParser.cpp:
(WebCore::CSSParser::createMediaRule):
* css/StyleRule.cpp:
(WebCore::StyleRuleMedia::StyleRuleMedia):

LayoutTests:

* inspector/styles/get-set-stylesheet-text-expected.txt:
* inspector/styles/resources/get-set-stylesheet-text.css:
(@media):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121764 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/inspector/styles/get-set-stylesheet-text-expected.txt
LayoutTests/inspector/styles/resources/get-set-stylesheet-text.css
Source/WebCore/ChangeLog
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/StyleRule.cpp