[Webkit-unassigned] [Bug 135823] Adjust max-width of cues based on text alignment when cue size is expanded

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 12 11:30:53 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=135823





--- Comment #6 from Brent Fulgham <bfulgham at webkit.org>  2014-08-12 11:31:02 PST ---
(In reply to comment #3)
> (In reply to comment #2)
> > (From update of attachment 236418 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=236418&action=review
> > 
> > This is really close, but we have to take RTL languages into account.  Take a look at "textAlignResolvingStartAndEnd" in WebCore/editing/EditingStyle.cpp for a snippet that shows what we  need here.
> > 
> > r- to fix the RTL handling, but otherwise it looks great!
> > 
> > > Source/WebCore/html/track/TextTrackCueGeneric.cpp:107
> > > +    if (alignment == CSSValueEnd || alignment == CSSValueRight)
> > 
> > CSSValueEnd is only the same as CSSValueRight in Left-to-Right contexts I think we need to do something where we check for RTL, and set alignment to left/right as needed.
> > 
> > > Source/WebCore/html/track/VTTCue.cpp:184
> > > +    if (alignment == CSSValueEnd || alignment == CSSValueRight)
> > 
> > Ditto my earlier comment about Start/End.
> 
> So apparently, with RTL text, the text position is also reversed!
> So a position of say, 80% actually is 80% from the right side of the video, not the left.
> Thus the original calculations end up still being right!
> Only managed to find this out after I had made the changes to handle RTL text...
> So I think we're actually good with the first patch

Awesome!  We'll just keep an eye on things when the patch lands, and fix any broken tests at that point.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list