[Media] Reduce style updates (painting) in controls
https://bugs.webkit.org/show_bug.cgi?id=137763
<rdar://problem/17833045>

Reviewed by Simon Fraser.

Media controls were causing a lot of repaints they were
constantly updating the style of the widgets, the value
of the forms, or the text in the display.

This is necessary when the controls are visible, but not
necessary when they are hidden. Return immediately in that case.

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.createControls): Initialise the slider to a zero value.
(Controller.prototype.handleDurationChange): Force an update even though we might be hidden.
(Controller.prototype.updateProgress): Don't update if we're hidden.
(Controller.prototype.updateTime): Ditto.
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.updateProgress): Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174756 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move TextCodec classes to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=137738

Reviewed by Darin Adler.

Replace uses of PassOwnPtr in code under TextCodecFoo class with std::unique_ptr.
To do this, ctor of TextCodecFoo classes is changed from private to public. Besides
related classes follow this change as well.

No new tests, no behavior change.

* html/parser/HTMLMetaCharsetParser.h:
* loader/TextResourceDecoder.cpp:
(WebCore::TextResourceDecoder::setEncoding):
(WebCore::TextResourceDecoder::flush):
* loader/TextResourceDecoder.h:
* platform/text/TextCodec.h:
* platform/text/TextCodecICU.cpp:
(WebCore::TextCodecICU::create):
* platform/text/TextCodecICU.h:
* platform/text/TextCodecLatin1.cpp:
(WebCore::newStreamingTextDecoderWindowsLatin1):
* platform/text/TextCodecUTF16.cpp:
(WebCore::newStreamingTextDecoderUTF16LE):
(WebCore::newStreamingTextDecoderUTF16BE):
* platform/text/TextCodecUTF8.cpp:
(WebCore::TextCodecUTF8::create):
* platform/text/TextCodecUTF8.h:
* platform/text/TextCodecUserDefined.cpp:
(WebCore::newStreamingTextDecoderUserDefined):
* platform/text/TextEncodingRegistry.cpp:
(WebCore::newTextCodec):
* platform/text/TextEncodingRegistry.h:
* platform/text/mac/TextCodecMac.cpp:
(WebCore::newTextCodecMac):


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