WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-20599-20130614161601.patch (text/plain), 13.28 KB, created by
Ruth Fong
on 2013-06-14 16:17:43 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Ruth Fong
Created:
2013-06-14 16:17:43 PDT
Size:
13.28 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 151611) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,31 @@ >+2013-06-14 Ruth Fong <ruth_fong@apple.com> >+ >+ REGRESSION: Important controls are missing from <video> element UI, when compared to QuickTime >+ https://bugs.webkit.org/show_bug.cgi?id=20599 >+ >+ Add a "Download Video"/"Download Audio" context menu item to download media >+ elements. >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ No new tests. media/context-menu-action.html, >+ which has been disabled by bug 116651, is used to test context menus. >+ >+ * English.lproj/Localizable.strings: Updated to >+ include localizable strings for "Download Video" and "Download Audio". >+ >+ * page/ContextMenuController.cpp: Updated to >+ include and handle a "Download Video/Audio" context menu item. >+ >+ * platform/ContextMenuItem.h: >+ >+ * platform/LocalizedStrings.cpp: >+ * platform/LocalizedStrings.h: >+ * platform/efl/LocalizedStringsEfl.cpp: >+ * platform/gtk/LocalizedStringsGtk.cpp: >+ * platform/qt/LocalizedStringsQt.cpp: >+ Updated to include localizable strings for "Download Video" and "Download Audio". >+ > 2013-06-14 Adam Barth <abarth@webkit.org> > > Threaded HTML parser can ASSERT in some situations >Index: Source/WebCore/English.lproj/Localizable.strings >=================================================================== >--- Source/WebCore/English.lproj/Localizable.strings (revision 151605) >+++ Source/WebCore/English.lproj/Localizable.strings (working copy) >@@ -178,6 +178,12 @@ > /* Video Exit Fullscreen context menu item */ > "Exit Fullscreen" = "Exit Fullscreen"; > >+/* Download Video context menu item */ >+"Download Video" = "Download Video"; >+ >+/* Download Audio context menu item */ >+"Download Audio" = "Download Audio"; >+ > /* Default application name for Open With context menu */ > "Finder" = "Finder"; > >Index: Source/WebCore/page/ContextMenuController.cpp >=================================================================== >--- Source/WebCore/page/ContextMenuController.cpp (revision 151605) >+++ Source/WebCore/page/ContextMenuController.cpp (working copy) >@@ -254,6 +254,10 @@ void ContextMenuController::contextMenuI > case ContextMenuItemTagOpenMediaInNewWindow: > openNewWindow(m_hitTestResult.absoluteMediaURL(), frame); > break; >+ case ContextMenuItemTagDownloadMediaToDisk: >+ // FIXME: Some day we should be able to do this from within WebCore. >+ m_client->downloadURL(m_hitTestResult.absoluteMediaURL()); >+ break; > case ContextMenuItemTagCopyMediaLinkToClipboard: > frame->editor().copyURL(m_hitTestResult.absoluteMediaURL(), m_hitTestResult.textContent()); > break; >@@ -761,8 +765,8 @@ void ContextMenuController::populate() > contextMenuItemTagCopyImageUrlToClipboard()); > #endif > ContextMenuItem OpenMediaInNewWindowItem(ActionType, ContextMenuItemTagOpenMediaInNewWindow, String()); >- ContextMenuItem CopyMediaLinkItem(ActionType, ContextMenuItemTagCopyMediaLinkToClipboard, >- String()); >+ ContextMenuItem DownloadMediaItem(ActionType, ContextMenuItemTagDownloadMediaToDisk, String()); >+ ContextMenuItem CopyMediaLinkItem(ActionType, ContextMenuItemTagCopyMediaLinkToClipboard, String()); > ContextMenuItem MediaPlayPause(ActionType, ContextMenuItemTagMediaPlayPause, > contextMenuItemTagMediaPlay()); > ContextMenuItem MediaMute(ActionType, ContextMenuItemTagMediaMute, >@@ -864,6 +868,8 @@ void ContextMenuController::populate() > appendItem(*separatorItem(), m_contextMenu.get()); > appendItem(CopyMediaLinkItem, m_contextMenu.get()); > appendItem(OpenMediaInNewWindowItem, m_contextMenu.get()); >+ if (loader->client()->canHandleRequest(ResourceRequest(mediaURL))) >+ appendItem(DownloadMediaItem, m_contextMenu.get()); > } > > if (imageURL.isEmpty() && linkURL.isEmpty() && mediaURL.isEmpty()) { >@@ -1344,6 +1350,12 @@ void ContextMenuController::checkOrEnabl > else > item.setTitle(contextMenuItemTagOpenAudioInNewWindow()); > break; >+ case ContextMenuItemTagDownloadMediaToDisk: >+ if (m_hitTestResult.mediaIsVideo()) >+ item.setTitle(contextMenuItemTagDownloadVideoToDisk()); >+ else >+ item.setTitle(contextMenuItemTagDownloadAudioToDisk()); >+ break; > case ContextMenuItemTagCopyMediaLinkToClipboard: > if (m_hitTestResult.mediaIsVideo()) > item.setTitle(contextMenuItemTagCopyVideoLinkToClipboard()); >Index: Source/WebCore/platform/ContextMenuItem.h >=================================================================== >--- Source/WebCore/platform/ContextMenuItem.h (revision 151605) >+++ Source/WebCore/platform/ContextMenuItem.h (working copy) >@@ -153,6 +153,7 @@ namespace WebCore { > ContextMenuItemTagChangeBack, > #endif > ContextMenuItemTagOpenMediaInNewWindow, >+ ContextMenuItemTagDownloadMediaToDisk, > ContextMenuItemTagCopyMediaLinkToClipboard, > ContextMenuItemTagToggleMediaControls, > ContextMenuItemTagToggleMediaLoop, >Index: Source/WebCore/platform/LocalizedStrings.cpp >=================================================================== >--- Source/WebCore/platform/LocalizedStrings.cpp (revision 151605) >+++ Source/WebCore/platform/LocalizedStrings.cpp (working copy) >@@ -469,6 +469,16 @@ String contextMenuItemTagOpenAudioInNewW > return WEB_UI_STRING("Open Audio in New Window", "Open Audio in New Window context menu item"); > } > >+String contextMenuItemTagDownloadVideoToDisk() >+{ >+ return WEB_UI_STRING("Download Video", "Download Video To Disk context menu item"); >+} >+ >+String contextMenuItemTagDownloadAudioToDisk() >+{ >+ return WEB_UI_STRING("Download Audio", "Download Audio To Disk context menu item"); >+} >+ > String contextMenuItemTagCopyVideoLinkToClipboard() > { > return WEB_UI_STRING("Copy Video Address", "Copy Video Address Location context menu item"); >Index: Source/WebCore/platform/LocalizedStrings.h >=================================================================== >--- Source/WebCore/platform/LocalizedStrings.h (revision 151605) >+++ Source/WebCore/platform/LocalizedStrings.h (working copy) >@@ -132,6 +132,8 @@ namespace WebCore { > #endif > String contextMenuItemTagOpenVideoInNewWindow(); > String contextMenuItemTagOpenAudioInNewWindow(); >+ String contextMenuItemTagDownloadVideoToDisk(); >+ String contextMenuItemTagDownloadAudioToDisk(); > String contextMenuItemTagCopyVideoLinkToClipboard(); > String contextMenuItemTagCopyAudioLinkToClipboard(); > String contextMenuItemTagToggleMediaControls(); >Index: Source/WebCore/platform/efl/LocalizedStringsEfl.cpp >=================================================================== >--- Source/WebCore/platform/efl/LocalizedStringsEfl.cpp (revision 151605) >+++ Source/WebCore/platform/efl/LocalizedStringsEfl.cpp (working copy) >@@ -128,6 +128,16 @@ String contextMenuItemTagOpenAudioInNewW > return String::fromUTF8("Open Audio in New Window"); > } > >+String contextMenuItemTagDownloadVideoToDisk() >+{ >+ return String::fromUTF8("Download Video"); >+} >+ >+String contextMenuItemTagDownloadAudioToDisk() >+{ >+ return String::fromUTF8("Download Audio"); >+} >+ > String contextMenuItemTagCopyVideoLinkToClipboard() > { > return String::fromUTF8("Copy Video Link Location"); >Index: Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp >=================================================================== >--- Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp (revision 151605) >+++ Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp (working copy) >@@ -141,6 +141,16 @@ String contextMenuItemTagOpenAudioInNewW > return String::fromUTF8(_("Open _Audio in New Window")); > } > >+String contextMenuItemTagDownloadVideoToDisk() >+{ >+ return String::fromUTF8(_("Download _Video")); >+} >+ >+String contextMenuItemTagOpenAudioInNewWindow() >+{ >+ return String::fromUTF8(_("Download _Audio")); >+} >+ > String contextMenuItemTagCopyVideoLinkToClipboard() > { > return String::fromUTF8(_("Cop_y Video Link Location")); >Index: Source/WebCore/platform/qt/LocalizedStringsQt.cpp >=================================================================== >--- Source/WebCore/platform/qt/LocalizedStringsQt.cpp (revision 151605) >+++ Source/WebCore/platform/qt/LocalizedStringsQt.cpp (working copy) >@@ -133,6 +133,16 @@ String contextMenuItemTagOpenAudioInNewW > return QCoreApplication::translate("QWebPage", "Open Audio", "Open Audio in New Window"); > } > >+String contextMenuItemTagDownloadVideoToDisk() >+{ >+ return QCoreApplication::translate("QWebPage", "Download Video", "Download Video context menu item"); >+} >+ >+String contextMenuItemTagDownloadAudioToDisk() >+{ >+ return QCoreApplication::translate("QWebPage", "Download Audio", "Download Audio context menu item"); >+} >+ > String contextMenuItemTagCopyVideoLinkToClipboard() > { > return QCoreApplication::translate("QWebPage", "Copy Video", "Copy Video Link Location"); >Index: Source/WebKit2/ChangeLog >=================================================================== >--- Source/WebKit2/ChangeLog (revision 151611) >+++ Source/WebKit2/ChangeLog (working copy) >@@ -1,3 +1,24 @@ >+2013-06-14 Ruth Fong <ruth_fong@apple.com> >+ >+ REGRESSION: Important controls are missing from <video> element UI, when compared to QuickTime >+ https://bugs.webkit.org/show_bug.cgi?id=20599 >+ >+ Add a "Download Video"/"Download Audio" context menu item to download media >+ elements. >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Shared/API/c/WKContextMenuItemTypes.h: Updated to include >+ an enum type for the "Download Video/Audio" context menu item. >+ >+ * Shared/API/c/WKSharedAPICast.h: Updated to associate >+ the enums in WebKit and WebCore that handle the "Download Video/Audio" >+ context menu item. >+ >+ * UIProcess/WebPageProxy.cpp: Updated to >+ handle the "Download Video/Audio" context menu item mouse click >+ and download the media item in the UI process. >+ > 2013-06-14 Enrica Casucci <enrica@apple.com> > > WKPageFindStringMatches ignores the kWKFindOptionsBackwards option. >Index: Source/WebKit2/Shared/API/c/WKContextMenuItemTypes.h >=================================================================== >--- Source/WebKit2/Shared/API/c/WKContextMenuItemTypes.h (revision 151605) >+++ Source/WebKit2/Shared/API/c/WKContextMenuItemTypes.h (working copy) >@@ -107,6 +107,7 @@ enum { > kWKContextMenuItemTagCapitalize, > kWKContextMenuItemTagChangeBack, > kWKContextMenuItemTagOpenMediaInNewWindow, >+ kWKContextMenuItemTagDownloadMediaToDisk, > kWKContextMenuItemTagCopyMediaLinkToClipboard, > kWKContextMenuItemTagToggleMediaControls, > kWKContextMenuItemTagToggleMediaLoop, >Index: Source/WebKit2/Shared/API/c/WKSharedAPICast.h >=================================================================== >--- Source/WebKit2/Shared/API/c/WKSharedAPICast.h (revision 151605) >+++ Source/WebKit2/Shared/API/c/WKSharedAPICast.h (working copy) >@@ -462,6 +462,8 @@ inline WKContextMenuItemTag toAPI(WebCor > return kWKContextMenuItemTagTextDirectionRightToLeft; > case WebCore::ContextMenuItemTagOpenMediaInNewWindow: > return kWKContextMenuItemTagOpenMediaInNewWindow; >+ case WebCore::ContextMenuItemTagDownloadMediaToDisk: >+ return kWKContextMenuItemTagDownloadMediaToDisk; > case WebCore::ContextMenuItemTagCopyMediaLinkToClipboard: > return kWKContextMenuItemTagCopyMediaLinkToClipboard; > case WebCore::ContextMenuItemTagToggleMediaControls: >@@ -654,6 +656,8 @@ inline WebCore::ContextMenuAction toImpl > return WebCore::ContextMenuItemTagTextDirectionRightToLeft; > case kWKContextMenuItemTagOpenMediaInNewWindow: > return WebCore::ContextMenuItemTagOpenMediaInNewWindow; >+ case kWKContextMenuItemTagDownloadMediaToDisk: >+ return WebCore::ContextMenuItemTagDownloadMediaToDisk; > case kWKContextMenuItemTagCopyMediaLinkToClipboard: > return WebCore::ContextMenuItemTagCopyMediaLinkToClipboard; > case kWKContextMenuItemTagToggleMediaControls: >Index: Source/WebKit2/UIProcess/WebPageProxy.cpp >=================================================================== >--- Source/WebKit2/UIProcess/WebPageProxy.cpp (revision 151605) >+++ Source/WebKit2/UIProcess/WebPageProxy.cpp (working copy) >@@ -3344,6 +3344,10 @@ void WebPageProxy::contextMenuItemSelect > m_process->context()->download(this, KURL(KURL(), m_activeContextMenuHitTestResultData.absoluteLinkURL)); > return; > } >+ if (item.action() == ContextMenuItemTagDownloadMediaToDisk) { >+ m_process->context()->download(this, KURL(KURL(), m_activeContextMenuHitTestResultData.absoluteMediaURL)); >+ return; >+ } > if (item.action() == ContextMenuItemTagCheckSpellingWhileTyping) { > TextChecker::setContinuousSpellCheckingEnabled(!TextChecker::state().isContinuousSpellCheckingEnabled); > m_process->updateTextCheckerState();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 20599
:
204740
|
204745
|
204746
|
204843