Create UTF-8 string from in-band VTT cues
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Aug 2014 21:01:20 +0000 (21:01 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Aug 2014 21:01:20 +0000 (21:01 +0000)
https://bugs.webkit.org/show_bug.cgi?id=135716

Reviewed by Brent Fulgham.

Tests will be added in https://bugs.webkit.org/show_bug.cgi?id=135717.

* platform/graphics/ISOVTTCue.cpp:
(WebCore::ISOBox::peekString): Call String::fromUTF8 because we know that VTT is always
    UTF-8.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172257 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/ISOVTTCue.cpp

index 27b6de5..8cadab2 100644 (file)
@@ -1,3 +1,16 @@
+2014-08-07  Eric Carlson  <eric.carlson@apple.com>
+
+        Create UTF-8 string from in-band VTT cues
+        https://bugs.webkit.org/show_bug.cgi?id=135716
+
+        Reviewed by Brent Fulgham.
+
+        Tests will be added in https://bugs.webkit.org/show_bug.cgi?id=135717.
+
+        * platform/graphics/ISOVTTCue.cpp:
+        (WebCore::ISOBox::peekString): Call String::fromUTF8 because we know that VTT is always
+            UTF-8.
+
 2014-08-06  Jeremy Jones  <jeremyj@apple.com>
 
         Disable implicit animations on video layer.
index 944fbd8..77d2ab7 100644 (file)
@@ -75,7 +75,7 @@ String ISOBox::peekString(ArrayBuffer* data, unsigned offset, unsigned length)
     if (data->byteLength() < offset + length)
         return emptyString();
 
-    return String(JSC::Uint8Array::create(data, offset, length)->data(), length);
+    return String::fromUTF8(JSC::Uint8Array::create(data, offset, length)->data(), length);
 }
 
 static const AtomicString& vttCueBoxType()