Web Inspector: Uncaught Exception: null is not an object (evaluating 'this.ownerDocum...
[WebKit-https.git] / Source / WebInspectorUI / UserInterface / Views / SpreadsheetCSSStyleDeclarationSection.js
index 67f6a77..b04f923 100644 (file)
@@ -493,13 +493,18 @@ WI.SpreadsheetCSSStyleDeclarationSection = class SpreadsheetCSSStyleDeclarationS
 
     _highlightNodesWithSelector()
     {
+        let node = this._style.node;
+
         if (!this._style.ownerRule) {
-            WI.domManager.highlightDOMNode(this._style.node.id);
+            WI.domManager.highlightDOMNode(node.id);
             return;
         }
 
         let selectorText = this._selectorElement.textContent.trim();
-        WI.domManager.highlightSelector(selectorText, this._style.node.ownerDocument.frameIdentifier);
+        if (node.frame)
+            WI.domManager.highlightSelector(selectorText, node.frame.id);
+        else
+            WI.domManager.highlightSelector(selectorText);
     }
 
     _hideDOMNodeHighlight()