Title: [224441] trunk/Source/WebInspectorUI
Revision
224441
Author
nvasil...@apple.com
Date
2017-11-03 16:31:50 -0700 (Fri, 03 Nov 2017)

Log Message

Web Inspector: Uncaught Exception: null is not an object (evaluating 'selector.specificity.map') (at SpreadsheetCSSStyleDeclarationSection.js:199:51)
https://bugs.webkit.org/show_bug.cgi?id=179225
<rdar://problem/35329019>

Reviewed by Joseph Pecoraro.

* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
(WI.SpreadsheetCSSStyleDeclarationSection.prototype._renderSelector):
selector.specificity may not exist when the selector is dynamic and doesn't match the selected element.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (224440 => 224441)


--- trunk/Source/WebInspectorUI/ChangeLog	2017-11-03 23:21:47 UTC (rev 224440)
+++ trunk/Source/WebInspectorUI/ChangeLog	2017-11-03 23:31:50 UTC (rev 224441)
@@ -1,3 +1,15 @@
+2017-11-03  Nikita Vasilyev  <nvasil...@apple.com>
+
+        Web Inspector: Uncaught Exception: null is not an object (evaluating 'selector.specificity.map') (at SpreadsheetCSSStyleDeclarationSection.js:199:51)
+        https://bugs.webkit.org/show_bug.cgi?id=179225
+        <rdar://problem/35329019>
+
+        Reviewed by Joseph Pecoraro.
+
+        * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
+        (WI.SpreadsheetCSSStyleDeclarationSection.prototype._renderSelector):
+        selector.specificity may not exist when the selector is dynamic and doesn't match the selected element.
+
 2017-11-03  Ross Kirsling  <ross.kirsl...@sony.com>
 
         Web Inspector: Move Show Compositing Borders/Paint Flashing buttons from Elements tab to Layers tab

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js (224440 => 224441)


--- trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js	2017-11-03 23:21:47 UTC (rev 224440)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js	2017-11-03 23:31:50 UTC (rev 224441)
@@ -196,8 +196,8 @@
             if (matched)
                 selectorElement.classList.add(WI.SpreadsheetCSSStyleDeclarationSection.MatchedSelectorElementStyleClassName);
 
-            let specificity = selector.specificity.map((number) => number.toLocaleString());
-            if (specificity) {
+            if (selector.specificity) {
+                let specificity = selector.specificity.map((number) => number.toLocaleString());
                 let tooltip = WI.UIString("Specificity: (%d, %d, %d)").format(...specificity);
                 if (selector.dynamic) {
                     tooltip += "\n";
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to