summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/inspector/front-end/StylesSidebarPane.js
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/inspector/front-end/StylesSidebarPane.js')
-rw-r--r--Source/WebCore/inspector/front-end/StylesSidebarPane.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/Source/WebCore/inspector/front-end/StylesSidebarPane.js b/Source/WebCore/inspector/front-end/StylesSidebarPane.js
index c7d151a..29d0317 100644
--- a/Source/WebCore/inspector/front-end/StylesSidebarPane.js
+++ b/Source/WebCore/inspector/front-end/StylesSidebarPane.js
@@ -132,10 +132,10 @@ WebInspector.StylesSidebarPane.prototype = {
if (!forceUpdate && (!node || node === this.node))
refresh = true;
- if (node && node.nodeType === Node.TEXT_NODE && node.parentNode)
+ if (node && node.nodeType() === Node.TEXT_NODE && node.parentNode)
node = node.parentNode;
- if (node && node.nodeType !== Node.ELEMENT_NODE)
+ if (node && node.nodeType() !== Node.ELEMENT_NODE)
node = null;
if (node)
@@ -244,7 +244,7 @@ WebInspector.StylesSidebarPane.prototype = {
var styleAttributes = {};
for (var name in styles.styleAttributes) {
var attrStyle = { style: styles.styleAttributes[name], editable: false };
- attrStyle.selectorText = WebInspector.panels.elements.treeOutline.nodeNameToCorrectCase(node.nodeName) + "[" + name;
+ attrStyle.selectorText = WebInspector.panels.elements.treeOutline.nodeNameToCorrectCase(node.nodeName()) + "[" + name;
if (node.getAttribute(name))
attrStyle.selectorText += "=" + node.getAttribute(name);
attrStyle.selectorText += "]";
@@ -252,7 +252,7 @@ WebInspector.StylesSidebarPane.prototype = {
}
// Show element's Style Attributes
- if (styles.inlineStyle && node.nodeType === Node.ELEMENT_NODE) {
+ if (styles.inlineStyle && node.nodeType() === Node.ELEMENT_NODE) {
var inlineStyle = { selectorText: "element.style", style: styles.inlineStyle, isAttribute: true };
styleRules.push(inlineStyle);
}
@@ -1964,6 +1964,9 @@ WebInspector.StylesSidebarPane.CSSPropertyPrompt.prototype = {
_buildPropertyCompletions: function(wordRange, bestMatchOnly, completionsReadyCallback)
{
var prefix = wordRange.toString().toLowerCase();
+ if (!prefix && bestMatchOnly)
+ return;
+
var results;
if (bestMatchOnly) {
results = [];