Issue 102 in chromedevtools: CSS Property Editor Pane - Race Condition

3 views
Skip to first unread message

chromed...@googlecode.com

unread,
Oct 20, 2014, 2:33:35 PM10/20/14
to chromedev...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 102 by james.ke...@wishabi.com: CSS Property Editor Pane - Race
Condition
https://code.google.com/p/chromedevtools/issues/detail?id=102

Chrome 38.0.2125.104 dev tools.

There is a race condition between user entered text and code completion
when using the CSS property editor pane. On my machine, the code
completions are returning before '_applyFreeFlowStyleTextEditTimer' fires.

I noticed the issue when adding a new property to an element and after
hitting 'enter' the property was disappearing (extremely frustrating!).
Debugging it showed that when I was hitting enter an error was being
returned from 'CSS.setPropertyText' saying that the range was not valid.

The range was not valid because the editor pane's internal state thought
the auto-completed style was applied, when it had been overwritten by the
user input (which is usually shorter, hence the bad range).

Bug was most likely introduced when the semi=colon part of the CSS style
was made a fixture instead of part of the auto-completion suffix. You can
see there is a check for that case
@ 'WebInspector.StylePropertyTreeElement._applyFreeFlowStyleTextEdit'
(valueText.indexOf(";") === -1). (Sorry I don't have un-minified source
ready).

But that check would only protect the internal state, it would not fix the
actual race condition! Really 100ms for '_applyFreeFlowStyleTextEditTimer'
is simply too long.

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

chromed...@googlecode.com

unread,
Oct 20, 2014, 2:34:36 PM10/20/14
to chromedev...@googlegroups.com

Comment #1 on issue 102 by james.ke...@wishabi.com: CSS Property Editor
Oops, this is the wrong project.

chromed...@googlecode.com

unread,
Oct 21, 2014, 4:45:21 AM10/21/14
to chromedev...@googlegroups.com
Updates:
Status: Invalid

Comment #2 on issue 102 by apav...@chromium.org: CSS Property Editor Pane -
Race Condition
https://code.google.com/p/chromedevtools/issues/detail?id=102

(No comment was entered for this change.)
Reply all
Reply to author
Forward
0 new messages