Bug 104822 - Implement CSSSupportsRule
Summary: Implement CSSSupportsRule
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Pablo Flouret
URL:
Keywords: WebExposed
Depends on: 114601 106418 106696
Blocks: 103506
  Show dependency treegraph
 
Reported: 2012-12-12 10:05 PST by Pablo Flouret
Modified: 2013-04-14 22:05 PDT (History)
21 users (show)

See Also:


Attachments
Patch (76.19 KB, patch)
2012-12-20 12:40 PST, Pablo Flouret
no flags Details | Formatted Diff | Diff
Patch (76.53 KB, patch)
2012-12-20 13:49 PST, Pablo Flouret
no flags Details | Formatted Diff | Diff
Patch (68.25 KB, patch)
2013-01-14 13:41 PST, Pablo Flouret
no flags Details | Formatted Diff | Diff
Patch (68.29 KB, patch)
2013-01-14 14:17 PST, Pablo Flouret
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pablo Flouret 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.
Comment 1 Pablo Flouret 2012-12-20 12:40:17 PST
Created attachment 180389 [details]
Patch
Comment 2 WebKit Review Bot 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.
Comment 3 Early Warning System Bot 2012-12-20 12:48:49 PST
Comment on attachment 180389 [details]
Patch

Attachment 180389 [details] did not pass qt-wk2-ews (qt):
Output: http://queues.webkit.org/results/15454123
Comment 4 Early Warning System Bot 2012-12-20 12:49:12 PST
Comment on attachment 180389 [details]
Patch

Attachment 180389 [details] did not pass qt-ews (qt):
Output: http://queues.webkit.org/results/15462039
Comment 5 WebKit Review Bot 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
Comment 6 Build Bot 2012-12-20 13:15:51 PST
Comment on attachment 180389 [details]
Patch

Attachment 180389 [details] did not pass win-ews (win):
Output: http://queues.webkit.org/results/15445209
Comment 7 Peter Beverloo (cr-android ews) 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
Comment 8 Pablo Flouret 2012-12-20 13:49:21 PST
Created attachment 180402 [details]
Patch

Missed some ENABLE guards, sorry for the noise.
Comment 9 WebKit Review Bot 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.
Comment 10 Allan Sandfeld Jensen 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?
Comment 11 Pablo Flouret 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.
Comment 12 Pablo Flouret 2013-01-14 13:41:51 PST
Created attachment 182622 [details]
Patch
Comment 13 WebKit Review Bot 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.
Comment 14 Early Warning System Bot 2013-01-14 13:58:45 PST
Comment on attachment 182622 [details]
Patch

Attachment 182622 [details] did not pass qt-ews (qt):
Output: http://queues.webkit.org/results/15860648
Comment 15 Early Warning System Bot 2013-01-14 14:00:35 PST
Comment on attachment 182622 [details]
Patch

Attachment 182622 [details] did not pass qt-wk2-ews (qt):
Output: http://queues.webkit.org/results/15841632
Comment 16 WebKit Review Bot 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
Comment 17 Pablo Flouret 2013-01-14 14:17:23 PST
Created attachment 182627 [details]
Patch
Comment 18 WebKit Review Bot 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.
Comment 19 WebKit Review Bot 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>
Comment 20 WebKit Review Bot 2013-01-16 03:33:15 PST
All reviewed patches have been landed.  Closing bug.
Comment 21 Simon Fraser (smfr) 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.
Comment 22 Simon Fraser (smfr) 2013-01-16 13:58:10 PST
Also caused:
ld: warning: ignoring undefined symbol .objc_class_name_DOMCSSSupportsRule from -exported_symbols_list
Comment 23 Pablo Flouret 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.
Comment 24 Pablo Flouret 2013-01-16 15:50:25 PST
Patch for the warnings at bug 107056.