Changeset 167779 in webkit
- Timestamp:
- Apr 24, 2014 3:29:16 PM (10 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 1 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r167756 r167779 1 2014-04-24 Jonathan Wells <jonowells@apple.com> 2 3 Web Inspector: CSS autofill suggests properties instead of values when values are needed 4 https://bugs.webkit.org/show_bug.cgi?id=132090 5 6 Reviewed by Joseph Pecoraro. 7 8 Updates are required to the CodeMirror helpers to be compatible with 9 CodeMirror 4. Some of those changes have been made to fix an issue 10 with CSS autofill, CSS code coloring, and also 11 https://bugs.webkit.org/show_bug.cgi?id=131859. The main issue is that 12 CodeMirror 4's CSS mode (css.js) stores its parsing modes in a different 13 data structure. All references to state.stack are obscelete. Many 14 are fixed here and more will be in an upcoming patch. 15 16 * Tools/PrettyPrinting/CodeMirrorFormatters.js: Removed exception for checking state.stack properties. 17 * UserInterface/Controllers/CodeMirrorCompletionController.js: 18 (WebInspector.CodeMirrorCompletionController.prototype._generateCSSCompletions): Corrected "block" state detection. 19 * UserInterface/External/CodeMirror/less.js: Removed. 20 * UserInterface/Views/CodeMirrorAdditions.js: Sets default state of "block" correctly. 21 * UserInterface/Views/CodeMirrorFormatters.js: Removed exception for checking state.stack properties. 22 * UserInterface/Views/SyntaxHighlightingDefaultTheme.css: Fix styles to match CSS mode changes. 23 1 24 2014-04-24 Antoine Quint <graouts@webkit.org> 2 25 … … 307 330 * UserInterface/Models/DOMNode.js: 308 331 * UserInterface/Views/DOMNodeDetailsSidebarPanel.js: 309 * UserInterface/Views/Main.css: 332 * UserInterface/Views/Main.css: 310 333 311 334 2014-03-28 Joseph Pecoraro <pecoraro@apple.com> … … 859 882 * UserInterface/Views/DataGrid.js: 860 883 (WebInspector.DataGrid.prototype.removeChild): 861 Add missing semicolon. 884 Add missing semicolon. 862 885 863 886 2014-03-12 Brian Burg <bburg@apple.com> … … 2050 2073 sizing information as a string and parse only the gradient stops as the sizing information is only useful to show 2051 2074 in an editor if attached to an element with metrics. 2052 2075 2053 2076 Since instances of Gradient are used as the .value property of CodeMirrorGradientEditingController, we implement 2054 2077 the required .copy() and .toString() methods. The .toString() implementations are aware of default values for angles … … 2196 2219 New class meant to be subclassed by any future editing controller, and already subclassed by 2197 2220 CodeMirrorColorEditingController. This class exposes several hooks for subclasses to customize its behavior: 2198 2221 2199 2222 .initialValue: a value we can revert to if the editing is canceled 2200 2223 .cssClassName: a CSS class name that can be added to the editing controller's container … … 2205 2228 being added to the DOM and setting of the necessary machinery to update the serialized value in the editor based on interaction 2206 2229 within the popover without changing the serialized value upon showing the popover the very first time. 2207 2230 2208 2231 Additionally, the .value property must be an object supporting .toString() and .copy() method. 2209 2232 2210 2233 Finally, the .editingControllerDidStartEditing() and .editingControllerDidFinishEditing() delegate methods are fired 2211 as editing begins and finishes. 2234 as editing begins and finishes. 2212 2235 2213 2236 (WebInspector.CodeMirrorEditingController): … … 2254 2277 We remove the assumption that a HoverMenu is only used to draw a single rounded rect based on a simple 2255 2278 Rect and instead support presentation based on an array of Rects where we either: 2256 2279 2257 2280 - draw a single rounded rectangle if there is only a single Rect provided 2258 2281 - draw two disconnected open-ended rects if we're provided with two non-overlapping Rects … … 2551 2574 Reviewed by Timothy Hatcher. 2552 2575 2553 Add a RuntimeManager event that the scope chain details sidebar can 2576 Add a RuntimeManager event that the scope chain details sidebar can 2554 2577 listen to to trigger refresh. 2555 2578 … … 4190 4213 * UserInterface/DebuggerSidebarPanel.js: 4191 4214 (WebInspector.DebuggerSidebarPanel.prototype.restoreStateFromCookie): 4192 Drive-by fix to pass along relaxedMatchDelay to the superclass. 4215 Drive-by fix to pass along relaxedMatchDelay to the superclass. 4193 4216 4194 4217 * UserInterface/Main.js: … … 5388 5411 WebInspector.TextMarker. Additionally, create a WebInspector.TextMarker with type 5389 5412 WebInspector.TextMarker.Type.Color in createColorMarkers(). 5390 5413 5391 5414 * UserInterface/CodeMirrorColorEditingController.js: 5392 5415 (WebInspector.CodeMirrorColorEditingController): … … 5747 5770 { 5748 5771 "regionFlow": <Reference to the ContentFlow object referenced by the -webkit-flow-from property of the node>, 5749 "contentFlow": <Reference to the ContentFlow object referenced by the -webkit-flow-into property of 5772 "contentFlow": <Reference to the ContentFlow object referenced by the -webkit-flow-into property of 5750 5773 the node or a parent of the node>, 5751 5774 "regions": [ list of DOMNodes representing the regions containers of the node. The node is split across all these regions. ] … … 6173 6196 Automatically dispatch a contextmenu event in case WebInspector.ContextMenu.prototype.show() 6174 6197 is called outside of a contextmenu event handler and would therefore not show the expected 6175 context menu (except in the Remote Web Inspector where this already works). 6198 context menu (except in the Remote Web Inspector where this already works). 6176 6199 6177 6200 * UserInterface/ContextMenu.js: … … 6426 6449 shrink the popover instead of shifting it to fit within the container frame. We now first 6427 6450 shift the preferred frame before getting its intersection with the container frame to 6428 avoid such situations. 6451 avoid such situations. 6429 6452 6430 6453 * UserInterface/Popover.js: … … 6595 6618 2013-11-06 Timothy Hatcher <timothy@apple.com> 6596 6619 6597 Fix the display of query parameters when the value is missing. 6620 Fix the display of query parameters when the value is missing. 6598 6621 6599 6622 https://bugs.webkit.org/show_bug.cgi?id=123920 … … 6822 6845 Reviewed by Timothy Hatcher. 6823 6846 6824 Moved some global functions out of Main.js, so that they can be used in the 6847 Moved some global functions out of Main.js, so that they can be used in the 6825 6848 layout tests without including Main.js. 6826 6849 … … 7224 7247 when either the Cmd key is pressed (NonSymbolTokens mode) or when the debugger is paused 7225 7248 (JavaScriptExpression mode). 7226 7249 7227 7250 The tokenTrackingController is now smarter about how it tracks mouse events when it's enabled, 7228 7251 tracking "mouseenter" and "mouseleave" events to enable tracking allowing immediate detection of -
trunk/Source/WebInspectorUI/Tools/PrettyPrinting/CodeMirrorFormatters.js
r155659 r167779 338 338 return 1; 339 339 if (content === ",") { // "a,b,c,...,z{}" rule list at top level or in @media top level and only if the line length will be large. 340 if ((!state.stack .length || state.stack.lastValue === "@media{") && state._cssPrettyPrint.lineLength > 60) {340 if ((!state.stack || !state.stack.length || state.stack.lastValue === "@media{") && state._cssPrettyPrint.lineLength > 60) { 341 341 state._cssPrettyPrint.lineLength = 0; 342 342 return 1; … … 396 396 // This isn't exact line length, only the builder knows that, but it is good enough to get an idea. 397 397 // If we are at a top level, keep track of the current line length, otherwise we reset to 0. 398 if (!state.stack .length || state.stack.lastValue === "@media{")398 if (!state.stack || !state.stack.length || state.stack.lastValue === "@media{") 399 399 state._cssPrettyPrint.lineLength += content.length; 400 400 else -
trunk/Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorCompletionController.js
r164543 r167779 519 519 _generateCSSCompletions: function(mainToken, base, suffix) 520 520 { 521 // We only support completion inside CSS rules.522 if (!mainToken.state || !mainToken.state.sta ck || !mainToken.state.stack.contains("rule"))521 // We only support completion inside CSS block context. 522 if (!mainToken.state || !mainToken.state.state || !mainToken.state.state === "block") 523 523 return []; 524 524 … … 527 527 528 528 // Scan backwards looking for the current property. 529 while (token.state.sta ck.lastValue === "propertyValue") {529 while (token.state.state === "prop") { 530 530 // Found the beginning of the line. Go to the previous line. 531 531 if (!token.start) { -
trunk/Source/WebInspectorUI/UserInterface/Views/CodeMirrorAdditions.js
r164543 r167779 234 234 var state = this._startState(base); 235 235 236 // Start the stack offlike it has already parsed a rule. This causes everything236 // Start off the state stack like it has already parsed a rule. This causes everything 237 237 // after to be parsed as properties in a rule. 238 state.stack = ["rule"]; 238 state.state = "block"; 239 state.context.type = "block"; 239 240 240 241 return state; -
trunk/Source/WebInspectorUI/UserInterface/Views/CodeMirrorFormatters.js
r164543 r167779 338 338 return 1; 339 339 if (content === ",") { // "a,b,c,...,z{}" rule list at top level or in @media top level and only if the line length will be large. 340 if ((!state.stack .length || state.stack.lastValue === "@media{") && state._cssPrettyPrint.lineLength > 60) {340 if ((!state.stack || !state.stack.length || state.stack.lastValue === "@media{") && state._cssPrettyPrint.lineLength > 60) { 341 341 state._cssPrettyPrint.lineLength = 0; 342 342 return 1; … … 396 396 // This isn't exact line length, only the builder knows that, but it is good enough to get an idea. 397 397 // If we are at a top level, keep track of the current line length, otherwise we reset to 0. 398 if (!state.stack .length || state.stack.lastValue === "@media{")398 if (!state.stack || !state.stack.length || state.stack.lastValue === "@media{") 399 399 state._cssPrettyPrint.lineLength += content.length; 400 400 else -
trunk/Source/WebInspectorUI/UserInterface/Views/SyntaxHighlightingDefaultTheme.css
r167294 r167779 46 46 .cm-s-default .cm-atom, 47 47 .cm-s-default .cm-keyword, 48 .cm-s-default .cm-m-css.cm- tag,48 .cm-s-default .cm-m-css.cm-atom, 49 49 .cm-s-default .cm-m-css.cm-meta, 50 50 .cm-s-default .cm-m-css.cm-variable-3, 51 .cm-s-default .cm-m-css.cm-property, 51 52 .cm-s-default .cm-m-javascript.cm-builtin, 52 53 .syntax-highlighted .css-keyword, … … 60 61 61 62 .cm-s-default .cm-number, 62 .cm-s-default .cm-m-css.cm-atom,63 63 .syntax-highlighted .css-number, 64 64 .syntax-highlighted .javascript-number { … … 69 69 .cm-s-default .cm-bracket, 70 70 .cm-s-default .cm-operator, 71 .cm-s-default .cm-qualifier,72 71 .cm-s-default .cm-variable, 73 72 .cm-s-default .cm-variable-2, 73 .cm-s-default .cm-m-css.cm-tag, 74 74 .cm-s-default .cm-m-css.cm-string-2, 75 75 .cm-s-default .cm-m-css.cm-builtin, 76 .cm-s-default .cm-m-css.cm- property,76 .cm-s-default .cm-m-css.cm-qualifier, 77 77 .syntax-highlighted .css-property, 78 78 .syntax-highlighted .css-selector,
Note: See TracChangeset
for help on using the changeset viewer.