Commit e7bfed76 authored by bdakin@apple.com's avatar bdakin@apple.com
Browse files

Fix for https://bugs.webkit.org/show_bug.cgi?id=34942 Fullscreen

API naming is inconsistent
-and corresponding-
<rdar://problem/7729165>

Reviewed by Simon Fraser.

WebCore: 

This patch changes all occurrences of "fullScreen" to the more 
popular "fullscreen." webkitEnterFullScreen and 
webkitExitFullScreen have been maintained for now for backwards 
compatibility. 

* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::webkitEnterFullscreen):
(WebCore::HTMLVideoElement::webkitExitFullscreen):
* html/HTMLVideoElement.h:
(WebCore::HTMLVideoElement::webkitEnterFullScreen):
(WebCore::HTMLVideoElement::webkitExitFullScreen):
* html/HTMLVideoElement.idl:
* platform/graphics/mac/MediaPlayerProxy.h:

WebKit/mac: 

This patch changes all occurrences of "fullScreen" to the more 
popular "fullscreen."

* Plugins/Hosted/NetscapePluginHostProxy.h:
(WebKit::NetscapePluginHostProxy::isFullscreenWindowShowing):
* Plugins/Hosted/NetscapePluginHostProxy.mm:
(WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
(WebKit::NetscapePluginHostProxy::didEnterFullscreen):
(WebKit::NetscapePluginHostProxy::didExitFullscreen):
(WebKit::NetscapePluginHostProxy::setFullscreenWindowIsShowing):
(WKPCSetFullscreenWindowIsShowing):
* Plugins/Hosted/WebKitPluginClient.defs:
* Plugins/WebNetscapePluginView.mm:
(-[WebNetscapePluginView _workaroundSilverlightFullscreenBug:]):
(-[WebNetscapePluginView _createPlugin]):
(-[WebNetscapePluginView _destroyPlugin]):
* WebView/WebVideoFullscreenHUDWindowController.mm:
(-[WebVideoFullscreenHUDWindowController windowDidLoad]):

WebKit/win: 

This patch changes all occurrences of "fullScreen" to the more 
popular "fullscreen."

* FullscreenVideoController.cpp:
(FullscreenVideoController::onMouseDown):
(FullscreenVideoController::onMouseMove):
(FullscreenVideoController::onMouseUp):
* FullscreenVideoController.h:
(FullscreenVideoController::fullscreenToHUDCoordinates):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55946 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent b095f1c0
2010-03-12 Beth Dakin <bdakin@apple.com>
Reviewed by Simon Fraser.
Fix for https://bugs.webkit.org/show_bug.cgi?id=34942 Fullscreen
API naming is inconsistent
-and corresponding-
<rdar://problem/7729165>
This patch changes all occurrences of "fullScreen" to the more
popular "fullscreen." webkitEnterFullScreen and
webkitExitFullScreen have been maintained for now for backwards
compatibility.
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::webkitEnterFullscreen):
(WebCore::HTMLVideoElement::webkitExitFullscreen):
* html/HTMLVideoElement.h:
(WebCore::HTMLVideoElement::webkitEnterFullScreen):
(WebCore::HTMLVideoElement::webkitExitFullScreen):
* html/HTMLVideoElement.idl:
* platform/graphics/mac/MediaPlayerProxy.h:
2010-03-12 James Robinson <jamesr@chromium.org>
 
Reviewed by Adam Barth.
......
......@@ -214,7 +214,7 @@ bool HTMLVideoElement::hasAvailableVideoFrame() const
return player()->hasAvailableVideoFrame();
}
void HTMLVideoElement::webkitEnterFullScreen(bool isUserGesture, ExceptionCode& ec)
void HTMLVideoElement::webkitEnterFullscreen(bool isUserGesture, ExceptionCode& ec)
{
if (isFullscreen())
return;
......@@ -229,7 +229,7 @@ void HTMLVideoElement::webkitEnterFullScreen(bool isUserGesture, ExceptionCode&
enterFullscreen();
}
void HTMLVideoElement::webkitExitFullScreen()
void HTMLVideoElement::webkitExitFullscreen()
{
if (isFullscreen())
exitFullscreen();
......
......@@ -49,12 +49,17 @@ public:
const KURL& poster() const { return m_posterURL; }
void setPoster(const String&);
// fullscreen
void webkitEnterFullScreen(bool isUserGesture, ExceptionCode&);
void webkitExitFullScreen();
// Fullscreen
void webkitEnterFullscreen(bool isUserGesture, ExceptionCode&);
void webkitExitFullscreen();
bool webkitSupportsFullscreen();
bool webkitDisplayingFullscreen();
// FIXME: Maintain "FullScreen" capitalization scheme for backwards compatibility.
// https://bugs.webkit.org/show_bug.cgi?id=36081
void webkitEnterFullScreen(bool isUserGesture, ExceptionCode& ec) { webkitEnterFullscreen(isUserGesture, ec); }
void webkitExitFullScreen() { webkitExitFullscreen(); }
bool shouldDisplayPosterImage() const { return m_shouldDisplayPosterImage; }
// Used by canvas to gain raw pixel access
......
......@@ -33,6 +33,10 @@ module html {
readonly attribute boolean webkitSupportsFullscreen;
readonly attribute boolean webkitDisplayingFullscreen;
[NeedsUserGestureCheck] void webkitEnterFullscreen()
raises (DOMException);
void webkitExitFullscreen();
[NeedsUserGestureCheck] void webkitEnterFullScreen()
raises (DOMException);
......
......@@ -40,8 +40,8 @@ enum MediaPlayerProxyNotificationType {
MediaPlayerNotificationStartUsingNetwork,
MediaPlayerNotificationStopUsingNetwork,
MediaPlayerNotificationEnteredFullScreen,
MediaPlayerNotificationExitedFullScreen,
MediaPlayerNotificationEnteredFullscreen,
MediaPlayerNotificationExitedFullscreen,
MediaPlayerNotificationReadyForInspection,
MediaPlayerNotificationReadyForPlayback,
......
2010-03-12 Beth Dakin <bdakin@apple.com>
Reviewed by Simon Fraser.
Fix for https://bugs.webkit.org/show_bug.cgi?id=34942 Fullscreen
API naming is inconsistent
-and corresponding-
<rdar://problem/7729165>
This patch changes all occurrences of "fullScreen" to the more
popular "fullscreen."
* Plugins/Hosted/NetscapePluginHostProxy.h:
(WebKit::NetscapePluginHostProxy::isFullscreenWindowShowing):
* Plugins/Hosted/NetscapePluginHostProxy.mm:
(WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
(WebKit::NetscapePluginHostProxy::didEnterFullscreen):
(WebKit::NetscapePluginHostProxy::didExitFullscreen):
(WebKit::NetscapePluginHostProxy::setFullscreenWindowIsShowing):
(WKPCSetFullscreenWindowIsShowing):
* Plugins/Hosted/WebKitPluginClient.defs:
* Plugins/WebNetscapePluginView.mm:
(-[WebNetscapePluginView _workaroundSilverlightFullscreenBug:]):
(-[WebNetscapePluginView _createPlugin]):
(-[WebNetscapePluginView _destroyPlugin]):
* WebView/WebVideoFullscreenHUDWindowController.mm:
(-[WebVideoFullscreenHUDWindowController windowDidLoad]):
2010-03-12 Andy Estes <aestes@apple.com>
Reviewed by Brady Eidson.
......
......@@ -54,8 +54,8 @@ public:
bool isMenuBarVisible() const { return m_menuBarIsVisible; }
void setMenuBarVisible(bool);
bool isFullScreenWindowShowing() const { return m_fullScreenWindowIsShowing; }
void setFullScreenWindowIsShowing(bool);
bool isFullscreenWindowShowing() const { return m_fullscreenWindowIsShowing; }
void setFullscreenWindowIsShowing(bool);
void setModal(bool);
......@@ -73,8 +73,8 @@ private:
void beginModal();
void endModal();
void didEnterFullScreen() const;
void didExitFullScreen() const;
void didEnterFullscreen() const;
void didExitFullscreen() const;
static void deadNameNotificationCallback(CFMachPortRef, void *msg, CFIndex size, void *info);
......@@ -96,7 +96,7 @@ private:
RetainPtr<WebPlaceholderModalWindow *> m_placeholderWindow;
unsigned m_isModal;
bool m_menuBarIsVisible;
bool m_fullScreenWindowIsShowing;
bool m_fullscreenWindowIsShowing;
const ProcessSerialNumber m_pluginHostPSN;
unsigned m_processingRequests;
......
......@@ -95,7 +95,7 @@ NetscapePluginHostProxy::NetscapePluginHostProxy(mach_port_t clientPort, mach_po
, m_pluginHostPort(pluginHostPort)
, m_isModal(false)
, m_menuBarIsVisible(true)
, m_fullScreenWindowIsShowing(false)
, m_fullscreenWindowIsShowing(false)
, m_pluginHostPSN(pluginHostPSN)
, m_processingRequests(0)
, m_shouldCacheMissingPropertiesAndMethods(shouldCacheMissingPropertiesAndMethods)
......@@ -202,12 +202,12 @@ void NetscapePluginHostProxy::setMenuBarVisible(bool visible)
[NSMenu setMenuBarVisible:visible];
}
void NetscapePluginHostProxy::didEnterFullScreen() const
void NetscapePluginHostProxy::didEnterFullscreen() const
{
SetFrontProcess(&m_pluginHostPSN);
}
void NetscapePluginHostProxy::didExitFullScreen() const
void NetscapePluginHostProxy::didExitFullscreen() const
{
// If the plug-in host is the current application then we should bring ourselves to the front when it exits full-screen mode.
......@@ -223,16 +223,16 @@ void NetscapePluginHostProxy::didExitFullScreen() const
SetFrontProcess(&currentProcess);
}
void NetscapePluginHostProxy::setFullScreenWindowIsShowing(bool isShowing)
void NetscapePluginHostProxy::setFullscreenWindowIsShowing(bool isShowing)
{
if (m_fullScreenWindowIsShowing == isShowing)
if (m_fullscreenWindowIsShowing == isShowing)
return;
m_fullScreenWindowIsShowing = isShowing;
if (m_fullScreenWindowIsShowing)
didEnterFullScreen();
m_fullscreenWindowIsShowing = isShowing;
if (m_fullscreenWindowIsShowing)
didEnterFullscreen();
else
didExitFullScreen();
didExitFullscreen();
}
......@@ -892,13 +892,13 @@ kern_return_t WKPCSetMenuBarVisible(mach_port_t clientPort, boolean_t menuBarVis
return KERN_SUCCESS;
}
kern_return_t WKPCSetFullScreenWindowIsShowing(mach_port_t clientPort, boolean_t fullScreenWindowIsShowing)
kern_return_t WKPCSetFullscreenWindowIsShowing(mach_port_t clientPort, boolean_t fullscreenWindowIsShowing)
{
NetscapePluginHostProxy* hostProxy = pluginProxyMap().get(clientPort);
if (!hostProxy)
return KERN_FAILURE;
hostProxy->setFullScreenWindowIsShowing(fullScreenWindowIsShowing);
hostProxy->setFullscreenWindowIsShowing(fullscreenWindowIsShowing);
return KERN_SUCCESS;
}
......
......@@ -234,7 +234,7 @@ simpleroutine PCBooleanAndDataReply(clientPort :mach_port_t;
simpleroutine PCRunSyncOpenPanel(clientPort :mach_port_t;
panelData :data_t);
simpleroutine PCSetFullScreenWindowIsShowing(clientPort :mach_port_t;
simpleroutine PCSetFullscreenWindowIsShowing(clientPort :mach_port_t;
isShowing :boolean_t);
simpleroutine PCSetException(clientPort :mach_port_t;
......
......@@ -82,7 +82,7 @@
#define LoginWindowDidSwitchFromUserNotification @"WebLoginWindowDidSwitchFromUserNotification"
#define LoginWindowDidSwitchToUserNotification @"WebLoginWindowDidSwitchToUserNotification"
#define WKNVSupportsCompositingCoreAnimationPluginsBool 74656 /* TRUE if the browser supports hardware compositing of Core Animation plug-ins */
static const int WKNVSilverlightFullScreenPerformanceIssueFixed = 7288546; /* TRUE if Siverlight addressed its underlying bug in <rdar://problem/7288546> */
static const int WKNVSilverlightFullscreenPerformanceIssueFixed = 7288546; /* TRUE if Siverlight addressed its underlying bug in <rdar://problem/7288546> */
using namespace WebCore;
using namespace WebKit;
......@@ -2310,13 +2310,13 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
// 1) Microsoft releases a genuine fix for 7288546.
// 2) Enough Silverlight users update to the new Silverlight.
// For now, we'll distinguish older broken versions of Silverlight by asking the plug-in if it resolved its full screen badness.
- (void)_workaroundSilverlightFullScreenBug:(BOOL)initializedPlugin
- (void)_workaroundSilverlightFullscreenBug:(BOOL)initializedPlugin
{
#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
ASSERT(_isSilverlight);
NPBool isFullScreenPerformanceIssueFixed = 0;
NPBool isFullscreenPerformanceIssueFixed = 0;
NPPluginFuncs *pluginFuncs = [_pluginPackage.get() pluginFuncs];
if (pluginFuncs->getvalue && pluginFuncs->getvalue(plugin, static_cast<NPPVariable>(WKNVSilverlightFullScreenPerformanceIssueFixed), &isFullScreenPerformanceIssueFixed) == NPERR_NO_ERROR && isFullScreenPerformanceIssueFixed)
if (pluginFuncs->getvalue && pluginFuncs->getvalue(plugin, static_cast<NPPVariable>(WKNVSilverlightFullscreenPerformanceIssueFixed), &isFullscreenPerformanceIssueFixed) == NPERR_NO_ERROR && isFullscreenPerformanceIssueFixed)
return;
static CGLPixelFormatObj pixelFormatObject = 0;
......@@ -2357,7 +2357,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
NPError npErr = [_pluginPackage.get() pluginFuncs]->newp((char *)[_MIMEType.get() cString], plugin, _mode, argsCount, cAttributes, cValues, NULL);
[[self class] setCurrentPluginView:nil];
if (_isSilverlight)
[self _workaroundSilverlightFullScreenBug:YES];
[self _workaroundSilverlightFullscreenBug:YES];
LOG(Plugins, "NPP_New: %d", npErr);
return npErr;
}
......@@ -2367,7 +2367,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
PluginMainThreadScheduler::scheduler().unregisterPlugin(plugin);
if (_isSilverlight)
[self _workaroundSilverlightFullScreenBug:NO];
[self _workaroundSilverlightFullscreenBug:NO];
NPError npErr;
npErr = ![_pluginPackage.get() pluginFuncs]->destroy(plugin, NULL);
......
......@@ -346,9 +346,9 @@ static NSTextField *createTimeTextField(NSRect frame)
static const CGFloat volumeButtonHeight = 16;
static const CGFloat volumeUpButtonLeftMargin = 4;
static const CGFloat volumeControlsTopMargin = 13;
static const CGFloat exitFullScreenButtonWidth = 25;
static const CGFloat exitFullScreenButtonHeight = 21;
static const CGFloat exitFullScreenButtonTopMargin = 11;
static const CGFloat exitFullscreenButtonWidth = 25;
static const CGFloat exitFullscreenButtonHeight = 21;
static const CGFloat exitFullscreenButtonTopMargin = 11;
static const CGFloat timelineWidth = 315;
static const CGFloat timelineHeight = 14;
static const CGFloat timelineBottomMargin = 7;
......@@ -380,8 +380,8 @@ static NSTextField *createTimeTextField(NSRect frame)
[_playButton setAction:@selector(togglePlaying:)];
[contentView addSubview:_playButton];
CGFloat closeToRight = windowWidth - horizontalMargin - exitFullScreenButtonWidth;
NSControl *exitFullscreenButton = createControlWithMediaUIControlType(WKMediaUIControlExitFullscreenButton, NSMakeRect(closeToRight, windowHeight - exitFullScreenButtonTopMargin - exitFullScreenButtonHeight, exitFullScreenButtonWidth, exitFullScreenButtonHeight));
CGFloat closeToRight = windowWidth - horizontalMargin - exitFullscreenButtonWidth;
NSControl *exitFullscreenButton = createControlWithMediaUIControlType(WKMediaUIControlExitFullscreenButton, NSMakeRect(closeToRight, windowHeight - exitFullscreenButtonTopMargin - exitFullscreenButtonHeight, exitFullscreenButtonWidth, exitFullscreenButtonHeight));
[exitFullscreenButton setAction:@selector(exitFullscreen:)];
[exitFullscreenButton setTarget:self];
[contentView addSubview:exitFullscreenButton];
......
2010-03-12 Beth Dakin <bdakin@apple.com>
Reviewed by Simon Fraser.
Fix for https://bugs.webkit.org/show_bug.cgi?id=34942 Fullscreen
API naming is inconsistent
-and corresponding-
<rdar://problem/7729165>
This patch changes all occurrences of "fullScreen" to the more
popular "fullscreen."
* FullscreenVideoController.cpp:
(FullscreenVideoController::onMouseDown):
(FullscreenVideoController::onMouseMove):
(FullscreenVideoController::onMouseUp):
* FullscreenVideoController.h:
(FullscreenVideoController::fullscreenToHUDCoordinates):
2010-03-12 Beth Dakin <bdakin@apple.com>
Reviewed by Adam Roben.
......
......@@ -513,7 +513,7 @@ void FullscreenVideoController::timerFired(Timer<FullscreenVideoController>*)
void FullscreenVideoController::onMouseDown(const IntPoint& point)
{
IntPoint convertedPoint(fullScreenToHUDCoordinates(point));
IntPoint convertedPoint(fullscreenToHUDCoordinates(point));
// Don't bother hit testing if we're outside the bounds of the window
if (convertedPoint.x() < 0 || convertedPoint.x() >= windowWidth || convertedPoint.y() < 0 || convertedPoint.y() >= windowHeight)
......@@ -552,7 +552,7 @@ void FullscreenVideoController::onMouseDown(const IntPoint& point)
void FullscreenVideoController::onMouseMove(const IntPoint& point)
{
IntPoint convertedPoint(fullScreenToHUDCoordinates(point));
IntPoint convertedPoint(fullscreenToHUDCoordinates(point));
if (m_hitWidget) {
m_hitWidget->drag(convertedPoint, false);
......@@ -567,7 +567,7 @@ void FullscreenVideoController::onMouseMove(const IntPoint& point)
void FullscreenVideoController::onMouseUp(const IntPoint& point)
{
IntPoint convertedPoint(fullScreenToHUDCoordinates(point));
IntPoint convertedPoint(fullscreenToHUDCoordinates(point));
m_movingWindow = false;
if (m_hitWidget) {
......
......@@ -128,7 +128,7 @@ private:
void beginScrubbing();
void endScrubbing();
WebCore::IntPoint fullScreenToHUDCoordinates(const WebCore::IntPoint& point) const
WebCore::IntPoint fullscreenToHUDCoordinates(const WebCore::IntPoint& point) const
{
return WebCore::IntPoint(point.x()- m_hudPosition.x(), point.y() - m_hudPosition.y());
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment