| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2009 Joseph Pecoraro | 3 * Copyright (C) 2009 Joseph Pecoraro |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1151 * @param {?Array.<!WebInspector.CSSMedia>} mediaRules | 1151 * @param {?Array.<!WebInspector.CSSMedia>} mediaRules |
| 1152 */ | 1152 */ |
| 1153 _createMediaList: function(mediaRules) | 1153 _createMediaList: function(mediaRules) |
| 1154 { | 1154 { |
| 1155 if (!mediaRules) | 1155 if (!mediaRules) |
| 1156 return; | 1156 return; |
| 1157 for (var i = mediaRules.length - 1; i >= 0; --i) { | 1157 for (var i = mediaRules.length - 1; i >= 0; --i) { |
| 1158 var media = mediaRules[i]; | 1158 var media = mediaRules[i]; |
| 1159 var mediaDataElement = this._mediaListElement.createChild("div", "me
dia"); | 1159 var mediaDataElement = this._mediaListElement.createChild("div", "me
dia"); |
| 1160 if (media.sourceURL) { | 1160 if (media.sourceURL) { |
| 1161 var refElement = mediaDataElement.createChild("div", "subtitle")
; | |
| 1162 var anchor = this._parentPane._linkifier.linkifyMedia(media); | 1161 var anchor = this._parentPane._linkifier.linkifyMedia(media); |
| 1163 refElement.appendChild(anchor); | 1162 anchor.classList.add("subtitle"); |
| 1163 mediaDataElement.appendChild(anchor); |
| 1164 } | 1164 } |
| 1165 | 1165 |
| 1166 var mediaContainerElement = mediaDataElement.createChild("span"); | 1166 var mediaContainerElement = mediaDataElement.createChild("span"); |
| 1167 var mediaTextElement = mediaContainerElement.createChild("span", "me
dia-text"); | 1167 var mediaTextElement = mediaContainerElement.createChild("span", "me
dia-text"); |
| 1168 mediaTextElement.title = media.text; | 1168 mediaTextElement.title = media.text; |
| 1169 switch (media.source) { | 1169 switch (media.source) { |
| 1170 case WebInspector.CSSMedia.Source.LINKED_SHEET: | 1170 case WebInspector.CSSMedia.Source.LINKED_SHEET: |
| 1171 case WebInspector.CSSMedia.Source.INLINE_SHEET: | 1171 case WebInspector.CSSMedia.Source.INLINE_SHEET: |
| 1172 mediaTextElement.textContent = "media=\"" + media.text + "\""; | 1172 mediaTextElement.textContent = "media=\"" + media.text + "\""; |
| 1173 break; | 1173 break; |
| (...skipping 2065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3239 | 3239 |
| 3240 /** | 3240 /** |
| 3241 * @override | 3241 * @override |
| 3242 * @return {?WebInspector.ToolbarItem} | 3242 * @return {?WebInspector.ToolbarItem} |
| 3243 */ | 3243 */ |
| 3244 item: function() | 3244 item: function() |
| 3245 { | 3245 { |
| 3246 return this._button; | 3246 return this._button; |
| 3247 } | 3247 } |
| 3248 } | 3248 } |
| OLD | NEW |