| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @constructor | 6 * @constructor |
| 7 * @extends {WebInspector.Widget} | 7 * @extends {WebInspector.Widget} |
| 8 * @implements {WebInspector.TargetManager.Observer} | 8 * @implements {WebInspector.TargetManager.Observer} |
| 9 */ | 9 */ |
| 10 WebInspector.MediaQueryInspector = function() | 10 WebInspector.MediaQueryInspector = function() |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 var labelClass = model.section() === WebInspector.MediaQueryInspecto
r.Section.MinMax ? "media-inspector-label-right" : "media-inspector-label-left"; | 334 var labelClass = model.section() === WebInspector.MediaQueryInspecto
r.Section.MinMax ? "media-inspector-label-right" : "media-inspector-label-left"; |
| 335 var labelContainer = markerElement.createChild("div", "media-inspect
or-marker-label-container media-inspector-marker-label-container-left"); | 335 var labelContainer = markerElement.createChild("div", "media-inspect
or-marker-label-container media-inspector-marker-label-container-left"); |
| 336 labelContainer.createChild("span", "media-inspector-marker-label " +
labelClass).textContent = model.minWidthExpression().value() + model.minWidthEx
pression().unit(); | 336 labelContainer.createChild("span", "media-inspector-marker-label " +
labelClass).textContent = model.minWidthExpression().value() + model.minWidthEx
pression().unit(); |
| 337 } | 337 } |
| 338 | 338 |
| 339 if (model.maxWidthExpression()) { | 339 if (model.maxWidthExpression()) { |
| 340 var labelClass = model.section() === WebInspector.MediaQueryInspecto
r.Section.MinMax ? "media-inspector-label-left" : "media-inspector-label-right"; | 340 var labelClass = model.section() === WebInspector.MediaQueryInspecto
r.Section.MinMax ? "media-inspector-label-left" : "media-inspector-label-right"; |
| 341 var labelContainer = markerElement.createChild("div", "media-inspect
or-marker-label-container media-inspector-marker-label-container-right"); | 341 var labelContainer = markerElement.createChild("div", "media-inspect
or-marker-label-container media-inspector-marker-label-container-right"); |
| 342 labelContainer.createChild("span", "media-inspector-marker-label " +
labelClass).textContent = model.maxWidthExpression().value() + model.maxWidthEx
pression().unit(); | 342 labelContainer.createChild("span", "media-inspector-marker-label " +
labelClass).textContent = model.maxWidthExpression().value() + model.maxWidthEx
pression().unit(); |
| 343 } | 343 } |
| 344 markerElement.title = model.mediaText(); | 344 var tooltipOptions = {}; |
| 345 tooltipOptions[WebInspector.Tooltip.Options.VerticalAlignmentTop] = true
; |
| 346 tooltipOptions[WebInspector.Tooltip.Options.HorizontalAlignUnderCursor]
= true; |
| 347 WebInspector.Tooltip.install(markerElement, model.mediaText(), "", toolt
ipOptions); |
| 345 | 348 |
| 346 return markerElement; | 349 return markerElement; |
| 347 }, | 350 }, |
| 348 | 351 |
| 349 __proto__: WebInspector.Widget.prototype | 352 __proto__: WebInspector.Widget.prototype |
| 350 }; | 353 }; |
| 351 | 354 |
| 352 /** | 355 /** |
| 353 * @constructor | 356 * @constructor |
| 354 * @param {!WebInspector.CSSMedia} cssMedia | 357 * @param {!WebInspector.CSSMedia} cssMedia |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 }, | 497 }, |
| 495 | 498 |
| 496 /** | 499 /** |
| 497 * @return {boolean} | 500 * @return {boolean} |
| 498 */ | 501 */ |
| 499 active: function() | 502 active: function() |
| 500 { | 503 { |
| 501 return this._active; | 504 return this._active; |
| 502 } | 505 } |
| 503 } | 506 } |
| OLD | NEW |