[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 13:28:34 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 21f0a53275f89dcfb9f70bf7351d71ca97b30fc3
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Sep 16 17:32:33 2010 +0000

    2010-09-16  Sheriff Bot  <webkit.review.bot at gmail.com>
    
            Unreviewed, rolling out r67628.
            http://trac.webkit.org/changeset/67628
            https://bugs.webkit.org/show_bug.cgi?id=45904
    
            broke the build (Requested by eric_carlson on #webkit).
    
            * media/context-menu-actions-expected.txt: Removed.
            * media/context-menu-actions.html: Removed.
            * platform/mac/Skipped:
            * platform/qt/Skipped:
            * platform/win/Skipped:
    2010-09-16  Sheriff Bot  <webkit.review.bot at gmail.com>
    
            Unreviewed, rolling out r67628.
            http://trac.webkit.org/changeset/67628
            https://bugs.webkit.org/show_bug.cgi?id=45904
    
            broke the build (Requested by eric_carlson on #webkit).
    
            * page/ContextMenuController.cpp:
            (WebCore::ContextMenuController::contextMenuItemSelected):
            * platform/ContextMenu.cpp:
            (WebCore::ContextMenu::populate):
            (WebCore::ContextMenu::checkOrEnableIfNeeded):
            * platform/ContextMenuItem.h:
            * platform/LocalizationStrategy.h:
            * platform/LocalizedStrings.cpp:
            * platform/LocalizedStrings.h:
            * platform/android/LocalizedStringsAndroid.cpp:
            * platform/brew/LocalizedStringsBrew.cpp:
            * platform/efl/LocalizedStringsEfl.cpp:
            * platform/gtk/ContextMenuItemGtk.cpp:
            (WebCore::gtkStockIDFromContextMenuAction):
            * platform/gtk/LocalizedStringsGtk.cpp:
            * platform/haiku/LocalizedStringsHaiku.cpp:
            * platform/wx/LocalizedStringsWx.cpp:
            * rendering/HitTestResult.cpp:
            (WebCore::HitTestResult::absoluteMediaURL):
            * rendering/HitTestResult.h:
    2010-09-16  Sheriff Bot  <webkit.review.bot at gmail.com>
    
            Unreviewed, rolling out r67628.
            http://trac.webkit.org/changeset/67628
            https://bugs.webkit.org/show_bug.cgi?id=45904
    
            broke the build (Requested by eric_carlson on #webkit).
    
            * DumpRenderTree/gtk/EventSender.cpp:
            (contextClickCallback):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67635 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 05a431e..791a4cd 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,17 @@
+2010-09-16  Sheriff Bot  <webkit.review.bot at gmail.com>
+
+        Unreviewed, rolling out r67628.
+        http://trac.webkit.org/changeset/67628
+        https://bugs.webkit.org/show_bug.cgi?id=45904
+
+        broke the build (Requested by eric_carlson on #webkit).
+
+        * media/context-menu-actions-expected.txt: Removed.
+        * media/context-menu-actions.html: Removed.
+        * platform/mac/Skipped:
+        * platform/qt/Skipped:
+        * platform/win/Skipped:
+
 2010-09-16  Zhenyao Mo  <zmo at google.com>
 
         Reviewed by Kenneth Russell.
diff --git a/LayoutTests/media/context-menu-actions-expected.txt b/LayoutTests/media/context-menu-actions-expected.txt
deleted file mode 100644
index 6918f3d..0000000
--- a/LayoutTests/media/context-menu-actions-expected.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-Test the various actions available in the HTML5 media element context-menu.
-
-RUN(video.src = 'content/test.mp4')
-EVENT(play)
-EXPECTED (video.paused == 'false') OK
-Toggling play state
-EXPECTED (video.paused == 'true') OK
-
-EXPECTED (video.muted == 'false') OK
-Toggling mute state
-EXPECTED (video.muted == 'true') OK
-
-EXPECTED (video.controls == 'true') OK
-Toggling media controls
-EXPECTED (video.controls == 'false') OK
-
-EXPECTED (video.loop == 'false') OK
-Toggling loop state
-EXPECTED (video.loop == 'true') OK
-
-EXPECTED (video.webkitDisplayingFullscreen == 'false') OK
-Toggling fullscreen state
-EXPECTED (video.webkitDisplayingFullscreen == 'true') OK
-
-END OF TEST
-
diff --git a/LayoutTests/media/context-menu-actions.html b/LayoutTests/media/context-menu-actions.html
deleted file mode 100644
index ae80f14..0000000
--- a/LayoutTests/media/context-menu-actions.html
+++ /dev/null
@@ -1,91 +0,0 @@
-<html>
-<head>
-        <script src="media-file.js"></script>
-        <script src=video-test.js></script>
-        <script>
-
-            function playing()
-            {
-                if (window.layoutTestController) {
-                    if (!window.eventSender) {
-                        layoutTestController.dumpAsText();
-                        endTest();
-                        return;
-                    }
-                } else {
-                    endTest();
-                    return;
-                }
-
-                findMediaElement();
-
-                var x, y, items;
-                x = video.offsetParent.offsetLeft + video.offsetLeft + video.offsetWidth / 2;
-                y = video.offsetParent.offsetTop + video.offsetTop + video.offsetHeight / 2;
-                eventSender.mouseMoveTo(x, y);
-                items = eventSender.contextClick();
-
-
-                for (var i = 0; i < items.length; i++)
-                {
-                    if (items[i].title.match("Controls")) {
-                       testExpected("video.controls", true, '==');
-                       consoleWrite("Toggling media controls");
-                       items[i].click();
-                       testExpected("video.controls", false, '==');
-                       consoleWrite("");
-                    }
-
-                    if (items[i].title.match("Pause")) {
-                       testExpected("video.paused", false, '==');
-                       consoleWrite("Toggling play state");
-                       items[i].click();
-                       testExpected("video.paused", true, '==');
-                       consoleWrite("");
-                    }
-
-                    if (items[i].title.match("Loop")) {
-                       testExpected("video.loop", false, '==');
-                       consoleWrite("Toggling loop state");
-                       items[i].click();
-                       testExpected("video.loop", true, '==');
-                       consoleWrite("");
-                    }
-
-                    if (items[i].title.match("Mute")) {
-                       testExpected("video.muted", false, '==');
-                       consoleWrite("Toggling mute state");
-                       items[i].click();
-                       testExpected("video.muted", true, '==');
-                       consoleWrite("");
-                    }
-
-                    if (items[i].title.match("Fullscreen") && video.webkitSupportsFullscreen) {
-                       testExpected("video.webkitDisplayingFullscreen", false, '==');
-                       consoleWrite("Toggling fullscreen state");
-                       items[i].click();
-                       testExpected("video.webkitDisplayingFullscreen", true, '==');
-                       consoleWrite("");
-                    }
-
-                    // TODO: test copy link location and open in new window.
-                 }
-                 layoutTestController.dumpAsText();
-                 endTest();
-            }
-
-            function start()
-            {
-                findMediaElement();
-                waitForEvent('play', playing);
-                run("video.src = '" + findMediaFile("video", "content/test") + "'");
-            }
-
-       </script>
-</head>
-<body onload="start()">
-    <p>Test the various actions available in the HTML5 media element context-menu.</p>
-    <video id="video" autoplay controls></video>
-</body>
-</html>
-
diff --git a/LayoutTests/platform/mac/Skipped b/LayoutTests/platform/mac/Skipped
index b4111ae..b8ca528 100644
--- a/LayoutTests/platform/mac/Skipped
+++ b/LayoutTests/platform/mac/Skipped
@@ -310,7 +310,3 @@ fast/files/workers
 
 # viewport meta tag support
 fast/viewport
-
-# needs enhanced eventSender.contextMenu() return value
-# see also https://bugs.webkit.org/show_bug.cgi?id=45021
-media/context-menu-actions.html
diff --git a/LayoutTests/platform/qt/Skipped b/LayoutTests/platform/qt/Skipped
index 3664001..f8abee7 100644
--- a/LayoutTests/platform/qt/Skipped
+++ b/LayoutTests/platform/qt/Skipped
@@ -2269,8 +2269,6 @@ editing/selection/5195166-1.html
 
 # missing DRT feature, see also https://bugs.webkit.org/show_bug.cgi?id=39102
 editing/selection/context-menu-on-text.html
-# and https://bugs.webkit.org/show_bug.cgi?id=45021
-media/context-menu-actions.html
 
 # ============================================================================= #
 # Failing editing/spelling tests
diff --git a/LayoutTests/platform/win/Skipped b/LayoutTests/platform/win/Skipped
index 9ef9cbd..8460cf4 100644
--- a/LayoutTests/platform/win/Skipped
+++ b/LayoutTests/platform/win/Skipped
@@ -297,8 +297,6 @@ http/tests/css/css-image-loading.html
 
 # missing DRT feature, see also https://bugs.webkit.org/show_bug.cgi?id=39102
 editing/selection/context-menu-on-text.html
-# and https://bugs.webkit.org/show_bug.cgi?id=45021
-media/context-menu-actions.html
 
 ################################################################################
 ####################### No bugs filed about the below yet#######################
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 688d49c..6ddb661 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,32 @@
+2010-09-16  Sheriff Bot  <webkit.review.bot at gmail.com>
+
+        Unreviewed, rolling out r67628.
+        http://trac.webkit.org/changeset/67628
+        https://bugs.webkit.org/show_bug.cgi?id=45904
+
+        broke the build (Requested by eric_carlson on #webkit).
+
+        * page/ContextMenuController.cpp:
+        (WebCore::ContextMenuController::contextMenuItemSelected):
+        * platform/ContextMenu.cpp:
+        (WebCore::ContextMenu::populate):
+        (WebCore::ContextMenu::checkOrEnableIfNeeded):
+        * platform/ContextMenuItem.h:
+        * platform/LocalizationStrategy.h:
+        * platform/LocalizedStrings.cpp:
+        * platform/LocalizedStrings.h:
+        * platform/android/LocalizedStringsAndroid.cpp:
+        * platform/brew/LocalizedStringsBrew.cpp:
+        * platform/efl/LocalizedStringsEfl.cpp:
+        * platform/gtk/ContextMenuItemGtk.cpp:
+        (WebCore::gtkStockIDFromContextMenuAction):
+        * platform/gtk/LocalizedStringsGtk.cpp:
+        * platform/haiku/LocalizedStringsHaiku.cpp:
+        * platform/wx/LocalizedStringsWx.cpp:
+        * rendering/HitTestResult.cpp:
+        (WebCore::HitTestResult::absoluteMediaURL):
+        * rendering/HitTestResult.h:
+
 2010-09-16  Andreas Kling  <andreas.kling at nokia.com>
 
         Reviewed by Simon Fraser.
diff --git a/WebCore/page/ContextMenuController.cpp b/WebCore/page/ContextMenuController.cpp
index de64988..d2317d2 100644
--- a/WebCore/page/ContextMenuController.cpp
+++ b/WebCore/page/ContextMenuController.cpp
@@ -1,6 +1,5 @@
 /*
  * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
- * Copyright (C) 2010 Igalia S.L
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -187,27 +186,6 @@ void ContextMenuController::contextMenuItemSelected(ContextMenuItem* item)
         // For now, call into the client. This is temporary!
         frame->editor()->copyImage(result);
         break;
-    case ContextMenuItemTagOpenMediaInNewWindow:
-        openNewWindow(result.absoluteMediaURL(), frame);
-        break;
-    case ContextMenuItemTagCopyMediaLinkToClipboard:
-        frame->editor()->copyURL(result.absoluteMediaURL(), result.textContent());
-        break;
-    case ContextMenuItemTagToggleMediaControls:
-        result.toggleMediaControlsDisplay();
-        break;
-    case ContextMenuItemTagToggleMediaLoop:
-        result.toggleMediaLoopPlayback();
-        break;
-    case ContextMenuItemTagEnterVideoFullscreen:
-        result.enterFullscreenForVideo();
-        break;
-    case ContextMenuItemTagMediaPlayPause:
-        result.toggleMediaPlayState();
-        break;
-    case ContextMenuItemTagMediaMute:
-        result.toggleMediaMuteState();
-        break;
     case ContextMenuItemTagOpenFrameInNewWindow: {
         DocumentLoader* loader = frame->loader()->documentLoader();
         if (!loader->unreachableURL().isEmpty())
diff --git a/WebCore/platform/ContextMenu.cpp b/WebCore/platform/ContextMenu.cpp
index fdcd3c9..37d4c2b 100644
--- a/WebCore/platform/ContextMenu.cpp
+++ b/WebCore/platform/ContextMenu.cpp
@@ -1,7 +1,6 @@
 /*
  * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
  * Copyright (C) 2008 Christian Dywan <christian at imendio.com>
- * Copyright (C) 2010 Igalia S.L
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -283,20 +282,6 @@ void ContextMenu::populate()
         contextMenuItemTagDownloadImageToDisk());
     ContextMenuItem CopyImageItem(ActionType, ContextMenuItemTagCopyImageToClipboard, 
         contextMenuItemTagCopyImageToClipboard());
-    ContextMenuItem OpenMediaInNewWindowItem(ActionType, ContextMenuItemTagOpenMediaInNewWindow, 
-        contextMenuItemTagOpenMediaInNewWindow());
-    ContextMenuItem CopyMediaLinkItem(ActionType, ContextMenuItemTagCopyMediaLinkToClipboard, 
-        contextMenuItemTagCopyMediaLinkToClipboard());
-    ContextMenuItem MediaPlayPause(ActionType, ContextMenuItemTagMediaPlayPause, 
-        contextMenuItemTagMediaPlay());
-    ContextMenuItem MediaMute(ActionType, ContextMenuItemTagMediaMute, 
-        contextMenuItemTagMediaMute());
-    ContextMenuItem ToggleMediaControls(CheckableActionType, ContextMenuItemTagToggleMediaControls, 
-        contextMenuItemTagToggleMediaControls());
-    ContextMenuItem ToggleMediaLoop(CheckableActionType, ContextMenuItemTagToggleMediaLoop, 
-        contextMenuItemTagToggleMediaLoop());
-    ContextMenuItem EnterVideoFullscreen(ActionType, ContextMenuItemTagEnterVideoFullscreen, 
-        contextMenuItemTagEnterVideoFullscreen());
 #if PLATFORM(MAC)
     ContextMenuItem SearchSpotlightItem(ActionType, ContextMenuItemTagSearchInSpotlight, 
         contextMenuItemTagSearchInSpotlight());
@@ -364,22 +349,6 @@ void ContextMenu::populate()
                 appendItem(CopyImageItem);
         }
 
-        KURL mediaURL = result.absoluteMediaURL();
-        if (!mediaURL.isEmpty()) {
-            if (!linkURL.isEmpty() || !imageURL.isEmpty())
-                appendItem(*separatorItem());
-
-            appendItem(MediaPlayPause);
-            appendItem(MediaMute);
-            appendItem(ToggleMediaControls);
-            appendItem(ToggleMediaLoop);
-            appendItem(EnterVideoFullscreen);
-
-            appendItem(*separatorItem());
-            appendItem(CopyMediaLinkItem);
-            appendItem(OpenMediaInNewWindowItem);
-        }
-
         if (imageURL.isEmpty() && linkURL.isEmpty()) {
             if (result.isSelected()) {
                 if (selectionContainsPossibleWord(frame)) {
@@ -406,6 +375,12 @@ void ContextMenu::populate()
 #if ENABLE(INSPECTOR)
                 if (!(frame->page() && frame->page()->inspectorController()->hasInspectorFrontendClient())) {
 #endif
+#if PLATFORM(GTK)
+                appendItem(BackItem);
+                appendItem(ForwardItem);
+                appendItem(StopItem);
+                appendItem(ReloadItem);
+#else
                 if (frame->page() && frame->page()->canGoBackOrForward(-1))
                     appendItem(BackItem);
 
@@ -418,6 +393,7 @@ void ContextMenu::populate()
                     appendItem(StopItem);
                 else
                     appendItem(ReloadItem);
+#endif
 #if ENABLE(INSPECTOR)
                 }
 #endif
@@ -812,17 +788,6 @@ void ContextMenu::checkOrEnableIfNeeded(ContextMenuItem& item) const
         case ContextMenuItemTagOpenImageInNewWindow:
         case ContextMenuItemTagDownloadImageToDisk:
         case ContextMenuItemTagCopyImageToClipboard:
-        case ContextMenuItemTagOpenMediaInNewWindow:
-        case ContextMenuItemTagCopyMediaLinkToClipboard:
-        case ContextMenuItemTagToggleMediaControls:
-            shouldCheck = m_hitTestResult.mediaControlsEnabled();
-            break;
-        case ContextMenuItemTagToggleMediaLoop:
-            shouldCheck = m_hitTestResult.mediaLoopEnabled();
-            break;
-        case ContextMenuItemTagEnterVideoFullscreen:
-            shouldEnable = m_hitTestResult.mediaSupportsFullscreen();
-            break;
         case ContextMenuItemTagOpenFrameInNewWindow:
         case ContextMenuItemTagSpellingGuess:
         case ContextMenuItemTagOther:
@@ -858,19 +823,6 @@ void ContextMenu::checkOrEnableIfNeeded(ContextMenuItem& item) const
         case ContextMenuItemLastCustomTag:
         case ContextMenuItemBaseApplicationTag:
             break;
-        case ContextMenuItemTagMediaPlayPause:
-            if (m_hitTestResult.mediaPlaying())
-                item.setTitle(contextMenuItemTagMediaPause());
-            else
-                item.setTitle(contextMenuItemTagMediaPlay());
-            break;
-        case ContextMenuItemTagMediaMute:
-            shouldEnable = m_hitTestResult.mediaHasAudio();
-            if (!shouldEnable || !m_hitTestResult.mediaMuted())
-                item.setTitle(contextMenuItemTagMediaMute());
-            else
-                item.setTitle(contextMenuItemTagMediaUnMute());
-            break;
     }
 
     item.setChecked(shouldCheck);
diff --git a/WebCore/platform/ContextMenuItem.h b/WebCore/platform/ContextMenuItem.h
index f7fa5e6..058f644 100644
--- a/WebCore/platform/ContextMenuItem.h
+++ b/WebCore/platform/ContextMenuItem.h
@@ -1,6 +1,5 @@
 /*
  * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
- * Copyright (C) 2010 Igalia S.L
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -144,13 +143,6 @@ namespace WebCore {
         ContextMenuItemTagCapitalize,
         ContextMenuItemTagChangeBack,
 #endif
-        ContextMenuItemTagOpenMediaInNewWindow,
-        ContextMenuItemTagCopyMediaLinkToClipboard,
-        ContextMenuItemTagToggleMediaControls,
-        ContextMenuItemTagToggleMediaLoop,
-        ContextMenuItemTagEnterVideoFullscreen,
-        ContextMenuItemTagMediaPlayPause,
-        ContextMenuItemTagMediaMute,
         ContextMenuItemBaseCustomTag = 5000,
         ContextMenuItemCustomTagNoAction = 5998,
         ContextMenuItemLastCustomTag = 5999,
diff --git a/WebCore/platform/LocalizationStrategy.h b/WebCore/platform/LocalizationStrategy.h
index 6c4db6a..178cfa2 100644
--- a/WebCore/platform/LocalizationStrategy.h
+++ b/WebCore/platform/LocalizationStrategy.h
@@ -1,6 +1,5 @@
 /*
  * Copyright (C) 2010 Apple Inc. All rights reserved.
- * Copyright (C) 2010 Igalia S.L
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -113,15 +112,6 @@ public:
     virtual String contextMenuItemTagCapitalize() = 0;
     virtual String contextMenuItemTagChangeBack(const String& replacedString) = 0;
 #endif
-    virtual String contextMenuItemTagOpenMediaInNewWindow() = 0;
-    virtual String contextMenuItemTagCopyMediaLinkToClipboard() = 0;
-    virtual String contextMenuItemTagToggleMediaControls() = 0;
-    virtual String contextMenuItemTagToggleMediaLoop() = 0;
-    virtual String contextMenuItemTagEnterVideoFullscreen() = 0;
-    virtual String contextMenuItemTagMediaPlay() = 0;
-    virtual String contextMenuItemTagMediaPause() = 0;
-    virtual String contextMenuItemTagMediaMute() = 0;
-    virtual String contextMenuItemTagMediaUnMute() = 0;
     virtual String contextMenuItemTagInspectElement() = 0;
 #endif // ENABLE(CONTEXT_MENUS)
 
diff --git a/WebCore/platform/LocalizedStrings.cpp b/WebCore/platform/LocalizedStrings.cpp
index b2e6b51..a69e0fb 100644
--- a/WebCore/platform/LocalizedStrings.cpp
+++ b/WebCore/platform/LocalizedStrings.cpp
@@ -1,6 +1,5 @@
 /*
  * Copyright (C) 2003, 2006, 2009, 2010 Apple Inc. All rights reserved.
- * Copyright (C) 2010 Igalia S.L
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -363,51 +362,6 @@ String contextMenuItemTagChangeBack(const String& replacedString)
 }
 
 #endif // PLATFORM(MAC)
-
-String contextMenuItemTagOpenMediaInNewWindow()
-{
-    return platformStrategies()->localizationStrategy()->contextMenuItemTagOpenMediaInNewWindow();
-}
-
-String contextMenuItemTagCopyMediaLinkToClipboard()
-{
-    return platformStrategies()->localizationStrategy()->contextMenuItemTagCopyMediaLinkToClipboard();
-}
-
-String contextMenuItemTagToggleMediaControls()
-{
-    return platformStrategies()->localizationStrategy()->contextMenuItemTagToggleMediaControls();
-}
-
-String contextMenuItemTagToggleMediaLoop()
-{
-    return platformStrategies()->localizationStrategy()->contextMenuItemTagToggleMediaLoop();
-}
-
-String contextMenuItemTagEnterVideoFullscreen()
-{
-    return platformStrategies()->localizationStrategy()->contextMenuItemTagEnterVideoFullscreen();
-}
-
-String contextMenuItemTagMediaPlay()
-{
-    return platformStrategies()->localizationStrategy()->contextMenuItemTagMediaPlay();
-}
-
-String contextMenuItemTagMediaPause()
-{
-    return platformStrategies()->localizationStrategy()->contextMenuItemTagMediaPause();
-}
-
-String contextMenuItemTagMediaMute()
-{
-    return platformStrategies()->localizationStrategy()->contextMenuItemTagMediaMute();
-}
-
-String contextMenuItemTagMediaUnMute()
-{
-    return platformStrategies()->localizationStrategy()->contextMenuItemTagMediaUnMute();
-}
     
 String contextMenuItemTagInspectElement()
 {
diff --git a/WebCore/platform/LocalizedStrings.h b/WebCore/platform/LocalizedStrings.h
index e13a407..04042b6 100644
--- a/WebCore/platform/LocalizedStrings.h
+++ b/WebCore/platform/LocalizedStrings.h
@@ -1,6 +1,5 @@
 /*
  * Copyright (C) 2003, 2006, 2009 Apple Computer, Inc.  All rights reserved.
- * Copyright (C) 2010 Igalia S.L
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -109,15 +108,6 @@ namespace WebCore {
     String contextMenuItemTagCapitalize();
     String contextMenuItemTagChangeBack(const String& replacedString);
 #endif
-    String contextMenuItemTagOpenMediaInNewWindow();
-    String contextMenuItemTagCopyMediaLinkToClipboard();
-    String contextMenuItemTagToggleMediaControls();
-    String contextMenuItemTagToggleMediaLoop();
-    String contextMenuItemTagEnterVideoFullscreen();
-    String contextMenuItemTagMediaPlay();
-    String contextMenuItemTagMediaPause();
-    String contextMenuItemTagMediaMute();
-    String contextMenuItemTagMediaUnMute();
     String contextMenuItemTagInspectElement();
 #endif // ENABLE(CONTEXT_MENUS)
 
diff --git a/WebCore/platform/android/LocalizedStringsAndroid.cpp b/WebCore/platform/android/LocalizedStringsAndroid.cpp
index 8d9250a..2fc880b 100644
--- a/WebCore/platform/android/LocalizedStringsAndroid.cpp
+++ b/WebCore/platform/android/LocalizedStringsAndroid.cpp
@@ -81,60 +81,6 @@ String contextMenuItemTagCopyImageToClipboard()
     return String();
 }
 
-String contextMenuItemTagOpenMediaInNewWindow()
-{
-    notImplemented();
-    return String();
-}
-
-String contextMenuItemTagCopyMediaLinkToClipboard()
-{
-    notImplemented();
-    return String();
-}
-
-String contextMenuItemTagToggleMediaControls()
-{
-    notImplemented();
-    return String();
-}
-
-String contextMenuItemTagToggleMediaLoop()
-{
-    notImplemented();
-    return String();
-}
-
-String contextMenuItemTagEnterVideoFullscreen()
-{
-    notImplemented();
-    return String();
-}
-
-String contextMenuItemTagMediaPlay()
-{
-    notImplemented();
-    return String();
-}
-
-String contextMenuItemTagMediaPause()
-{
-    notImplemented();
-    return String();
-}
-
-String contextMenuItemTagMediaMute()
-{
-    notImplemented();
-    return String();
-}
-
-String contextMenuItemTagMediaUnMute()
-{
-    notImplemented();
-    return String();
-}
-
 String contextMenuItemTagOpenFrameInNewWindow()
 {
     notImplemented();
diff --git a/WebCore/platform/brew/LocalizedStringsBrew.cpp b/WebCore/platform/brew/LocalizedStringsBrew.cpp
index b5289c2..1bc5985 100644
--- a/WebCore/platform/brew/LocalizedStringsBrew.cpp
+++ b/WebCore/platform/brew/LocalizedStringsBrew.cpp
@@ -96,51 +96,6 @@ String contextMenuItemTagCopyImageToClipboard()
     return "Copy image to clipboard";
 }
 
-String contextMenuItemTagOpenMediaInNewWindow()
-{
-    return "Open Media in New Window";
-}
-
-String contextMenuItemTagCopyMediaLinkToClipboard()
-{
-    return "Copy Media Link Location";
-}
-
-String contextMenuItemTagToggleMediaControls()
-{
-    return "Toggle Media Controls";
-}
-
-String contextMenuItemTagToggleMediaLoop()
-{
-    return "Toggle Media Loop Playback";
-}
-
-String contextMenuItemTagEnterVideoFullscreen()
-{
-    return "Switch Video to Fullscreen";
-}
-
-String contextMenuItemTagMediaPlay()
-{
-    return "Play";
-}
-
-String contextMenuItemTagMediaPause()
-{
-    return "Pause";
-}
-
-String contextMenuItemTagMediaMute()
-{
-    return "Mute";
-}
-
-String contextMenuItemTagMediaUnMute()
-{
-    return "UnMute";
-}
-
 String contextMenuItemTagOpenFrameInNewWindow()
 {
     return "Open frame in new window";
diff --git a/WebCore/platform/efl/LocalizedStringsEfl.cpp b/WebCore/platform/efl/LocalizedStringsEfl.cpp
index c645e0d..6023205 100644
--- a/WebCore/platform/efl/LocalizedStringsEfl.cpp
+++ b/WebCore/platform/efl/LocalizedStringsEfl.cpp
@@ -98,51 +98,6 @@ String contextMenuItemTagCopyImageToClipboard()
     return String::fromUTF8("Copy Image");
 }
 
-String contextMenuItemTagOpenMediaInNewWindow()
-{
-    return String::fromUTF8("Open Media in New Window");
-}
-
-String contextMenuItemTagCopyMediaLinkToClipboard()
-{
-    return String::fromUTF8("Copy Media Link Location");
-}
-
-String contextMenuItemTagToggleMediaControls()
-{
-    return String::fromUTF8("Toggle Media Controls");
-}
-
-String contextMenuItemTagToggleMediaLoop()
-{
-    return String::fromUTF8("Toggle Media Loop Playback");
-}
-
-String contextMenuItemTagEnterVideoFullscreen()
-{
-    return String::fromUTF8("Switch Video to Fullscreen");
-}
-
-String contextMenuItemTagMediaPlay()
-{
-    return String::fromUTF8("Play");
-}
-
-String contextMenuItemTagMediaPause()
-{
-    return String::fromUTF8("Pause");
-}
-
-String contextMenuItemTagMediaMute()
-{
-    return String::fromUTF8("Mute");
-}
-
-String contextMenuItemTagMediaUnMute()
-{
-    return String::fromUTF8("UnMute");
-}
-
 String contextMenuItemTagOpenFrameInNewWindow()
 {
     return String::fromUTF8("Open Frame in New Window");
diff --git a/WebCore/platform/gtk/ContextMenuItemGtk.cpp b/WebCore/platform/gtk/ContextMenuItemGtk.cpp
index bd25a4a..e2c5b84 100644
--- a/WebCore/platform/gtk/ContextMenuItemGtk.cpp
+++ b/WebCore/platform/gtk/ContextMenuItemGtk.cpp
@@ -1,6 +1,5 @@
 /*
  *  Copyright (C) 2007 Holger Hans Peter Freyther
- *  Copyright (C) 2010 Igalia S.L
  *
  *  This library is free software; you can redistribute it and/or
  *  modify it under the terms of the GNU Lesser General Public
@@ -34,13 +33,11 @@ static const char* gtkStockIDFromContextMenuAction(const ContextMenuAction& acti
     switch (action) {
     case ContextMenuItemTagCopyLinkToClipboard:
     case ContextMenuItemTagCopyImageToClipboard:
-    case ContextMenuItemTagCopyMediaLinkToClipboard:
     case ContextMenuItemTagCopy:
         return GTK_STOCK_COPY;
     case ContextMenuItemTagOpenLinkInNewWindow:
     case ContextMenuItemTagOpenImageInNewWindow:
     case ContextMenuItemTagOpenFrameInNewWindow:
-    case ContextMenuItemTagOpenMediaInNewWindow:
         return GTK_STOCK_OPEN;
     case ContextMenuItemTagDownloadLinkToDisk:
     case ContextMenuItemTagDownloadImageToDisk:
@@ -102,12 +99,6 @@ static const char* gtkStockIDFromContextMenuAction(const ContextMenuAction& acti
         return GTK_STOCK_UNDERLINE;
     case ContextMenuItemTagShowColors:
         return GTK_STOCK_SELECT_COLOR;
-    case ContextMenuItemTagToggleMediaControls:
-    case ContextMenuItemTagToggleMediaLoop:
-        // No icon for this.
-        return NULL;
-    case ContextMenuItemTagEnterVideoFullscreen:
-        return GTK_STOCK_FULLSCREEN;
     default:
         return NULL;
     }
diff --git a/WebCore/platform/gtk/LocalizedStringsGtk.cpp b/WebCore/platform/gtk/LocalizedStringsGtk.cpp
index 499123b..432c92f 100644
--- a/WebCore/platform/gtk/LocalizedStringsGtk.cpp
+++ b/WebCore/platform/gtk/LocalizedStringsGtk.cpp
@@ -4,7 +4,6 @@
  * Copyright (C) 2007 Holger Hans Peter Freyther
  * Copyright (C) 2008 Christian Dywan <christian at imendio.com>
  * Copyright (C) 2008 Nuanti Ltd.
- * Copyright (C) 2010 Igalia S.L
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -111,51 +110,6 @@ String contextMenuItemTagCopyImageToClipboard()
     return String::fromUTF8(_("Cop_y Image"));
 }
 
-String contextMenuItemTagOpenMediaInNewWindow()
-{
-    return String::fromUTF8(_("Open _Media in New Window"));
-}
-
-String contextMenuItemTagCopyMediaLinkToClipboard()
-{
-    return String::fromUTF8(_("Cop_y Media Link Location"));
-}
-
-String contextMenuItemTagToggleMediaControls()
-{
-    return String::fromUTF8(_("_Toggle Media Controls"));
-}
-
-String contextMenuItemTagToggleMediaLoop()
-{
-    return String::fromUTF8(_("Toggle Media _Loop Playback"));
-}
-
-String contextMenuItemTagEnterVideoFullscreen()
-{
-    return String::fromUTF8(_("Switch Video to _Fullscreen"));
-}
-
-String contextMenuItemTagMediaPlay()
-{
-    return String::fromUTF8(_("_Play"));
-}
-
-String contextMenuItemTagMediaPause()
-{
-    return String::fromUTF8(_("_Pause"));
-}
-
-String contextMenuItemTagMediaMute()
-{
-    return String::fromUTF8(_("_Mute"));
-}
-
-String contextMenuItemTagMediaUnMute()
-{
-    return String::fromUTF8(_("Un_Mute"));
-}
-
 String contextMenuItemTagOpenFrameInNewWindow()
 {
     return String::fromUTF8(_("Open _Frame in New Window"));
diff --git a/WebCore/platform/haiku/LocalizedStringsHaiku.cpp b/WebCore/platform/haiku/LocalizedStringsHaiku.cpp
index 28d825b..5321792 100644
--- a/WebCore/platform/haiku/LocalizedStringsHaiku.cpp
+++ b/WebCore/platform/haiku/LocalizedStringsHaiku.cpp
@@ -98,51 +98,6 @@ String contextMenuItemTagCopyImageToClipboard()
     return "Copy image to clipboard";
 }
 
-String contextMenuItemTagOpenMediaInNewWindow()
-{
-    return "Open Media in New Window";
-}
-
-String contextMenuItemTagCopyMediaLinkToClipboard()
-{
-    return "Copy Media Link Location";
-}
-
-String contextMenuItemTagToggleMediaControls()
-{
-    return "Toggle Media Controls";
-}
-
-String contextMenuItemTagToggleMediaLoop()
-{
-    return "Toggle Media Loop Playback";
-}
-
-String contextMenuItemTagEnterVideoFullscreen()
-{
-    return "Switch Video to Fullscreen";
-}
-
-String contextMenuItemTagMediaPlay()
-{
-    return "Play";
-}
-
-String contextMenuItemTagMediaPause()
-{
-    return "Pause";
-}
-
-String contextMenuItemTagMediaMute()
-{
-    return "Mute";
-}
-
-String contextMenuItemTagMediaUnMute()
-{
-    return "UnMute";
-}
-
 String contextMenuItemTagOpenFrameInNewWindow()
 {
     return "Open frame in new window";
diff --git a/WebCore/platform/wx/LocalizedStringsWx.cpp b/WebCore/platform/wx/LocalizedStringsWx.cpp
index a5afcb7..4112f64 100644
--- a/WebCore/platform/wx/LocalizedStringsWx.cpp
+++ b/WebCore/platform/wx/LocalizedStringsWx.cpp
@@ -97,51 +97,6 @@ String contextMenuItemTagCopyImageToClipboard()
     return String("Copy Image to Clipboard"); 
 }
 
-String contextMenuItemTagOpenMediaInNewWindow()
-{
-    return String("Open Media in New Window");
-}
-
-String contextMenuItemTagCopyMediaLinkToClipboard()
-{
-    return String("Copy Media Link Location");
-}
-
-String contextMenuItemTagToggleMediaControls()
-{
-    return String("Toggle Media Controls");
-}
-
-String contextMenuItemTagToggleMediaLoop()
-{
-    return String("Toggle Media Loop Playback");
-}
-
-String contextMenuItemTagEnterVideoFullscreen()
-{
-    return String("Switch Video to Fullscreen");
-}
-
-String contextMenuItemTagMediaPlay()
-{
-    return String("Play");
-}
-
-String contextMenuItemTagMediaPause()
-{
-    return String("Pause");
-}
-
-String contextMenuItemTagMediaMute()
-{
-    return String("Mute");
-}
-
-String contextMenuItemTagMediaUnMute()
-{
-    return String("UnMute");
-}
-
 String contextMenuItemTagOpenFrameInNewWindow() 
 { 
     return String("Open Frame in New Window"); 
diff --git a/WebCore/rendering/HitTestResult.cpp b/WebCore/rendering/HitTestResult.cpp
index 4ae9990..496c4ba 100644
--- a/WebCore/rendering/HitTestResult.cpp
+++ b/WebCore/rendering/HitTestResult.cpp
@@ -24,7 +24,6 @@
 #include "Frame.h"
 #include "FrameTree.h"
 #include "HTMLAnchorElement.h"
-#include "HTMLVideoElement.h"
 #include "HTMLImageElement.h"
 #include "HTMLInputElement.h"
 #include "HTMLMediaElement.h"
@@ -293,125 +292,22 @@ KURL HitTestResult::absoluteImageURL() const
 KURL HitTestResult::absoluteMediaURL() const
 {
 #if ENABLE(VIDEO)
-    if (HTMLMediaElement* mediaElt = mediaElement())
-        return m_innerNonSharedNode->document()->completeURL(deprecatedParseURL(mediaElt->currentSrc()));
-    return KURL();
-#else
-    return KURL();
-#endif
-}
-
-bool HitTestResult::mediaSupportsFullscreen() const
-{
-#if ENABLE(VIDEO)
-    HTMLMediaElement* mediaElt(mediaElement());
-    return (mediaElt && mediaElt->hasTagName(HTMLNames::videoTag) && mediaElt->supportsFullscreen());
-#else
-    return false;
-#endif
-}
-
-#if ENABLE(VIDEO)
-HTMLMediaElement* HitTestResult::mediaElement() const
-{
     if (!(m_innerNonSharedNode && m_innerNonSharedNode->document()))
-        return 0;
+        return KURL();
 
     if (!(m_innerNonSharedNode->renderer() && m_innerNonSharedNode->renderer()->isMedia()))
-        return 0;
-
-    if (m_innerNonSharedNode->hasTagName(HTMLNames::videoTag) || m_innerNonSharedNode->hasTagName(HTMLNames::audioTag))
-        return static_cast<HTMLMediaElement*>(m_innerNonSharedNode.get());
-    return 0;
-}
-#endif
-
-void HitTestResult::toggleMediaControlsDisplay() const
-{
-#if ENABLE(VIDEO)
-    if (HTMLMediaElement* mediaElt = mediaElement())
-        mediaElt->setControls(!mediaElt->controls());
-#endif
-}
-
-void HitTestResult::toggleMediaLoopPlayback() const
-{
-#if ENABLE(VIDEO)
-    if (HTMLMediaElement* mediaElt = mediaElement())
-        mediaElt->setLoop(!mediaElt->loop());
-#endif
-}
-
-void HitTestResult::enterFullscreenForVideo() const
-{
-#if ENABLE(VIDEO)
-    HTMLMediaElement* mediaElt(mediaElement());
-    if (mediaElt && mediaElt->hasTagName(HTMLNames::videoTag)) {
-        HTMLVideoElement* videoElt = static_cast<HTMLVideoElement*>(mediaElt);
-        if (!videoElt->isFullscreen() && mediaElt->supportsFullscreen())
-            videoElt->enterFullscreen();
-    }
-#endif
-}
-
-bool HitTestResult::mediaControlsEnabled() const
-{
-#if ENABLE(VIDEO)
-    if (HTMLMediaElement* mediaElt = mediaElement())
-        return mediaElt->controls();
-#endif
-    return false;
-}
-
-bool HitTestResult::mediaLoopEnabled() const
-{
-#if ENABLE(VIDEO)
-    if (HTMLMediaElement* mediaElt = mediaElement())
-        return mediaElt->loop();
-#endif
-    return false;
-}
-
-bool HitTestResult::mediaPlaying() const
-{
-#if ENABLE(VIDEO)
-    if (HTMLMediaElement* mediaElt = mediaElement())
-        return !mediaElt->paused();
-#endif
-    return false;
-}
-
-void HitTestResult::toggleMediaPlayState() const
-{
-#if ENABLE(VIDEO)
-    if (HTMLMediaElement* mediaElt = mediaElement())
-        mediaElt->togglePlayState();
-#endif
-}
-
-bool HitTestResult::mediaHasAudio() const
-{
-#if ENABLE(VIDEO)
-    if (HTMLMediaElement* mediaElt = mediaElement())
-        return mediaElt->hasAudio();
-#endif
-    return false;
-}
+        return KURL();
 
-bool HitTestResult::mediaMuted() const
-{
-#if ENABLE(VIDEO)
-    if (HTMLMediaElement* mediaElt = mediaElement())
-        return mediaElt->muted();
-#endif
-    return false;
-}
+    AtomicString urlString;
+    if (m_innerNonSharedNode->hasTagName(HTMLNames::videoTag) || m_innerNonSharedNode->hasTagName(HTMLNames::audioTag)) {
+        HTMLMediaElement* mediaElement = static_cast<HTMLMediaElement*>(m_innerNonSharedNode.get());
+        urlString = mediaElement->currentSrc();
+    } else
+        return KURL();
 
-void HitTestResult::toggleMediaMuteState() const
-{
-#if ENABLE(VIDEO)
-    if (HTMLMediaElement* mediaElt = mediaElement())
-        mediaElt->setMuted(!mediaElt->muted());
+    return m_innerNonSharedNode->document()->completeURL(deprecatedParseURL(urlString));
+#else
+    return KURL();
 #endif
 }
 
diff --git a/WebCore/rendering/HitTestResult.h b/WebCore/rendering/HitTestResult.h
index e635033..3a42719 100644
--- a/WebCore/rendering/HitTestResult.h
+++ b/WebCore/rendering/HitTestResult.h
@@ -32,9 +32,6 @@ namespace WebCore {
 
 class Element;
 class Frame;
-#if ENABLE(VIDEO)
-class HTMLMediaElement;
-#endif
 class Image;
 class IntRect;
 class KURL;
@@ -83,17 +80,6 @@ public:
     String textContent() const;
     bool isLiveLink() const;
     bool isContentEditable() const;
-    void toggleMediaControlsDisplay() const;
-    void toggleMediaLoopPlayback() const;
-    void enterFullscreenForVideo() const;
-    bool mediaControlsEnabled() const;
-    bool mediaLoopEnabled() const;
-    bool mediaPlaying() const;
-    bool mediaSupportsFullscreen() const;
-    void toggleMediaPlayState() const;
-    bool mediaHasAudio() const;
-    bool mediaMuted() const;
-    void toggleMediaMuteState() const;
 
     // Rect-based hit test related methods.
     bool isRectBasedTest() const { return m_isRectBased; }
@@ -110,10 +96,6 @@ public:
 
 private:
 
-#if ENABLE(VIDEO)
-    HTMLMediaElement* mediaElement() const;
-#endif
-
     RefPtr<Node> m_innerNode;
     RefPtr<Node> m_innerNonSharedNode;
     IntPoint m_point;
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 4f0190d..b8f337c 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,14 @@
+2010-09-16  Sheriff Bot  <webkit.review.bot at gmail.com>
+
+        Unreviewed, rolling out r67628.
+        http://trac.webkit.org/changeset/67628
+        https://bugs.webkit.org/show_bug.cgi?id=45904
+
+        broke the build (Requested by eric_carlson on #webkit).
+
+        * DumpRenderTree/gtk/EventSender.cpp:
+        (contextClickCallback):
+
 2010-09-16  Balazs Kelemen  <kbalazs at webkit.org>
 
         Unreviewed.
diff --git a/WebKitTools/DumpRenderTree/gtk/EventSender.cpp b/WebKitTools/DumpRenderTree/gtk/EventSender.cpp
index fe7e93a..0e2e469 100644
--- a/WebKitTools/DumpRenderTree/gtk/EventSender.cpp
+++ b/WebKitTools/DumpRenderTree/gtk/EventSender.cpp
@@ -147,58 +147,6 @@ bool prepareMouseButtonEvent(GdkEvent* event, int eventSenderButtonNumber, guint
     return true;
 }
 
-static JSValueRef getMenuItemTitleCallback(JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception)
-{
-    GtkWidget* widget = GTK_WIDGET(JSObjectGetPrivate(object));
-    CString label;
-    if (GTK_IS_SEPARATOR_MENU_ITEM(widget))
-        label = "<separator>";
-    else
-        label = gtk_menu_item_get_label(GTK_MENU_ITEM(widget));
-
-    return JSValueMakeString(context, JSStringCreateWithUTF8CString(label.data()));
-}
-
-static bool setMenuItemTitleCallback(JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception)
-{
-    return true;
-}
-
-static JSValueRef menuItemClickCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
-    GtkMenuItem* item = GTK_MENU_ITEM(JSObjectGetPrivate(thisObject));
-    gtk_menu_item_activate(item);
-    return JSValueMakeUndefined(context);
-}
-
-static JSStaticFunction staticMenuItemFunctions[] = {
-    { "click", menuItemClickCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
-    { 0, 0, 0 }
-};
-
-static JSStaticValue staticMenuItemValues[] = {
-    { "title", getMenuItemTitleCallback, setMenuItemTitleCallback, kJSPropertyAttributeNone },
-    { 0, 0, 0, 0 }
-};
-
-static JSClassRef getMenuItemClass()
-{
-    static JSClassRef menuItemClass = 0;
-
-    if (!menuItemClass) {
-        JSClassDefinition classDefinition = {
-                0, 0, 0, 0, 0, 0,
-                0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-        classDefinition.staticFunctions = staticMenuItemFunctions;
-        classDefinition.staticValues = staticMenuItemValues;
-
-        menuItemClass = JSClassCreate(&classDefinition);
-    }
-
-    return menuItemClass;
-}
-
-
 static JSValueRef contextClickCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
     GdkEvent* pressEvent = gdk_event_new(GDK_BUTTON_PRESS);
@@ -217,7 +165,13 @@ static JSValueRef contextClickCallback(JSContextRef context, JSObjectRef functio
         JSValueRef arrayValues[g_list_length(items)];
         int index = 0;
         for (GList* item = g_list_first(items); item; item = g_list_next(item)) {
-            arrayValues[index] = JSObjectMake(context, getMenuItemClass(), item->data);
+            CString label;
+            if (GTK_IS_SEPARATOR_MENU_ITEM(item->data))
+                label = "<separator>";
+            else
+                label = gtk_menu_item_get_label(GTK_MENU_ITEM(item->data));
+
+            arrayValues[index] = JSValueMakeString(context, JSStringCreateWithUTF8CString(label.data()));
             index++;
         }
         if (index)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list