Changeset 170694 in webkit
- Timestamp:
- Jul 1, 2014, 8:35:51 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r170691 r170694 1 2014-07-01 Eric Carlson <eric.carlson@apple.com> 2 3 WebVTT percentage value can be a float 4 https://bugs.webkit.org/show_bug.cgi?id=134511 5 6 Reviewed by Brent Fulgham. 7 8 * media/track/captions-webvtt/tc015-positioning-ltr.vtt: 9 * media/track/captions-webvtt/tc015-positioning.vtt: 10 * media/track/captions-webvtt/tc017-line-position.vtt: 11 * media/track/captions-webvtt/tc018-align-text-line-position.vtt: 12 * media/track/captions-webvtt/tc019-cue-size.vtt: 13 * media/track/track-webvtt-tc015-positioning-expected.txt: 14 * media/track/track-webvtt-tc015-positioning.html: 15 * media/track/track-webvtt-tc017-line-position-expected.txt: 16 * media/track/track-webvtt-tc017-line-position.html: 17 * media/track/track-webvtt-tc018-align-text-line-position-expected.txt: 18 * media/track/track-webvtt-tc018-align-text-line-position.html: 19 * media/video-test.js: 20 (testCues): 21 1 22 2014-07-01 Simon Fraser <simon.fraser@apple.com> 2 23 -
trunk/LayoutTests/media/track/captions-webvtt/tc015-positioning-ltr.vtt
r112898 r170694 8 8 9 9 2 10 00:00:31.000 --> 00:00:45.500 position: 50%10 00:00:31.000 --> 00:00:45.500 position:49.20% 11 11 قلت الدب قادم!! 12 12 تحديد المواقع في منتصف القاع. -
trunk/LayoutTests/media/track/captions-webvtt/tc015-positioning.vtt
r112898 r170694 8 8 9 9 2 10 00:00:31.000 --> 00:00:45.500 position: 50%10 00:00:31.000 --> 00:00:45.500 position:49.20% 11 11 I said Bear is coming!!!! 12 12 Positioning on the bottom middle. -
trunk/LayoutTests/media/track/captions-webvtt/tc017-line-position.vtt
r112898 r170694 13 13 14 14 2 15 00:00:31.000 --> 00:00:45.500 line:50 %15 00:00:31.000 --> 00:00:45.500 line:50.2% 16 16 I said Bear is coming!!!! 17 17 Positioning on the center of the video. -
trunk/LayoutTests/media/track/captions-webvtt/tc018-align-text-line-position.vtt
r112898 r170694 13 13 14 14 2 15 00:00:31.000 --> 00:00:45.500 position:80 % line:80%15 00:00:31.000 --> 00:00:45.500 position:80.3% line:80.08% 16 16 I said Bear is coming!!!! 17 Middle aligned, middle of cue's character is at 80 % width and 80% height.17 Middle aligned, middle of cue's character is at 80.3% width and 80.08% height. 18 18 19 19 00:00:46.000 --> 00:01:00.500 line:5 align:end position:30% -
trunk/LayoutTests/media/track/captions-webvtt/tc019-cue-size.vtt
r112898 r170694 10 10 11 11 2 12 00:00:31.000 --> 00:01:00.500 size:10 %12 00:00:31.000 --> 00:01:00.500 size:10.6% 13 13 I said Bear is coming!!!! 14 Box for the cue is 10 % of the video viewport width, which will mean that automatic line wrapping will happen.14 Box for the cue is 10.6% of the video viewport width, which will mean that automatic line wrapping will happen. 15 15 16 16 3 -
trunk/LayoutTests/media/track/track-webvtt-tc015-positioning-expected.txt
r158743 r170694 6 6 EXPECTED (cues.length == '4') OK 7 7 EXPECTED (cues[0].position == '0') OK 8 EXPECTED (cues[1].position == ' 50') OK8 EXPECTED (cues[1].position == '49.2') OK 9 9 EXPECTED (cues[2].position == '50') OK 10 10 EXPECTED (cues[3].position == '100') OK … … 13 13 EXPECTED (cues.length == '4') OK 14 14 EXPECTED (cues[0].position == '0') OK 15 EXPECTED (cues[1].position == ' 50') OK15 EXPECTED (cues[1].position == '49.2') OK 16 16 EXPECTED (cues[2].position == '50') OK 17 17 EXPECTED (cues[3].position == '100') OK -
trunk/LayoutTests/media/track/track-webvtt-tc015-positioning.html
r108872 r170694 30 30 { 31 31 property : "position", 32 values : [0, 50, 50, 100], 32 values : [0, 49.2, 50, 100], 33 precision : 2, 33 34 }, 34 35 ], -
trunk/LayoutTests/media/track/track-webvtt-tc017-line-position-expected.txt
r158743 r170694 9 9 EXPECTED (cues[1].line == '0') OK 10 10 EXPECTED (cues[1].snapToLines == 'true') OK 11 EXPECTED (cues[2].line == '50 ') OK11 EXPECTED (cues[2].line == '50.2') OK 12 12 EXPECTED (cues[2].snapToLines == 'false') OK 13 13 EXPECTED (cues[3].line == '5') OK -
trunk/LayoutTests/media/track/track-webvtt-tc017-line-position.html
r108872 r170694 29 29 { 30 30 property : "line", 31 values : [0, 0, 50, 5, 100, -1, 500], 31 values : [0, 0, 50.2, 5, 100, -1, 500], 32 precision : 2, 32 33 }, 33 34 { -
trunk/LayoutTests/media/track/track-webvtt-tc018-align-text-line-position-expected.txt
r158743 r170694 14 14 EXPECTED (cues[1].snapToLines == 'true') OK 15 15 EXPECTED (cues[2].align == 'middle') OK 16 EXPECTED (cues[2].position == '80 ') OK17 EXPECTED (cues[2].line == '80 ') OK16 EXPECTED (cues[2].position == '80.3') OK 17 EXPECTED (cues[2].line == '80.08') OK 18 18 EXPECTED (cues[2].snapToLines == 'false') OK 19 19 EXPECTED (cues[3].align == 'end') OK -
trunk/LayoutTests/media/track/track-webvtt-tc018-align-text-line-position.html
r108872 r170694 34 34 { 35 35 property : "position", 36 values : [10, 50, 80, 30, 60], 36 values : [10, 50, 80.3, 30, 60], 37 precision : 2, 37 38 }, 38 39 { 39 40 property : "line", 40 values : [0, 0, 80, 5, -3], 41 values : [0, 0, 80.08, 5, -3], 42 precision : 2, 41 43 }, 42 44 { -
trunk/LayoutTests/media/video-test.js
r163649 r170694 320 320 for (j = 0; j < expected.tests.length; j++) { 321 321 var test = expected.tests[j]; 322 testExpected("cues[" + i + "]." + test.property, test.values[i]); 322 var propertyString = "cues[" + i + "]." + test.property; 323 var propertyValue = eval(propertyString); 324 if (test["precision"]) 325 propertyValue = propertyValue.toFixed(test["precision"]); 326 reportExpected(test.values[i] == propertyValue, propertyString, "==", test.values[i], propertyValue) 323 327 } 324 328 } -
trunk/Source/WebCore/ChangeLog
r170690 r170694 1 2014-07-01 Eric Carlson <eric.carlson@apple.com> 2 3 WebVTT percentage value can be a float 4 https://bugs.webkit.org/show_bug.cgi?id=134511 5 6 Reviewed by Brent Fulgham. 7 8 No new tests, existing tests modified. 9 10 * html/track/TextTrackCueGeneric.cpp: 11 (WebCore::TextTrackCueGeneric::setLine): int -> double. 12 (WebCore::TextTrackCueGeneric::setPosition): Ditto. 13 * html/track/TextTrackCueGeneric.h: 14 15 * html/track/VTTCue.cpp: 16 (WebCore::VTTCue::setLine): Ditto. 17 (WebCore::VTTCue::setPosition): Ditto. 18 (WebCore::VTTCue::setCueSettings): Support floating point values for line, position, and size. 19 (WebCore::scanPercentage): Deleted. 20 * html/track/VTTCue.h: 21 22 * html/track/VTTScanner.cpp: 23 (WebCore::VTTScanner::scanFloat): Support negative values. 24 * html/track/VTTScanner.h: 25 26 * html/track/WebVTTParser.cpp: Include parseFloatPercentageValue in non-WEBVTT_REGIONS builds. 27 * html/track/WebVTTParser.h: 28 29 * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: 30 (WebCore::InbandTextTrackPrivateAVF::processCueAttributes): Drive by change to take a cue 31 reference rather than a pointer. 32 (WebCore::InbandTextTrackPrivateAVF::processAttributedStrings): Ditto. 33 (WebCore::InbandTextTrackPrivateAVF::removeCompletedCues): Loop over all cues, don't LOG that 34 we are asking the client to delete the cue because the client will have already deleted 35 it when status when to GenericCueData::Complete. 36 * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h: 37 1 38 2014-07-01 Simon Fraser <simon.fraser@apple.com> 2 39 -
trunk/Source/WebCore/html/track/TextTrackCueGeneric.cpp
r170379 r170694 122 122 } 123 123 124 void TextTrackCueGeneric::setLine( intline, ExceptionCode& ec)124 void TextTrackCueGeneric::setLine(double line, ExceptionCode& ec) 125 125 { 126 126 m_defaultPosition = false; … … 128 128 } 129 129 130 void TextTrackCueGeneric::setPosition( intposition, ExceptionCode& ec)130 void TextTrackCueGeneric::setPosition(double position, ExceptionCode& ec) 131 131 { 132 132 m_defaultPosition = false; -
trunk/Source/WebCore/html/track/TextTrackCueGeneric.h
r169440 r170694 48 48 virtual PassRefPtr<VTTCueBox> createDisplayTree() override; 49 49 50 virtual void setLine( int, ExceptionCode&) override;51 virtual void setPosition( int, ExceptionCode&) override;50 virtual void setLine(double, ExceptionCode&) override; 51 virtual void setPosition(double, ExceptionCode&) override; 52 52 53 53 bool useDefaultPosition() const { return m_defaultPosition; } -
trunk/Source/WebCore/html/track/VTTCue.cpp
r170379 r170694 341 341 } 342 342 343 void VTTCue::setLine( intposition, ExceptionCode& ec)343 void VTTCue::setLine(double position, ExceptionCode& ec) 344 344 { 345 345 // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#dom-texttrackcue-line … … 361 361 } 362 362 363 void VTTCue::setPosition( intposition, ExceptionCode& ec)363 void VTTCue::setPosition(double position, ExceptionCode& ec) 364 364 { 365 365 // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#dom-texttrackcue-position … … 892 892 } 893 893 894 // Used for 'position' and 'size'.895 static bool scanPercentage(VTTScanner& input, const VTTScanner::Run& valueRun, int& number)896 {897 // 1. If value contains any characters other than U+0025 PERCENT SIGN898 // characters (%) and characters in the range U+0030 DIGIT ZERO (0) to899 // U+0039 DIGIT NINE (9), then jump to the step labeled next setting.900 // 2. If value does not contain at least one character in the range U+0030901 // DIGIT ZERO (0) to U+0039 DIGIT NINE (9), then jump to the step902 // labeled next setting.903 if (!input.scanDigits(number))904 return false;905 906 // 3. If any character in value other than the last character is a U+0025907 // PERCENT SIGN character (%), then jump to the step labeled next908 // setting.909 // 4. If the last character in value is not a U+0025 PERCENT SIGN character910 // (%), then jump to the step labeled next setting.911 if (!input.scan('%') || !input.isAt(valueRun.end()))912 return false;913 914 // 5. Ignoring the trailing percent sign, interpret value as an integer,915 // and let number be that number.916 // 6. If number is not in the range 0 ≤ number ≤ 100, then jump to the step917 // labeled next setting.918 return number >= 0 && number <= 100;919 }920 921 894 void VTTCue::setCueSettings(const String& inputString) 922 895 { … … 959 932 else if (input.scanRun(valueRun, verticalGrowingRightKeyword())) 960 933 m_writingDirection = VerticalGrowingRight; 934 935 else 936 LOG(Media, "VTTCue::setCueSettings, invalid Vertical"); 961 937 break; 962 938 } 963 939 case Line: { 964 // 1-2 - Collect chars that are either '-', '%', or a digit. 965 // 1. If value contains any characters other than U+002D HYPHEN-MINUS characters (-), U+0025 PERCENT SIGN 966 // characters (%), and characters in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9), then jump 967 // to the step labeled next setting. 968 bool isNegative = input.scan('-'); 969 int linePosition; 970 unsigned numDigits = input.scanDigits(linePosition); 971 bool isPercentage = input.scan('%'); 972 973 if (!input.isAt(valueRun.end())) 974 break; 975 976 // 2. If value does not contain at least one character in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT 977 // NINE (9), then jump to the step labeled next setting. 978 // 3. If any character in value other than the first character is a U+002D HYPHEN-MINUS character (-), then 979 // jump to the step labeled next setting. 980 // 4. If any character in value other than the last character is a U+0025 PERCENT SIGN character (%), then 981 // jump to the step labeled next setting. 982 // 5. If the first character in value is a U+002D HYPHEN-MINUS character (-) and the last character in value is a 983 // U+0025 PERCENT SIGN character (%), then jump to the step labeled next setting. 984 if (!numDigits || (isPercentage && isNegative)) 985 break; 986 987 // 6. Ignoring the trailing percent sign, if any, interpret value as a (potentially signed) integer, and 988 // let number be that number. 989 // 7. If the last character in value is a U+0025 PERCENT SIGN character (%), but number is not in the range 990 // 0 ≤ number ≤ 100, then jump to the step labeled next setting. 991 // 8. Let cue's text track cue line position be number. 992 // 9. If the last character in value is a U+0025 PERCENT SIGN character (%), then let cue's text track cue 993 // snap-to-lines flag be false. Otherwise, let it be true. 994 if (isPercentage) { 995 if (linePosition < 0 || linePosition > 100) 940 bool isValid = false; 941 do { 942 // 1-2 - Collect chars that are either '-', '%', or a digit. 943 // 1. If value contains any characters other than U+002D HYPHEN-MINUS characters (-), U+0025 PERCENT SIGN 944 // characters (%), and characters in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9), then jump 945 // to the step labeled next setting. 946 float linePosition; 947 bool isNegative; 948 if (!input.scanFloat(linePosition, &isNegative)) 996 949 break; 997 950 998 // 10 - If '%' then set snap-to-lines flag to false. 999 m_snapToLines = false; 1000 } else { 1001 if (isNegative) 1002 linePosition = -linePosition; 1003 1004 m_snapToLines = true; 1005 } 1006 1007 m_linePosition = linePosition; 951 bool isPercentage = input.scan('%'); 952 if (!input.isAt(valueRun.end())) 953 break; 954 955 // 2. If value does not contain at least one character in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT 956 // NINE (9), then jump to the step labeled next setting. 957 // 3. If any character in value other than the first character is a U+002D HYPHEN-MINUS character (-), then 958 // jump to the step labeled next setting. 959 // 4. If any character in value other than the last character is a U+0025 PERCENT SIGN character (%), then 960 // jump to the step labeled next setting. 961 // 5. If the first character in value is a U+002D HYPHEN-MINUS character (-) and the last character in value is a 962 // U+0025 PERCENT SIGN character (%), then jump to the step labeled next setting. 963 if (isPercentage && isNegative) 964 break; 965 966 // 6. Ignoring the trailing percent sign, if any, interpret value as a (potentially signed) integer, and 967 // let number be that number. 968 // 7. If the last character in value is a U+0025 PERCENT SIGN character (%), but number is not in the range 969 // 0 ≤ number ≤ 100, then jump to the step labeled next setting. 970 // 8. Let cue's text track cue line position be number. 971 // 9. If the last character in value is a U+0025 PERCENT SIGN character (%), then let cue's text track cue 972 // snap-to-lines flag be false. Otherwise, let it be true. 973 if (isPercentage) { 974 if (linePosition < 0 || linePosition > 100) 975 break; 976 977 // 10 - If '%' then set snap-to-lines flag to false. 978 m_snapToLines = false; 979 } else { 980 if (linePosition - static_cast<int>(linePosition)) 981 break; 982 983 m_snapToLines = true; 984 } 985 986 m_linePosition = linePosition; 987 isValid = true; 988 } while (0); 989 990 if (!isValid) 991 LOG(Media, "VTTCue::setCueSettings, invalid Line"); 992 1008 993 break; 1009 994 } 1010 995 case Position: { 1011 int number; 1012 // Steps 1 - 6. 1013 if (!scanPercentage(input, valueRun, number)) 1014 break; 1015 1016 // 7. Let cue's text track cue text position be number. 1017 m_textPosition = number; 996 float position; 997 if (WebVTTParser::parseFloatPercentageValue(input, position) && input.isAt(valueRun.end())) 998 m_textPosition = position; 999 else 1000 LOG(Media, "VTTCue::setCueSettings, invalid Position"); 1018 1001 break; 1019 1002 } 1020 1003 case Size: { 1021 int number; 1022 // Steps 1 - 6. 1023 if (!scanPercentage(input, valueRun, number)) 1024 break; 1025 1026 // 7. Let cue's text track cue size be number. 1027 m_cueSize = number; 1004 float cueSize; 1005 if (WebVTTParser::parseFloatPercentageValue(input, cueSize) && input.isAt(valueRun.end())) 1006 m_cueSize = cueSize; 1007 else 1008 LOG(Media, "VTTCue::setCueSettings, invalid Size"); 1028 1009 break; 1029 1010 } … … 1048 1029 else if (input.scanRun(valueRun, rightKeyword())) 1049 1030 m_cueAlignment = Right; 1031 1032 else 1033 LOG(Media, "VTTCue::setCueSettings, invalid Align"); 1034 1050 1035 break; 1051 1036 } -
trunk/Source/WebCore/html/track/VTTCue.h
r170379 r170694 83 83 void setSnapToLines(bool); 84 84 85 intline() const { return m_linePosition; }86 virtual void setLine( int, ExceptionCode&);87 88 intposition() const { return m_textPosition; }89 virtual void setPosition( int, ExceptionCode&);85 double line() const { return m_linePosition; } 86 virtual void setLine(double, ExceptionCode&); 87 88 double position() const { return m_textPosition; } 89 virtual void setPosition(double, ExceptionCode&); 90 90 91 91 int size() const { return m_cueSize; } … … 191 191 String m_content; 192 192 String m_settings; 193 intm_linePosition;194 intm_computedLinePosition;195 intm_textPosition;193 double m_linePosition; 194 double m_computedLinePosition; 195 double m_textPosition; 196 196 int m_cueSize; 197 197 -
trunk/Source/WebCore/html/track/VTTScanner.cpp
r166097 r170694 141 141 } 142 142 143 bool VTTScanner::scanFloat(float& number )143 bool VTTScanner::scanFloat(float& number, bool* isNegative) 144 144 { 145 bool negative = scan('-'); 145 146 Run integerRun = collectWhile<isASCIIDigit>(); 147 146 148 seekTo(integerRun.end()); 147 149 Run decimalRun(position(), position(), m_is8Bit); … … 167 169 if (!validNumber) 168 170 number = std::numeric_limits<float>::max(); 171 else if (negative) 172 number = -number; 173 174 if (isNegative) 175 *isNegative = negative; 176 169 177 return true; 170 178 } -
trunk/Source/WebCore/html/track/VTTScanner.h
r166097 r170694 128 128 129 129 // Scan a floating point value on one of the forms: \d+\.? \d+\.\d+ \.\d+ 130 bool scanFloat(float& number );130 bool scanFloat(float& number, bool* isNegative = nullptr); 131 131 132 132 protected: -
trunk/Source/WebCore/html/track/WebVTTParser.cpp
r170379 r170694 51 51 const unsigned fileIdentifierLength = 6; 52 52 53 #if ENABLE(WEBVTT_REGIONS)54 53 bool WebVTTParser::parseFloatPercentageValue(VTTScanner& valueScanner, float& percentage) 55 54 { … … 68 67 } 69 68 69 #if ENABLE(WEBVTT_REGIONS) 70 70 bool WebVTTParser::parseFloatPercentageValuePair(VTTScanner& valueScanner, char delimiter, FloatPoint& valuePair) 71 71 { -
trunk/Source/WebCore/html/track/WebVTTParser.h
r170379 r170694 140 140 static bool collectTimeStamp(const String&, double&); 141 141 142 #if ENABLE(WEBVTT_REGIONS)143 142 // Useful functions for parsing percentage settings. 144 143 static bool parseFloatPercentageValue(VTTScanner& valueScanner, float&); 144 #if ENABLE(WEBVTT_REGIONS) 145 145 static bool parseFloatPercentageValuePair(VTTScanner& valueScanner, char, FloatPoint&); 146 146 #endif -
trunk/Source/WebCore/platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp
r170384 r170694 162 162 } 163 163 164 void InbandTextTrackPrivateAVF::processCueAttributes(CFAttributedStringRef attributedString, GenericCueData *cueData)164 void InbandTextTrackPrivateAVF::processCueAttributes(CFAttributedStringRef attributedString, GenericCueData& cueData) 165 165 { 166 166 // Some of the attributes we translate into per-cue WebVTT settings are are repeated on each part of an attributed string so only … … 212 212 213 213 if (CFStringCompare(valueString, kCMTextMarkupAlignmentType_Start, 0) == kCFCompareEqualTo) 214 cueData ->setAlign(GenericCueData::Start);214 cueData.setAlign(GenericCueData::Start); 215 215 else if (CFStringCompare(valueString, kCMTextMarkupAlignmentType_Middle, 0) == kCFCompareEqualTo) 216 cueData ->setAlign(GenericCueData::Middle);216 cueData.setAlign(GenericCueData::Middle); 217 217 else if (CFStringCompare(valueString, kCMTextMarkupAlignmentType_End, 0) == kCFCompareEqualTo) 218 cueData ->setAlign(GenericCueData::End);218 cueData.setAlign(GenericCueData::End); 219 219 else 220 220 ASSERT_NOT_REACHED(); … … 260 260 double line; 261 261 CFNumberGetValue(valueNumber, kCFNumberFloat64Type, &line); 262 cueData ->setLine(line);262 cueData.setLine(line); 263 263 continue; 264 264 } … … 274 274 double position; 275 275 CFNumberGetValue(valueNumber, kCFNumberFloat64Type, &position); 276 cueData ->setPosition(position);276 cueData.setPosition(position); 277 277 continue; 278 278 } … … 288 288 double size; 289 289 CFNumberGetValue(valueNumber, kCFNumberFloat64Type, &size); 290 cueData ->setSize(size);290 cueData.setSize(size); 291 291 continue; 292 292 } … … 311 311 double baseFontSize; 312 312 CFNumberGetValue(valueNumber, kCFNumberFloat64Type, &baseFontSize); 313 cueData ->setBaseFontSize(baseFontSize);313 cueData.setBaseFontSize(baseFontSize); 314 314 continue; 315 315 } … … 322 322 double relativeFontSize; 323 323 CFNumberGetValue(valueNumber, kCFNumberFloat64Type, &relativeFontSize); 324 cueData ->setRelativeFontSize(relativeFontSize);324 cueData.setRelativeFontSize(relativeFontSize); 325 325 continue; 326 326 } … … 334 334 processed |= FontName; 335 335 336 cueData ->setFontName(valueString);336 cueData.setFontName(valueString); 337 337 continue; 338 338 } … … 346 346 if (!makeRGBA32FromARGBCFArray(arrayValue, color)) 347 347 continue; 348 cueData ->setForegroundColor(color);348 cueData.setForegroundColor(color); 349 349 } 350 350 … … 357 357 if (!makeRGBA32FromARGBCFArray(arrayValue, color)) 358 358 continue; 359 cueData ->setBackgroundColor(color);359 cueData.setBackgroundColor(color); 360 360 } 361 361 … … 368 368 if (!makeRGBA32FromARGBCFArray(arrayValue, color)) 369 369 continue; 370 cueData ->setHighlightColor(color);370 cueData.setHighlightColor(color); 371 371 } 372 372 } … … 378 378 379 379 if (content.length()) 380 cueData ->setContent(content.toString());380 cueData.setContent(content.toString()); 381 381 } 382 382 … … 404 404 405 405 RefPtr<GenericCueData> cueData = GenericCueData::create(); 406 processCueAttributes(attributedString, cueData.get());406 processCueAttributes(attributedString, *cueData.get()); 407 407 if (!cueData->content().length()) 408 408 continue; … … 500 500 if (client()) { 501 501 long currentCue = m_cues.size() - 1; 502 for (; currentCue > 0; --currentCue) {502 for (; currentCue >= 0; --currentCue) { 503 503 if (m_cues[currentCue]->status() != GenericCueData::Complete) 504 504 continue; 505 505 506 LOG(Media, "InbandTextTrackPrivateAVF::removeCompletedCues(%p) - removing cue (\"%s\") for time = %.2f, position = %.2f, line = %.2f", this, m_cues[currentCue]->content().utf8().data(), m_cues[currentCue]->startTime(), m_cues[currentCue]->position(), m_cues[currentCue]->line());507 client()->removeGenericCue(this, m_cues[currentCue].get());508 506 m_cues.remove(currentCue); 509 507 } -
trunk/Source/WebCore/platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h
r170379 r170694 75 75 InbandTextTrackPrivateAVF(AVFInbandTrackParent*, CueFormat); 76 76 77 void processCueAttributes(CFAttributedStringRef, GenericCueData *);77 void processCueAttributes(CFAttributedStringRef, GenericCueData&); 78 78 void processAttributedStrings(CFArrayRef, double); 79 79 void processNativeSamples(CFArrayRef, double);
Note:
See TracChangeset
for help on using the changeset viewer.