Changeset 74228 in webkit
- Timestamp:
- Dec 16, 2010, 7:28:51 PM (15 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r74226 r74228 1 2010-12-16 Yi Shen <yi.4.shen@nokia.com>, Tor Arne Vestbo <tor.arne.vestbo@nokia.com> 2 3 Reviewed by Eric Carlson. 4 5 Provide an interface to require using fullscreen mediaplayer 6 https://bugs.webkit.org/show_bug.cgi?id=51133 7 8 Add ChromeClient::requiresFullscreenForVideoPlayback to require webkit 9 to launch fullscreen video player for playing the html5 video. The 10 idea is that a browser vendor can specify this behavior through the 11 platform plugin or something else by using this interface. 12 13 No new tests because no client implements requiresFullscreenForVideoPlayback yet. 14 15 * html/HTMLMediaElement.cpp: 16 (WebCore::HTMLMediaElement::updatePlayState): 17 (WebCore::HTMLMediaElement::exitFullscreen): 18 * page/Chrome.cpp: 19 (WebCore::Chrome::requiresFullscreenForVideoPlayback): 20 * page/Chrome.h: 21 * page/ChromeClient.h: 22 (WebCore::ChromeClient::requiresFullscreenForVideoPlayback): 23 1 24 2010-12-16 Steve Block <steveblock@google.com> 2 25 -
trunk/WebCore/html/HTMLMediaElement.cpp
r73957 r74228 2110 2110 2111 2111 if (playerPaused) { 2112 if (document() && document()->page() && document()->page()->chrome()->requiresFullscreenForVideoPlayback() && !m_isFullscreen) 2113 enterFullscreen(); 2114 2112 2115 // Set rate before calling play in case the rate was set before the media engine was setup. 2113 2116 // The media engine should just stash the rate since it isn't already playing. … … 2425 2428 m_isFullscreen = false; 2426 2429 if (document() && document()->page()) { 2430 if (document()->page()->chrome()->requiresFullscreenForVideoPlayback()) 2431 pauseInternal(); 2427 2432 document()->page()->chrome()->client()->exitFullscreenForNode(this); 2428 2433 scheduleEvent(eventNames().webkitendfullscreenEvent); -
trunk/WebCore/page/Chrome.cpp
r71541 r74228 522 522 #endif 523 523 524 bool Chrome::requiresFullscreenForVideoPlayback() 525 { 526 return m_client->requiresFullscreenForVideoPlayback(); 527 } 528 524 529 } // namespace WebCore -
trunk/WebCore/page/Chrome.h
r73163 r74228 150 150 void dispatchViewportDataDidChange(const ViewportArguments&) const; 151 151 152 bool requiresFullscreenForVideoPlayback(); 153 152 154 #if PLATFORM(MAC) 153 155 void focusNSView(NSView*); -
trunk/WebCore/page/ChromeClient.h
r73163 r74228 257 257 virtual void enterFullscreenForNode(Node*) { } 258 258 virtual void exitFullscreenForNode(Node*) { } 259 virtual bool requiresFullscreenForVideoPlayback() { return false; } 259 260 260 261 #if ENABLE(FULLSCREEN_API)
Note:
See TracChangeset
for help on using the changeset viewer.