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.View} | 7 * @extends {WebInspector.View} |
8 * @implements {WebInspector.TargetManager.Observer} | 8 * @implements {WebInspector.TargetManager.Observer} |
9 */ | 9 */ |
10 WebInspector.MediaQueryInspector = function() | 10 WebInspector.MediaQueryInspector = function() |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
350 }, | 350 }, |
351 | 351 |
352 _renderRulerDecorations: function() | 352 _renderRulerDecorations: function() |
353 { | 353 { |
354 this._rulerDecorationLayer.removeChildren(); | 354 this._rulerDecorationLayer.removeChildren(); |
355 var zoomFactor = this._zoomFactor(); | 355 var zoomFactor = this._zoomFactor(); |
356 | 356 |
357 var thresholds = this._mediaQueryThresholds(); | 357 var thresholds = this._mediaQueryThresholds(); |
358 for (var i = 0; i < thresholds.length; ++i) { | 358 for (var i = 0; i < thresholds.length; ++i) { |
359 var thresholdElement = this._rulerDecorationLayer.createChild("div", "media-inspector-threshold-serif"); | 359 var thresholdElement = this._rulerDecorationLayer.createChild("div", "media-inspector-threshold-serif"); |
360 thresholdElement.title = thresholds[i] + "px"; | |
dgozman
2014/08/16 17:54:13
Do you think we should round the value?
lushnikov
2014/08/16 18:18:52
They are integers - no need for conversion here.
| |
360 thresholdElement._value = thresholds[i]; | 361 thresholdElement._value = thresholds[i]; |
361 thresholdElement.style.left = (thresholds[i] - this._offset) / zoomF actor + "px"; | 362 thresholdElement.style.left = (thresholds[i] - this._offset) / zoomF actor + "px"; |
362 } | 363 } |
363 }, | 364 }, |
364 | 365 |
365 wasShown: function() | 366 wasShown: function() |
366 { | 367 { |
367 this._renderMediaQueries(); | 368 this._renderMediaQueries(); |
368 }, | 369 }, |
369 | 370 |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
547 }, | 548 }, |
548 | 549 |
549 /** | 550 /** |
550 * @return {?WebInspector.CSSMediaQueryExpression} | 551 * @return {?WebInspector.CSSMediaQueryExpression} |
551 */ | 552 */ |
552 maxWidthExpression: function() | 553 maxWidthExpression: function() |
553 { | 554 { |
554 return this._maxWidthExpression; | 555 return this._maxWidthExpression; |
555 } | 556 } |
556 } | 557 } |
OLD | NEW |