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

Side by Side Diff: Source/devtools/front_end/OverridesView.js

Issue 25735003: Add text autosizing override in the inspector. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix typeo Created 7 years, 2 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 | « Source/devtools/front_end/OverridesSupport.js ('k') | Source/devtools/front_end/Settings.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 blockElement.appendChild(contentElements[i]); 68 blockElement.appendChild(contentElements[i]);
69 } 69 }
70 70
71 this.containerElement = topContainer; 71 this.containerElement = topContainer;
72 appendBlock([this._createUserAgentControl()]); 72 appendBlock([this._createUserAgentControl()]);
73 appendBlock([this._createDeviceMetricsControl()]); 73 appendBlock([this._createDeviceMetricsControl()]);
74 appendBlock([this._createGeolocationOverrideControl()]); 74 appendBlock([this._createGeolocationOverrideControl()]);
75 appendBlock([this._createDeviceOrientationOverrideControl()]); 75 appendBlock([this._createDeviceOrientationOverrideControl()]);
76 appendBlock([WebInspector.SettingsTab.createSettingCheckbox(WebInspector.UIS tring("Emulate touch events"), WebInspector.settings.emulateTouchEvents)]); 76 appendBlock([WebInspector.SettingsTab.createSettingCheckbox(WebInspector.UIS tring("Emulate touch events"), WebInspector.settings.emulateTouchEvents)]);
77 appendBlock([this._createMediaEmulationElement()]); 77 appendBlock([this._createMediaEmulationElement()]);
78 appendBlock([this._createTextAutosizingOverrideControl()]);
78 this._setOverridesActive(enableCheckbox.checked); 79 this._setOverridesActive(enableCheckbox.checked);
79 80
80 this._statusElement = document.createElement("span"); 81 this._statusElement = document.createElement("span");
81 this._statusElement.textContent = WebInspector.UIString("Overrides"); 82 this._statusElement.textContent = WebInspector.UIString("Overrides");
82 } 83 }
83 84
84 WebInspector.OverridesView.showInDrawer = function() 85 WebInspector.OverridesView.showInDrawer = function()
85 { 86 {
86 if (!WebInspector.OverridesView._view) 87 if (!WebInspector.OverridesView._view)
87 WebInspector.OverridesView._view = new WebInspector.OverridesView(); 88 WebInspector.OverridesView._view = new WebInspector.OverridesView();
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 mediaSelectElement.addEventListener("change", this._emulateMediaChanged. bind(this, mediaSelectElement), false); 581 mediaSelectElement.addEventListener("change", this._emulateMediaChanged. bind(this, mediaSelectElement), false);
581 return checkbox; 582 return checkbox;
582 }, 583 },
583 584
584 _emulateMediaChanged: function(select) 585 _emulateMediaChanged: function(select)
585 { 586 {
586 var media = select.options[select.selectedIndex].value; 587 var media = select.options[select.selectedIndex].value;
587 WebInspector.settings.emulatedCSSMedia.set(media); 588 WebInspector.settings.emulatedCSSMedia.set(media);
588 }, 589 },
589 590
591 _createTextAutosizingOverrideControl: function()
592 {
593 var overrideCheckbox = WebInspector.SettingsTab.createSettingCheckbox(We bInspector.UIString("Override text autosizing"), WebInspector.settings.overrideT extAutosizing);
594 var fieldsetElement = WebInspector.SettingsTab.createSettingFieldset(Web Inspector.settings.overrideTextAutosizing);
595 overrideCheckbox.appendChild(fieldsetElement);
596
597 var enableTextAutosizingCheckbox = WebInspector.SettingsTab.createSettin gCheckbox(WebInspector.UIString("Enable text autosizing"), WebInspector.settings .enableTextAutosizing);
598 fieldsetElement.appendChild(enableTextAutosizingCheckbox);
599
600 enableTextAutosizingCheckbox.addEventListener("change", this._enableText AutosizingChanged.bind(this, enableTextAutosizingCheckbox.checked), false);
601 return overrideCheckbox;
602 },
603
604 _enableTextAutosizingChanged: function(enable)
605 {
606 WebInspector.settings.enableTextAutosizing.set(enable);
607 },
608
590 __proto__: WebInspector.View.prototype 609 __proto__: WebInspector.View.prototype
591 } 610 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/OverridesSupport.js ('k') | Source/devtools/front_end/Settings.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698