| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 4 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). | 4 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). |
| 5 * Copyright (C) 2009 Joseph Pecoraro | 5 * Copyright (C) 2009 Joseph Pecoraro |
| 6 * | 6 * |
| 7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
| 8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
| 9 * are met: | 9 * are met: |
| 10 * | 10 * |
| (...skipping 1832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1843 [NetworkAgent.ResourcePriority.Low, WebInspector.UIString("Low")], | 1843 [NetworkAgent.ResourcePriority.Low, WebInspector.UIString("Low")], |
| 1844 [NetworkAgent.ResourcePriority.Medium, WebInspector.UIString("Medium
")], | 1844 [NetworkAgent.ResourcePriority.Medium, WebInspector.UIString("Medium
")], |
| 1845 [NetworkAgent.ResourcePriority.High, WebInspector.UIString("High")], | 1845 [NetworkAgent.ResourcePriority.High, WebInspector.UIString("High")], |
| 1846 [NetworkAgent.ResourcePriority.VeryHigh, WebInspector.UIString("High
est")] | 1846 [NetworkAgent.ResourcePriority.VeryHigh, WebInspector.UIString("High
est")] |
| 1847 ]); | 1847 ]); |
| 1848 WebInspector.uiLabelForPriority._priorityToUILabel = labelMap; | 1848 WebInspector.uiLabelForPriority._priorityToUILabel = labelMap; |
| 1849 } | 1849 } |
| 1850 return labelMap.get(priority) || WebInspector.UIString("Unknown"); | 1850 return labelMap.get(priority) || WebInspector.UIString("Unknown"); |
| 1851 } | 1851 } |
| 1852 | 1852 |
| 1853 /** |
| 1854 * @param {string} url |
| 1855 * @param {string=} linkText |
| 1856 * @param {string=} classes |
| 1857 * @param {boolean=} isExternal |
| 1858 * @param {string=} tooltipText |
| 1859 * @return {!Element} |
| 1860 */ |
| 1861 WebInspector.linkifyURLAsNode = function(url, linkText, classes, isExternal, too
ltipText) |
| 1862 { |
| 1863 if (!linkText) |
| 1864 linkText = url; |
| 1865 |
| 1866 var a = createElementWithClass("a", classes); |
| 1867 var href = url; |
| 1868 if (url.trim().toLowerCase().startsWith("javascript:")) |
| 1869 href = null; |
| 1870 if (isExternal && WebInspector.ParsedURL.isRelativeURL(url)) |
| 1871 href = null; |
| 1872 if (href !== null) { |
| 1873 a.href = href; |
| 1874 a.classList.add(isExternal ? "webkit-html-external-link" : "webkit-html-
resource-link"); |
| 1875 } |
| 1876 if (!tooltipText && linkText !== url) |
| 1877 a.title = url; |
| 1878 else if (tooltipText) |
| 1879 a.title = tooltipText; |
| 1880 a.textContent = linkText.trimMiddle(150); |
| 1881 if (isExternal) |
| 1882 a.setAttribute("target", "_blank"); |
| 1883 |
| 1884 return a; |
| 1885 } |
| 1886 |
| 1887 /** |
| 1888 * @param {string} article |
| 1889 * @param {string} title |
| 1890 * @return {!Element} |
| 1891 */ |
| 1892 WebInspector.linkifyDocumentationURLAsNode = function(article, title) |
| 1893 { |
| 1894 return WebInspector.linkifyURLAsNode("https://developers.google.com/web/tool
s/chrome-devtools/" + article, title, undefined, true); |
| 1895 } |
| 1896 |
| 1853 /** @type {!WebInspector.ThemeSupport} */ | 1897 /** @type {!WebInspector.ThemeSupport} */ |
| 1854 WebInspector.themeSupport; | 1898 WebInspector.themeSupport; |
| OLD | NEW |