<?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>71465</bug_id>
          
          <creation_ts>2011-11-03 06:25:10 -0700</creation_ts>
          <short_desc>[GTK][DRT] implement FrameLoaderClient::didDetectXSS</short_desc>
          <delta_ts>2012-12-11 07:16:08 -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>DUPLICATE</resolution>
          <dup_id>104444</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Gtk, LayoutTestFailure</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>72166</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Philippe Normand">pnormand</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>mrobinson</cc>
    
    <cc>zan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>495405</commentid>
    <comment_count>0</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2011-11-03 06:25:10 -0700</bug_when>
    <thetext>It was added in http://trac.webkit.org/changeset/99096
Test: http/tests/security/xssAuditor/script-tag-with-callbacks.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>496420</commentid>
    <comment_count>1</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2011-11-04 13:36:19 -0700</bug_when>
    <thetext>Looking around this test, I&apos;ve seen that FrameLoaderClient::didDetectXSS is called, so the line containing &apos;didDetectXSS&apos; should be written into output, but the problem occurs when transporting this information to DumpRenderTree.

When bringing up layout tests support for Clutter&apos;s port of WebKit, I created a DRTSupportGObject singleton structure[1][1.1]. Its purpose is to hold various signals that could easily be emitted from WebKit library[2] and to which it would be simple to connect[3] and then output the gathered information[4].

I propose the same kind of approach to be utilized in the Gtk port. Of course, in a different bug.


[1] https://gitorious.org/webkit-clutter/webkit-clutter/blobs/master/Source/WebKit/gobject/WebCoreSupport/DumpRenderTreeSupportGObject.cpp
[1.1] https://gitorious.org/webkit-clutter/webkit-clutter/blobs/master/Source/WebKit/clutter/WebCoreSupport/DumpRenderTreeSupportClutter.cpp#line85
[2] https://gitorious.org/webkit-clutter/webkit-clutter/blobs/master/Source/WebKit/gobject/WebCoreSupport/FrameLoaderClientGObject.cpp#line803
[3] https://gitorious.org/webkit-clutter/webkit-clutter/blobs/master/Tools/DumpRenderTree/clutter/DumpRenderTree.cpp#line799
[4] https://gitorious.org/webkit-clutter/webkit-clutter/blobs/master/Tools/DumpRenderTree/clutter/DumpRenderTree.cpp#line732</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>496431</commentid>
    <comment_count>2</comment_count>
    <who name="Martin Robinson">mrobinson</who>
    <bug_when>2011-11-04 13:42:48 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; Looking around this test, I&apos;ve seen that FrameLoaderClient::didDetectXSS is called, so the line containing &apos;didDetectXSS&apos; should be written into output, but the problem occurs when transporting this information to DumpRenderTree.

Do other ports expose this in their API? It might be useful to just add the signal.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>496461</commentid>
    <comment_count>3</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2011-11-04 14:13:46 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; (In reply to comment #1)
&gt; &gt; Looking around this test, I&apos;ve seen that FrameLoaderClient::didDetectXSS is called, so the line containing &apos;didDetectXSS&apos; should be written into output, but the problem occurs when transporting this information to DumpRenderTree.
&gt; 
&gt; Do other ports expose this in their API? It might be useful to just add the signal.

Chromium and Mac seem to do so, while Win doesn&apos;t implement it yet and Qt only outputs &apos;didDetectXSS&apos; if in test mode.

This seems to be a worthy candidate for exposing it in our API. With some further direction -- where (object-wise) and how (method-wise, signal probably) to put it -- I can put a patch together.

Still, spare a thought for that DRTGObject. I find it to be an efficient way of translating information towards DumpRenderTree, especially in cases when decisions haven&apos;t yet been made about APIs or if the information is for testing purposes only.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>496467</commentid>
    <comment_count>4</comment_count>
    <who name="Martin Robinson">mrobinson</who>
    <bug_when>2011-11-04 14:22:57 -0700</bug_when>
    <thetext>(In reply to comment #3)

&gt; Still, spare a thought for that DRTGObject. I find it to be an efficient way of translating information towards DumpRenderTree, especially in cases when decisions haven&apos;t yet been made about APIs or if the information is for testing purposes only.

It sounds like a decent idea to me. Currently we try to hide signals like this by simply not documenting them. That isn&apos;t a great method. If we go this route I&apos;d prefer to move all of DumpRenderTreeSupport to this object. We&apos;d also need to be sure to hide it from gtkdoc.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>499299</commentid>
    <comment_count>5</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2011-11-09 13:20:52 -0800</bug_when>
    <thetext>Marked this bug to depend on #71948.

The work in #71948 will also include implementation of FrameLoaderClientGtk::didDetectXSS. When this function will be called, a signal will be emitted on WebKitWebFrame on which we should be able to connect in DumpRenderTree and then properly show that the signal was received as needed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>676828</commentid>
    <comment_count>6</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2012-07-24 08:09:43 -0700</bug_when>
    <thetext>Given the focus is now shifting towards WebKit2 APIs and WebKit2 in general, meaning new API additions to WebKit1 don&apos;t really make sense, I&apos;m going to close this bug as a WONTFIX.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>788426</commentid>
    <comment_count>7</comment_count>
    <who name="Martin Robinson">mrobinson</who>
    <bug_when>2012-12-11 07:16:08 -0800</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 104444 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>