Bug 107214

Summary: WebVTT <i>, <b> and <u> elements should have default styles
Product: WebKit Reporter: Dima Gorbik <dgorbik>
Component: MediaAssignee: Dima Gorbik <dgorbik>
Status: RESOLVED FIXED    
Severity: Normal CC: cmarcelo, dgorbik, eric.carlson, eric, esprehn, feature-media-reviews, koivisto, macpherson, menard, ojan.autocc, silviapf, vcarbune, webkit-bug-importer, webkit.review.bot
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 43668    
Attachments:
Description Flags
Proposed fix 0.1
koivisto: review+, koivisto: commit-queue-
Proposed fix 0.2 none

Description Dima Gorbik 2013-01-17 18:40:12 PST
We shouldn't reuse HTMLElements but set css properties on span elements as specs require.
Comment 1 Dima Gorbik 2013-02-01 19:58:50 PST
Created attachment 186208 [details]
Proposed fix 0.1
Comment 2 Elliott Sprehn 2013-02-01 21:38:49 PST
Comment on attachment 186208 [details]
Proposed fix 0.1

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

> Source/WebCore/css/mediaControls.css:270
> +video::-webkit-media-text-track-container ruby > rt {

Can we leave the ruby changes out of this patch since there's no tests? The test above doesn't have anything ruby related.

> Source/WebCore/rendering/RenderObject.cpp:167
> +    if (element->hasTagName(rubyTag) || element->hasTagName(WebVTTElement::rubyElementTagName())) {

Lets leave all the changes in this file out until you have some tests.
Comment 3 Silvia Pfeiffer 2013-02-01 22:02:13 PST
What makes you think that they should by <span>s ? The spec says otherwise: http://dev.w3.org/html5/webvtt/#webvtt-cue-text-dom-construction-rules .
Comment 4 Dima Gorbik 2013-02-01 22:37:15 PST
(In reply to comment #2)
> (From update of attachment 186208 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=186208&action=review
> 
> > Source/WebCore/css/mediaControls.css:270
> > +video::-webkit-media-text-track-container ruby > rt {
> 
> Can we leave the ruby changes out of this patch since there's no tests? The test above doesn't have anything ruby related.
> 
> > Source/WebCore/rendering/RenderObject.cpp:167
> > +    if (element->hasTagName(rubyTag) || element->hasTagName(WebVTTElement::rubyElementTagName())) {
> 
> Lets leave all the changes in this file out until you have some tests.

The problem here is that first of all we should implement display: ruby property, but Hixie said that they will rewrite all ruby specs but for now I still should place rt on top of rb. It works with this patch, though you can't see rt's text because it overflows the top bound of the cue box. I think the only proper way to test ruby/rt is to do a DRT of the cue. Would you suggest doing this? I have broken all elements from being rendered at all with my previous patch (on purpose) but those were not covered by test. That's why I decided to fix this regression though there will be no new tests (except for i, b and u). Do you think that's not a good idea?
Comment 5 Dima Gorbik 2013-02-01 22:40:21 PST
(In reply to comment #3)
> What makes you think that they should by <span>s ? The spec says otherwise: http://dev.w3.org/html5/webvtt/#webvtt-cue-text-dom-construction-rules .

I only used 'spans' in the bug description because specs say something like "These represent spans of underline text ". I don't use html spans of course,  only plain elements. I should probably change the bug description and the changelog so that it's not confusing.
Comment 6 Silvia Pfeiffer 2013-02-01 22:51:30 PST
Ah, right, in the meaning of "span of text". I agree that it's an unfortunate choice of word in the spec and confusing. Could you use "span of text" rather than just "span"? I might suggest replacing the word "span" with "snippet" or "passage" in the spec?
Comment 7 Dima Gorbik 2013-02-01 22:56:15 PST
(In reply to comment #6)
> Ah, right, in the meaning of "span of text". I agree that it's an unfortunate choice of word in the spec and confusing. Could you use "span of text" rather than just "span"? I might suggest replacing the word "span" with "snippet" or "passage" in the spec?

How about just "i, b, u WebVTT elements should have default styles" ?
Comment 8 Silvia Pfeiffer 2013-02-01 23:15:12 PST
Works for me! Thanks!
Comment 9 Dima Gorbik 2013-02-04 13:54:09 PST
Created attachment 186452 [details]
Proposed fix 0.2
Comment 10 Radar WebKit Bug Importer 2013-02-04 13:57:35 PST
<rdar://problem/13147072>
Comment 11 WebKit Review Bot 2013-02-04 14:40:51 PST
Comment on attachment 186452 [details]
Proposed fix 0.2

Clearing flags on attachment: 186452

Committed r141817: <http://trac.webkit.org/changeset/141817>
Comment 12 WebKit Review Bot 2013-02-04 14:40:55 PST
All reviewed patches have been landed.  Closing bug.