<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>120772</bug_id>
          
          <creation_ts>2013-09-05 07:39:24 -0700</creation_ts>
          <short_desc>[GTK] [Meta] GtkActions and Stock Items are deprecated in gtk+ 3.10</short_desc>
          <delta_ts>2016-01-08 11:24:28 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Gtk</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>120636</dependson>
    
    <dependson>121686</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Pena">spena</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>berto</cc>
    
    <cc>brian.holt</cc>
    
    <cc>cgarcia</cc>
    
    <cc>eocanha</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>obzhirov</cc>
    
    <cc>zan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>925024</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Pena">spena</who>
    <bug_when>2013-09-05 07:39:24 -0700</bug_when>
    <thetext>WebKitGTK+ uses a number of symbols that have been deprecated in gtk+ 3.10: https://developer.gnome.org/gtk3/unstable/DeprecatedObjects.html, more specifically

 * GtkActions:

$ fgrep -lr --include=*.{h,c,cpp} --exclude-dir=WebKitBuild GtkAction
Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuItem.cpp
Source/WebKit2/UIProcess/API/gtk/tests/TestContextMenu.cpp
Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuItem.h
Source/WebKit2/UIProcess/gtk/WebPopupMenuProxyGtk.h
Source/WebKit2/UIProcess/gtk/WebPopupMenuProxyGtk.cpp
Source/WebKit2/UIProcess/gtk/WebContextMenuProxyGtk.cpp
Source/WTF/wtf/gobject/GTypedefs.h
Source/WebKit/gtk/tests/testcontextmenu.c
Source/WebKit/gtk/webkit/webkitglobals.cpp
Source/WebCore/platform/graphics/gtk/FullscreenVideoControllerGtk.cpp
Source/WebCore/platform/graphics/gtk/FullscreenVideoControllerGtk.h
Source/WebCore/platform/ContextMenuItem.h
Source/WebCore/platform/gtk/PopupMenuGtk.h
Source/WebCore/platform/gtk/GtkPopupMenu.cpp
Source/WebCore/platform/gtk/ContextMenuItemGtk.cpp
Source/WebCore/platform/gtk/PopupMenuGtk.cpp
Source/WebCore/platform/gtk/GtkPopupMenu.h
Tools/MiniBrowser/gtk/BrowserWindow.c

 * Stock Items:

$ fgrep -lir --include=*.{h,c,cpp} --exclude-dir=WebKitBuild gtk_stock
Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp
Source/WebKit2/UIProcess/API/gtk/WebKitAuthenticationDialog.cpp
Source/WebKit/gtk/webkit/webkitwebview.cpp
Source/WebKit/gtk/webkit/webkitauthenticationdialog.cpp
Source/WebCore/platform/graphics/gtk/ImageGtk.cpp
Source/WebCore/platform/graphics/gtk/IconGtk.cpp
Source/WebCore/platform/gtk/RenderThemeGtk.cpp
Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp
Source/WebCore/platform/gtk/WebKitAuthenticationWidget.cpp
Source/WebCore/platform/gtk/ContextMenuItemGtk.cpp
Tools/MiniBrowser/gtk/BrowserDownloadsBar.c
Tools/MiniBrowser/gtk/BrowserSettingsDialog.c
Tools/MiniBrowser/gtk/BrowserWindow.c
Tools/GtkLauncher/main.c

(Some of the previous entries are false positives, since they are guarded by GTK_API_VERSION_2, so the proper way to do this would be to actually build against gtk+ 3.10 and check the error messages instead of simply grepping)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>926629</commentid>
    <comment_count>1</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2013-09-09 03:06:37 -0700</bug_when>
    <thetext>I would be careful with removing deprecated symbols, I think it&apos;s important to check that the dependencies are not bumped because of this, else we would be making the webkitgtk build more difficult for no reason.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>927666</commentid>
    <comment_count>2</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2013-09-11 00:15:59 -0700</bug_when>
    <thetext>This is at the moment breaking debug builds on the 2.2 stable branch, with GTK+ 3.10. As a workaround we could undefine the *_DISABLE_DEPRECATED macros in the case of debug builds.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>927694</commentid>
    <comment_count>3</comment_count>
    <who name="Anton Obzhirov">obzhirov</who>
    <bug_when>2013-09-11 02:30:36 -0700</bug_when>
    <thetext>I think you can already use GtkActions in current version of GTK. Not sure about stock items.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>927695</commentid>
    <comment_count>4</comment_count>
    <who name="Anton Obzhirov">obzhirov</who>
    <bug_when>2013-09-11 02:31:39 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; I think you can already use GtkActions in current version of GTK. Not sure about stock items.
Sorry I meant I can already remove GtkActions in current version of GTK.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>927702</commentid>
    <comment_count>5</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2013-09-11 03:00:40 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; This is at the moment breaking debug builds on the 2.2 stable branch, with GTK+ 3.10. As a workaround we could undefine the *_DISABLE_DEPRECATED macros in the case of debug builds.

Those macro definitions were removed in r155509.
https://trac.webkit.org/r155509</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>931363</commentid>
    <comment_count>6</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2013-09-20 08:41:41 -0700</bug_when>
    <thetext>If the problem is that there are compile warnings, I wouldn&apos;t worry too much. We don&apos;t plan to bump GTK+ requirements, and I wouldn&apos;t spend time porting to new API either (I&apos;m not even sure there&apos;s a replacement in current glib/GTK+ API for out uses cases), if the code is going to be full of #ifdefs. We expose GtkAction in the ContextMenu API and it works pretty well, so I would keep GtkAction and stock icons until we bump the requirements to GTK 4.0.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>931373</commentid>
    <comment_count>7</comment_count>
    <who name="Anton Obzhirov">obzhirov</who>
    <bug_when>2013-09-20 08:53:09 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; If the problem is that there are compile warnings, I wouldn&apos;t worry too much. We don&apos;t plan to bump GTK+ requirements, and I wouldn&apos;t spend time porting to new API either (I&apos;m not even sure there&apos;s a replacement in current glib/GTK+ API for out uses cases), if the code is going to be full of #ifdefs. We expose GtkAction in the ContextMenu API and it works pretty well, so I would keep GtkAction and stock icons until we bump the requirements to GTK 4.0.

OK, so I guess it can be postponed for now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>932586</commentid>
    <comment_count>8</comment_count>
    <who name="Brian Holt">brian.holt</who>
    <bug_when>2013-09-24 09:02:34 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; If the problem is that there are compile warnings, I wouldn&apos;t worry too much. We don&apos;t plan to bump GTK+ requirements, and I wouldn&apos;t spend time porting to new API either (I&apos;m not even sure there&apos;s a replacement in current glib/GTK+ API for out uses cases), if the code is going to be full of #ifdefs. We expose GtkAction in the ContextMenu API and it works pretty well, so I would keep GtkAction and stock icons until we bump the requirements to GTK 4.0.

Its not that there are just compile warning, building WebKit with debug symbols fails: 
$ ./autogen.sh --prefix=/opt/gnome3 --libdir=/opt/gnome3/lib64 --enable-debug

Source/WebKit/gtk/webkit/webkitwebview.cpp:1309:53: error: &apos;GTK_STOCK_CANCEL&apos; was not declared in this scope
Source/WebKit/gtk/webkit/webkitwebview.cpp:1310:53: error: &apos;GTK_STOCK_OPEN&apos; was not declared in this scope</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>932591</commentid>
    <comment_count>9</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2013-09-24 09:16:30 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; (In reply to comment #6)
&gt; &gt; If the problem is that there are compile warnings, I wouldn&apos;t worry too much. We don&apos;t plan to bump GTK+ requirements, and I wouldn&apos;t spend time porting to new API either (I&apos;m not even sure there&apos;s a replacement in current glib/GTK+ API for out uses cases), if the code is going to be full of #ifdefs. We expose GtkAction in the ContextMenu API and it works pretty well, so I would keep GtkAction and stock icons until we bump the requirements to GTK 4.0.
&gt; 
&gt; Its not that there are just compile warning, building WebKit with debug symbols fails: 
&gt; $ ./autogen.sh --prefix=/opt/gnome3 --libdir=/opt/gnome3/lib64 --enable-debug
&gt; 
&gt; Source/WebKit/gtk/webkit/webkitwebview.cpp:1309:53: error: &apos;GTK_STOCK_CANCEL&apos; was not declared in this scope
&gt; Source/WebKit/gtk/webkit/webkitwebview.cpp:1310:53: error: &apos;GTK_STOCK_OPEN&apos; was not declared in this scope

I removed the disabling of deprecated API under debug builds in r155509.
http://trac.webkit.org/changeset/155509</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>958263</commentid>
    <comment_count>10</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2013-12-10 03:13:42 -0800</bug_when>
    <thetext>*** Bug 121686 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>958267</commentid>
    <comment_count>11</comment_count>
    <who name="Enrique Ocaña">eocanha</who>
    <bug_when>2013-12-10 03:42:36 -0800</bug_when>
    <thetext>If migrating away from stock icons turns out to be a priority at some point, maybe https://bugs.webkit.org/attachment.cgi?id=218847 (from Bug 121686) might be considered.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1153904</commentid>
    <comment_count>12</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-01-08 11:24:28 -0800</bug_when>
    <thetext>Stock item deprecations are trivial, patches welcome to get rid of those where they exist. No reason to keep a bug open for it without a patch, because they aren&apos;t hurting anything.

GtkAction is part of our API, we cannot remove it.

(In reply to comment #9)
&gt; I removed the disabling of deprecated API under debug builds in r155509.
&gt; http://trac.webkit.org/changeset/155509

This is all that matters.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>