[iOS] deviceScaleFactor is being double-applied when rendering captions in full scree...
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 4 May 2014 21:01:23 +0000 (21:01 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 4 May 2014 21:01:23 +0000 (21:01 +0000)
commitbef5cbdea51af05ee662e55beb88d70d38c5b4f5
treeacbb4df117b26a7bdddba99008847225dfbca0d5
parent5d70ce9ccbcfaafa32e4dd0407bb521d920da66a
[iOS] deviceScaleFactor is being double-applied when rendering captions in full screen mode
https://bugs.webkit.org/show_bug.cgi?id=132481
<rdar://problem/16507482>

Reviewed by Jer Noble.

Add a new 'syncTextTrackBounds' method (and relaying functions) to keep the text track container in sync
with changes to the video player's display layer.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::syncTextTrackBounds: Added.
* html/HTMLMediaElement.h:
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateDisplay): Don't set the platform scale factor here. It is already
being accounted for in the createTextTrackRepresentationImage method.
(WebCore::MediaControlTextTrackContainerElement::updateSizes): Synchronize the text track representation
with any new video layer changes.
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::syncTextTrackBounds): Added.
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::syncTextTrackBounds): Added.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer): Use new sync function.
(WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenFrame): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::syncTextTrackBounds): Added. Keep the text track layer size in sync with
the current video layer size. This may change during animations, rotations, etc.
(WebCore::MediaPlayerPrivateAVFoundationObjC::setTextTrackRepresentation): Use new sync function.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@168245 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLMediaElement.h
Source/WebCore/html/shadow/MediaControlElements.cpp
Source/WebCore/platform/graphics/MediaPlayer.cpp
Source/WebCore/platform/graphics/MediaPlayer.h
Source/WebCore/platform/graphics/MediaPlayerPrivate.h
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm