| 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 1839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1850 [NetworkAgent.ResourcePriority.Low, WebInspector.UIString("Low")], | 1850 [NetworkAgent.ResourcePriority.Low, WebInspector.UIString("Low")], |
| 1851 [NetworkAgent.ResourcePriority.Medium, WebInspector.UIString("Medium
")], | 1851 [NetworkAgent.ResourcePriority.Medium, WebInspector.UIString("Medium
")], |
| 1852 [NetworkAgent.ResourcePriority.High, WebInspector.UIString("High")], | 1852 [NetworkAgent.ResourcePriority.High, WebInspector.UIString("High")], |
| 1853 [NetworkAgent.ResourcePriority.VeryHigh, WebInspector.UIString("High
est")] | 1853 [NetworkAgent.ResourcePriority.VeryHigh, WebInspector.UIString("High
est")] |
| 1854 ]); | 1854 ]); |
| 1855 WebInspector.uiLabelForPriority._priorityToUILabel = labelMap; | 1855 WebInspector.uiLabelForPriority._priorityToUILabel = labelMap; |
| 1856 } | 1856 } |
| 1857 return labelMap.get(priority) || WebInspector.UIString("Unknown"); | 1857 return labelMap.get(priority) || WebInspector.UIString("Unknown"); |
| 1858 } | 1858 } |
| 1859 | 1859 |
| 1860 /** |
| 1861 * @param {string} url |
| 1862 * @param {string=} linkText |
| 1863 * @param {string=} classes |
| 1864 * @param {boolean=} isExternal |
| 1865 * @param {string=} tooltipText |
| 1866 * @return {!Element} |
| 1867 */ |
| 1868 WebInspector.linkifyURLAsNode = function(url, linkText, classes, isExternal, too
ltipText) |
| 1869 { |
| 1870 if (!linkText) |
| 1871 linkText = url; |
| 1872 |
| 1873 var a = createElementWithClass("a", classes); |
| 1874 var href = url; |
| 1875 if (url.trim().toLowerCase().startsWith("javascript:")) |
| 1876 href = null; |
| 1877 if (isExternal && WebInspector.ParsedURL.isRelativeURL(url)) |
| 1878 href = null; |
| 1879 if (href !== null) { |
| 1880 a.href = href; |
| 1881 a.classList.add(isExternal ? "webkit-html-external-link" : "webkit-html-
resource-link"); |
| 1882 } |
| 1883 if (!tooltipText && linkText !== url) |
| 1884 a.title = url; |
| 1885 else if (tooltipText) |
| 1886 a.title = tooltipText; |
| 1887 a.textContent = linkText.trimMiddle(30); |
| 1888 if (isExternal) |
| 1889 a.setAttribute("target", "_blank"); |
| 1890 |
| 1891 return a; |
| 1892 } |
| 1893 |
| 1894 /** |
| 1895 * @param {string} article |
| 1896 * @param {string} title |
| 1897 * @return {!Element} |
| 1898 */ |
| 1899 WebInspector.linkifyDocumentationURLAsNode = function(article, title) |
| 1900 { |
| 1901 return WebInspector.linkifyURLAsNode("https://developers.google.com/web/tool
s/chrome-devtools/" + article, title, undefined, true); |
| 1902 } |
| 1903 |
| 1860 /** @type {!WebInspector.ThemeSupport} */ | 1904 /** @type {!WebInspector.ThemeSupport} */ |
| 1861 WebInspector.themeSupport; | 1905 WebInspector.themeSupport; |
| OLD | NEW |