WebKit Bugzilla
Attachment 371950 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-20190612162104.patch (text/plain), 6.81 KB, created by
Ludovico de Nittis
on 2019-06-12 07:21:06 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Ludovico de Nittis
Created:
2019-06-12 07:21:06 PDT
Size:
6.81 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..2d5582ab535362cae969f65719ef006f219295f8 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,13 @@ >+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!). >+ >+ * 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..5da7b6ede99161d4c95e4ee13f107c0d86c69e15 100644 >--- a/Source/WebCore/platform/graphics/gtk/IconGtk.cpp >+++ b/Source/WebCore/platform/graphics/gtk/IconGtk.cpp >@@ -86,7 +86,11 @@ static String lookupIconName(String MIMEType) > if(gtk_icon_theme_has_icon(iconTheme, iconName.utf8().data())) > return iconName; > } >+#if GTK_CHECK_VERSION(3, 10, 0) >+ return "text-x-generic"; >+#else > return GTK_STOCK_FILE; >+#endif > } > > // 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..61c7cd6ff87208a238ec20d7f4543ca6b0521da3 100644 >--- a/Source/WebCore/platform/graphics/gtk/ImageGtk.cpp >+++ b/Source/WebCore/platform/graphics/gtk/ImageGtk.cpp >@@ -64,7 +64,11 @@ static Ref<Image> loadMissingImageIconFromTheme(const char* name) > { > int iconSize = g_str_has_suffix(name, "@2x") ? 32 : 16; > auto icon = BitmapImage::create(); >+#if GTK_CHECK_VERSION(3, 10, 0) >+ GUniquePtr<GtkIconInfo> iconInfo(gtk_icon_theme_lookup_icon(gtk_icon_theme_get_default(), "image-missing", iconSize, GTK_ICON_LOOKUP_NO_SVG)); >+#else > GUniquePtr<GtkIconInfo> iconInfo(gtk_icon_theme_lookup_icon(gtk_icon_theme_get_default(), GTK_STOCK_MISSING_IMAGE, iconSize, GTK_ICON_LOOKUP_NO_SVG)); >+#endif > 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..50a84398640b50e3c0cc8be97aeaa725546ffa28 100644 >--- a/Source/WebKit/Shared/glib/WebContextMenuItemGlib.cpp >+++ b/Source/WebKit/Shared/glib/WebContextMenuItemGlib.cpp >@@ -40,6 +40,83 @@ using namespace WebCore; > static const char* gtkStockIDFromContextMenuAction(ContextMenuAction action) > { > switch (action) { >+#if GTK_CHECK_VERSION(3, 10, 0) >+ case ContextMenuItemTagCopyLinkToClipboard: >+ case ContextMenuItemTagCopyImageToClipboard: >+ case ContextMenuItemTagCopyMediaLinkToClipboard: >+ case ContextMenuItemTagCopy: >+ return "edit-copy"; >+ case ContextMenuItemTagOpenLinkInNewWindow: >+ case ContextMenuItemTagOpenImageInNewWindow: >+ case ContextMenuItemTagOpenFrameInNewWindow: >+ case ContextMenuItemTagOpenMediaInNewWindow: >+ return "document-open"; >+ case ContextMenuItemTagDownloadLinkToDisk: >+ case ContextMenuItemTagDownloadImageToDisk: >+ return "document-save"; >+ case ContextMenuItemTagGoBack: >+ return "go-previous"; >+ case ContextMenuItemTagGoForward: >+ return "go-next"; >+ case ContextMenuItemTagStop: >+ return "process-stop"; >+ case ContextMenuItemTagReload: >+ return "view-refresh"; >+ case ContextMenuItemTagCut: >+ return "edit-cut"; >+ case ContextMenuItemTagPaste: >+ return "edit-paste"; >+ case ContextMenuItemTagDelete: >+ return "edit-delete"; >+ case ContextMenuItemTagSelectAll: >+ return "edit-select-all"; >+ case ContextMenuItemTagSpellingGuess: >+ case ContextMenuItemTagIgnoreSpelling: >+ case ContextMenuItemTagLearnSpelling: >+ return nullptr; >+ case ContextMenuItemTagOther: >+ return "image-missing"; >+ case ContextMenuItemTagSearchInSpotlight: >+ return "edit-find"; >+ case ContextMenuItemTagSearchWeb: >+ return "edit-find"; >+ case ContextMenuItemTagOpenWithDefaultApplication: >+ return "document-open"; >+ case ContextMenuItemPDFZoomIn: >+ return "zoom-in"; >+ case ContextMenuItemPDFZoomOut: >+ return "zoom-out"; >+ case ContextMenuItemPDFAutoSize: >+ return "zoom-fit-best"; >+ case ContextMenuItemPDFNextPage: >+ return "go-next"; >+ case ContextMenuItemPDFPreviousPage: >+ return "go-previous"; >+ // New tags, not part of API >+ case ContextMenuItemTagOpenLink: >+ return "document-open"; >+ case ContextMenuItemTagCheckSpelling: >+ return "tools-check-spelling"; >+ case ContextMenuItemTagFontMenu: >+ case ContextMenuItemTagShowFonts: >+ return nullptr; >+ case ContextMenuItemTagBold: >+ return "format-text-bold"; >+ case ContextMenuItemTagItalic: >+ return "format-text-italic"; >+ case ContextMenuItemTagUnderline: >+ return "format-text-underline"; >+ case ContextMenuItemTagShowColors: >+ case ContextMenuItemTagToggleMediaControls: >+ case ContextMenuItemTagToggleMediaLoop: >+ case ContextMenuItemTagCopyImageUrlToClipboard: >+ // No icon for this. >+ return nullptr; >+ case ContextMenuItemTagEnterVideoFullscreen: >+ return "view-fullscreen"; >+ default: >+ return nullptr; >+#else > case ContextMenuItemTagCopyLinkToClipboard: > case ContextMenuItemTagCopyImageToClipboard: > case ContextMenuItemTagCopyMediaLinkToClipboard: >@@ -119,6 +196,7 @@ static const char* gtkStockIDFromContextMenuAction(ContextMenuAction action) > return GTK_STOCK_FULLSCREEN; > default: > return nullptr; >+#endif // GTK_CHECK_VERSION(3, 10, 0) > } > } > #endif // PLATFORM(GTK)
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