<?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>50109</bug_id>
          
          <creation_ts>2010-11-26 06:20:15 -0800</creation_ts>
          <short_desc>Web Inspector: crash upon inspecting user style sheet.</short_desc>
          <delta_ts>2010-11-30 08:07:23 -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 (Deprecated)</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Pavel Feldman">pfeldman</reporter>
          <assigned_to name="Pavel Feldman">pfeldman</assigned_to>
          <cc>apavlov</cc>
    
    <cc>bweinstein</cc>
    
    <cc>commit-queue</cc>
    
    <cc>joepeck</cc>
    
    <cc>keishi</cc>
    
    <cc>loislo</cc>
    
    <cc>pfeldman</cc>
    
    <cc>pmuellr</cc>
    
    <cc>rik</cc>
    
    <cc>timothy</cc>
    
    <cc>yurys</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>313993</commentid>
    <comment_count>0</comment_count>
    <who name="Pavel Feldman">pfeldman</who>
    <bug_when>2010-11-26 06:20:15 -0800</bug_when>
    <thetext>Patch to follow.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>313994</commentid>
    <comment_count>1</comment_count>
      <attachid>74929</attachid>
    <who name="Pavel Feldman">pfeldman</who>
    <bug_when>2010-11-26 06:21:37 -0800</bug_when>
    <thetext>Created attachment 74929
[PATCH] Proposed change.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>314172</commentid>
    <comment_count>2</comment_count>
      <attachid>74929</attachid>
    <who name="Brian Weinstein">bweinstein</who>
    <bug_when>2010-11-28 02:46:41 -0800</bug_when>
    <thetext>Comment on attachment 74929
[PATCH] Proposed change.

View in context: https://bugs.webkit.org/attachment.cgi?id=74929&amp;action=review

&gt; WebCore/ChangeLog:7
&gt; +

Is there a reason resourceStyleSheetText crashes for user style sheets? A little more information here would be nice.

&gt; WebCore/inspector/InspectorStyleSheet.cpp:990
&gt; +    if (m_origin == &quot;user&quot; || m_origin == &quot;user-agent&quot;)
&gt; +        return false;

It looks like canBind() in InspectorStyleSheet.h checks for &quot;userAgent&quot;. Is there a difference between &quot;user-agent&quot; and &quot;userAgent&quot;? Should these checks match up? It would probably be nice to have those strings in constants as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>314309</commentid>
    <comment_count>3</comment_count>
    <who name="Alexander Pavlov (apavlov)">apavlov</who>
    <bug_when>2010-11-29 01:47:52 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 74929 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=74929&amp;action=review
&gt; &gt; WebCore/inspector/InspectorStyleSheet.cpp:990
&gt; &gt; +    if (m_origin == &quot;user&quot; || m_origin == &quot;user-agent&quot;)
&gt; &gt; +        return false;
&gt; 
&gt; It looks like canBind() in InspectorStyleSheet.h checks for &quot;userAgent&quot;. Is there a difference between &quot;user-agent&quot; and &quot;userAgent&quot;? Should these checks match up? It would probably be nice to have those strings in constants as well.

Yes, these two should match up. Pavel, can you please fix the occurrence to be &quot;user-agent&quot; (as required by CSSStyleModel.js)? Global constants would be really nice but it is quite tedious to set them up (as class static fields are not allowed in WebKit). Would be great if you could introduce them, though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>314348</commentid>
    <comment_count>4</comment_count>
    <who name="Alexander Pavlov (apavlov)">apavlov</who>
    <bug_when>2010-11-29 04:14:30 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; (In reply to comment #2)
&gt; &gt; (From update of attachment 74929 [details] [details])
&gt; &gt; View in context: https://bugs.webkit.org/attachment.cgi?id=74929&amp;action=review
&gt; &gt; &gt; WebCore/inspector/InspectorStyleSheet.cpp:990
&gt; &gt; &gt; +    if (m_origin == &quot;user&quot; || m_origin == &quot;user-agent&quot;)
&gt; &gt; &gt; +        return false;
&gt; &gt; 
&gt; &gt; It looks like canBind() in InspectorStyleSheet.h checks for &quot;userAgent&quot;. Is there a difference between &quot;user-agent&quot; and &quot;userAgent&quot;? Should these checks match up? It would probably be nice to have those strings in constants as well.
&gt; 
&gt; Yes, these two should match up. Pavel, can you please fix the occurrence to be &quot;user-agent&quot; (as required by CSSStyleModel.js)? Global constants would be really nice but it is quite tedious to set them up (as class static fields are not allowed in WebKit). Would be great if you could introduce them, though.

On the second thought I figured that this would make user-agent styles editable, which will break the CSS editing experience (all editing operations will fail for these styles). To fix this, we should either support editing of styles not backed by source code or implement retrieval of user-agent stylesheet text, as we discussed last Friday offline (the latter is preferable, of course).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>314506</commentid>
    <comment_count>5</comment_count>
      <attachid>74929</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2010-11-29 10:37:08 -0800</bug_when>
    <thetext>Comment on attachment 74929
[PATCH] Proposed change.

Clearing flags on attachment: 74929

Committed r72811: &lt;http://trac.webkit.org/changeset/72811&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>314507</commentid>
    <comment_count>6</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2010-11-29 10:37:13 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>314850</commentid>
    <comment_count>7</comment_count>
    <who name="Brian Weinstein">bweinstein</who>
    <bug_when>2010-11-29 21:16:05 -0800</bug_when>
    <thetext>I&apos;m confused why this was marked r+ and cq+ when there were clear objections to the patch raised in the bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>314851</commentid>
    <comment_count>8</comment_count>
    <who name="Brian Weinstein">bweinstein</who>
    <bug_when>2010-11-29 21:16:54 -0800</bug_when>
    <thetext>(In reply to comment #7)
&gt; I&apos;m confused why this was marked r+ and cq+ when there were clear objections to the patch raised in the bug.

Unless I missed some discussion offline that was relevant to the change being correct, I&apos;m still not sure why there is an example of &quot;userAgent&quot; and &quot;user-agent&quot; in the .h and .cpp files.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>315060</commentid>
    <comment_count>9</comment_count>
    <who name="Pavel Feldman">pfeldman</who>
    <bug_when>2010-11-30 08:07:23 -0800</bug_when>
    <thetext>(In reply to comment #8)
&gt; (In reply to comment #7)
&gt; &gt; I&apos;m confused why this was marked r+ and cq+ when there were clear objections to the patch raised in the bug.
&gt; 
&gt; Unless I missed some discussion offline that was relevant to the change being correct, I&apos;m still not sure why there is an example of &quot;userAgent&quot; and &quot;user-agent&quot; in the .h and .cpp files.

Hey, sorry about that. This change was fixing a nasty crasher, so I decided to give it a go (it is #1 crasher in the chromium nightly, i suppose same would be reported from webkit nightlies). The idea was that the part that you noticed was immediately followed up on by Alexander. This did not happen though due to the misunderstanding. We will follow up immediately. Sorry again.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>74929</attachid>
            <date>2010-11-26 06:21:37 -0800</date>
            <delta_ts>2010-11-29 10:37:07 -0800</delta_ts>
            <desc>[PATCH] Proposed change.</desc>
            <filename>style_crash</filename>
            <type>text/plain</type>
            <size>1114</size>
            <attacher name="Pavel Feldman">pfeldman</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1dlYkNvcmUvQ2hhbmdlTG9nIGIvV2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