| 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 1353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1364 element.textElement.textContent = title; | 1364 element.textElement.textContent = title; |
| 1365 if (subtitle !== undefined) { | 1365 if (subtitle !== undefined) { |
| 1366 element.subtitleElement = element.textElement.createChild("div", "dt
-checkbox-subtitle"); | 1366 element.subtitleElement = element.textElement.createChild("div", "dt
-checkbox-subtitle"); |
| 1367 element.subtitleElement.textContent = subtitle; | 1367 element.subtitleElement.textContent = subtitle; |
| 1368 } | 1368 } |
| 1369 } | 1369 } |
| 1370 return element; | 1370 return element; |
| 1371 } | 1371 } |
| 1372 | 1372 |
| 1373 /** | 1373 /** |
| 1374 * @return {!Element} |
| 1375 * @param {number} min |
| 1376 * @param {number} max |
| 1377 */ |
| 1378 function createSliderLabel(min, max) |
| 1379 { |
| 1380 var element = createElement("label", "dt-slider"); |
| 1381 element.sliderElement.min = min; |
| 1382 element.sliderElement.max = max; |
| 1383 element.sliderElement.step = 1; |
| 1384 return element; |
| 1385 } |
| 1386 |
| 1387 /** |
| 1374 * @param {!Node} node | 1388 * @param {!Node} node |
| 1375 * @param {string} cssFile | 1389 * @param {string} cssFile |
| 1376 * @suppressGlobalPropertiesCheck | 1390 * @suppressGlobalPropertiesCheck |
| 1377 */ | 1391 */ |
| 1378 WebInspector.appendStyle = function(node, cssFile) | 1392 WebInspector.appendStyle = function(node, cssFile) |
| 1379 { | 1393 { |
| 1380 var content = Runtime.cachedResources[cssFile] || ""; | 1394 var content = Runtime.cachedResources[cssFile] || ""; |
| 1381 if (!content) | 1395 if (!content) |
| 1382 console.error(cssFile + " not preloaded. Check module.json"); | 1396 console.error(cssFile + " not preloaded. Check module.json"); |
| 1383 var styleElement = createElement("style"); | 1397 var styleElement = createElement("style"); |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1528 * @this {Element} | 1542 * @this {Element} |
| 1529 */ | 1543 */ |
| 1530 set type(type) | 1544 set type(type) |
| 1531 { | 1545 { |
| 1532 this._iconElement.className = type; | 1546 this._iconElement.className = type; |
| 1533 }, | 1547 }, |
| 1534 | 1548 |
| 1535 __proto__: HTMLLabelElement.prototype | 1549 __proto__: HTMLLabelElement.prototype |
| 1536 }); | 1550 }); |
| 1537 | 1551 |
| 1552 registerCustomElement("label", "dt-slider", { |
| 1553 /** |
| 1554 * @this {Element} |
| 1555 */ |
| 1556 createdCallback: function() |
| 1557 { |
| 1558 var root = WebInspector.createShadowRootWithCoreStyles(this, "ui/sli
der.css"); |
| 1559 this.sliderElement = createElementWithClass("input", "dt-range-input
"); |
| 1560 this.sliderElement.type = "range"; |
| 1561 root.appendChild(this.sliderElement); |
| 1562 }, |
| 1563 |
| 1564 /** |
| 1565 * @param {number} amount |
| 1566 * @this {Element} |
| 1567 */ |
| 1568 set value(amount) |
| 1569 { |
| 1570 this.sliderElement.value = amount; |
| 1571 }, |
| 1572 |
| 1573 /** |
| 1574 * @this {Element} |
| 1575 */ |
| 1576 get value() |
| 1577 { |
| 1578 return this.sliderElement.value; |
| 1579 }, |
| 1580 |
| 1581 __proto__: HTMLLabelElement.prototype |
| 1582 }); |
| 1583 |
| 1538 registerCustomElement("label", "dt-small-bubble", { | 1584 registerCustomElement("label", "dt-small-bubble", { |
| 1539 /** | 1585 /** |
| 1540 * @this {Element} | 1586 * @this {Element} |
| 1541 */ | 1587 */ |
| 1542 createdCallback: function() | 1588 createdCallback: function() |
| 1543 { | 1589 { |
| 1544 var root = WebInspector.createShadowRootWithCoreStyles(this, "ui/sma
llBubble.css"); | 1590 var root = WebInspector.createShadowRootWithCoreStyles(this, "ui/sma
llBubble.css"); |
| 1545 this._textElement = root.createChild("div"); | 1591 this._textElement = root.createChild("div"); |
| 1546 this._textElement.className = "info"; | 1592 this._textElement.className = "info"; |
| 1547 this._textElement.createChild("content"); | 1593 this._textElement.createChild("content"); |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1960 * @param {string} title | 2006 * @param {string} title |
| 1961 * @return {!Element} | 2007 * @return {!Element} |
| 1962 */ | 2008 */ |
| 1963 WebInspector.linkifyDocumentationURLAsNode = function(article, title) | 2009 WebInspector.linkifyDocumentationURLAsNode = function(article, title) |
| 1964 { | 2010 { |
| 1965 return WebInspector.linkifyURLAsNode("https://developers.google.com/web/tool
s/chrome-devtools/" + article, title, undefined, true); | 2011 return WebInspector.linkifyURLAsNode("https://developers.google.com/web/tool
s/chrome-devtools/" + article, title, undefined, true); |
| 1966 } | 2012 } |
| 1967 | 2013 |
| 1968 /** @type {!WebInspector.ThemeSupport} */ | 2014 /** @type {!WebInspector.ThemeSupport} */ |
| 1969 WebInspector.themeSupport; | 2015 WebInspector.themeSupport; |
| OLD | NEW |