Changeset 142910 in webkit
- Timestamp:
- Feb 14, 2013, 1:51:49 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r142909 r142910 1 2013-02-14 Eric Carlson <eric.carlson@apple.com> 2 3 [Mac] adjust caption color user preference calculation 4 https://bugs.webkit.org/show_bug.cgi?id=109840 5 6 Reviewed by Dean Jackson. 7 8 No new tests, it isn't possible to test this with DRT. 9 10 * page/CaptionUserPreferencesMac.mm: 11 (WebCore::CaptionUserPreferencesMac::captionsWindowCSS): The color is "important" if either the 12 color or opacity are supposed to override. 13 (WebCore::CaptionUserPreferencesMac::captionsBackgroundCSS): Ditto. 14 (WebCore::CaptionUserPreferencesMac::captionsTextColor): Ditto. 15 1 16 2013-02-14 Cosmin Truta <ctruta@rim.com> 2 17 -
trunk/Source/WebCore/page/CaptionUserPreferencesMac.mm
r142809 r142910 162 162 windowColor = Color::transparent; 163 163 164 bool important = behavior == kMACaptionAppearanceBehaviorUseValue; 164 165 CGFloat opacity = MACaptionAppearanceGetWindowOpacity(kMACaptionAppearanceDomainUser, &behavior); 165 String windowStyle = colorPropertyCSS(CSSPropertyBackgroundColor, Color(windowColor.red(), windowColor.green(), windowColor.blue(), static_cast<int>(opacity * 255)), behavior == kMACaptionAppearanceBehaviorUseValue); 166 if (!important) 167 important = behavior == kMACaptionAppearanceBehaviorUseValue; 168 String windowStyle = colorPropertyCSS(CSSPropertyBackgroundColor, Color(windowColor.red(), windowColor.green(), windowColor.blue(), static_cast<int>(opacity * 255)), important); 166 169 167 170 if (!opacity) … … 189 192 backgroundColor = defaultBackgroundColor; 190 193 194 bool important = behavior == kMACaptionAppearanceBehaviorUseValue; 191 195 CGFloat opacity = MACaptionAppearanceGetBackgroundOpacity(kMACaptionAppearanceDomainUser, 0); 192 String backgroundStyle = colorPropertyCSS(CSSPropertyBackgroundColor, Color(backgroundColor.red(), backgroundColor.green(), backgroundColor.blue(), static_cast<int>(opacity * 255)), behavior == kMACaptionAppearanceBehaviorUseValue); 196 if (!important) 197 important = behavior == kMACaptionAppearanceBehaviorUseValue; 198 String backgroundStyle = colorPropertyCSS(CSSPropertyBackgroundColor, Color(backgroundColor.red(), backgroundColor.green(), backgroundColor.blue(), static_cast<int>(opacity * 255)), important); 193 199 194 200 if (!opacity) … … 215 221 textColor = Color::white; 216 222 223 important = behavior == kMACaptionAppearanceBehaviorUseValue; 217 224 CGFloat opacity = MACaptionAppearanceGetForegroundOpacity(kMACaptionAppearanceDomainUser, &behavior); 218 important = behavior == kMACaptionAppearanceBehaviorUseValue; 225 if (!important) 226 important = behavior == kMACaptionAppearanceBehaviorUseValue; 219 227 return Color(textColor.red(), textColor.green(), textColor.blue(), static_cast<int>(opacity * 255)); 220 228 }
Note:
See TracChangeset
for help on using the changeset viewer.