| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). | 3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). |
| 4 * Copyright (C) 2009 Joseph Pecoraro | 4 * Copyright (C) 2009 Joseph Pecoraro |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 * @param {number=} lineNumber | 141 * @param {number=} lineNumber |
| 142 * @param {number=} columnNumber | 142 * @param {number=} columnNumber |
| 143 * @return {Node} | 143 * @return {Node} |
| 144 */ | 144 */ |
| 145 function linkifier(title, url, lineNumber, columnNumber) | 145 function linkifier(title, url, lineNumber, columnNumber) |
| 146 { | 146 { |
| 147 var isExternal = !WebInspector.resourceForURL(url) && !WebInspector.work
space.uiSourceCodeForURL(url); | 147 var isExternal = !WebInspector.resourceForURL(url) && !WebInspector.work
space.uiSourceCodeForURL(url); |
| 148 var urlNode = WebInspector.linkifyURLAsNode(url, title, undefined, isExt
ernal); | 148 var urlNode = WebInspector.linkifyURLAsNode(url, title, undefined, isExt
ernal); |
| 149 if (typeof lineNumber !== "undefined") { | 149 if (typeof lineNumber !== "undefined") { |
| 150 urlNode.lineNumber = lineNumber; | 150 urlNode.lineNumber = lineNumber; |
| 151 urlNode.preferredPanel = "scripts"; | 151 urlNode.preferredPanel = "sources"; |
| 152 if (typeof columnNumber !== "undefined") | 152 if (typeof columnNumber !== "undefined") |
| 153 urlNode.columnNumber = columnNumber; | 153 urlNode.columnNumber = columnNumber; |
| 154 } | 154 } |
| 155 | 155 |
| 156 return urlNode; | 156 return urlNode; |
| 157 } | 157 } |
| 158 | 158 |
| 159 return WebInspector.linkifyStringAsFragmentWithCustomLinkifier(string, linki
fier); | 159 return WebInspector.linkifyStringAsFragmentWithCustomLinkifier(string, linki
fier); |
| 160 } | 160 } |
| 161 | 161 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 * @return {?string} | 235 * @return {?string} |
| 236 */ | 236 */ |
| 237 WebInspector.contentAsDataURL = function(content, mimeType, contentEncoded) | 237 WebInspector.contentAsDataURL = function(content, mimeType, contentEncoded) |
| 238 { | 238 { |
| 239 const maxDataUrlSize = 1024 * 1024; | 239 const maxDataUrlSize = 1024 * 1024; |
| 240 if (content == null || content.length > maxDataUrlSize) | 240 if (content == null || content.length > maxDataUrlSize) |
| 241 return null; | 241 return null; |
| 242 | 242 |
| 243 return "data:" + mimeType + (contentEncoded ? ";base64," : ",") + content; | 243 return "data:" + mimeType + (contentEncoded ? ";base64," : ",") + content; |
| 244 } | 244 } |
| OLD | NEW |