Bug 100324 - Implement css-conditional's CSS.supports()
Summary: Implement css-conditional's CSS.supports()
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:
Blocks: 134358
  Show dependency treegraph
 
Reported: 2012-10-24 21:20 PDT by Paul Irish
Modified: 2014-06-27 12:13 PDT (History)
28 users (show)

See Also:


Attachments
Patch (45.96 KB, patch)
2012-11-01 14:46 PDT, Pablo Flouret
no flags Details | Formatted Diff | Diff
Patch (47.89 KB, patch)
2012-11-02 15:58 PDT, Pablo Flouret
no flags Details | Formatted Diff | Diff
Patch (49.64 KB, patch)
2013-01-22 17:29 PST, Pablo Flouret
no flags Details | Formatted Diff | Diff
Patch (49.68 KB, patch)
2013-01-23 11:17 PST, Pablo Flouret
no flags Details | Formatted Diff | Diff
Patch (49.77 KB, patch)
2013-01-23 17:00 PST, Pablo Flouret
koivisto: review+
koivisto: commit-queue-
Details | Formatted Diff | Diff
GTK build fix (1.80 KB, patch)
2013-02-05 02:49 PST, Zan Dobersek
no flags Details | Formatted Diff | Diff
Patch for landing (52.79 KB, patch)
2013-02-05 11:17 PST, Pablo Flouret
webkit.review.bot: commit-queue-
Details | Formatted Diff | Diff
Patch for landing (51.82 KB, patch)
2013-02-12 11:10 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 Paul Irish 2012-10-24 21:20:27 PDT
Bug 86146 took care of @supports, but the JS api was implemented in Opera and FIrefox as well.  

It was previously supportsCSS() but has now shifted to CSS.supports().  http://dev.w3.org/csswg/css3-conditional/#the-csssupportsrule-interface
Comment 1 Pablo Flouret 2012-10-25 16:41:19 PDT
What went into Firefox? I can't see either supportsCSS or CSS.supports in my nightly. Are FF and Opera changing names soon or should a prefix be used here (boo)? How happy is everyone with the new name?
Comment 2 Glenn Adams 2012-10-26 06:30:45 PDT
It's pretty early to commit to this Paul. I don't sense the CSS WG has concluded its thinking; furthermore, I wonder if this should be handled by the normal prefixing rules, i.e., as WebkitCSS, until the WG has reached a consensus about unprefixing.
Comment 3 Tab Atkins 2012-10-26 07:20:50 PDT
(In reply to comment #2)
> It's pretty early to commit to this Paul. I don't sense the CSS WG has concluded its thinking; furthermore, I wonder if this should be handled by the normal prefixing rules, i.e., as WebkitCSS, until the WG has reached a consensus about unprefixing.

I disagree.  Nobody's brought up anything further on the matter since we put it into the spec; the only thing that's been delaying Last Call is our issues around the handling syntax errors in @supports.

Once we hit Last Call (which will happen next week at TPAC), we'll only be a few weeks to CR, which is a guaranteed "unprefix" event.  Implementing it a month early, when it's not going to hit public before CR, and when everyone else is unprefixing, is fine.

So, Pablo, do it without a prefix.
Comment 4 Pablo Flouret 2012-11-01 14:46:14 PDT
Created attachment 171936 [details]
Patch
Comment 5 Pablo Flouret 2012-11-01 14:52:58 PDT
Comment on attachment 171936 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=171936&action=review

window.CSS is a glorified namespace so far, i'm not sure if there's a better way right now to handle, bindings-wise, what's effectively a bunch of static methods. Also, is it defined in any spec yet (Tab?).

> Source/WebCore/css/DOMWindowCSS.idl:32
> +[
> +    InterfaceName=CSS
> +] interface DOMWindowCSS {

Should this one be conditional on CSS3_CONDITIONAL_RULES for now?

> Source/WebCore/page/DOMWindow.h:271
> +        DOMWindowCSS* cSS();

The funky casing is due to the CodeGenerator uses WK_lcfirst for the method call, should i add an exception there or is this fine?
Comment 6 Early Warning System Bot 2012-11-01 15:02:06 PDT
Comment on attachment 171936 [details]
Patch

Attachment 171936 [details] did not pass qt-ews (qt):
Output: http://queues.webkit.org/results/14681075
Comment 7 kov's GTK+ EWS bot 2012-11-01 15:04:23 PDT
Comment on attachment 171936 [details]
Patch

Attachment 171936 [details] did not pass gtk-ews (gtk):
Output: http://queues.webkit.org/results/14663671
Comment 8 Early Warning System Bot 2012-11-01 15:04:36 PDT
Comment on attachment 171936 [details]
Patch

Attachment 171936 [details] did not pass qt-wk2-ews (qt):
Output: http://queues.webkit.org/results/14670623
Comment 9 Build Bot 2012-11-01 18:02:19 PDT
Comment on attachment 171936 [details]
Patch

Attachment 171936 [details] did not pass win-ews (win):
Output: http://queues.webkit.org/results/14678669
Comment 10 Tab Atkins 2012-11-02 07:00:53 PDT
(In reply to comment #5)
> (From update of attachment 171936 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=171936&action=review
> 
> window.CSS is a glorified namespace so far, i'm not sure if there's a better way right now to handle, bindings-wise, what's effectively a bunch of static methods. Also, is it defined in any spec yet (Tab?).

It's in the obvious spec, in the obvious place. ^_^ http://dev.w3.org/csswg/css3-conditional/#the-css-interface


> > Source/WebCore/css/DOMWindowCSS.idl:32
> > +[
> > +    InterfaceName=CSS
> > +] interface DOMWindowCSS {
> 
> Should this one be conditional on CSS3_CONDITIONAL_RULES for now?

Probably, yeah.


> > Source/WebCore/page/DOMWindow.h:271
> > +        DOMWindowCSS* cSS();
> 
> The funky casing is due to the CodeGenerator uses WK_lcfirst for the method call, should i add an exception there or is this fine?

I suspect you'll want an exception there, just because it reads so badly.
Comment 11 Pablo Flouret 2012-11-02 15:58:00 PDT
Created attachment 172164 [details]
Patch
Comment 12 Pablo Flouret 2013-01-22 17:29:34 PST
Created attachment 184091 [details]
Patch

Rebased.
Comment 13 Early Warning System Bot 2013-01-22 17:39:21 PST
Comment on attachment 184091 [details]
Patch

Attachment 184091 [details] did not pass qt-ews (qt):
Output: http://queues.webkit.org/results/16065210
Comment 14 Early Warning System Bot 2013-01-22 17:44:25 PST
Comment on attachment 184091 [details]
Patch

Attachment 184091 [details] did not pass qt-wk2-ews (qt):
Output: http://queues.webkit.org/results/16037899
Comment 15 WebKit Review Bot 2013-01-22 18:00:00 PST
Comment on attachment 184091 [details]
Patch

Attachment 184091 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/16067096
Comment 16 Peter Beverloo (cr-android ews) 2013-01-22 18:18:32 PST
Comment on attachment 184091 [details]
Patch

Attachment 184091 [details] did not pass cr-android-ews (chromium-android):
Output: http://queues.webkit.org/results/16033951
Comment 17 EFL EWS Bot 2013-01-22 18:37:31 PST
Comment on attachment 184091 [details]
Patch

Attachment 184091 [details] did not pass efl-ews (efl):
Output: http://queues.webkit.org/results/16036915
Comment 18 Build Bot 2013-01-22 19:21:31 PST
Comment on attachment 184091 [details]
Patch

Attachment 184091 [details] did not pass win-ews (win):
Output: http://queues.webkit.org/results/16035952
Comment 19 Build Bot 2013-01-22 19:45:06 PST
Comment on attachment 184091 [details]
Patch

Attachment 184091 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/16063332
Comment 20 kov's GTK+ EWS bot 2013-01-22 19:53:51 PST
Comment on attachment 184091 [details]
Patch

Attachment 184091 [details] did not pass gtk-ews (gtk):
Output: http://queues.webkit.org/results/16067146
Comment 21 Build Bot 2013-01-22 20:15:24 PST
Comment on attachment 184091 [details]
Patch

Attachment 184091 [details] did not pass win-ews (win):
Output: http://queues.webkit.org/results/16040976
Comment 22 Build Bot 2013-01-22 21:41:53 PST
Comment on attachment 184091 [details]
Patch

Attachment 184091 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://queues.webkit.org/results/16065316
Comment 23 Pablo Flouret 2013-01-23 11:17:40 PST
Created attachment 184268 [details]
Patch
Comment 24 Build Bot 2013-01-23 15:44:27 PST
Comment on attachment 184268 [details]
Patch

Attachment 184268 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://queues.webkit.org/results/16083341
Comment 25 Build Bot 2013-01-23 15:58:29 PST
Comment on attachment 184268 [details]
Patch

Attachment 184268 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/16083340
Comment 26 Pablo Flouret 2013-01-23 17:00:09 PST
Created attachment 184354 [details]
Patch
Comment 27 Antti Koivisto 2013-02-04 10:54:51 PST
Comment on attachment 184354 [details]
Patch

r=me with gtk build fixed
Comment 28 Zan Dobersek 2013-02-05 02:48:45 PST
(In reply to comment #27)
> (From update of attachment 184354 [details])
> r=me with gtk build fixed

Thank you!

I've checked the build failure and I'll append the changes needed for the GTK build to pass. I'd still like to request that you upload the updated reviewed patch again so the EWS can confirm the fix is indeed OK if it's not too much of a hassle for you.
Comment 29 Zan Dobersek 2013-02-05 02:49:30 PST
Created attachment 186587 [details]
GTK build fix

Should fix the GTK build failure.
Comment 30 Pablo Flouret 2013-02-05 10:23:40 PST
(In reply to comment #28)
> (In reply to comment #27)
> > (From update of attachment 184354 [details] [details])
> > r=me with gtk build fixed
> 
> Thank you!
> 
> I've checked the build failure and I'll append the changes needed for the GTK build to pass. I'd still like to request that you upload the updated reviewed patch again so the EWS can confirm the fix is indeed OK if it's not too much of a hassle for you.

Oh, cool! I'll post a new patch, thanks!
Comment 31 Pablo Flouret 2013-02-05 11:17:55 PST
Created attachment 186664 [details]
Patch for landing
Comment 32 Pablo Flouret 2013-02-05 13:11:29 PST
Green all around :-)
Comment 33 WebKit Review Bot 2013-02-12 10:51:56 PST
Comment on attachment 186664 [details]
Patch for landing

Rejecting attachment 186664 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=gce-cq-01', 'apply-attachment', '--no-update', '--non-interactive', 186664, '--port=chromium-xvfb']" exit_code: 2 cwd: /mnt/git/webkit-commit-queue

Last 500 characters of output:
s).
patching file LayoutTests/platform/qt/TestExpectations
patching file LayoutTests/platform/win/TestExpectations
Hunk #1 succeeded at 2409 (offset -3 lines).
patching file LayoutTests/platform/wincairo/TestExpectations
Hunk #1 succeeded at 2908 (offset -2 lines).
patching file LayoutTests/platform/wk2/TestExpectations
Hunk #1 succeeded at 329 (offset -13 lines).

Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', '--force']" exit_code: 1 cwd: /mnt/git/webkit-commit-queue

Full output: http://queues.webkit.org/results/16522305
Comment 34 Pablo Flouret 2013-02-12 11:10:02 PST
Created attachment 187902 [details]
Patch for landing

Rebased.
Comment 35 WebKit Review Bot 2013-02-13 05:46:44 PST
Comment on attachment 187902 [details]
Patch for landing

Clearing flags on attachment: 187902

Committed r142739: <http://trac.webkit.org/changeset/142739>