LayoutTests/ChangeLog

 12010-11-21 Rob Buis <rwlbuis@gmail.com>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 CSS 2.1 failure: at-import-*
 6 https://bugs.webkit.org/show_bug.cgi?id=47153
 7
 8 Import the two CSS2.1 Testsuite tests mentioned in the bug.
 9
 10 * css2.1/t040105-import-09-b.html: Added.
 11 * css2.1/t040105-import-10-b.html: Added.
 12 * platform/mac/css2.1/t040105-import-09-b-expected.checksum: Added.
 13 * platform/mac/css2.1/t040105-import-09-b-expected.png: Added.
 14 * platform/mac/css2.1/t040105-import-09-b-expected.txt: Added.
 15 * platform/mac/css2.1/t040105-import-10-b-expected.checksum: Added.
 16 * platform/mac/css2.1/t040105-import-10-b-expected.png: Added.
 17 * platform/mac/css2.1/t040105-import-10-b-expected.txt: Added.
 18
1192010-11-20 Rob Buis <rwlbuis@gmail.com>
220
321 Reviewed by NOBODY (OOPS!).

LayoutTests/css2.1/t040105-import-09-b.html

 1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
 2<html>
 3 <head>
 4 <title>CSS 2.1 Test Suite: At-rules</title>
 5 <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#at-rules">
 6 <style type="text/css">
 7
 8 @page;
 9 @charset;
 10 @import "support/import-green.css";
 11
 12 </style>
 13 </head>
 14 <body>
 15 <p class="import">This sentence must be green.</p>
 16 </body>
 17</html>

LayoutTests/css2.1/t040105-import-10-b.html

 1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
 2<html>
 3 <head>
 4 <title>CSS 2.1 Test Suite: At-rules</title>
 5 <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#at-rules">
 6 <style type="text/css">
 7
 8 # { background: red; }
 9 :unknownpseudo { background: red; }
 10 @import "support/import-green.css";
 11
 12 </style>
 13 </head>
 14 <body>
 15 <p class="import">This sentence must be green.</p>
 16 </body>
 17</html>

LayoutTests/platform/mac/css2.1/t040105-import-09-b-expected.checksum

 1b7763d24029a46b045e01c18f38d7d84
02\ No newline at end of file

LayoutTests/platform/mac/css2.1/t040105-import-09-b-expected.png

Exception raised during decoding git binary patch:
Error running git apply --directory=/tmp
with patch:
diff --git a/PrettyPatch20260610-169656-1wthnbf.bin b/PrettyPatch20260610-169656-1wthnbf.bin
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 0
HcmV?d00001

...
error: invalid path '/tmp/PrettyPatch20260610-169656-1wthnbf.bin'

/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:924:in `run_git_apply_on_patch'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:935:in `extract_contents_from_git_binary_literal_chunk'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:950:in `extract_contents_from_remote'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:713:in `initialize'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:845:in `new'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:845:in `block in parse'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:845:in `collect'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:845:in `parse'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:21:in `prettify'
/var/www/html/PrettyPatch/prettify.rb:30:in `<main>'

LayoutTests/platform/mac/css2.1/t040105-import-09-b-expected.txt

 1layer at (0,0) size 800x600
 2 RenderView at (0,0) size 800x600
 3layer at (0,0) size 800x50
 4 RenderBlock {HTML} at (0,0) size 800x50
 5 RenderBody {BODY} at (8,16) size 784x18
 6 RenderBlock {P} at (0,0) size 784x18 [color=#008000]
 7 RenderText {#text} at (0,0) size 182x18
 8 text run at (0,0) width 182: "This sentence must be green."

LayoutTests/platform/mac/css2.1/t040105-import-10-b-expected.checksum

 1b7763d24029a46b045e01c18f38d7d84
02\ No newline at end of file

LayoutTests/platform/mac/css2.1/t040105-import-10-b-expected.png

Exception raised during decoding git binary patch:
Error running git apply --directory=/tmp
with patch:
diff --git a/PrettyPatch20260610-169656-48xjmz.bin b/PrettyPatch20260610-169656-48xjmz.bin
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 0
HcmV?d00001

...
error: invalid path '/tmp/PrettyPatch20260610-169656-48xjmz.bin'

/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:924:in `run_git_apply_on_patch'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:935:in `extract_contents_from_git_binary_literal_chunk'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:950:in `extract_contents_from_remote'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:713:in `initialize'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:845:in `new'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:845:in `block in parse'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:845:in `collect'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:845:in `parse'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:21:in `prettify'
/var/www/html/PrettyPatch/prettify.rb:30:in `<main>'

LayoutTests/platform/mac/css2.1/t040105-import-10-b-expected.txt

 1layer at (0,0) size 800x600
 2 RenderView at (0,0) size 800x600
 3layer at (0,0) size 800x50
 4 RenderBlock {HTML} at (0,0) size 800x50
 5 RenderBody {BODY} at (8,16) size 784x18
 6 RenderBlock {P} at (0,0) size 784x18 [color=#008000]
 7 RenderText {#text} at (0,0) size 182x18
 8 text run at (0,0) width 182: "This sentence must be green."

WebCore/ChangeLog

 12010-11-21 Rob Buis <rwlbuis@gmail.com>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 CSS 2.1 failure: at-import-*
 6 https://bugs.webkit.org/show_bug.cgi?id=47153
 7
 8 Fix at-import-009.htm by ignoring invalid @media and @charset rules.
 9 Fix at-import-010.htm by only setting m_allowImportRules
 10 to false when creating valid style or page rules.
 11
 12 Tests: css2.1/t040105-import-09-b.html
 13 css2.1/t040105-import-10-b.html
 14
 15 * css/CSSGrammar.y:
 16 * css/CSSParser.cpp:
 17 (WebCore::CSSParser::createStyleRule):
 18 (WebCore::CSSParser::createPageRule):
 19
1202010-11-20 Rob Buis <rwlbuis@gmail.com>
221
322 Reviewed by NOBODY (OOPS!).

WebCore/css/CSSGrammar.y

@@ignored_charset:
375375 // Ignore any @charset rule not at the beginning of the style sheet.
376376 $$ = 0;
377377 }
 378 | CHARSET_SYM error ';' {
 379 $$ = 0;
 380 }
378381;
379382
380383rule_list:

@@media:
575578 | MEDIA_SYM maybe_space '{' maybe_space block_rule_list save_block {
576579 $$ = static_cast<CSSParser*>(parser)->createMediaRule(0, $5);
577580 }
 581 | MEDIA_SYM error ';' {
 582 $$ = 0;
 583 }
578584 ;
579585
580586medium:

WebCore/css/CSSParser.cpp

@@WebKitCSSKeyframesRule* CSSParser::createKeyframesRule()
54565456
54575457CSSRule* CSSParser::createStyleRule(Vector<CSSSelector*>* selectors)
54585458{
5459  m_allowImportRules = m_allowNamespaceDeclarations = false;
54605459 CSSStyleRule* result = 0;
54615460 markRuleBodyEnd();
54625461 if (selectors) {
 5462 m_allowImportRules = m_allowNamespaceDeclarations = false;
54635463 RefPtr<CSSStyleRule> rule = CSSStyleRule::create(m_styleSheet, m_lastSelectorLineNumber);
54645464 rule->adoptSelectorVector(*selectors);
54655465 if (m_hasFontFaceOnlyValues)

@@void CSSParser::addNamespace(const AtomicString& prefix, const AtomicString& uri
55135513CSSRule* CSSParser::createPageRule(CSSSelector* pageSelector)
55145514{
55155515 // FIXME: Margin at-rules are ignored.
5516  m_allowImportRules = m_allowNamespaceDeclarations = false;
55175516 CSSPageRule* pageRule = 0;
55185517 if (pageSelector) {
 5518 m_allowImportRules = m_allowNamespaceDeclarations = false;
55195519 RefPtr<CSSPageRule> rule = CSSPageRule::create(m_styleSheet, pageSelector, m_lastSelectorLineNumber);
55205520 rule->setDeclaration(CSSMutableStyleDeclaration::create(rule.get(), m_parsedProperties, m_numParsedProperties));
55215521 pageRule = rule.get();