Improve consistency of captions rendering on Mac
authorjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Mar 2017 18:08:41 +0000 (18:08 +0000)
committerjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Mar 2017 18:08:41 +0000 (18:08 +0000)
commit421145788345c07e5cbbf473ab672e3a956377b1
tree8791b8585d49b55be3cb14f931a7d92ee0732472
parente83b612095e9e58125a99abdc1480cf66ac060a6
Improve consistency of captions rendering on Mac
https://bugs.webkit.org/show_bug.cgi?id=169071

Reviewed by Eric Carlson.

* page/CaptionUserPreferencesMediaAF.h:
(WebCore::CaptionUserPreferencesMediaAF::captionsEdgeColorForTextColor): Deleted.
(WebCore::CaptionUserPreferencesMediaAF::cssPropertyWithTextEdgeColor): Deleted.

* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::appendCSS): Helper function to add a CSS rule with a provided StringBuilder.
(WebCore::CaptionUserPreferencesMediaAF::windowRoundedCornerRadiusCSS): Refactor to use
appendCSS.
(WebCore::CaptionUserPreferencesMediaAF::colorPropertyCSS): Ditto.
(WebCore::CaptionUserPreferencesMediaAF::captionsTextEdgeCSS): Update text edge styles.
- Add a blur to the shadow
- Drop shadow style includes 1px text border
- Always use black for the text edge color
Also convert the stroke rules to using the CSS property and values instead of straight strings.
(WebCore::CaptionUserPreferencesMediaAF::captionsStyleSheetOverride): Fly-by fix of a typo.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@213285 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp
Source/WebCore/page/CaptionUserPreferencesMediaAF.h