| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Apple Inc. All rights reserved. | 2 * Copyright (C) 2013 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 } else { | 66 } else { |
| 67 setInlineStyleProperty(CSSPropertyLeft, static_cast<float>(cue->position
()), CSSPrimitiveValue::CSS_PERCENTAGE); | 67 setInlineStyleProperty(CSSPropertyLeft, static_cast<float>(cue->position
()), CSSPrimitiveValue::CSS_PERCENTAGE); |
| 68 setInlineStyleProperty(CSSPropertyTop, static_cast<float>(cue->line()),
CSSPrimitiveValue::CSS_PERCENTAGE); | 68 setInlineStyleProperty(CSSPropertyTop, static_cast<float>(cue->line()),
CSSPrimitiveValue::CSS_PERCENTAGE); |
| 69 | 69 |
| 70 if (cue->getWritingDirection() == TextTrackCue::Horizontal) | 70 if (cue->getWritingDirection() == TextTrackCue::Horizontal) |
| 71 setInlineStyleProperty(CSSPropertyWidth, size, CSSPrimitiveValue::CS
S_PERCENTAGE); | 71 setInlineStyleProperty(CSSPropertyWidth, size, CSSPrimitiveValue::CS
S_PERCENTAGE); |
| 72 else | 72 else |
| 73 setInlineStyleProperty(CSSPropertyHeight, size, CSSPrimitiveValue::
CSS_PERCENTAGE); | 73 setInlineStyleProperty(CSSPropertyHeight, size, CSSPrimitiveValue::
CSS_PERCENTAGE); |
| 74 } | 74 } |
| 75 | 75 |
| 76 if (cue->foregroundColor().alpha()) | 76 if (cue->foregroundColor().isValid()) |
| 77 setInlineStyleProperty(CSSPropertyColor, cue->foregroundColor().serializ
ed()); | 77 setInlineStyleProperty(CSSPropertyColor, cue->foregroundColor().serializ
ed()); |
| 78 | 78 |
| 79 if (cue->backgroundColor().alpha()) | 79 if (cue->backgroundColor().isValid()) |
| 80 cue->element()->setInlineStyleProperty(CSSPropertyBackgroundColor, cue->
backgroundColor().serialized()); | 80 cue->element()->setInlineStyleProperty(CSSPropertyBackgroundColor, cue->
backgroundColor().serialized()); |
| 81 | 81 |
| 82 if (cue->getWritingDirection() == TextTrackCue::Horizontal) | 82 if (cue->getWritingDirection() == TextTrackCue::Horizontal) |
| 83 setInlineStyleProperty(CSSPropertyHeight, CSSValueAuto); | 83 setInlineStyleProperty(CSSPropertyHeight, CSSValueAuto); |
| 84 else | 84 else |
| 85 setInlineStyleProperty(CSSPropertyWidth, CSSValueAuto); | 85 setInlineStyleProperty(CSSPropertyWidth, CSSValueAuto); |
| 86 | 86 |
| 87 if (cue->baseFontSizeRelativeToVideoHeight()) { | 87 if (cue->baseFontSizeRelativeToVideoHeight()) { |
| 88 double fontSize = videoSize.height() * cue->baseFontSizeRelativeToVideoH
eight() / 100; | 88 double fontSize = videoSize.height() * cue->baseFontSizeRelativeToVideoH
eight() / 100; |
| 89 if (cue->fontSizeMultiplier()) | 89 if (cue->fontSizeMultiplier()) |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 if (m_foregroundColor != other->foregroundColor()) | 159 if (m_foregroundColor != other->foregroundColor()) |
| 160 return false; | 160 return false; |
| 161 if (m_backgroundColor != other->backgroundColor()) | 161 if (m_backgroundColor != other->backgroundColor()) |
| 162 return false; | 162 return false; |
| 163 | 163 |
| 164 return TextTrackCue::operator==(cue); | 164 return TextTrackCue::operator==(cue); |
| 165 } | 165 } |
| 166 | 166 |
| 167 } // namespace WebCore | 167 } // namespace WebCore |
| 168 | 168 |
| OLD | NEW |