Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(400)

Side by Side Diff: Source/devtools/front_end/toolbox/MediaQueryInspector.js

Issue 478953002: DevTools: [MQI] add tooltips for ruler serifs (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698