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

Side by Side Diff: Source/core/html/track/vtt/VTTCue.cpp

Issue 262753004: Replace all remaining IDL finitude type checks with [TypeChecking=Unrestricted] (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 6 years, 7 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
« no previous file with comments | « Source/core/html/track/TextTrackCue.idl ('k') | Source/core/html/track/vtt/VTTRegion.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013, Opera Software ASA. All rights reserved. 2 * Copyright (c) 2013, Opera Software ASA. 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 DEFINE_STATIC_LOCAL(const String, verticalrl, ("rl")); 108 DEFINE_STATIC_LOCAL(const String, verticalrl, ("rl"));
109 return verticalrl; 109 return verticalrl;
110 } 110 }
111 111
112 static const String& verticalGrowingRightKeyword() 112 static const String& verticalGrowingRightKeyword()
113 { 113 {
114 DEFINE_STATIC_LOCAL(const String, verticallr, ("lr")); 114 DEFINE_STATIC_LOCAL(const String, verticallr, ("lr"));
115 return verticallr; 115 return verticallr;
116 } 116 }
117 117
118 static bool isInvalidPercentage(double value, ExceptionState& exceptionState) 118 static bool isInvalidPercentage(int value, ExceptionState& exceptionState)
119 { 119 {
120 if (TextTrackCue::isInfiniteOrNonNumber(value, exceptionState))
121 return true;
122 if (value < 0 || value > 100) { 120 if (value < 0 || value > 100) {
123 exceptionState.throwDOMException(IndexSizeError, ExceptionMessages::inde xOutsideRange("value", value, 0.0, ExceptionMessages::InclusiveBound, 100.0, Exc eptionMessages::InclusiveBound)); 121 exceptionState.throwDOMException(IndexSizeError, ExceptionMessages::inde xOutsideRange("value", value, 0, ExceptionMessages::InclusiveBound, 100, Excepti onMessages::InclusiveBound));
124 return true; 122 return true;
125 } 123 }
126 return false; 124 return false;
127 } 125 }
128 126
129 VTTCueBox::VTTCueBox(Document& document, VTTCue* cue) 127 VTTCueBox::VTTCueBox(Document& document, VTTCue* cue)
130 : HTMLDivElement(document) 128 : HTMLDivElement(document)
131 , m_cue(cue) 129 , m_cue(cue)
132 { 130 {
133 setShadowPseudoId(AtomicString("-webkit-media-text-track-display", AtomicStr ing::ConstructFromLiteral)); 131 setShadowPseudoId(AtomicString("-webkit-media-text-track-display", AtomicStr ing::ConstructFromLiteral));
(...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after
1062 ASSERT(m_cueBackgroundBox); 1060 ASSERT(m_cueBackgroundBox);
1063 return m_cueBackgroundBox->document(); 1061 return m_cueBackgroundBox->document();
1064 } 1062 }
1065 1063
1066 void VTTCue::trace(Visitor* visitor) 1064 void VTTCue::trace(Visitor* visitor)
1067 { 1065 {
1068 TextTrackCue::trace(visitor); 1066 TextTrackCue::trace(visitor);
1069 } 1067 }
1070 1068
1071 } // namespace WebCore 1069 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/track/TextTrackCue.idl ('k') | Source/core/html/track/vtt/VTTRegion.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698