OLD | NEW |
1 <!-- | 1 <!-- |
2 Copyright (C) 2012 Google Inc. All rights reserved. | 2 Copyright (C) 2012 Google Inc. All rights reserved. |
3 | 3 |
4 Redistribution and use in source and binary forms, with or without | 4 Redistribution and use in source and binary forms, with or without |
5 modification, are permitted provided that the following conditions | 5 modification, are permitted provided that the following conditions |
6 are met: | 6 are met: |
7 | 7 |
8 1. Redistributions of source code must retain the above copyright | 8 1. Redistributions of source code must retain the above copyright |
9 notice, this list of conditions and the following disclaimer. | 9 notice, this list of conditions and the following disclaimer. |
10 2. Redistributions in binary form must reproduce the above copyright | 10 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
828 showSelectorTooltip(); | 828 showSelectorTooltip(); |
829 } | 829 } |
830 | 830 |
831 function showSelectorTooltip() | 831 function showSelectorTooltip() |
832 { | 832 { |
833 var tooltipElement = document.getElementById("selector-tooltip"); | 833 var tooltipElement = document.getElementById("selector-tooltip"); |
834 tooltipElement.style.visibility = "visible"; | 834 tooltipElement.style.visibility = "visible"; |
835 tooltipElement.style.left = "100px"; | 835 tooltipElement.style.left = "100px"; |
836 tooltipElement.style.top = "100px"; | 836 tooltipElement.style.top = "100px"; |
837 var selectorInfo = JSON.parse(InspectorOverlayHost.currentSelectorInfo()); | 837 var selectorInfo = JSON.parse(InspectorOverlayHost.currentSelectorInfo()); |
838 tooltipElement.textContent = selectorInfo.selector; | 838 var medias = selectorInfo.medias ? selectorInfo.medias.map(function(media) {
return "@media " + media + ""}) : ""; |
| 839 tooltipElement.textContent = (medias ? medias.join(", ") + " { " : "") + se
lectorInfo.selector + ( medias ? " } " : ""); |
839 tooltipElement.style.backgroundColor = "#eee"; | 840 tooltipElement.style.backgroundColor = "#eee"; |
840 | 841 |
841 var matchedNodesCanvas = document.getElementById("layout-editor-matched-node
s-canvas"); | 842 var matchedNodesCanvas = document.getElementById("layout-editor-matched-node
s-canvas"); |
842 resetCanvas(matchedNodesCanvas); | 843 resetCanvas(matchedNodesCanvas); |
843 | 844 |
844 if (!selectorInfo.nodes) | 845 if (!selectorInfo.nodes) |
845 return; | 846 return; |
846 | 847 |
847 for (var nodeHighlight of selectorInfo.nodes) | 848 for (var nodeHighlight of selectorInfo.nodes) |
848 drawHighlight(nodeHighlight, matchedNodesCanvas.getContext("2d")); | 849 drawHighlight(nodeHighlight, matchedNodesCanvas.getContext("2d")); |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1160 <div id="tooltip-container" class="hidden"> | 1161 <div id="tooltip-container" class="hidden"> |
1161 <div id="element-tooltip"> | 1162 <div id="element-tooltip"> |
1162 <div id="element-description" class="monospace"><span id="material-tag-nam
e"></span><span id="material-node-id"></span><span id="material-class-name"></sp
an></div> | 1163 <div id="element-description" class="monospace"><span id="material-tag-nam
e"></span><span id="material-node-id"></span><span id="material-class-name"></sp
an></div> |
1163 <div id="dimensions"><span id="material-node-width"></span>×<span id=
"material-node-height"></span></div> | 1164 <div id="dimensions"><span id="material-node-width"></span>×<span id=
"material-node-height"></span></div> |
1164 </div> | 1165 </div> |
1165 <div id="element-tooltip-arrow"></div> | 1166 <div id="element-tooltip-arrow"></div> |
1166 <div id="editor" class="fill"></div> | 1167 <div id="editor" class="fill"></div> |
1167 <div id="selector-tooltip"></div> | 1168 <div id="selector-tooltip"></div> |
1168 <div id="log"></div> | 1169 <div id="log"></div> |
1169 </html> | 1170 </html> |
OLD | NEW |