[Webkit-unassigned] [Bug 128768] Web Inspector: Color Picker doesn't update color of CSS property

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 13 15:07:21 PST 2014


https://bugs.webkit.org/show_bug.cgi?id=128768





--- Comment #3 from Diego Pino <dpino at igalia.com>  2014-02-13 15:04:33 PST ---
(From update of attachment 224113)
To be honest I don'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 'colorTextMarker.find()' is null, so it dives into the 'if'. The code tries to find a marker with a flag '__markedColor', which was set on the previous pick but what I noticed is that none of the markers returned by 'findMarksAt(range.from)' have this flag, so 'colorTextMarker' 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 "range" (on the first pick colorTextMarker was of type "range") and doesn't have a property called '__cssProperty'. 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't know whether the patch is correct but in case is not I hope it can bring some light to the right solution.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list