| Summary: | Web Inspector: CSS autofill suggests properties instead of values when values are needed | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Jonathan Wells <jonowells> | ||||
| Component: | Web Inspector | Assignee: | Nobody <webkit-unassigned> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | commit-queue, graouts, joepeck, timothy, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Attachments: |
|
||||||
|
Description
Jonathan Wells
2014-04-23 16:34:39 PDT
Created attachment 230108 [details]
[PATCH] Proposed Fix: Updated to CSS mode handling to fix autocomplete, other issues
Comment on attachment 230108 [details] [PATCH] Proposed Fix: Updated to CSS mode handling to fix autocomplete, other issues View in context: https://bugs.webkit.org/attachment.cgi?id=230108&action=review r=me > Source/WebInspectorUI/ChangeLog:13 > + data structure. All references to state.stack are obscelete. Many Typo: obscelete > Source/WebInspectorUI/ChangeLog:884 > - Add missing semicolon. > + Add missing semicolon. I wonder if commit queue will allow a patch that fixes this trailing whitespace. Maybe it will, maybe it won't. > Source/WebInspectorUI/Tools/PrettyPrinting/CodeMirrorFormatters.js:398 > + if (!state.stack || !state.stack.length || state.stack.lastValue === "@media{") These only fix the exception, but I assume they don't make CSS pretty printing work? That's right, this just fixes the exception. See https://bugs.webkit.org/show_bug.cgi?id=132149 Good question re: the whitespace. I meant to remove that and did so incorrectly. That should be done in a separate patch probably. Comment on attachment 230108 [details] [PATCH] Proposed Fix: Updated to CSS mode handling to fix autocomplete, other issues Clearing flags on attachment: 230108 Committed r167779: <http://trac.webkit.org/changeset/167779> All reviewed patches have been landed. Closing bug. Comment on attachment 230108 [details] [PATCH] Proposed Fix: Updated to CSS mode handling to fix autocomplete, other issues View in context: https://bugs.webkit.org/attachment.cgi?id=230108&action=review > Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorCompletionController.js:523 > + if (!mainToken.state || !mainToken.state.state || !mainToken.state.state === "block") > return []; This is not right. The while loop later looks for "prop", but this returns early if there is no "block" state. This needs to do a similar contains check up the state stack for "block". As-is only proper name completions will work, property value completions will not work. But maybe you intended to fix this in the other bug. Yes, this was just a quick fix to avoid total breakage of the inspector. Plan to rework in https://bugs.webkit.org/show_bug.cgi?id=132149 |