| OLD | NEW |
| 1 function initialize_cssTest() | 1 function initialize_cssTest() |
| 2 { | 2 { |
| 3 | 3 |
| 4 InspectorTest.dumpStyleSheetText = function(styleSheetId, callback) | 4 InspectorTest.dumpStyleSheetText = function(styleSheetId, callback) |
| 5 { | 5 { |
| 6 InspectorTest.sendCommandOrDie("CSS.getStyleSheetText", { styleSheetId: styl
eSheetId }, onStyleSheetText); | 6 InspectorTest.sendCommandOrDie("CSS.getStyleSheetText", { styleSheetId: styl
eSheetId }, onStyleSheetText); |
| 7 function onStyleSheetText(result) | 7 function onStyleSheetText(result) |
| 8 { | 8 { |
| 9 InspectorTest.log("==== Style sheet text ===="); | 9 InspectorTest.log("==== Style sheet text ===="); |
| 10 InspectorTest.log(result.text); | 10 InspectorTest.log(result.text); |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 { | 124 { |
| 125 if (!omitLog) | 125 if (!omitLog) |
| 126 InspectorTest.log("Dumping matched rules: "); | 126 InspectorTest.log("Dumping matched rules: "); |
| 127 dumpRuleMatches(result.matchedCSSRules); | 127 dumpRuleMatches(result.matchedCSSRules); |
| 128 if (!omitLog) | 128 if (!omitLog) |
| 129 InspectorTest.log("Dumping inherited rules: "); | 129 InspectorTest.log("Dumping inherited rules: "); |
| 130 for (var inheritedEntry of result.inherited) { | 130 for (var inheritedEntry of result.inherited) { |
| 131 InspectorTest.dumpStyle(inheritedEntry.inlineStyle); | 131 InspectorTest.dumpStyle(inheritedEntry.inlineStyle); |
| 132 dumpRuleMatches(inheritedEntry.matchedCSSRules); | 132 dumpRuleMatches(inheritedEntry.matchedCSSRules); |
| 133 } | 133 } |
| 134 dumpKeyframesRules(result.cssKeyframesRules); |
| 134 callback(); | 135 callback(); |
| 135 } | 136 } |
| 136 | 137 |
| 137 function dumpRuleMatches(ruleMatches) | 138 function dumpRuleMatches(ruleMatches) |
| 138 { | 139 { |
| 139 for (var ruleMatch of ruleMatches) { | 140 for (var ruleMatch of ruleMatches) { |
| 140 var origin = ruleMatch.rule.origin; | 141 var origin = ruleMatch.rule.origin; |
| 141 if (origin !== "inspector" && origin !== "regular") | 142 if (origin !== "inspector" && origin !== "regular") |
| 142 continue; | 143 continue; |
| 143 InspectorTest.dumpRuleMatch(ruleMatch); | 144 InspectorTest.dumpRuleMatch(ruleMatch); |
| 144 } | 145 } |
| 145 } | 146 } |
| 146 } | 147 } |
| 147 | 148 |
| 149 InspectorTest.loadAndDumpCSSAnimationsForNode = function(nodeId, callback) |
| 150 { |
| 151 InspectorTest.sendCommandOrDie("CSS.getCSSAnimationsForNode", { "nodeId": no
deId }, cssAnimationsLoaded); |
| 152 |
| 153 function cssAnimationsLoaded(result) |
| 154 { |
| 155 InspectorTest.log("Dumping CSS keyframed animations: "); |
| 156 for (var keyframesRule of result.cssKeyframesRules) { |
| 157 InspectorTest.log("@keyframes " + keyframesRule.name + " {"); |
| 158 for (var keyframe of keyframesRule.keyframes) { |
| 159 indentLog(4, keyframe.keyText + " {"); |
| 160 InspectorTest.dumpStyle(keyframe.style, 4); |
| 161 indentLog(4, "}"); |
| 162 } |
| 163 InspectorTest.log("}"); |
| 164 } |
| 165 callback(); |
| 166 } |
| 167 } |
| 168 |
| 148 InspectorTest.loadAndDumpMatchingRules = function(documentNodeId, selector, call
back, omitLog) | 169 InspectorTest.loadAndDumpMatchingRules = function(documentNodeId, selector, call
back, omitLog) |
| 149 { | 170 { |
| 150 InspectorTest.requestNodeId(documentNodeId, selector, nodeIdLoaded); | 171 InspectorTest.requestNodeId(documentNodeId, selector, nodeIdLoaded); |
| 151 | 172 |
| 152 function nodeIdLoaded(nodeId) | 173 function nodeIdLoaded(nodeId) |
| 153 { | 174 { |
| 154 InspectorTest.loadAndDumpMatchingRulesForNode(nodeId, callback, omitLog)
; | 175 InspectorTest.loadAndDumpMatchingRulesForNode(nodeId, callback, omitLog)
; |
| 155 } | 176 } |
| 156 } | 177 } |
| 157 | 178 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 169 { | 190 { |
| 170 if (!omitLog) | 191 if (!omitLog) |
| 171 InspectorTest.log("Dumping inline style: "); | 192 InspectorTest.log("Dumping inline style: "); |
| 172 InspectorTest.log("{"); | 193 InspectorTest.log("{"); |
| 173 InspectorTest.dumpStyle(result.inlineStyle, 0); | 194 InspectorTest.dumpStyle(result.inlineStyle, 0); |
| 174 InspectorTest.log("}"); | 195 InspectorTest.log("}"); |
| 175 InspectorTest.loadAndDumpMatchingRulesForNode(nodeId, callback, omitLog) | 196 InspectorTest.loadAndDumpMatchingRulesForNode(nodeId, callback, omitLog) |
| 176 } | 197 } |
| 177 } | 198 } |
| 178 } | 199 } |
| OLD | NEW |