<?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>181126</bug_id>
          
          <creation_ts>2017-12-22 07:41:12 -0800</creation_ts>
          <short_desc>REGRESSION(r218089): [GTK] webkit_web_view_get_inspector() needs to be called, otherwise inspector does not close</short_desc>
          <delta_ts>2018-03-08 09:28:06 -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>Web Inspector</component>
          <version>Other</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>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Cédric Bellegarde">cedric.bellegarde</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>aperez</cc>
    
    <cc>bugs-noreply</cc>
    
    <cc>cgarcia</cc>
    
    <cc>clopez</cc>
    
    <cc>inspector-bugzilla-changes</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1384468</commentid>
    <comment_count>0</comment_count>
    <who name="Cédric Bellegarde">cedric.bellegarde</who>
    <bug_when>2017-12-22 07:41:12 -0800</bug_when>
    <thetext>When enabling inspector with &quot;developer-extras&quot;, the inspector window opened from default webkit menu can&apos;t be closed.

Adding a webkit_web_view_get_inspector() call fixes the issue. (Was not present in 2.16)

Exemple:
#!/usr/bin/python
from gi.repository import WebKit2
from gi.repository import Gtk

def close(window):
        Gtk.main_quit()

def main():
        Gtk.init()

        view = WebKit2.WebView()
        settings = view.get_settings()
        settings.set_property(&quot;enable-developer-extras&quot;, True)
        view.load_uri(&quot;http://google.fr&quot;)
        window = Gtk.Window()
        window.add(view)
        window.connect(&quot;destroy&quot;, close)
        window.show_all()

        Gtk.main()

main()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1384518</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2017-12-22 12:25:52 -0800</bug_when>
    <thetext>This one, I can reproduce. 2.18.3 is fine, trunk is not.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1384528</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2017-12-22 12:43:19 -0800</bug_when>
    <thetext>We could probably fix it by calling webkitWebInspectorCreate during WebKitWebView construction, instead of doing it lazily, but there&apos;s probably a better way, if we could figure out what changed here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1385110</commentid>
    <comment_count>3</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2018-01-02 05:10:50 -0800</bug_when>
    <thetext>I can&apos;t reproduce this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1403705</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-03-05 12:22:31 -0800</bug_when>
    <thetext>(In reply to Carlos Garcia Campos from comment #3)
&gt; I can&apos;t reproduce this.

Did you try the example in the first comment? MiniBrowser and epiphany both calls webkit_web_view_get_inspector(), which avoids the problem, so you won&apos;t be able to reproduce there.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1404287</commentid>
    <comment_count>5</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2018-03-07 00:39:34 -0800</bug_when>
    <thetext>I broke this in r218089</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1404288</commentid>
    <comment_count>6</comment_count>
      <attachid>335176</attachid>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2018-03-07 00:44:07 -0800</bug_when>
    <thetext>Created attachment 335176
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1404291</commentid>
    <comment_count>7</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2018-03-07 00:58:03 -0800</bug_when>
    <thetext>I can reproduce this with Dinghy (https://github.com/aperezdc/dinghy),
which is is a WPE launcher/browser. It can be built with against
WebKitGTK+ as well passing “-DDY_USE_WEBKITGTK=ON” to CMake. The issue
is present in both ports.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1404619</commentid>
    <comment_count>8</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2018-03-07 22:37:52 -0800</bug_when>
    <thetext>Committed r229396: &lt;https://trac.webkit.org/changeset/229396&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1404765</commentid>
    <comment_count>9</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2018-03-08 09:28:05 -0800</bug_when>
    <thetext>&lt;rdar://problem/38265943&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1404766</commentid>
    <comment_count>10</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2018-03-08 09:28:06 -0800</bug_when>
    <thetext>&lt;rdar://problem/38265944&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>335176</attachid>
            <date>2018-03-07 00:44:07 -0800</date>
            <delta_ts>2018-03-07 06:46:18 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>wk2-inspector-detach.diff</filename>
            <type>text/plain</type>
            <size>1614</size>
            <attacher name="Carlos Garcia Campos">cgarcia</attacher>
            
              <data encoding="base64">ZGlmZiA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HdlIG1pZ2h0IG5vdCBo
YXZlIGEgcGFyZW50IHlldC4K
</data>
<flag name="review"
          id="353849"
          type_id="1"
          status="+"
          setter="clopez"
    />
          </attachment>
      

    </bug>

</bugzilla>