RESOLVED FIXED 104822
Implement CSSSupportsRule
https://bugs.webkit.org/show_bug.cgi?id=104822
Summary Implement CSSSupportsRule
Pablo Flouret
Reported 2012-12-12 10:05:27 PST
http://dev.w3.org/csswg/css3-conditional/#the-csssupportsrule-interface Right now @supports is not creating CSSSupportRules, so they don't show up in the stylesheets' cssRules, and also creates problems like the one in http://hg.csswg.org/test/file/5f94e4b03ed9/contributors/opera/submitted/css3-conditional/at-supports-004.html Namely, @support rules declared within @media are applied whether the media query applies or not.
Attachments
Patch (76.19 KB, patch)
2012-12-20 12:40 PST, Pablo Flouret
no flags
Patch (76.53 KB, patch)
2012-12-20 13:49 PST, Pablo Flouret
no flags
Patch (68.25 KB, patch)
2013-01-14 13:41 PST, Pablo Flouret
no flags
Patch (68.29 KB, patch)
2013-01-14 14:17 PST, Pablo Flouret
no flags
Pablo Flouret
Comment 1 2012-12-20 12:40:17 PST
WebKit Review Bot
Comment 2 2012-12-20 12:46:09 PST
Attachment 180389 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/css3..." exit_code: 1 Source/WebCore/css/RuleSet.cpp:326: One line control clauses should not use braces. [whitespace/braces] [4] Source/WebCore/css/CSSRule.h:54: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4] Source/WebCore/css/CSSPropertySourceData.h:100: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4] Source/WebCore/css/CSSPropertySourceData.h:101: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4] Total errors found: 4 in 43 files If any of these errors are false positives, please file a bug against check-webkit-style.
Early Warning System Bot
Comment 3 2012-12-20 12:48:49 PST
Early Warning System Bot
Comment 4 2012-12-20 12:49:12 PST
WebKit Review Bot
Comment 5 2012-12-20 13:12:22 PST
Comment on attachment 180389 [details] Patch Attachment 180389 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/15451149
Build Bot
Comment 6 2012-12-20 13:15:51 PST
Peter Beverloo (cr-android ews)
Comment 7 2012-12-20 13:32:57 PST
Comment on attachment 180389 [details] Patch Attachment 180389 [details] did not pass cr-android-ews (chromium-android): Output: http://queues.webkit.org/results/15464033
Pablo Flouret
Comment 8 2012-12-20 13:49:21 PST
Created attachment 180402 [details] Patch Missed some ENABLE guards, sorry for the noise.
WebKit Review Bot
Comment 9 2012-12-20 13:55:32 PST
Attachment 180402 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/css3..." exit_code: 1 Source/WebCore/css/RuleSet.cpp:326: One line control clauses should not use braces. [whitespace/braces] [4] Source/WebCore/css/CSSRule.h:54: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4] Source/WebCore/css/CSSPropertySourceData.h:100: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4] Source/WebCore/css/CSSPropertySourceData.h:101: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4] Total errors found: 4 in 43 files If any of these errors are false positives, please file a bug against check-webkit-style.
Allan Sandfeld Jensen
Comment 10 2013-01-09 05:52:36 PST
Comment on attachment 180402 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=180402&action=review > Source/WebCore/ChangeLog:15 > + This patch also incidentally adds support for proper nesting of at-rules > + where allowed by the spec. Would it make sense to land the part about nesting at-rules as a separate patch, so this patch only addresses the support of support-rules? >> Source/WebCore/css/RuleSet.cpp:326 >> + else if (isWithinNestedRule && rule->isImportRule()) { >> + // Ignore. >> + } > > One line control clauses should not use braces. [whitespace/braces] [4] Ignore? Why make the test then?
Pablo Flouret
Comment 11 2013-01-09 09:54:14 PST
(In reply to comment #10) > (From update of attachment 180402 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=180402&action=review > > > Source/WebCore/ChangeLog:15 > > + This patch also incidentally adds support for proper nesting of at-rules > > + where allowed by the spec. > > Would it make sense to land the part about nesting at-rules as a separate patch, so this patch only addresses the support of support-rules? > Sure. > >> Source/WebCore/css/RuleSet.cpp:326 > >> + else if (isWithinNestedRule && rule->isImportRule()) { > >> + // Ignore. > >> + } > > > > One line control clauses should not use braces. [whitespace/braces] [4] > > Ignore? Why make the test then? To make it explicit, but i can get rid of it.
Pablo Flouret
Comment 12 2013-01-14 13:41:51 PST
WebKit Review Bot
Comment 13 2013-01-14 13:47:07 PST
Attachment 182622 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/css3..." exit_code: 1 Source/WebCore/css/CSSRule.h:54: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4] Source/WebCore/css/CSSPropertySourceData.h:100: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4] Source/WebCore/css/CSSPropertySourceData.h:101: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4] Total errors found: 3 in 42 files If any of these errors are false positives, please file a bug against check-webkit-style.
Early Warning System Bot
Comment 14 2013-01-14 13:58:45 PST
Early Warning System Bot
Comment 15 2013-01-14 14:00:35 PST
WebKit Review Bot
Comment 16 2013-01-14 14:13:13 PST
Comment on attachment 182622 [details] Patch Attachment 182622 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/15860645
Pablo Flouret
Comment 17 2013-01-14 14:17:23 PST
WebKit Review Bot
Comment 18 2013-01-14 14:23:23 PST
Attachment 182627 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/css3..." exit_code: 1 Source/WebCore/css/CSSRule.h:54: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4] Source/WebCore/css/CSSPropertySourceData.h:100: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4] Source/WebCore/css/CSSPropertySourceData.h:101: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4] Total errors found: 3 in 42 files If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Review Bot
Comment 19 2013-01-16 03:33:08 PST
Comment on attachment 182627 [details] Patch Clearing flags on attachment: 182627 Committed r139866: <http://trac.webkit.org/changeset/139866>
WebKit Review Bot
Comment 20 2013-01-16 03:33:15 PST
All reviewed patches have been landed. Closing bug.
Simon Fraser (smfr)
Comment 21 2013-01-16 13:55:49 PST
This messed up the Mac Xcode project by adding CSSSupportsRule.h and JSCSSSupportsRule.h to the compile build phase.
Simon Fraser (smfr)
Comment 22 2013-01-16 13:58:10 PST
Also caused: ld: warning: ignoring undefined symbol .objc_class_name_DOMCSSSupportsRule from -exported_symbols_list
Pablo Flouret
Comment 23 2013-01-16 14:39:32 PST
(In reply to comment #21) > This messed up the Mac Xcode project by adding CSSSupportsRule.h and JSCSSSupportsRule.h to the compile build phase. I'll check it out.
Pablo Flouret
Comment 24 2013-01-16 15:50:25 PST
Patch for the warnings at bug 107056.
Note You need to log in before you can comment on or make changes to this bug.