Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/ui.js

Issue 9169140: Bug 798567 removed nsIDOMCSSValueList interface (Closed)
Patch Set: Created Jan. 14, 2013, 12:52 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « .hgsubstate ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/ui.js
===================================================================
--- a/lib/ui.js
+++ b/lib/ui.js
@@ -1714,19 +1714,21 @@ let UI = exports.UI =
}
// Look for a background image
if (!hadImage)
{
function extractImageURL(computedStyle, property)
{
let value = computedStyle.getPropertyCSSValue(property);
- if (value instanceof Ci.nsIDOMCSSValueList && value.length >= 1)
+ // CSSValueList
+ if ("length" in value && value.length >= 1)
Thomas Greiner 2013/01/14 14:16:24 What about using |value instanceof CSSValueList| i
Wladimir Palant 2013/01/14 14:46:54 CSSValueList won't be defined in this context - it
value = value[0];
- if (value instanceof Ci.nsIDOMCSSPrimitiveValue && value.primitiveType == Ci.nsIDOMCSSPrimitiveValue.CSS_URI)
+ // CSSValuePrimitiveType
+ if ("primitiveType" in value && value.primitiveType == value.CSS_URI)
Thomas Greiner 2013/01/14 14:16:24 What about using |value instanceof CSSPrimitiveVal
Wladimir Palant 2013/01/14 14:46:54 Same as above.
return Utils.unwrapURL(value.getStringValue()).spec;
return null;
}
let node = target;
while (node)
{
« no previous file with comments | « .hgsubstate ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld