RESOLVED FIXED26985
Implement parsing of <rp> & <rt> elements as per HTML5 spec
https://bugs.webkit.org/show_bug.cgi?id=26985
Summary Implement parsing of <rp> & <rt> elements as per HTML5 spec
Roland Steiner
Reported 2009-07-05 23:30:41 PDT
The HTML5 spec specifies that end tags of the ruby tags <rp> and <rt> are optional if followed by another <rp> or <rt> tag: http://www.whatwg.org/specs/web-apps/current-work/#optional-tags
Attachments
patch: implement parsing of <rt>/<rp>, add accessibility role (6.61 KB, patch)
2009-07-05 23:34 PDT, Roland Steiner
mjs: review-
patch: update with layout test (9.16 KB, patch)
2009-07-06 03:20 PDT, Roland Steiner
mjs: review+
Roland Steiner
Comment 1 2009-07-05 23:34:45 PDT
Created attachment 32286 [details] patch: implement parsing of <rt>/<rp>, add accessibility role This patch implements the parsing of <rp> and <rt> tags as per the HTML5 spec. It also sets a (new) accessibility role "Annotation" for <rp> and <rt>. Affected code parts are not enclosed in #IF ENABLE(RUBY), since the parsing is not affected by whether ruby is rendered properly or not (in fact, it may be more profound without ruby layouting, since the contents of <rp> are not hidden). The patch includes no layout tests, as layouting will change once the patch for proper ruby rendering is landed.
Maciej Stachowiak
Comment 2 2009-07-06 00:25:49 PDT
(In reply to comment #1) > Created an attachment (id=32286) [details] > patch: implement parsing of <rt>/<rp>, add accessibility role > > This patch implements the parsing of <rp> and <rt> tags as per the HTML5 spec. > > It also sets a (new) accessibility role "Annotation" for <rp> and <rt>. > > Affected code parts are not enclosed in #IF ENABLE(RUBY), since the parsing is > not affected by whether ruby is rendered properly or not (in fact, it may be > more profound without ruby layouting, since the contents of <rp> are not > hidden). > > The patch includes no layout tests, as layouting will change once the patch for > proper ruby rendering is landed. I think this patch needs regression tests anyway, since it affects behavior. Either the tests should be made so they only test parsing and not layout, or the results can be updated when layout changes too.
Maciej Stachowiak
Comment 3 2009-07-06 00:27:16 PDT
Comment on attachment 32286 [details] patch: implement parsing of <rt>/<rp>, add accessibility role The code change looks good. However, I am going to say review- due to lack of tests for the newly introduced parsing behavior.
Roland Steiner
Comment 4 2009-07-06 03:20:34 PDT
Created attachment 32296 [details] patch: update with layout test Adding a layout test was a good thing because it turns out that for proper parsing I also needed to add code for the outer <ruby> tag. Without this, <rp>/<rt> wouldn't be automatically closed if no end tag is present before </ruby>.
Maciej Stachowiak
Comment 5 2009-07-09 20:15:35 PDT
Comment on attachment 32296 [details] patch: update with layout test r=me
Brent Fulgham
Comment 6 2009-07-09 21:43:19 PDT
Note You need to log in before you can comment on or make changes to this bug.