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

Unified Diff: Source/devtools/front_end/main/OverridesView.js

Issue 805853002: DevTools: Make labeled checkbox a web component (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/devtools/front_end/inspectorCommon.css ('k') | Source/devtools/front_end/settings/SettingsScreen.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/main/OverridesView.js
diff --git a/Source/devtools/front_end/main/OverridesView.js b/Source/devtools/front_end/main/OverridesView.js
index e2121ba6e45d3ccc4a10f4fe83adc256a2d90bfe..39322cd12d092e29760da4dc63612d13a1fdfbfd 100644
--- a/Source/devtools/front_end/main/OverridesView.js
+++ b/Source/devtools/front_end/main/OverridesView.js
@@ -513,13 +513,10 @@ WebInspector.OverridesView.SensorsTab.prototype = {
rowElement = tableElement.createChild("tr");
cellElement = rowElement.createChild("td");
cellElement.colSpan = 2;
- var geolocationErrorLabelElement = createElement("label");
- var geolocationErrorCheckboxElement = geolocationErrorLabelElement.createChild("input");
+ var geolocationErrorLabelElement = createCheckboxLabel(WebInspector.UIString("Emulate position unavailable"), !geolocation || !!geolocation.error);
+ var geolocationErrorCheckboxElement = geolocationErrorLabelElement.checkboxElement;
geolocationErrorCheckboxElement.id = "geolocation-error";
- geolocationErrorCheckboxElement.type = "checkbox";
- geolocationErrorCheckboxElement.checked = !geolocation || geolocation.error;
geolocationErrorCheckboxElement.addEventListener("click", this._applyGeolocationUserInput.bind(this), false);
- geolocationErrorLabelElement.createTextChild(WebInspector.UIString("Emulate position unavailable"));
this._geolocationErrorElement = geolocationErrorCheckboxElement;
cellElement.appendChild(geolocationErrorLabelElement);
« no previous file with comments | « Source/devtools/front_end/inspectorCommon.css ('k') | Source/devtools/front_end/settings/SettingsScreen.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698