Changeset 55946 in webkit


Ignore:
Timestamp:
Mar 12, 2010 5:39:03 PM (14 years ago)
Author:
Beth Dakin
Message:

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):

Location:
trunk
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r55945 r55946  
     12010-03-12  Beth Dakin  <bdakin@apple.com>
     2
     3        Reviewed by Simon Fraser.
     4
     5        Fix for https://bugs.webkit.org/show_bug.cgi?id=34942 Fullscreen
     6        API naming is inconsistent
     7        -and corresponding-
     8        <rdar://problem/7729165>
     9
     10        This patch changes all occurrences of "fullScreen" to the more
     11        popular "fullscreen." webkitEnterFullScreen and
     12        webkitExitFullScreen have been maintained for now for backwards
     13        compatibility.
     14
     15        * html/HTMLVideoElement.cpp:
     16        (WebCore::HTMLVideoElement::webkitEnterFullscreen):
     17        (WebCore::HTMLVideoElement::webkitExitFullscreen):
     18        * html/HTMLVideoElement.h:
     19        (WebCore::HTMLVideoElement::webkitEnterFullScreen):
     20        (WebCore::HTMLVideoElement::webkitExitFullScreen):
     21        * html/HTMLVideoElement.idl:
     22        * platform/graphics/mac/MediaPlayerProxy.h:
     23
    1242010-03-12  James Robinson  <jamesr@chromium.org>
    225
  • trunk/WebCore/html/HTMLVideoElement.cpp

    r55682 r55946  
    215215}
    216216
    217 void HTMLVideoElement::webkitEnterFullScreen(bool isUserGesture, ExceptionCode& ec)
     217void HTMLVideoElement::webkitEnterFullscreen(bool isUserGesture, ExceptionCode& ec)
    218218{
    219219    if (isFullscreen())
     
    230230}
    231231
    232 void HTMLVideoElement::webkitExitFullScreen()
     232void HTMLVideoElement::webkitExitFullscreen()
    233233{
    234234    if (isFullscreen())
  • trunk/WebCore/html/HTMLVideoElement.h

    r55682 r55946  
    5050    void setPoster(const String&);
    5151
    52 // fullscreen
    53     void webkitEnterFullScreen(bool isUserGesture, ExceptionCode&);
    54     void webkitExitFullScreen();
     52    // Fullscreen
     53    void webkitEnterFullscreen(bool isUserGesture, ExceptionCode&);
     54    void webkitExitFullscreen();
    5555    bool webkitSupportsFullscreen();
    5656    bool webkitDisplayingFullscreen();
     57
     58    // FIXME: Maintain "FullScreen" capitalization scheme for backwards compatibility.
     59    // https://bugs.webkit.org/show_bug.cgi?id=36081
     60    void webkitEnterFullScreen(bool isUserGesture, ExceptionCode& ec) { webkitEnterFullscreen(isUserGesture, ec); }
     61    void webkitExitFullScreen() { webkitExitFullscreen(); }
    5762
    5863    bool shouldDisplayPosterImage() const { return m_shouldDisplayPosterImage; }
  • trunk/WebCore/html/HTMLVideoElement.idl

    r54182 r55946  
    3434        readonly attribute boolean webkitSupportsFullscreen;
    3535        readonly attribute boolean webkitDisplayingFullscreen;
     36
     37        [NeedsUserGestureCheck] void webkitEnterFullscreen()
     38            raises (DOMException);
     39        void webkitExitFullscreen();
    3640   
    3741        [NeedsUserGestureCheck] void webkitEnterFullScreen()
  • trunk/WebCore/platform/graphics/mac/MediaPlayerProxy.h

    r41042 r55946  
    4141    MediaPlayerNotificationStopUsingNetwork,
    4242
    43     MediaPlayerNotificationEnteredFullScreen,
    44     MediaPlayerNotificationExitedFullScreen,
     43    MediaPlayerNotificationEnteredFullscreen,
     44    MediaPlayerNotificationExitedFullscreen,
    4545   
    4646    MediaPlayerNotificationReadyForInspection,
  • trunk/WebKit/mac/ChangeLog

    r55931 r55946  
     12010-03-12  Beth Dakin  <bdakin@apple.com>
     2
     3        Reviewed by Simon Fraser.
     4
     5        Fix for https://bugs.webkit.org/show_bug.cgi?id=34942 Fullscreen
     6        API naming is inconsistent
     7        -and corresponding-
     8        <rdar://problem/7729165>
     9
     10        This patch changes all occurrences of "fullScreen" to the more
     11        popular "fullscreen."
     12
     13        * Plugins/Hosted/NetscapePluginHostProxy.h:
     14        (WebKit::NetscapePluginHostProxy::isFullscreenWindowShowing):
     15        * Plugins/Hosted/NetscapePluginHostProxy.mm:
     16        (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
     17        (WebKit::NetscapePluginHostProxy::didEnterFullscreen):
     18        (WebKit::NetscapePluginHostProxy::didExitFullscreen):
     19        (WebKit::NetscapePluginHostProxy::setFullscreenWindowIsShowing):
     20        (WKPCSetFullscreenWindowIsShowing):
     21        * Plugins/Hosted/WebKitPluginClient.defs:
     22        * Plugins/WebNetscapePluginView.mm:
     23        (-[WebNetscapePluginView _workaroundSilverlightFullscreenBug:]):
     24        (-[WebNetscapePluginView _createPlugin]):
     25        (-[WebNetscapePluginView _destroyPlugin]):
     26        * WebView/WebVideoFullscreenHUDWindowController.mm:
     27        (-[WebVideoFullscreenHUDWindowController windowDidLoad]):
     28
    1292010-03-12  Andy Estes  <aestes@apple.com>
    230
  • trunk/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.h

    r53178 r55946  
    5555    void setMenuBarVisible(bool);
    5656
    57     bool isFullScreenWindowShowing() const { return m_fullScreenWindowIsShowing; }
    58     void setFullScreenWindowIsShowing(bool);
     57    bool isFullscreenWindowShowing() const { return m_fullscreenWindowIsShowing; }
     58    void setFullscreenWindowIsShowing(bool);
    5959
    6060    void setModal(bool);
     
    7474    void endModal();
    7575
    76     void didEnterFullScreen() const;
    77     void didExitFullScreen() const;
     76    void didEnterFullscreen() const;
     77    void didExitFullscreen() const;
    7878
    7979    static void deadNameNotificationCallback(CFMachPortRef, void *msg, CFIndex size, void *info);
     
    9797    unsigned m_isModal;
    9898    bool m_menuBarIsVisible;
    99     bool m_fullScreenWindowIsShowing;
     99    bool m_fullscreenWindowIsShowing;
    100100    const ProcessSerialNumber m_pluginHostPSN;
    101101
  • trunk/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm

    r54783 r55946  
    9696    , m_isModal(false)
    9797    , m_menuBarIsVisible(true)
    98     , m_fullScreenWindowIsShowing(false)
     98    , m_fullscreenWindowIsShowing(false)
    9999    , m_pluginHostPSN(pluginHostPSN)
    100100    , m_processingRequests(0)
     
    203203}
    204204
    205 void NetscapePluginHostProxy::didEnterFullScreen() const
     205void NetscapePluginHostProxy::didEnterFullscreen() const
    206206{
    207207    SetFrontProcess(&m_pluginHostPSN);
    208208}
    209209
    210 void NetscapePluginHostProxy::didExitFullScreen() const
     210void NetscapePluginHostProxy::didExitFullscreen() const
    211211{
    212212    // If the plug-in host is the current application then we should bring ourselves to the front when it exits full-screen mode.
     
    224224}
    225225
    226 void NetscapePluginHostProxy::setFullScreenWindowIsShowing(bool isShowing)
    227 {
    228     if (m_fullScreenWindowIsShowing == isShowing)
     226void NetscapePluginHostProxy::setFullscreenWindowIsShowing(bool isShowing)
     227{
     228    if (m_fullscreenWindowIsShowing == isShowing)
    229229        return;
    230230
    231     m_fullScreenWindowIsShowing = isShowing;
    232     if (m_fullScreenWindowIsShowing)
    233         didEnterFullScreen();
     231    m_fullscreenWindowIsShowing = isShowing;
     232    if (m_fullscreenWindowIsShowing)
     233        didEnterFullscreen();
    234234    else
    235         didExitFullScreen();
     235        didExitFullscreen();
    236236
    237237}
     
    893893}
    894894
    895 kern_return_t WKPCSetFullScreenWindowIsShowing(mach_port_t clientPort, boolean_t fullScreenWindowIsShowing)
    896 {
    897     NetscapePluginHostProxy* hostProxy = pluginProxyMap().get(clientPort);
    898     if (!hostProxy)
    899         return KERN_FAILURE;
    900 
    901     hostProxy->setFullScreenWindowIsShowing(fullScreenWindowIsShowing);
     895kern_return_t WKPCSetFullscreenWindowIsShowing(mach_port_t clientPort, boolean_t fullscreenWindowIsShowing)
     896{
     897    NetscapePluginHostProxy* hostProxy = pluginProxyMap().get(clientPort);
     898    if (!hostProxy)
     899        return KERN_FAILURE;
     900
     901    hostProxy->setFullscreenWindowIsShowing(fullscreenWindowIsShowing);
    902902
    903903    return KERN_SUCCESS;
  • trunk/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs

    r54783 r55946  
    235235                                 panelData :data_t);
    236236
    237 simpleroutine PCSetFullScreenWindowIsShowing(clientPort :mach_port_t;
     237simpleroutine PCSetFullscreenWindowIsShowing(clientPort :mach_port_t;
    238238                                             isShowing :boolean_t);
    239239
  • trunk/WebKit/mac/Plugins/WebNetscapePluginView.mm

    r55824 r55946  
    8383#define LoginWindowDidSwitchToUserNotification      @"WebLoginWindowDidSwitchToUserNotification"
    8484#define WKNVSupportsCompositingCoreAnimationPluginsBool 74656  /* TRUE if the browser supports hardware compositing of Core Animation plug-ins  */
    85 static const int WKNVSilverlightFullScreenPerformanceIssueFixed = 7288546; /* TRUE if Siverlight addressed its underlying  bug in <rdar://problem/7288546> */
     85static const int WKNVSilverlightFullscreenPerformanceIssueFixed = 7288546; /* TRUE if Siverlight addressed its underlying  bug in <rdar://problem/7288546> */
    8686
    8787using namespace WebCore;
     
    23112311// 2) Enough Silverlight users update to the new Silverlight.
    23122312// For now, we'll distinguish older broken versions of Silverlight by asking the plug-in if it resolved its full screen badness.
    2313 - (void)_workaroundSilverlightFullScreenBug:(BOOL)initializedPlugin
     2313- (void)_workaroundSilverlightFullscreenBug:(BOOL)initializedPlugin
    23142314{
    23152315#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
    23162316    ASSERT(_isSilverlight);
    2317     NPBool isFullScreenPerformanceIssueFixed = 0;
     2317    NPBool isFullscreenPerformanceIssueFixed = 0;
    23182318    NPPluginFuncs *pluginFuncs = [_pluginPackage.get() pluginFuncs];
    2319     if (pluginFuncs->getvalue && pluginFuncs->getvalue(plugin, static_cast<NPPVariable>(WKNVSilverlightFullScreenPerformanceIssueFixed), &isFullScreenPerformanceIssueFixed) == NPERR_NO_ERROR && isFullScreenPerformanceIssueFixed)
     2319    if (pluginFuncs->getvalue && pluginFuncs->getvalue(plugin, static_cast<NPPVariable>(WKNVSilverlightFullscreenPerformanceIssueFixed), &isFullscreenPerformanceIssueFixed) == NPERR_NO_ERROR && isFullscreenPerformanceIssueFixed)
    23202320        return;
    23212321   
     
    23582358    [[self class] setCurrentPluginView:nil];
    23592359    if (_isSilverlight)
    2360         [self _workaroundSilverlightFullScreenBug:YES];
     2360        [self _workaroundSilverlightFullscreenBug:YES];
    23612361    LOG(Plugins, "NPP_New: %d", npErr);
    23622362    return npErr;
     
    23682368   
    23692369    if (_isSilverlight)
    2370         [self _workaroundSilverlightFullScreenBug:NO];
     2370        [self _workaroundSilverlightFullscreenBug:NO];
    23712371   
    23722372    NPError npErr;
  • trunk/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm

    r54182 r55946  
    347347    static const CGFloat volumeUpButtonLeftMargin = 4;
    348348    static const CGFloat volumeControlsTopMargin = 13;
    349     static const CGFloat exitFullScreenButtonWidth = 25;
    350     static const CGFloat exitFullScreenButtonHeight = 21;
    351     static const CGFloat exitFullScreenButtonTopMargin = 11;
     349    static const CGFloat exitFullscreenButtonWidth = 25;
     350    static const CGFloat exitFullscreenButtonHeight = 21;
     351    static const CGFloat exitFullscreenButtonTopMargin = 11;
    352352    static const CGFloat timelineWidth = 315;
    353353    static const CGFloat timelineHeight = 14;
     
    381381    [contentView addSubview:_playButton];
    382382
    383     CGFloat closeToRight = windowWidth - horizontalMargin - exitFullScreenButtonWidth;
    384     NSControl *exitFullscreenButton = createControlWithMediaUIControlType(WKMediaUIControlExitFullscreenButton, NSMakeRect(closeToRight, windowHeight - exitFullScreenButtonTopMargin - exitFullScreenButtonHeight, exitFullScreenButtonWidth, exitFullScreenButtonHeight));
     383    CGFloat closeToRight = windowWidth - horizontalMargin - exitFullscreenButtonWidth;
     384    NSControl *exitFullscreenButton = createControlWithMediaUIControlType(WKMediaUIControlExitFullscreenButton, NSMakeRect(closeToRight, windowHeight - exitFullscreenButtonTopMargin - exitFullscreenButtonHeight, exitFullscreenButtonWidth, exitFullscreenButtonHeight));
    385385    [exitFullscreenButton setAction:@selector(exitFullscreen:)];
    386386    [exitFullscreenButton setTarget:self];
  • trunk/WebKit/win/ChangeLog

    r55942 r55946  
     12010-03-12  Beth Dakin  <bdakin@apple.com>
     2
     3        Reviewed by Simon Fraser.
     4
     5        Fix for https://bugs.webkit.org/show_bug.cgi?id=34942 Fullscreen
     6        API naming is inconsistent
     7        -and corresponding-
     8        <rdar://problem/7729165>
     9
     10        This patch changes all occurrences of "fullScreen" to the more
     11        popular "fullscreen."
     12
     13        * FullscreenVideoController.cpp:
     14        (FullscreenVideoController::onMouseDown):
     15        (FullscreenVideoController::onMouseMove):
     16        (FullscreenVideoController::onMouseUp):
     17        * FullscreenVideoController.h:
     18        (FullscreenVideoController::fullscreenToHUDCoordinates):
     19
    1202010-03-12  Beth Dakin  <bdakin@apple.com>
    221
  • trunk/WebKit/win/FullscreenVideoController.cpp

    r55942 r55946  
    514514void FullscreenVideoController::onMouseDown(const IntPoint& point)
    515515{
    516     IntPoint convertedPoint(fullScreenToHUDCoordinates(point));
     516    IntPoint convertedPoint(fullscreenToHUDCoordinates(point));
    517517
    518518    // Don't bother hit testing if we're outside the bounds of the window
     
    553553void FullscreenVideoController::onMouseMove(const IntPoint& point)
    554554{
    555     IntPoint convertedPoint(fullScreenToHUDCoordinates(point));
     555    IntPoint convertedPoint(fullscreenToHUDCoordinates(point));
    556556
    557557    if (m_hitWidget) {
     
    568568void FullscreenVideoController::onMouseUp(const IntPoint& point)
    569569{
    570     IntPoint convertedPoint(fullScreenToHUDCoordinates(point));
     570    IntPoint convertedPoint(fullscreenToHUDCoordinates(point));
    571571    m_movingWindow = false;
    572572
  • trunk/WebKit/win/FullscreenVideoController.h

    r52998 r55946  
    129129    void endScrubbing();
    130130
    131     WebCore::IntPoint fullScreenToHUDCoordinates(const WebCore::IntPoint& point) const
     131    WebCore::IntPoint fullscreenToHUDCoordinates(const WebCore::IntPoint& point) const
    132132    {
    133133        return WebCore::IntPoint(point.x()- m_hudPosition.x(), point.y() - m_hudPosition.y());
Note: See TracChangeset for help on using the changeset viewer.