diff options
| author | Teng-Hui Zhu <ztenghui@google.com> | 2010-11-10 15:31:59 -0800 |
|---|---|---|
| committer | Teng-Hui Zhu <ztenghui@google.com> | 2010-11-17 13:35:59 -0800 |
| commit | 28040489d744e0c5d475a88663056c9040ed5320 (patch) | |
| tree | c463676791e4a63e452a95f0a12b2a8519730693 /WebCore/platform/graphics/win | |
| parent | eff9be92c41913c92fb1d3b7983c071f3e718678 (diff) | |
| download | external_webkit-28040489d744e0c5d475a88663056c9040ed5320.zip external_webkit-28040489d744e0c5d475a88663056c9040ed5320.tar.gz external_webkit-28040489d744e0c5d475a88663056c9040ed5320.tar.bz2 | |
Merge WebKit at r71558: Initial merge by git.
Change-Id: Ib345578fa29df7e4bc72b4f00e4a6fddcb754c4c
Diffstat (limited to 'WebCore/platform/graphics/win')
6 files changed, 24 insertions, 2 deletions
diff --git a/WebCore/platform/graphics/win/FontCacheWin.cpp b/WebCore/platform/graphics/win/FontCacheWin.cpp index 2240f80..e800245 100644 --- a/WebCore/platform/graphics/win/FontCacheWin.cpp +++ b/WebCore/platform/graphics/win/FontCacheWin.cpp @@ -330,7 +330,7 @@ SimpleFontData* FontCache::getLastResortFallbackFont(const FontDescription& font AtomicString("Arial") }; SimpleFontData* simpleFont; - for (int i = 0; i < ARRAYSIZE(fallbackFonts); ++i) { + for (size_t i = 0; i < WTF_ARRAY_LENGTH(fallbackFonts); ++i) { if (simpleFont = getCachedFontData(fontDescription, fallbackFonts[i])) { fallbackFontName = fallbackFonts[i]; return simpleFont; diff --git a/WebCore/platform/graphics/win/IconWin.cpp b/WebCore/platform/graphics/win/IconWin.cpp index 05959e0..4d4d219 100644 --- a/WebCore/platform/graphics/win/IconWin.cpp +++ b/WebCore/platform/graphics/win/IconWin.cpp @@ -69,7 +69,7 @@ PassRefPtr<Icon> Icon::createIconForFiles(const Vector<String>& filenames) return 0; #else TCHAR buffer[MAX_PATH]; - UINT length = ::GetSystemDirectory(buffer, ARRAYSIZE(buffer)); + UINT length = ::GetSystemDirectory(buffer, WTF_ARRAY_LENGTH(buffer)); if (!length) return 0; diff --git a/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp b/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp index 5544229..34a8817 100644 --- a/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp +++ b/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp @@ -1053,6 +1053,16 @@ void MediaPlayerPrivateQuickTimeVisualContext::setPreload(MediaPlayer::Preload p resumeLoad(); } +float MediaPlayerPrivateQuickTimeVisualContext::mediaTimeForTimeValue(float timeValue) const +{ + long timeScale; + if (m_readyState < MediaPlayer::HaveMetadata || !(timeScale = m_movie->timeScale())) + return timeValue; + + long mediaTimeValue = static_cast<long>(timeValue * timeScale); + return static_cast<float>(mediaTimeValue) / timeScale; +} + MediaPlayerPrivateQuickTimeVisualContext::MediaRenderingMode MediaPlayerPrivateQuickTimeVisualContext::currentRenderingMode() const { if (!m_movie) diff --git a/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h b/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h index 109fd0b..43d5bd5 100644 --- a/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h +++ b/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h @@ -173,6 +173,8 @@ private: void retrieveAndResetMovieTransform(); + virtual float mediaTimeForTimeValue(float) const; + MediaPlayer* m_player; RefPtr<QTMovie> m_movie; #if USE(ACCELERATED_COMPOSITING) diff --git a/WebCore/platform/graphics/win/QTMovie.cpp b/WebCore/platform/graphics/win/QTMovie.cpp index 375d8c2..e425bf8 100644 --- a/WebCore/platform/graphics/win/QTMovie.cpp +++ b/WebCore/platform/graphics/win/QTMovie.cpp @@ -738,6 +738,14 @@ void QTMovie::setClosedCaptionsVisible(bool visible) QTSetTrackProperty(ccTrack, closedCaptionTrackType, closedCaptionDisplayPropertyID, sizeof(doDisplay), &doDisplay); } +long QTMovie::timeScale() const +{ + if (!m_private->m_movie) + return 0; + + return GetMovieTimeScale(m_private->m_movie); +} + static void initializeSupportedTypes() { if (gSupportedTypes) diff --git a/WebCore/platform/graphics/win/QTMovie.h b/WebCore/platform/graphics/win/QTMovie.h index e205b68..5e4c4e7 100644 --- a/WebCore/platform/graphics/win/QTMovie.h +++ b/WebCore/platform/graphics/win/QTMovie.h @@ -115,6 +115,8 @@ public: Movie getMovieHandle() const; + long timeScale() const; + private: QTMoviePrivate* m_private; friend class QTMoviePrivate; |
