haikuwebkit/LayoutTests/css3/supports-not-selector-expec...

14 lines
730 B
HTML
Raw Permalink Normal View History

REGRESSION: CSS not() selector does not work when it appears after or within @supports https://bugs.webkit.org/show_bug.cgi?id=136063 Patch by Yuki Sekiguchi <yuki.sekiguchi@access-company.com> on 2014-08-21 Reviewed by Darin Adler. Source/WebCore: CSSParser changes its m_parsingMode to SupportsMode when it finds "@supports" token. However, the mode will be never changed to NormalMode. This changes parsing algorithm for "not" token forever, and it cannot parse not pseudo class selector. When we finish parsing @supports rule, we should change to normal mode. @media does the same thing. This patch changed CharacterEndMediaQuery to CharacterEndConditionQuery, and we change parsing mode from SupportsMode to NormalMode when the parser finished to parse @supports rule. Like "@-webkit-mediaquery", we cannot use '{' to "@-webkit-supports-condition". Changed "@-webkit-supports-condition" parsing rule and parseSupportsCondition() not to use '{'. Tests: css3/supports-not-selector-cssom.html css3/supports-not-selector.html * css/CSSGrammar.y.in: * css/CSSParser.cpp: (WebCore::CSSParser::parseSupportsCondition): (WebCore::isCSSLetter): (WebCore::CSSParser::realLex): LayoutTests: Test that @supports doesn't break "not" pseudo class selector. * css3/supports-not-selector-cssom-expected.txt: Added. * css3/supports-not-selector-cssom.html: Added. * css3/supports-not-selector-expected.html: Added. * css3/supports-not-selector.html: Added. Canonical link: https://commits.webkit.org/153969@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172833 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-08-21 20:29:43 +00:00
<!DOCTYPE html>
<style>
div { color: green; }
</style>
<div>This should be green if not() pseudo class selector works inside @supports rule.</div>
<div>This should be green if not() pseudo class selector works after/outside @supports rule.</div>
<div>This should be green if not() pseudo class selector DOES NOT work inside @supports rule without condition.</div>
<div>This should be green if not() pseudo class selector works after/outside @supports rule without condition.</div>
<div>This should be green if not() pseudo class selector DOES NOT work after/outside @supports rule without rule.</div>
<div>This should be green if not() pseudo class selector works after/outside @supports rule without condition and rule.</div>