| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 var pseudoClasses = node.marker(WebInspector.CSSModel.PseudoStateMarker)
|| []; | 364 var pseudoClasses = node.marker(WebInspector.CSSModel.PseudoStateMarker)
|| []; |
| 365 if (enable) { | 365 if (enable) { |
| 366 if (pseudoClasses.indexOf(pseudoClass) >= 0) | 366 if (pseudoClasses.indexOf(pseudoClass) >= 0) |
| 367 return false; | 367 return false; |
| 368 pseudoClasses.push(pseudoClass); | 368 pseudoClasses.push(pseudoClass); |
| 369 node.setMarker(WebInspector.CSSModel.PseudoStateMarker, pseudoClasse
s); | 369 node.setMarker(WebInspector.CSSModel.PseudoStateMarker, pseudoClasse
s); |
| 370 } else { | 370 } else { |
| 371 if (pseudoClasses.indexOf(pseudoClass) < 0) | 371 if (pseudoClasses.indexOf(pseudoClass) < 0) |
| 372 return false; | 372 return false; |
| 373 pseudoClasses.remove(pseudoClass); | 373 pseudoClasses.remove(pseudoClass); |
| 374 if (!pseudoClasses.length) | 374 if (pseudoClasses.length) |
| 375 node.setMarker(WebInspector.CSSModel.PseudoStateMarker, pseudoCl
asses); |
| 376 else |
| 375 node.setMarker(WebInspector.CSSModel.PseudoStateMarker, null); | 377 node.setMarker(WebInspector.CSSModel.PseudoStateMarker, null); |
| 376 } | 378 } |
| 377 | 379 |
| 378 this._agent.forcePseudoState(node.id, pseudoClasses); | 380 this._agent.forcePseudoState(node.id, pseudoClasses); |
| 379 this.dispatchEventToListeners(WebInspector.CSSModel.Events.PseudoStateFo
rced, { node: node, pseudoClass: pseudoClass, enable: enable }); | 381 this.dispatchEventToListeners(WebInspector.CSSModel.Events.PseudoStateFo
rced, { node: node, pseudoClass: pseudoClass, enable: enable }); |
| 380 return true; | 382 return true; |
| 381 }, | 383 }, |
| 382 | 384 |
| 383 /** | 385 /** |
| 384 * @param {!WebInspector.DOMNode} node | 386 * @param {!WebInspector.DOMNode} node |
| (...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 873 /** | 875 /** |
| 874 * @constructor | 876 * @constructor |
| 875 * @param {?WebInspector.CSSStyleDeclaration} inlineStyle | 877 * @param {?WebInspector.CSSStyleDeclaration} inlineStyle |
| 876 * @param {?WebInspector.CSSStyleDeclaration} attributesStyle | 878 * @param {?WebInspector.CSSStyleDeclaration} attributesStyle |
| 877 */ | 879 */ |
| 878 WebInspector.CSSModel.InlineStyleResult = function(inlineStyle, attributesStyle) | 880 WebInspector.CSSModel.InlineStyleResult = function(inlineStyle, attributesStyle) |
| 879 { | 881 { |
| 880 this.inlineStyle = inlineStyle; | 882 this.inlineStyle = inlineStyle; |
| 881 this.attributesStyle = attributesStyle; | 883 this.attributesStyle = attributesStyle; |
| 882 } | 884 } |
| OLD | NEW |