OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 | 47 |
48 namespace WebCore { | 48 namespace WebCore { |
49 | 49 |
50 // The following values default values are defined within the WebVTT Regions Spe
c. | 50 // The following values default values are defined within the WebVTT Regions Spe
c. |
51 // https://dvcs.w3.org/hg/text-tracks/raw-file/default/608toVTT/region.html | 51 // https://dvcs.w3.org/hg/text-tracks/raw-file/default/608toVTT/region.html |
52 | 52 |
53 // The region occupies by default 100% of the width of the video viewport. | 53 // The region occupies by default 100% of the width of the video viewport. |
54 static const float defaultWidth = 100; | 54 static const float defaultWidth = 100; |
55 | 55 |
56 // The region has, by default, 3 lines of text. | 56 // The region has, by default, 3 lines of text. |
57 static const long defaultHeightInLines = 3; | 57 static const int defaultHeightInLines = 3; |
58 | 58 |
59 // The region and viewport are anchored in the bottom left corner. | 59 // The region and viewport are anchored in the bottom left corner. |
60 static const float defaultAnchorPointX = 0; | 60 static const float defaultAnchorPointX = 0; |
61 static const float defaultAnchorPointY = 100; | 61 static const float defaultAnchorPointY = 100; |
62 | 62 |
63 // The region doesn't have scrolling text, by default. | 63 // The region doesn't have scrolling text, by default. |
64 static const bool defaultScroll = false; | 64 static const bool defaultScroll = false; |
65 | 65 |
66 // Default region line-height (vh units) | 66 // Default region line-height (vh units) |
67 static const float lineHeight = 5.33; | 67 static const float lineHeight = 5.33; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 } | 107 } |
108 | 108 |
109 if (value < 0 || value > 100) { | 109 if (value < 0 || value > 100) { |
110 ec = IndexSizeError; | 110 ec = IndexSizeError; |
111 return; | 111 return; |
112 } | 112 } |
113 | 113 |
114 m_width = value; | 114 m_width = value; |
115 } | 115 } |
116 | 116 |
117 void TextTrackRegion::setHeight(long value, ExceptionCode& ec) | 117 void TextTrackRegion::setHeight(int value, ExceptionCode& ec) |
118 { | 118 { |
119 if (value < 0) { | 119 if (value < 0) { |
120 ec = IndexSizeError; | 120 ec = IndexSizeError; |
121 return; | 121 return; |
122 } | 122 } |
123 | 123 |
124 m_heightInLines = value; | 124 m_heightInLines = value; |
125 } | 125 } |
126 | 126 |
127 void TextTrackRegion::setRegionAnchorX(double value, ExceptionCode& ec) | 127 void TextTrackRegion::setRegionAnchorX(double value, ExceptionCode& ec) |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 { | 497 { |
498 LOG(Media, "TextTrackRegion::scrollTimerFired"); | 498 LOG(Media, "TextTrackRegion::scrollTimerFired"); |
499 | 499 |
500 stopTimer(); | 500 stopTimer(); |
501 displayLastTextTrackCueBox(); | 501 displayLastTextTrackCueBox(); |
502 } | 502 } |
503 | 503 |
504 } // namespace WebCore | 504 } // namespace WebCore |
505 | 505 |
506 #endif | 506 #endif |
OLD | NEW |