Title: [191187] trunk/Source/WebInspectorUI
Revision
191187
Author
commit-qu...@webkit.org
Date
2015-10-16 11:20:39 -0700 (Fri, 16 Oct 2015)

Log Message

Web Inspector: Add "unset" to CSS value autocompletion
https://bugs.webkit.org/show_bug.cgi?id=127616

Patch by Joseph Pecoraro <pecor...@apple.com> on 2015-10-16
Reviewed by Brian Burg.

* UserInterface/Models/CSSCompletions.js:
* UserInterface/Models/CSSKeywordCompletions.js:
(WebInspector.CSSKeywordCompletions.forProperty):
Treat "unset" similiar to "initial". Also, no need for "initial"
in an individual property's list. We always include it.

* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel):
(WebInspector.VisualStyleDetailsPanel.prototype._populateDisplaySection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateAlignmentSection):
Add "Unset" alongside "Initial".

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (191186 => 191187)


--- trunk/Source/WebInspectorUI/ChangeLog	2015-10-16 18:01:57 UTC (rev 191186)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-10-16 18:20:39 UTC (rev 191187)
@@ -1,3 +1,22 @@
+2015-10-16  Joseph Pecoraro  <pecor...@apple.com>
+
+        Web Inspector: Add "unset" to CSS value autocompletion
+        https://bugs.webkit.org/show_bug.cgi?id=127616
+
+        Reviewed by Brian Burg.
+
+        * UserInterface/Models/CSSCompletions.js:
+        * UserInterface/Models/CSSKeywordCompletions.js:
+        (WebInspector.CSSKeywordCompletions.forProperty):
+        Treat "unset" similiar to "initial". Also, no need for "initial"
+        in an individual property's list. We always include it.
+
+        * UserInterface/Views/VisualStyleDetailsPanel.js:
+        (WebInspector.VisualStyleDetailsPanel):
+        (WebInspector.VisualStyleDetailsPanel.prototype._populateDisplaySection):
+        (WebInspector.VisualStyleDetailsPanel.prototype._populateAlignmentSection):
+        Add "Unset" alongside "Initial".
+
 2015-10-14  Joseph Pecoraro  <pecor...@apple.com>
 
         Web Inspector: Include Garbage Collection Event in Timeline

Modified: trunk/Source/WebInspectorUI/UserInterface/Models/CSSCompletions.js (191186 => 191187)


--- trunk/Source/WebInspectorUI/UserInterface/Models/CSSCompletions.js	2015-10-16 18:01:57 UTC (rev 191186)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/CSSCompletions.js	2015-10-16 18:20:39 UTC (rev 191187)
@@ -97,7 +97,7 @@
                 return;
 
             var propertyNamesForCodeMirror = {};
-            var valueKeywordsForCodeMirror = {"inherit": true, "initial": true};
+            var valueKeywordsForCodeMirror = {"inherit": true, "initial": true, "unset": true};
             var colorKeywordsForCodeMirror = {};
 
             function nameForCodeMirror(name)

Modified: trunk/Source/WebInspectorUI/UserInterface/Models/CSSKeywordCompletions.js (191186 => 191187)


--- trunk/Source/WebInspectorUI/UserInterface/Models/CSSKeywordCompletions.js	2015-10-16 18:01:57 UTC (rev 191186)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/CSSKeywordCompletions.js	2015-10-16 18:20:39 UTC (rev 191187)
@@ -33,8 +33,8 @@
 
 WebInspector.CSSKeywordCompletions.forProperty = function(propertyName)
 {
-    var acceptedKeywords = ["initial"];
-    var isNotPrefixed = propertyName.charAt(0) !== "-";
+    let acceptedKeywords = ["initial", "unset"];
+    let isNotPrefixed = propertyName.charAt(0) !== "-";
 
     if (propertyName in WebInspector.CSSKeywordCompletions._propertyKeywordMap)
         acceptedKeywords = acceptedKeywords.concat(WebInspector.CSSKeywordCompletions._propertyKeywordMap[propertyName]);
@@ -956,7 +956,7 @@
         "sideways", "sideways-right", "vertical-right", "upright"
     ],
     "-webkit-line-box-contain": [
-        "block", "inline", "font", "glyphs", "replaced", "inline-box", "none", "initial"
+        "block", "inline", "font", "glyphs", "replaced", "inline-box", "none"
     ],
     "font-feature-settings": [
         "normal"

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.js (191186 => 191187)


--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.js	2015-10-16 18:01:57 UTC (rev 191186)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.js	2015-10-16 18:20:39 UTC (rev 191187)
@@ -39,7 +39,7 @@
         this._autocompletionPropertyEditors = {};
 
         // These keywords, as well as the values below, are not localized as they must match the CSS spec.
-        this._keywords.defaults = ["Inherit", "Initial"];
+        this._keywords.defaults = ["Inherit", "Initial", "Unset"];
         this._keywords.boxModel = this._keywords.defaults.concat(["Auto"]);
         this._keywords.borderStyle = {
             basic: this._keywords.defaults.concat(["None", "Hidden", "Solid"]),
@@ -333,7 +333,7 @@
 
         properties.opacity = new WebInspector.VisualStyleUnitSlider("opacity", WebInspector.UIString("Opacity"));
         properties.overflow = new WebInspector.VisualStyleKeywordPicker(["overflow-x", "overflow-y"], WebInspector.UIString("Overflow"), {
-            basic: ["Initial", "Auto", "Hidden", "Scroll", "Visible"],
+            basic: ["Initial", "Unset", "Auto", "Hidden", "Scroll", "Visible"],
             advanced: ["Marquee", "Overlay", " WebKit Paged X", " WebKit Paged Y"]
         });
 
@@ -581,7 +581,7 @@
     {
         let group = this._groups.alignment;
         let properties = group.properties;
-        let alignmentKeywords = ["Initial", "Auto", "Flex Start", "Flex End", "Center", "Stretch"];
+        let alignmentKeywords = ["Initial", "Unset", "Auto", "Flex Start", "Flex End", "Center", "Stretch"];
         let advancedAlignmentKeywords = ["Start", "End", "Left", "Right", "Baseline", "Last Baseline"];
 
         let contentRow = new WebInspector.DetailsSectionRow;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to