Move WebCore/platform/text to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=139395

Reviewed by Darin Adler.

As a step to use std::unique_ptr<>, this patch replaces OwnPtr|PassOwnPtr with
std::unique_ptr<> | std::make_unique<>.

* dom/Document.h:
* platform/text/LineBreakIteratorPoolICU.h:
(WebCore::LineBreakIteratorPool::LineBreakIteratorPool):
(WebCore::LineBreakIteratorPool::create): Deleted.
* platform/text/LocaleICU.cpp:
(WebCore::Locale::create):
(WebCore::LocaleICU::createLabelVector):
(WebCore::createFallbackMonthLabels):
(WebCore::createFallbackAMPMLabels):
(WebCore::LocaleICU::initializeDateTimeFormat):
(WebCore::LocaleICU::shortMonthLabels):
(WebCore::LocaleICU::create): Deleted.
(WebCore::LocaleICU::standAloneMonthLabels): Deleted.
(WebCore::LocaleICU::shortStandAloneMonthLabels): Deleted.
* platform/text/LocaleICU.h:
* platform/text/LocaleNone.cpp:
(WebCore::Locale::create):
* platform/text/PlatformLocale.h:
(WebCore::Locale::createDefault):
* platform/text/TextCodecLatin1.cpp:
* platform/text/TextCodecUTF16.cpp:
* platform/text/TextEncoding.cpp:
* platform/text/mac/LocaleMac.h:
* platform/text/mac/LocaleMac.mm:
(WebCore::Locale::create):
(WebCore::LocaleMac::create):
* platform/text/mac/TextCodecMac.cpp:
* platform/text/win/LocaleWin.cpp:
(WebCore::Locale::create):
(WebCore::LocaleWin::create):
* platform/text/win/LocaleWin.h:
* platform/text/win/TextCodecWin.cpp:
(WebCore::newTextCodecWin):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@177280 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[MSE] Prevent SourceBuffer monitoring algorithm from triggering a HAVE_NOTHING to HAVE_METADATA transition.
https://bugs.webkit.org/show_bug.cgi?id=139444

Patch by Bartlomiej Gajda <b.gajda@samsung.com> on 2014-12-15
Reviewed by Jer Noble.

Source/WebCore:

In case of 2 SourceBuffers, there can be transition to HaveMetadata from monitorSourceBuffers,
even though second SourceBuffer did not receive init segment - we can't query for it's metadata
such as width/height (if second one was video), so we shouldn't fire the event.
W3 Bug reference : https://www.w3.org/Bugs/Public/show_bug.cgi?id=27542

Test: media/media-source/media-source-loadedmetada-with-two-sourcebuffers.html

* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::monitorSourceBuffers):
* Modules/mediasource/SourceBuffer.h:
* platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
(WebCore::mimeTypeCache):

LayoutTests:

Added test to check how many active SourceBuffers exist when loadedmetadata fires,
according to spec 3.5.7, this should be equal to number of sourcebuffers.

* media/media-source/media-source-loadedmetada-with-two-sourcebuffers-expected.txt: Added.
* media/media-source/media-source-loadedmetada-with-two-sourcebuffers.html: Added.

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