Bug 140525

Summary: Add the alternative syntax for CSS Selector's descendant combinator (">>")
Product: WebKit Reporter: Benjamin Poulain <benjamin>
Component: New BugsAssignee: Benjamin Poulain <benjamin>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, kling, koivisto, rniwa, webkit.bugzilla
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Archive of layout-test-results from ews107 for mac-mavericks-wk2
none
Patch none

Description Benjamin Poulain 2015-01-15 16:11:54 PST
Add the alternative syntax for CSS Selector's descendant combinator (">>")
Comment 1 Benjamin Poulain 2015-01-15 16:14:30 PST
Created attachment 244722 [details]
Patch
Comment 2 Build Bot 2015-01-15 17:00:01 PST
Comment on attachment 244722 [details]
Patch

Attachment 244722 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/4923767511842816

New failing tests:
fast/css/parsing-css-descendant-combinator-doubled-child-syntax.html
Comment 3 Build Bot 2015-01-15 17:00:06 PST
Created attachment 244731 [details]
Archive of layout-test-results from ews107 for mac-mavericks-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews107  Port: mac-mavericks-wk2  Platform: Mac OS X 10.9.5
Comment 4 Benjamin Poulain 2015-01-15 17:08:18 PST
Created attachment 244733 [details]
Patch
Comment 5 Antti Koivisto 2015-01-16 01:56:27 PST
How is this useful?
Comment 6 Benjamin Poulain 2015-01-16 11:47:26 PST
(In reply to comment #5)
> How is this useful?

It's really not at the moment :)

The reason they added it is consistency:
- ">" is child.
- ">>>" is going through a shadow dom boundary.
- ">>" is the thing in between.

In the future, it should be the only way to do filtered combinators for descendant relations.
Comment 7 Antti Koivisto 2015-01-16 12:08:39 PST
Comment on attachment 244733 [details]
Patch

I'm not convinced by the consistency argument. It is not very consistent that the zero angle bracket case is the same as two bracket case. Is this is really worth the developer confusion and broken web sites on older browsers? 

r+ anyway, the patch look technically good.
Comment 8 Benjamin Poulain 2015-01-16 12:55:55 PST
(In reply to comment #7)
> Comment on attachment 244733 [details]
> Patch
> 
> I'm not convinced by the consistency argument. It is not very consistent
> that the zero angle bracket case is the same as two bracket case. Is this is
> really worth the developer confusion and broken web sites on older browsers? 
> 
> r+ anyway, the patch look technically good.

Yeah, I was not a big fan myself but it looks like everyone was okay with that syntax in the CSS Working group.
Comment 9 Benjamin Poulain 2015-01-16 12:56:59 PST
Comment on attachment 244733 [details]
Patch

Clearing flags on attachment: 244733

Committed r178592: <http://trac.webkit.org/changeset/178592>
Comment 10 Benjamin Poulain 2015-01-16 12:57:03 PST
All reviewed patches have been landed.  Closing bug.
Comment 11 Antti Koivisto 2015-02-04 10:37:26 PST
Looks like Blink is not doing >>>

https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/hRw781MV3mE

The "consistency" argument seems even less convincing now.
Comment 12 Benjamin Poulain 2015-02-04 15:13:26 PST
(In reply to comment #11)
> Looks like Blink is not doing >>>
> 
> https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/hRw781MV3mE
> 
> The "consistency" argument seems even less convincing now.

Yeah, it's really weird. It is Google that has been pushing for ">>" and ">>>".

I'll nuke ">>" if it goes out of the spec.