<?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>128768</bug_id>
          
          <creation_ts>2014-02-13 14:41:37 -0800</creation_ts>
          <short_desc>Web Inspector: Color Picker doesn&apos;t update color of CSS property</short_desc>
          <delta_ts>2014-02-18 13:14:14 -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>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>128965</dup_id>
          
          <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="Diego Pino">dpino</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>chrisjshull</cc>
    
    <cc>joepeck</cc>
    
    <cc>timothy</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>980462</commentid>
    <comment_count>0</comment_count>
    <who name="Diego Pino">dpino</who>
    <bug_when>2014-02-13 14:41:37 -0800</bug_when>
    <thetext>When choosing the color for a CSS property using the color picker, the first pick works fine but subsequent color picks don&apos;t update the color of the CSS property.

Steps to reproduce (test file attached: test-red-color-square.html):

1. Open the Web Inspector, click on Inspect and select the red square.
2. In the Style side panel, click on the red swatch of the CSS property &apos;background-color&apos;. The color picker will pop up.
3. Select a new color on the color circle. The color of the red square and the swatch get updated.
4. Without closing the pop-up pick a new color again.

Expected result: the square and the swatch get updated.
Actual result: the square and the swatch remain the same.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>980464</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2014-02-13 14:42:08 -0800</bug_when>
    <thetext>&lt;rdar://problem/16063920&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>980468</commentid>
    <comment_count>2</comment_count>
      <attachid>224113</attachid>
    <who name="Diego Pino">dpino</who>
    <bug_when>2014-02-13 14:44:48 -0800</bug_when>
    <thetext>Created attachment 224113
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>980479</commentid>
    <comment_count>3</comment_count>
      <attachid>224113</attachid>
    <who name="Diego Pino">dpino</who>
    <bug_when>2014-02-13 15:04:33 -0800</bug_when>
    <thetext>Comment on attachment 224113
Patch

To be honest I don&apos;t really understand what are these markers :) I fixed the bug by checking what was inside the markers and suspecting that at least one of them has to be correct. First, an explanation about why the code is not currently working. 

The first time a color is picked, the conditional is false and that part is skipped. The second time a color is picked &apos;colorTextMarker.find()&apos; is null, so it dives into the &apos;if&apos;. The code tries to find a marker with a flag &apos;__markedColor&apos;, which was set on the previous pick but what I noticed is that none of the markers returned by &apos;findMarksAt(range.from)&apos; have this flag, so &apos;colorTextMarker&apos; is null and the function exists (no update of color).

Debugging the properties of the markers I noticed that the right marker is of type &quot;range&quot; (on the first pick colorTextMarker was of type &quot;range&quot;) and doesn&apos;t have a property called &apos;__cssProperty&apos;. Interestingly, this marker is always the second marker of the array (at least in the example I tested), so maybe this code can be simplified further.

I don&apos;t know whether the patch is correct but in case is not I hope it can bring some light to the right solution.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>980960</commentid>
    <comment_count>4</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2014-02-14 13:57:36 -0800</bug_when>
    <thetext>Interesting! I am curious why the range looses __markedColor. Overall I think the patch is correct and should work. However, it might fail in the future when we use markers for more things.

Finding out why __markedColor is missing would be good.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>981002</commentid>
    <comment_count>5</comment_count>
    <who name="Diego Pino">dpino</who>
    <bug_when>2014-02-14 14:45:13 -0800</bug_when>
    <thetext>Agree. I will try to take a further look into this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>981806</commentid>
    <comment_count>6</comment_count>
    <who name="Chris J. Shull">chrisjshull</who>
    <bug_when>2014-02-17 23:37:22 -0800</bug_when>
    <thetext>So I think I have this traced back. Any change in the CodeMirror editor for a CSSStyleDeclarationTextEditor updates the internal data model thru CSSAgent.setStyleText. This change percolates back as a refresh() on the DOMNodeStyles on the frontend, which then goes back to the backend with calls to CSSAgent.get*StylesForNode. The callbacks for this update() the CSSStyleDeclaration, which events WebInspector.CSSStyleDeclaration.Event.PropertiesChanged. CSSStyleDeclarationTextEditor picks up the event and calls _updateTextMarkers(), which first clears out all the existing text markers, then recreates the normal markers.

In essence, any CSSStyleDeclarationTextEditor change blows away any temporary markers like the one that was being defined here.

Hope that helps.

Here are the JS traces. It goes between the backend and frontend, and there are a few setTimeouts as well:

DOMNodeStyles.js:367: CONSOLE TRACE:
0: changeStyleText (DOMNodeStyles.js:367)
1: text (CSSStyleDeclaration.js:191)
2: _commitChanges (CSSStyleDeclarationTextEditor.js:273)
3: (unknown) ([native code])

DOMNodeStyles.js:246: CONSOLE TRACE:
0: refresh (DOMNodeStyles.js:246)
1: _refreshNodeStyles (StyleDetailsPanel.js:128)
2: _nodeStylesNeedsRefreshed (StyleDetailsPanel.js:159)
3: dispatch (Object.js:180)
4: dispatchEventToListeners (Object.js:187)
5: _markAsNeedsRefresh (DOMNodeStyles.js:867)
6: _styleSheetContentDidChange (DOMNodeStyles.js:883)
7: dispatch (Object.js:180)
8: dispatchEventToListeners (Object.js:187)
9: noteContentDidChange (CSSStyleSheet.js:150)
10: styleSheetChanged (CSSStyleManager.js:136)
11: styleSheetChanged (CSSObserver.js:43)
12: dispatch (InspectorBackend.js:262)
13: dispatchNextQueuedMessageFromBackend (MessageDispatcher.js:31)
14: (unknown) ([native code])

CSSStyleDeclaration.js:166: CONSOLE TRACE:
0: update (CSSStyleDeclaration.js:166)
1: _parseStyleDeclarationPayload (DOMNodeStyles.js:731)
2: _parseRulePayload (DOMNodeStyles.js:788)
3: parseRuleMatchArrayPayload (DOMNodeStyles.js:98)
4: fetchedMatchedStyles (DOMNodeStyles.js:121)
5: fetchedMatchedStyles ([native code])
6: dispatch (InspectorBackend.js:220)
7: dispatchNextQueuedMessageFromBackend (MessageDispatcher.js:31)
8: (unknown) ([native code])

CSSStyleDeclarationTextEditor.js:496: CONSOLE TRACE:
0: clear (CSSStyleDeclarationTextEditor.js:496)
1: _clearTextMarkers (CSSStyleDeclarationTextEditor.js:521)
2: update (CSSStyleDeclarationTextEditor.js:320)
3: update ([native code])
4: runInOp (External/CodeMirror/codemirror.js:1445)
5: operation (External/CodeMirror/codemirror.js:3223)
6: _updateTextMarkers (CSSStyleDeclarationTextEditor.js:386)
7: _propertiesChanged (CSSStyleDeclarationTextEditor.js:736)
8: dispatch (Object.js:180)
9: dispatchEventToListeners (Object.js:187)
10: delayed (CSSStyleDeclaration.js:164)
11: delayed ([native code])

CSSStyleDeclaration.js:166: CONSOLE TRACE:
0: update (CSSStyleDeclaration.js:166)
1: _parseStyleDeclarationPayload (DOMNodeStyles.js:731)
2: fetchedInlineStyles (DOMNodeStyles.js:153)
3: fetchedInlineStyles ([native code])
4: dispatch (InspectorBackend.js:220)
5: dispatchNextQueuedMessageFromBackend (MessageDispatcher.js:31)
6: (unknown) ([native code])

CSSStyleDeclaration.js:166: CONSOLE TRACE:
0: update (CSSStyleDeclaration.js:166)
1: fetchedComputedStyle (DOMNodeStyles.js:173)
2: fetchedComputedStyle ([native code])
3: dispatch (InspectorBackend.js:220)
4: dispatchNextQueuedMessageFromBackend (MessageDispatcher.js:31)
5: (unknown) ([native code])

CSSStyleDeclarationTextEditor.js:496: CONSOLE TRACE:
0: clear (CSSStyleDeclarationTextEditor.js:496)
1: _clearTextMarkers (CSSStyleDeclarationTextEditor.js:521)
2: update (CSSStyleDeclarationTextEditor.js:320)
3: update ([native code])
4: runInOp (External/CodeMirror/codemirror.js:1445)
5: operation (External/CodeMirror/codemirror.js:3223)
6: _updateTextMarkers (CSSStyleDeclarationTextEditor.js:386)
7: _propertiesChanged (CSSStyleDeclarationTextEditor.js:736)
8: dispatch (Object.js:180)
9: dispatchEventToListeners (Object.js:187)
10: delayed (CSSStyleDeclaration.js:164)
11: delayed ([native code])</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>981827</commentid>
    <comment_count>7</comment_count>
    <who name="Chris J. Shull">chrisjshull</who>
    <bug_when>2014-02-18 00:49:12 -0800</bug_when>
    <thetext>On line 644 there is this check:
if (mark.type === &quot;range&quot; &amp;&amp; !mark.__cssProperty) {

I&apos;m thinking that might be replaced this with this:
if (WebInspector.TextMarker.textMarkerForCodeMirrorTextMarker(mark).type === WebInspector.TextMarker.Type.Color) {

This might be less brittle to changes down the road.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>981864</commentid>
    <comment_count>8</comment_count>
    <who name="Diego Pino">dpino</who>
    <bug_when>2014-02-18 03:23:03 -0800</bug_when>
    <thetext>(In reply to comment #6)
&gt; So I think I have this traced back. Any change in the CodeMirror editor for a CSSStyleDeclarationTextEditor updates the internal data model thru CSSAgent.setStyleText. This change percolates back as a refresh() on the DOMNodeStyles on the frontend, which then goes back to the backend with calls to CSSAgent.get*StylesForNode. The callbacks for this update() the CSSStyleDeclaration, which events WebInspector.CSSStyleDeclaration.Event.PropertiesChanged. CSSStyleDeclarationTextEditor picks up the event and calls _updateTextMarkers(), which first clears out all the existing text markers, then recreates the normal markers.
&gt; 
&gt; In essence, any CSSStyleDeclarationTextEditor change blows away any temporary markers like the one that was being defined here.
&gt; 
&gt; Hope that helps.
&gt; 
&gt; Here are the JS traces. It goes between the backend and frontend, and there are a few setTimeouts as well:
&gt; 
&gt; DOMNodeStyles.js:367: CONSOLE TRACE:
&gt; 0: changeStyleText (DOMNodeStyles.js:367)
&gt; 1: text (CSSStyleDeclaration.js:191)
&gt; 2: _commitChanges (CSSStyleDeclarationTextEditor.js:273)
&gt; 3: (unknown) ([native code])
&gt; 
&gt; DOMNodeStyles.js:246: CONSOLE TRACE:
&gt; 0: refresh (DOMNodeStyles.js:246)
&gt; 1: _refreshNodeStyles (StyleDetailsPanel.js:128)
&gt; 2: _nodeStylesNeedsRefreshed (StyleDetailsPanel.js:159)
&gt; 3: dispatch (Object.js:180)
&gt; 4: dispatchEventToListeners (Object.js:187)
&gt; 5: _markAsNeedsRefresh (DOMNodeStyles.js:867)
&gt; 6: _styleSheetContentDidChange (DOMNodeStyles.js:883)
&gt; 7: dispatch (Object.js:180)
&gt; 8: dispatchEventToListeners (Object.js:187)
&gt; 9: noteContentDidChange (CSSStyleSheet.js:150)
&gt; 10: styleSheetChanged (CSSStyleManager.js:136)
&gt; 11: styleSheetChanged (CSSObserver.js:43)
&gt; 12: dispatch (InspectorBackend.js:262)
&gt; 13: dispatchNextQueuedMessageFromBackend (MessageDispatcher.js:31)
&gt; 14: (unknown) ([native code])
&gt; 
&gt; CSSStyleDeclaration.js:166: CONSOLE TRACE:
&gt; 0: update (CSSStyleDeclaration.js:166)
&gt; 1: _parseStyleDeclarationPayload (DOMNodeStyles.js:731)
&gt; 2: _parseRulePayload (DOMNodeStyles.js:788)
&gt; 3: parseRuleMatchArrayPayload (DOMNodeStyles.js:98)
&gt; 4: fetchedMatchedStyles (DOMNodeStyles.js:121)
&gt; 5: fetchedMatchedStyles ([native code])
&gt; 6: dispatch (InspectorBackend.js:220)
&gt; 7: dispatchNextQueuedMessageFromBackend (MessageDispatcher.js:31)
&gt; 8: (unknown) ([native code])
&gt; 
&gt; CSSStyleDeclarationTextEditor.js:496: CONSOLE TRACE:
&gt; 0: clear (CSSStyleDeclarationTextEditor.js:496)
&gt; 1: _clearTextMarkers (CSSStyleDeclarationTextEditor.js:521)
&gt; 2: update (CSSStyleDeclarationTextEditor.js:320)
&gt; 3: update ([native code])
&gt; 4: runInOp (External/CodeMirror/codemirror.js:1445)
&gt; 5: operation (External/CodeMirror/codemirror.js:3223)
&gt; 6: _updateTextMarkers (CSSStyleDeclarationTextEditor.js:386)
&gt; 7: _propertiesChanged (CSSStyleDeclarationTextEditor.js:736)
&gt; 8: dispatch (Object.js:180)
&gt; 9: dispatchEventToListeners (Object.js:187)
&gt; 10: delayed (CSSStyleDeclaration.js:164)
&gt; 11: delayed ([native code])
&gt; 
&gt; CSSStyleDeclaration.js:166: CONSOLE TRACE:
&gt; 0: update (CSSStyleDeclaration.js:166)
&gt; 1: _parseStyleDeclarationPayload (DOMNodeStyles.js:731)
&gt; 2: fetchedInlineStyles (DOMNodeStyles.js:153)
&gt; 3: fetchedInlineStyles ([native code])
&gt; 4: dispatch (InspectorBackend.js:220)
&gt; 5: dispatchNextQueuedMessageFromBackend (MessageDispatcher.js:31)
&gt; 6: (unknown) ([native code])
&gt; 
&gt; CSSStyleDeclaration.js:166: CONSOLE TRACE:
&gt; 0: update (CSSStyleDeclaration.js:166)
&gt; 1: fetchedComputedStyle (DOMNodeStyles.js:173)
&gt; 2: fetchedComputedStyle ([native code])
&gt; 3: dispatch (InspectorBackend.js:220)
&gt; 4: dispatchNextQueuedMessageFromBackend (MessageDispatcher.js:31)
&gt; 5: (unknown) ([native code])
&gt; 
&gt; CSSStyleDeclarationTextEditor.js:496: CONSOLE TRACE:
&gt; 0: clear (CSSStyleDeclarationTextEditor.js:496)
&gt; 1: _clearTextMarkers (CSSStyleDeclarationTextEditor.js:521)
&gt; 2: update (CSSStyleDeclarationTextEditor.js:320)
&gt; 3: update ([native code])
&gt; 4: runInOp (External/CodeMirror/codemirror.js:1445)
&gt; 5: operation (External/CodeMirror/codemirror.js:3223)
&gt; 6: _updateTextMarkers (CSSStyleDeclarationTextEditor.js:386)
&gt; 7: _propertiesChanged (CSSStyleDeclarationTextEditor.js:736)
&gt; 8: dispatch (Object.js:180)
&gt; 9: dispatchEventToListeners (Object.js:187)
&gt; 10: delayed (CSSStyleDeclaration.js:164)
&gt; 11: delayed ([native code])

Good job!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>981866</commentid>
    <comment_count>9</comment_count>
    <who name="Diego Pino">dpino</who>
    <bug_when>2014-02-18 03:25:25 -0800</bug_when>
    <thetext>(In reply to comment #7)
&gt; On line 644 there is this check:
&gt; if (mark.type === &quot;range&quot; &amp;&amp; !mark.__cssProperty) {
&gt; 
&gt; I&apos;m thinking that might be replaced this with this:
&gt; if (WebInspector.TextMarker.textMarkerForCodeMirrorTextMarker(mark).type === WebInspector.TextMarker.Type.Color) {
&gt; 
&gt; This might be less brittle to changes down the road.

Tested it and it works. I agree is better this way.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>982053</commentid>
    <comment_count>10</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2014-02-18 13:10:46 -0800</bug_when>
    <thetext>Antoine fixed this in bug 128965.

*** This bug has been marked as a duplicate of bug 128965 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>982056</commentid>
    <comment_count>11</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2014-02-18 13:14:14 -0800</bug_when>
    <thetext>Thanks for investigating.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>224113</attachid>
            <date>2014-02-13 14:44:48 -0800</date>
            <delta_ts>2014-02-18 13:11:12 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-128768-20140213234446.patch</filename>
            <type>text/plain</type>
            <size>2627</size>
            <attacher name="Diego Pino">dpino</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTY0MDI4CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViSW5zcGVj
dG9yVUkvQ2hhbmdlTG9nIGIvU291cmNlL1dl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SAwOyBpIDwgbWFy
a3MubGVuZ3RoOyArK2kpIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIHZhciBtYXJrID0gbWFy
a3NbaV07Ci0gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIW1hcmsuX19tYXJrZWRDb2xvcikK
LSAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsKLSAgICAgICAgICAgICAgICAg
ICAgICAgIGNvbG9yVGV4dE1hcmtlciA9IG1hcms7Ci0gICAgICAgICAgICAgICAgICAgICAgICBi
cmVhazsKKyAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgbWFyayBvZiB0aGlzLl9jb2RlTWly
cm9yLmZpbmRNYXJrc0F0KHJhbmdlLmZyb20pKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBp
ZiAobWFyay50eXBlID09PSAicmFuZ2UiICYmICFtYXJrLl9fY3NzUHJvcGVydHkpIHsKKyAgICAg
ICAgICAgICAgICAgICAgICAgICAgICBjb2xvclRleHRNYXJrZXIgPSBtYXJrOworICAgICAgICAg
ICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgICAgICAgICAgfQogICAg
ICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgfQogCkBAIC02NzIsNyArNjY3LDYg
QEAgV2ViSW5zcGVjdG9yLkNTU1N0eWxlRGVjbGFyYXRpb25UZXh0RWRpdG9yLnByb3RvdHlwZSA9
IHsKICAgICAgICAgICAgICAgICByYW5nZS50by5jaCA9IHJhbmdlLmZyb20uY2ggKyBuZXdDb2xv
clRleHQubGVuZ3RoOwogCiAgICAgICAgICAgICAgICAgY29sb3JUZXh0TWFya2VyID0gdGhpcy5f
Y29kZU1pcnJvci5tYXJrVGV4dChyYW5nZS5mcm9tLCByYW5nZS50byk7Ci0gICAgICAgICAgICAg
ICAgY29sb3JUZXh0TWFya2VyLl9fbWFya2VkQ29sb3IgPSB0cnVlOwogCiAgICAgICAgICAgICAg
ICAgc3dhdGNoLl9fY29sb3JUZXh0TWFya2VyID0gY29sb3JUZXh0TWFya2VyOwogICAgICAgICAg
ICAgfQo=
</data>
<flag name="review"
          id="248202"
          type_id="1"
          status="-"
          setter="timothy"
    />
          </attachment>
      

    </bug>

</bugzilla>