WebKit Bugzilla
Attachment 371962 Details for
Bug 198787
: [GTK] GTK_STOCK_* types have been deprecated since GTK 3.10
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198787-20190612174207.patch (text/plain), 8.05 KB, created by
Ludovico de Nittis
on 2019-06-12 08:42:08 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Ludovico de Nittis
Created:
2019-06-12 08:42:08 PDT
Size:
8.05 KB
patch
obsolete
>Subversion Revision: 246349 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 4a275d05a3013ee7d97a8957a7b907ca116c7d3f..3e0635a8fd605350b21da735d7cf25c2f35864fc 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,17 @@ >+2019-06-12 Ludovico de Nittis <ludovico.denittis@collabora.com> >+ >+ [GTK] GTK_STOCK_* types have been deprecated since GTK 3.10 >+ https://bugs.webkit.org/show_bug.cgi?id=198787 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ No behaviour changes. >+ >+ * platform/graphics/gtk/IconGtk.cpp: >+ (WebCore::lookupIconName): >+ * platform/graphics/gtk/ImageGtk.cpp: >+ (WebCore::loadMissingImageIconFromTheme): >+ > 2019-06-11 Wenson Hsieh <wenson_hsieh@apple.com> > > [iOS] Idempotent text autosizing needs to react properly to viewport changes >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 898da324a131510884bc00b5abc847d17e4d7838..33e6a4ddee162ef245c18fa32a8f5591c8cacb80 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,16 @@ >+2019-06-12 Ludovico de Nittis <ludovico.denittis@collabora.com> >+ >+ [GTK] GTK_STOCK_* types have been deprecated since GTK 3.10 >+ https://bugs.webkit.org/show_bug.cgi?id=198787 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ We completely remove the gtkStockIDFromContextMenuAction function in order to get rid of the stock items. >+ This function was used only in "createActionIfNeeded" where now we pass a nullptr as a stock_id variable. >+ >+ * Shared/glib/WebContextMenuItemGlib.cpp: >+ (WebKit::gtkStockIDFromContextMenuAction): >+ > 2019-06-11 Wenson Hsieh <wenson_hsieh@apple.com> > > [iOS] Idempotent text autosizing needs to react properly to viewport changes >diff --git a/Source/WebCore/platform/graphics/gtk/IconGtk.cpp b/Source/WebCore/platform/graphics/gtk/IconGtk.cpp >index af185a54cdd49d2046865e693c5a73c94c58b04b..f039ba663eb2ae51018c35617c1ea654df0e3c8e 100644 >--- a/Source/WebCore/platform/graphics/gtk/IconGtk.cpp >+++ b/Source/WebCore/platform/graphics/gtk/IconGtk.cpp >@@ -86,7 +86,7 @@ static String lookupIconName(String MIMEType) > if(gtk_icon_theme_has_icon(iconTheme, iconName.utf8().data())) > return iconName; > } >- return GTK_STOCK_FILE; >+ return "text-x-generic"; > } > > // FIXME: Move the code to ChromeClient::iconForFiles(). >diff --git a/Source/WebCore/platform/graphics/gtk/ImageGtk.cpp b/Source/WebCore/platform/graphics/gtk/ImageGtk.cpp >index 575b3a5ef545e4b6aabc01db2fc8b042344a4481..830185810e1e844e5483f5c2e6df4fb616d82547 100644 >--- a/Source/WebCore/platform/graphics/gtk/ImageGtk.cpp >+++ b/Source/WebCore/platform/graphics/gtk/ImageGtk.cpp >@@ -64,7 +64,7 @@ static Ref<Image> loadMissingImageIconFromTheme(const char* name) > { > int iconSize = g_str_has_suffix(name, "@2x") ? 32 : 16; > auto icon = BitmapImage::create(); >- GUniquePtr<GtkIconInfo> iconInfo(gtk_icon_theme_lookup_icon(gtk_icon_theme_get_default(), GTK_STOCK_MISSING_IMAGE, iconSize, GTK_ICON_LOOKUP_NO_SVG)); >+ GUniquePtr<GtkIconInfo> iconInfo(gtk_icon_theme_lookup_icon(gtk_icon_theme_get_default(), "image-missing", iconSize, GTK_ICON_LOOKUP_NO_SVG)); > if (iconInfo) { > auto buffer = loadResourceSharedBuffer(gtk_icon_info_get_filename(iconInfo.get())); > icon->setData(WTFMove(buffer), true); >diff --git a/Source/WebKit/Shared/glib/WebContextMenuItemGlib.cpp b/Source/WebKit/Shared/glib/WebContextMenuItemGlib.cpp >index d00120cf022f1dec841862bac725333fc972b954..7f75a606c7222c309ee53f5787b0b88fdc17d681 100644 >--- a/Source/WebKit/Shared/glib/WebContextMenuItemGlib.cpp >+++ b/Source/WebKit/Shared/glib/WebContextMenuItemGlib.cpp >@@ -36,93 +36,6 @@ > namespace WebKit { > using namespace WebCore; > >-#if PLATFORM(GTK) >-static const char* gtkStockIDFromContextMenuAction(ContextMenuAction action) >-{ >- 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: >- return GTK_STOCK_SAVE; >- case ContextMenuItemTagGoBack: >- return GTK_STOCK_GO_BACK; >- case ContextMenuItemTagGoForward: >- return GTK_STOCK_GO_FORWARD; >- case ContextMenuItemTagStop: >- return GTK_STOCK_STOP; >- case ContextMenuItemTagReload: >- return GTK_STOCK_REFRESH; >- case ContextMenuItemTagCut: >- return GTK_STOCK_CUT; >- case ContextMenuItemTagPaste: >- return GTK_STOCK_PASTE; >- case ContextMenuItemTagDelete: >- return GTK_STOCK_DELETE; >- case ContextMenuItemTagSelectAll: >- return GTK_STOCK_SELECT_ALL; >- case ContextMenuItemTagSpellingGuess: >- return nullptr; >- case ContextMenuItemTagIgnoreSpelling: >- return GTK_STOCK_NO; >- case ContextMenuItemTagLearnSpelling: >- return GTK_STOCK_OK; >- case ContextMenuItemTagOther: >- return GTK_STOCK_MISSING_IMAGE; >- case ContextMenuItemTagSearchInSpotlight: >- return GTK_STOCK_FIND; >- case ContextMenuItemTagSearchWeb: >- return GTK_STOCK_FIND; >- case ContextMenuItemTagOpenWithDefaultApplication: >- return GTK_STOCK_OPEN; >- case ContextMenuItemPDFZoomIn: >- return GTK_STOCK_ZOOM_IN; >- case ContextMenuItemPDFZoomOut: >- return GTK_STOCK_ZOOM_OUT; >- case ContextMenuItemPDFAutoSize: >- return GTK_STOCK_ZOOM_FIT; >- case ContextMenuItemPDFNextPage: >- return GTK_STOCK_GO_FORWARD; >- case ContextMenuItemPDFPreviousPage: >- return GTK_STOCK_GO_BACK; >- // New tags, not part of API >- case ContextMenuItemTagOpenLink: >- return GTK_STOCK_OPEN; >- case ContextMenuItemTagCheckSpelling: >- return GTK_STOCK_SPELL_CHECK; >- case ContextMenuItemTagFontMenu: >- return GTK_STOCK_SELECT_FONT; >- case ContextMenuItemTagShowFonts: >- return GTK_STOCK_SELECT_FONT; >- case ContextMenuItemTagBold: >- return GTK_STOCK_BOLD; >- case ContextMenuItemTagItalic: >- return GTK_STOCK_ITALIC; >- case ContextMenuItemTagUnderline: >- return GTK_STOCK_UNDERLINE; >- case ContextMenuItemTagShowColors: >- return GTK_STOCK_SELECT_COLOR; >- case ContextMenuItemTagToggleMediaControls: >- case ContextMenuItemTagToggleMediaLoop: >- case ContextMenuItemTagCopyImageUrlToClipboard: >- // No icon for this. >- return nullptr; >- case ContextMenuItemTagEnterVideoFullscreen: >- return GTK_STOCK_FULLSCREEN; >- default: >- return nullptr; >- } >-} >-#endif // PLATFORM(GTK) >- > WebContextMenuItemGlib::WebContextMenuItemGlib(ContextMenuItemType type, ContextMenuAction action, const String& title, bool enabled, bool checked) > : WebContextMenuItemData(type, action, title, enabled, checked) > { >@@ -207,10 +120,10 @@ void WebContextMenuItemGlib::createActionIfNeeded() > // Create the GtkAction for backwards compatibility only. > if (!m_gtkAction) { > if (type() == CheckableActionType) { >- m_gtkAction = GTK_ACTION(gtk_toggle_action_new(g_action_get_name(m_gAction.get()), title().utf8().data(), nullptr, gtkStockIDFromContextMenuAction(action()))); >+ m_gtkAction = GTK_ACTION(gtk_toggle_action_new(g_action_get_name(m_gAction.get()), title().utf8().data(), nullptr, nullptr)); > gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(m_gtkAction), checked()); > } else >- m_gtkAction = gtk_action_new(g_action_get_name(m_gAction.get()), title().utf8().data(), 0, gtkStockIDFromContextMenuAction(action())); >+ m_gtkAction = gtk_action_new(g_action_get_name(m_gAction.get()), title().utf8().data(), 0, nullptr); > gtk_action_set_sensitive(m_gtkAction, enabled()); > g_object_set_data_full(G_OBJECT(m_gAction.get()), "webkit-gtk-action", m_gtkAction, g_object_unref); > }
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 198787
:
371950
|
371953
| 371962