Bug 44515

Summary: Use ruby specific 'display' property values as per HTML5 spec
Product: WebKit Reporter: Niels Leenheer (HTML5test) <info>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: eoconnor, eric, haraken, hyatt, paulirish, syoichi
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
URL: http://beta.html5test.com/testcases/ruby/index.html
Bug Depends on:    
Bug Blocks: 40829    

Description Niels Leenheer (HTML5test) 2010-08-24 05:01:56 PDT
When HTML5 ruby elements are rendered their display property values are inline or block. The HTML5 specification *1 suggest the use of 'ruby' for <ruby> elements, 'ruby-text' for <rt> elements and 'none' for <rp> elements. Additionally 'ruby-base' is suggested for children of <ruby> elements that are not <rt> or <rp> elements.

These display property values correspond to the values defined in the CSS3 Ruby Module *2. Even though full support for this CSS module is not present at the moment, the HTML5 ruby support should use the suggested display property values.

This change is worth 3 points on the HTML5test *3 which currently does not award any points to Webkit for ruby support.

---
*1 http://www.w3.org/TR/html5/rendering.html#display-types
*2 http://www.w3.org/TR/css3-ruby/
*3 http://html5test.com/
Comment 1 Alexey Proskuryakov 2010-11-09 19:59:40 PST
See also: bug 47596.
Comment 2 Dave Hyatt 2010-11-20 19:55:55 PST
The problem here is that ruby can work as both an inline or block construct (or even as an inline-block construct).  A single display type, "ruby", is insufficient to model this.  The CSS3 Ruby draft has huge flaws, and if you're basing your HTML5 test suite off it, then you need to fix your test suite.

I think the HTML5 spec should be amended to drop all mention of unique Ruby display types until problems like this can be addressed.

The ruby-base and ruby-text display types are fine, but the Ruby display type needs to be broken into two display types.  We'd be willing to break the inline-block version of Ruby since it would rarely be desired, but I don't think we want positioning or floating a ruby to suddenly turn off its ruby behavior. Therefore block-level ruby has to be specifiable.
Comment 3 Dave Hyatt 2010-11-20 20:19:50 PST
Also, one of your ruby tests is buggy and is testing for a display value of hidden rather than none for the rp element.
Comment 4 Dave Hyatt 2010-11-20 20:33:00 PST
Note that even if we did add these display types, we would have to add them as -webkit-ruby-text, etc., so we wouldn't pass your test anyway.
Comment 5 Eric Seidel (no email) 2012-01-20 18:13:07 PST
http://www.w3.org/TR/css3-ruby/#display also seems relevant.

I agree with Dave, the test should be fixed to not depend on these display types until the specs settle down.
Comment 6 Eric Seidel (no email) 2012-01-20 18:55:57 PST
https://github.com/NielsLeenheer/html5test/issues/51 was the original bug filed against the test suite.