You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pm...@apache.org on 2013/05/03 19:03:56 UTC
weinre commit: [CB-2650] - Weinre style inspection breaks with
normalize.css
Updated Branches:
refs/heads/master e1370bae3 -> bb83d05ba
[CB-2650] - Weinre style inspection breaks with normalize.css
https://issues.apache.org/jira/browse/CB-2650
Project: http://git-wip-us.apache.org/repos/asf/cordova-weinre/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-weinre/commit/bb83d05b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-weinre/tree/bb83d05b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-weinre/diff/bb83d05b
Branch: refs/heads/master
Commit: bb83d05ba862b045917a42a6e5a4554383285155
Parents: e1370ba
Author: Patrick Mueller <pm...@apache.org>
Authored: Fri May 3 13:03:05 2013 -0400
Committer: Patrick Mueller <pm...@apache.org>
Committed: Fri May 3 13:03:05 2013 -0400
----------------------------------------------------------------------
weinre.doc/ChangeLog.body.html | 1 +
weinre.web/modules/weinre/target/CSSStore.coffee | 23 +++++++++-------
2 files changed, 14 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-weinre/blob/bb83d05b/weinre.doc/ChangeLog.body.html
----------------------------------------------------------------------
diff --git a/weinre.doc/ChangeLog.body.html b/weinre.doc/ChangeLog.body.html
index 6a0b4b3..54b8e31 100644
--- a/weinre.doc/ChangeLog.body.html
+++ b/weinre.doc/ChangeLog.body.html
@@ -53,6 +53,7 @@
<li><a href="https://issues.apache.org/jira/browse/CB-1193">CB-1193</a> - add Windows Phone support
<li><a href="https://issues.apache.org/jira/browse/CB-1800">CB-1800</a> - remove references to "incubator"
<li><a href="https://issues.apache.org/jira/browse/CB-1494">CB-1494</a> - Supports running server behind a proxy, such as Heroku Cedar
+<li><a href="https://issues.apache.org/jira/browse/CB-2650">CB-2650</a> - Weinre style inspection breaks with normalize.css
<li><a href="https://issues.apache.org/jira/browse/CB-3319">CB-3319</a> - Chrome is setting window properties which now breaks Weinre
<li><a href="https://issues.apache.org/jira/browse/CB-3328">CB-3328</a> - chrome version >= 27 breaks flex-box usage
</ul>
http://git-wip-us.apache.org/repos/asf/cordova-weinre/blob/bb83d05b/weinre.web/modules/weinre/target/CSSStore.coffee
----------------------------------------------------------------------
diff --git a/weinre.web/modules/weinre/target/CSSStore.coffee b/weinre.web/modules/weinre/target/CSSStore.coffee
index 07c6017..158295b 100644
--- a/weinre.web/modules/weinre/target/CSSStore.coffee
+++ b/weinre.web/modules/weinre/target/CSSStore.coffee
@@ -54,16 +54,19 @@ module.exports = class CSSStore
getMatchedCSSRules: (node) ->
result = []
- for styleSheet in document.styleSheets
- continue unless styleSheet.cssRules
-
- for cssRule in styleSheet.cssRules
- continue unless _elementMatchesSelector(node, cssRule.selectorText)
- object = {}
- object.ruleId = @_getStyleRuleId(cssRule)
- object.selectorText = cssRule.selectorText
- object.style = @_buildMirrorForStyle(cssRule.style, true)
- result.push object
+ try
+ for styleSheet in document.styleSheets
+ continue unless styleSheet.cssRules
+
+ for cssRule in styleSheet.cssRules
+ continue unless _elementMatchesSelector(node, cssRule.selectorText)
+ object = {}
+ object.ruleId = @_getStyleRuleId(cssRule)
+ object.selectorText = cssRule.selectorText
+ object.style = @_buildMirrorForStyle(cssRule.style, true)
+ result.push object
+ catch err
+ return result
result