Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: Source/core/html/track/InbandTextTrack.cpp

Issue 20061003: Move isValid/isCurrentColor from Color to StyleColor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 cue->setBaseFontSizeRelativeToVideoHeight(cueData->baseFontSize()); 149 cue->setBaseFontSizeRelativeToVideoHeight(cueData->baseFontSize());
150 cue->setFontSizeMultiplier(cueData->relativeFontSize()); 150 cue->setFontSizeMultiplier(cueData->relativeFontSize());
151 cue->setFontName(cueData->fontName()); 151 cue->setFontName(cueData->fontName());
152 152
153 if (cueData->position() > 0) 153 if (cueData->position() > 0)
154 cue->setPosition(lround(cueData->position()), IGNORE_EXCEPTION); 154 cue->setPosition(lround(cueData->position()), IGNORE_EXCEPTION);
155 if (cueData->line() > 0) 155 if (cueData->line() > 0)
156 cue->setLine(lround(cueData->line()), IGNORE_EXCEPTION); 156 cue->setLine(lround(cueData->line()), IGNORE_EXCEPTION);
157 if (cueData->size() > 0) 157 if (cueData->size() > 0)
158 cue->setSize(lround(cueData->size()), IGNORE_EXCEPTION); 158 cue->setSize(lround(cueData->size()), IGNORE_EXCEPTION);
159 if (cueData->backgroundColor().isValid()) 159 if (cueData->backgroundColor().alpha())
160 cue->setBackgroundColor(cueData->backgroundColor().rgb()); 160 cue->setBackgroundColor(cueData->backgroundColor().rgb());
161 if (cueData->foregroundColor().isValid()) 161 if (cueData->foregroundColor().alpha())
162 cue->setForegroundColor(cueData->foregroundColor().rgb()); 162 cue->setForegroundColor(cueData->foregroundColor().rgb());
163 163
164 if (cueData->align() == GenericCueData::Start) 164 if (cueData->align() == GenericCueData::Start)
165 cue->setAlign(ASCIILiteral("start"), IGNORE_EXCEPTION); 165 cue->setAlign(ASCIILiteral("start"), IGNORE_EXCEPTION);
166 else if (cueData->align() == GenericCueData::Middle) 166 else if (cueData->align() == GenericCueData::Middle)
167 cue->setAlign(ASCIILiteral("middle"), IGNORE_EXCEPTION); 167 cue->setAlign(ASCIILiteral("middle"), IGNORE_EXCEPTION);
168 else if (cueData->align() == GenericCueData::End) 168 else if (cueData->align() == GenericCueData::End)
169 cue->setAlign(ASCIILiteral("end"), IGNORE_EXCEPTION); 169 cue->setAlign(ASCIILiteral("end"), IGNORE_EXCEPTION);
170 cue->setSnapToLines(false); 170 cue->setSnapToLines(false);
171 171
(...skipping 15 matching lines...) Expand all
187 cue->setId(id); 187 cue->setId(id);
188 cue->setCueSettings(settings); 188 cue->setCueSettings(settings);
189 189
190 if (hasCue(cue.get())) 190 if (hasCue(cue.get()))
191 return; 191 return;
192 192
193 addCue(cue); 193 addCue(cue);
194 } 194 }
195 195
196 } // namespace WebCore 196 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698