Source/WebCore/ChangeLog

 12012-11-15 Takashi Sakamoto <tasak@google.com>
 2
 3 ASSERT_NOT_REACHED() when building a CSSOM wrapper for StyleRuleHost
 4 https://bugs.webkit.org/show_bug.cgi?id=102116
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 @host @-rules are shown in matchedCSSRules in WebInspector, because
 9 @host @-rules are stored in scoped author stylesheets.
 10 However, there is no implementaiton for CSSOMWrapper.
 11
 12 Test: inspector/styles/styles-include-host-rules-crash.html
 13
 14 * css/StyleRule.cpp:
 15 (WebCore::StyleRuleBase::createCSSOMWrapper):
 16
1172012-11-14 Shinya Kawanaka <shinyak@chromium.org>
218
319 Changing pseudoClass (:checked) should cause distribution.

Source/WebCore/css/StyleRule.cpp

2828#include "CSSMediaRule.h"
2929#include "CSSPageRule.h"
3030#include "CSSStyleRule.h"
 31#include "CSSUnknownRule.h"
3132#include "StyleRuleImport.h"
3233#include "WebCoreMemoryInstrumentation.h"
3334#include "WebKitCSSKeyframeRule.h"

@@PassRefPtr<CSSRule> StyleRuleBase::createCSSOMWrapper(CSSStyleSheet* parentSheet
220221 break;
221222#endif
222223 case Host:
 224 // FIXME: The current CSSOM editor's draft (http://dev.w3.org/csswg/cssom/) does not handle @host rules (see bug 102344).
 225 rule = adoptRef(new CSSUnknownRule());
 226 break;
223227 case Unknown:
224228 case Charset:
225229 case Keyframe:

LayoutTests/ChangeLog

 12012-11-15 Takashi Sakamoto <tasak@google.com>
 2
 3 ASSERT_NOT_REACHED() when building a CSSOM wrapper for StyleRuleHost
 4 https://bugs.webkit.org/show_bug.cgi?id=102116
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 * inspector/styles/styles-include-host-rules-crash-expected.txt: Added.
 9 * inspector/styles/styles-include-host-rules-crash.html: Added.
 10
1112012-11-14 Shinya Kawanaka <shinyak@chromium.org>
212
313 Changing pseudoClass (:checked) should cause distribution.

LayoutTests/inspector/styles/styles-include-host-rules-crash-expected.txt

 1[bug 102116] - https://bugs.webkit.org/show_bug.cgi?id=102116 - ASSERT_NOT_REACHED() when building a CSSOM wrapper for StyleRuleHost. If this test passes, no crash occurs.
 2
 3Foo
 4[expanded]
 5display: block;
 6 div - block user agent stylesheet
 7
 8[expanded]
 9element.style { ()
 10
 11======== Matched CSS Rules ========
 12[expanded]
 13div { (user agent stylesheet)
 14display: block;
 15
 16
 17

LayoutTests/inspector/styles/styles-include-host-rules-crash.html

 1<html>
 2<head>
 3<style>
 4@host {
 5 div { border: 1px solid blue; }
 6}
 7</style>
 8<script src="../../http/tests/inspector/inspector-test.js"></script>
 9<script src="../../http/tests/inspector/elements-test.js"></script>
 10<script>
 11
 12function test()
 13{
 14 InspectorTest.selectNodeAndWaitForStylesWithComputed("foo", step1);
 15
 16 function step1()
 17 {
 18 InspectorTest.dumpSelectedElementStyles(false, false);
 19 InspectorTest.completeTest();
 20 }
 21}
 22
 23</script>
 24</head>
 25
 26<body onload="runTest()">
 27<p>
 28[bug 102116] - <a href="https://bugs.webkit.org/show_bug.cgi?id=102116">https://bugs.webkit.org/show_bug.cgi?id=102116</a> -
 29ASSERT_NOT_REACHED() when building a CSSOM wrapper for StyleRuleHost.
 30If this test passes, no crash occurs.
 31</p>
 32
 33<div id="container">
 34 <div id="foo">Foo</div>
 35</div>
 36
 37</body>
 38</html>