[Webkit-unassigned] [Bug 135677] Increase width of caption container if a larger font size is selected from user prefs

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 7 09:32:44 PDT 2014


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





--- Comment #5 from Brent Fulgham <bfulgham at webkit.org>  2014-08-07 09:32:54 PST ---
(From update of attachment 236155)
View in context: https://bugs.webkit.org/attachment.cgi?id=236155&action=review

> Source/WebCore/html/track/TextTrackCueGeneric.cpp:45
>  

We should add a comment along the lines of:
    // This default value must be the same as the one specified in mediaControlsApple.css for -webkit-media-controls-closed-captions-container

> Source/WebCore/html/track/TextTrackCueGeneric.cpp:82
> +        float authorFontSize = fmax(defaultFontSize, videoSize.height() * cue->baseFontSizeRelativeToVideoHeight() / 100);

I think we usually use std::max (or maybe std::max<float>).

> Source/WebCore/html/track/TextTrackCueGeneric.cpp:86
> +        float multiplier = fmax(1.0, m_fontSizeFromCaptionUserPrefs / authorFontSize);

Ditto.

> Source/WebCore/html/track/TextTrackCueGeneric.cpp:88
> +            setInlineStyleProperty(CSSPropertyWidth, size*multiplier, CSSPrimitiveValue::CSS_PERCENTAGE);

Need spaces around the '*'

> Source/WebCore/html/track/TextTrackCueGeneric.cpp:90
> +            setInlineStyleProperty(CSSPropertyHeight, size*multiplier,  CSSPrimitiveValue::CSS_PERCENTAGE);

Ditto

> Source/WebCore/html/track/VTTCue.h:62
> +    virtual void setFontSizeFromCaptionUserPrefs(int fontSize) { m_fontSizeFromCaptionUserPrefs = fontSize; }

Is this meant to be overridden? This might not need to be virtual.

-- 
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