<?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>166786</bug_id>
          
          <creation_ts>2017-01-06 16:50:52 -0800</creation_ts>
          <short_desc>REGRESSION(r208886) Web Inspector: Toggling CSS Properties in Styles Sidebar (comment / uncomment)</short_desc>
          <delta_ts>2017-01-06 22:54:58 -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>WebKit 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>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Joseph Pecoraro">joepeck</reporter>
          <assigned_to name="Joseph Pecoraro">joepeck</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>dino</cc>
    
    <cc>hyatt</cc>
    
    <cc>inspector-bugzilla-changes</cc>
    
    <cc>joepeck</cc>
    
    <cc>nvasilyev</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1264573</commentid>
    <comment_count>0</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2017-01-06 16:50:52 -0800</bug_when>
    <thetext>Summary:
Toggling CSS Properties in Styles Sidebar (comment / uncomment)

Modifications enabled in by the new CSS Parser backend (r208886 and turned on in r209396) introduced some issues toggling CSS properties in Web Inspector&apos;s Style Sidebar.

Steps to Reproduce: Toggling an individual CSS Properties
1. Inspect the div.post.odd of &lt;http://bogojoker.com/shell/&gt;
2. Show the Styles &gt; Rules in the Sidebar
3. Check / Uncheck the checkbox for the &quot;background: #EFF2FF;&quot; property for the &quot;.odd&quot; rule
  =&gt; Does not behave as expected

Steps to Reproduce: Toggling a group of Properties
1. Inspect the div.post.odd of &lt;http://bogojoker.com/shell/&gt;
2. Show the Styles &gt; Rules in the Sidebar
3. Click the [{}] icon for some of the rules
  =&gt; Does not behave as expected

Notes:
- The root cause here is the backend is sending new, potentially useful, data to the frontend that the frontend doesn&apos;t know how to deal with. The frontend ends up dealing with it very poorly.

As a first step, this bug will handle getting us back to the previous behavior.

We can then follow-up with a bug that will fix the frontend to handle the new data.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1264574</commentid>
    <comment_count>1</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2017-01-06 16:51:09 -0800</bug_when>
    <thetext>&lt;rdar://problem/29767412&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1264577</commentid>
    <comment_count>2</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2017-01-06 17:04:08 -0800</bug_when>
    <thetext>*** Bug 166297 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1264579</commentid>
    <comment_count>3</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2017-01-06 17:04:53 -0800</bug_when>
    <thetext>*** Bug 165831 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1264583</commentid>
    <comment_count>4</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2017-01-06 17:12:19 -0800</bug_when>
    <thetext>For some context. Toggling commenting out a property the frontend makes the same modification, but the response changed.

    [Log] request: {
        &quot;id&quot;: 157,
        &quot;method&quot;: &quot;CSS.setStyleText&quot;,
        &quot;params&quot;: {
            &quot;styleId&quot;: {
                &quot;styleSheetId&quot;: &quot;4&quot;,
                &quot;ordinal&quot;: 4
            },
            &quot;text&quot;: &quot;\n    /* background: #EFF2FF; */\n&quot;
        }
    }

Before the new path the frontend just got the text with no information about commented &quot;disabled&quot; properties:

    [Log] response: {
        &quot;result&quot;: {
            &quot;style&quot;: {
                &quot;cssProperties&quot;: [],
                &quot;shorthandEntries&quot;: [],
                &quot;styleId&quot;: { &quot;styleSheetId&quot;: &quot;16&quot;, &quot;ordinal&quot;: 4 },
                &quot;range&quot;: {
                    &quot;startLine&quot;: 9,
                    &quot;startColumn&quot;: 6,
                    &quot;endLine&quot;: 11,
                    &quot;endColumn&quot;: 0
                },
                &quot;cssText&quot;: &quot;\n    /* background: #EFF2FF; */\n&quot;
            }
        },
        &quot;id&quot;: 361
    }

Now in trunk we get extra information about the commented out property!

    [Log] response: {
        &quot;result&quot;: {
            &quot;style&quot;: {
                &quot;cssProperties&quot;: [{
                    &quot;name&quot;: &quot;background&quot;,
                    &quot;value&quot;: &quot;#EFF2FF&quot;,
                    &quot;text&quot;: &quot;/* background: #EFF2FF; */&quot;,
                    &quot;status&quot;: &quot;disabled&quot;
                }],
                &quot;shorthandEntries&quot;: [],
                &quot;styleId&quot;: { &quot;styleSheetId&quot;: &quot;4&quot;, &quot;ordinal&quot;: 4 },
                &quot;range&quot;: {
                    &quot;startLine&quot;: 9,
                    &quot;startColumn&quot;: 6,
                    &quot;endLine&quot;: 11,
                    &quot;endColumn&quot;: 0
                },
                &quot;cssText&quot;: &quot;\n    /* background: #EFF2FF; */\n&quot;
            }
        },
        &quot;id&quot;: 157
    }

The frontend isn&apos;t properly handling these kinds of (status &quot;disabled&quot;) properties.

Ultimately we should, this is added data that may be useful in the future. But fixing the frontend is a much larger and riskier change.

As a quick fix, to keep the new CSS parser enabled, lets get the backend back to what it was doing and investigate taking advantage of the new data in the frontend.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1264634</commentid>
    <comment_count>5</comment_count>
      <attachid>298253</attachid>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2017-01-06 20:12:47 -0800</bug_when>
    <thetext>Created attachment 298253
[PATCH] Proposed Fix</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1264640</commentid>
    <comment_count>6</comment_count>
      <attachid>298253</attachid>
    <who name="Blaze Burg">bburg</who>
    <bug_when>2017-01-06 20:27:11 -0800</bug_when>
    <thetext>Comment on attachment 298253
[PATCH] Proposed Fix

r=me

Is this exercised by a test? Please consider to write one for the fix of 166787.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1264657</commentid>
    <comment_count>7</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2017-01-06 22:29:05 -0800</bug_when>
    <thetext>(In reply to comment #6)
&gt; Comment on attachment 298253 [details]
&gt; [PATCH] Proposed Fix
&gt; 
&gt; r=me
&gt; 
&gt; Is this exercised by a test?

No because this is disabling the new behavior that will be enabled once we address the FIXME. Meaning, we don&apos;t currently support and haven&apos;t had to support status &quot;disabled&quot; previously, and this change brings us back in line with that.

&gt; Please consider to write one for the fix of 166787.

Yep that is the plan. When we enable this on the backend and frontend we should have tests for this since the protocol messages will be different (containing information they didn&apos;t contain before).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1264659</commentid>
    <comment_count>8</comment_count>
      <attachid>298253</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2017-01-06 22:54:53 -0800</bug_when>
    <thetext>Comment on attachment 298253
[PATCH] Proposed Fix

Clearing flags on attachment: 298253

Committed r210472: &lt;http://trac.webkit.org/changeset/210472&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1264660</commentid>
    <comment_count>9</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2017-01-06 22:54:58 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>298253</attachid>
            <date>2017-01-06 20:12:47 -0800</date>
            <delta_ts>2017-01-06 22:54:53 -0800</delta_ts>
            <desc>[PATCH] Proposed Fix</desc>
            <filename>comments-1.patch</filename>
            <type>text/plain</type>
            <size>1907</size>
            <attacher name="Joseph Pecoraro">joepeck</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZyBiL1NvdXJjZS9XZWJDb3JlL0No
YW5nZUxvZwppbmRleCAxM2U5MzdhLi42YzliYTU4IDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViQ29y
ZS9DaGFuZ2VMb2cKKysrIGIvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTcg
QEAKKzIwMTctMDEtMDYgIEpvc2VwaCBQZWNvcmFybyAgPHBlY29yYXJvQGFwcGxlLmNvbT4KKwor
ICAgICAgICBSRUdSRVNTSU9OKHIyMDg4ODYpIFdlYiBJbnNwZWN0b3I6IFRvZ2dsaW5nIENTUyBQ
cm9wZXJ0aWVzIGluIFN0eWxlcyBTaWRlYmFyIChjb21tZW50IC8gdW5jb21tZW50KQorICAgICAg
ICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9MTY2Nzg2CisgICAgICAg
IDxyZGFyOi8vcHJvYmxlbS8yOTc2NzQxMj4KKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkg
KE9PUFMhKS4KKworICAgICAgICAqIGluc3BlY3Rvci9JbnNwZWN0b3JTdHlsZVNoZWV0LmNwcDoK
KyAgICAgICAgKFdlYkNvcmU6Okluc3BlY3RvclN0eWxlOjpwb3B1bGF0ZUFsbFByb3BlcnRpZXMp
OgorICAgICAgICBNYXRjaCBlYXJsaWVyIGJlaGF2aW9yIGFuZCBkb24ndCBzZW5kIHRoZSBmcm9u
dGVuZCBpbmZvcm1hdGlvbiBhYm91dAorICAgICAgICBkaXNhYm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