<?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>162387</bug_id>
          
          <creation_ts>2016-09-22 06:31:23 -0700</creation_ts>
          <short_desc>REGRESSION(r206165): [GTK] Web inspector broken since r206165</short_desc>
          <delta_ts>2016-09-22 17:57:15 -0700</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>WebKit Local Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=162254</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=162475</see_also>
          <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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Carlos Garcia Campos">cgarcia</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>achristensen</cc>
    
    <cc>bugs-noreply</cc>
    
    <cc>joepeck</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>sam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1232424</commentid>
    <comment_count>0</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2016-09-22 06:31:23 -0700</bug_when>
    <thetext>Web inspector no longer works after r206165 because it fails to load all resources with messages like:

CONSOLE ERROR Refused to load resource:///org/webkitgtk/inspector/UserInterface/External/CodeMirror/codemirror.css because it does not appear in the style-src directive of the Content Security Policy.
CONSOLE ERROR Refused to load resource:///org/webkitgtk/inspector/UserInterface/External/CodeMirror/codemirror.js because it does not appear in the script-src directive of the Content Security Policy.

Adding resource: to style-src or script-src doesn&apos;t work, resources are indeed loaded, but then it fails with:

resource:///org/webkitgtk/inspector/UserInterface/Base/Setting.js:61:44: CONSOLE ERROR SecurityError (DOM Exception 18): The operation is insecure.
resource:///org/webkitgtk/inspector/UserInterface/Main.html:1:21: CONSOLE ERROR ReferenceError: Can&apos;t find variable: InspectorFrontendAPI

Because since r206165 resource scheme is considered as unique origin. Simply including resource in the list of schemes checked in shouldTreatAsUniqueOrigin() would fix it, but I&apos;m not sure it&apos;s really correct, because that&apos;s supposed to be the list of special schemes according to the spec (https://url.spec.whatwg.org/#origin).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1232583</commentid>
    <comment_count>1</comment_count>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2016-09-22 13:27:45 -0700</bug_when>
    <thetext>(In reply to comment #0)
&gt; Simply including resource in the list of schemes checked in shouldTreatAsUniqueOrigin() would fix it, but I&apos;m not sure it&apos;s really correct.
That would indeed not be correct.  Why are these not file urls?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1232590</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-09-22 13:44:38 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; That would indeed not be correct.  Why are these not file urls?

With GResources, the files get bundled into the ELF executable by glib-compile-resources so that we can do fast sync I/O without error checking, and don&apos;t have to worry about users messing with or removing the files. It&apos;s the best practice for distributing data files on our platform. See https://blogs.gnome.org/alexl/2012/01/26/resources-in-glib/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1232731</commentid>
    <comment_count>3</comment_count>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2016-09-22 17:56:55 -0700</bug_when>
    <thetext>There are more problems similar to this.  I think the correct solution is using https://bugs.webkit.org/show_bug.cgi?id=162475</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>