diff options
author | Valerio Virgillito | 2012-05-22 22:36:19 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-05-22 22:36:19 -0700 |
commit | 816d52e94424a84dab7ac44ab953624a245be30f (patch) | |
tree | de7c7d78929e780c2edeb2d302b9b8422c26b3ff /js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js | |
parent | a341522e3603c18ab3b93defa894e3be702dd0f4 (diff) | |
parent | a00e1f30c3da3053574c982ddfacca12e32c12b2 (diff) | |
download | ninja-816d52e94424a84dab7ac44ab953624a245be30f.tar.gz |
Merge pull request #251 from ericguzman/CSSPanelUpdates
Css panel updates
Diffstat (limited to 'js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js')
-rwxr-xr-x | js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js b/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js index 2a3fc068..4c0a3611 100755 --- a/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js +++ b/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js | |||
@@ -4,8 +4,8 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot | |||
4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | 4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. |
5 | </copyright> */ | 5 | </copyright> */ |
6 | 6 | ||
7 | var cssPropertyNameList = require("js/panels/CSSPanel/css-property-name-list").cssPropertyNameList, | 7 | var cssPropertyNameList = require("js/panels/CSSPanel/css-property-name-list").CssPropertyNameList, |
8 | cssCompletionMap = require("js/panels/CSSPanel/css-value-completion-map").cssValueCompletionMap, | 8 | cssCompletionMap = require("js/panels/CSSPanel/css-value-completion-map").CssValueCompletionMap, |
9 | CSS_SHORTHAND_MAP = require("js/panels/CSSPanel/css-shorthand-map").CSS_SHORTHAND_MAP, | 9 | CSS_SHORTHAND_MAP = require("js/panels/CSSPanel/css-shorthand-map").CSS_SHORTHAND_MAP, |
10 | keyboardModule = require("js/mediators/keyboard-mediator").Keyboard, | 10 | keyboardModule = require("js/mediators/keyboard-mediator").Keyboard, |
11 | nj = require("js/lib/NJUtils").NJUtils; | 11 | nj = require("js/lib/NJUtils").NJUtils; |
@@ -822,17 +822,14 @@ var CSSPanel = exports.CSSPanelBase = (require("montage/core/core").Montage).cre | |||
822 | }, | 822 | }, |
823 | getAllRelatedRules : { | 823 | getAllRelatedRules : { |
824 | value: function(element) { | 824 | value: function(element) { |
825 | var pseudos = [null],//, 'link', 'visited', 'active', 'hover', 'focus', 'first-letter', | 825 | var rules = [], |
826 | //'first-line', 'first-child', 'before', 'after', 'lang'], | 826 | win = element.ownerDocument.defaultView, |
827 | rules = [], | ||
828 | self = this; | 827 | self = this; |
829 | 828 | ||
830 | pseudos.forEach(function(pseudo) { | 829 | rules = rules.concat(nj.toArray(win.getMatchedCSSRules(element)).filter(function(rule) { |
831 | rules = rules.concat(nj.toArray(this.getMatchedCSSRules(element, ':'+pseudo)).filter(function(rule) { | 830 | var sheetId = (rule.parentStyleSheet) ? rule.parentStyleSheet.ownerNode.id : null; |
832 | var sheetId = (rule.parentStyleSheet) ? rule.parentStyleSheet.ownerNode.id : null; | 831 | return sheetId !== self._stageStyleSheetId; |
833 | return sheetId !== self._stageStyleSheetId; | 832 | })); |
834 | })); | ||
835 | }, element.ownerDocument.defaultView); | ||
836 | 833 | ||
837 | return rules; | 834 | return rules; |
838 | } | 835 | } |