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

Side by Side Diff: Source/WebCore/inspector/front-end/HandlerRegistry.js

Issue 10828339: Merge 125668 - Web Inspector: [REGRESSION] "save as" of edited source in developer mode fails to up… (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1229/
Patch Set: Created 8 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
« 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 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 contentType !== WebInspector.resourceTypes.Script) 120 contentType !== WebInspector.resourceTypes.Script)
121 return; 121 return;
122 122
123 function doSave(forceSaveAs, content) 123 function doSave(forceSaveAs, content)
124 { 124 {
125 WebInspector.fileManager.save(contentProvider.contentURL(), content, forceSaveAs); 125 WebInspector.fileManager.save(contentProvider.contentURL(), content, forceSaveAs);
126 } 126 }
127 127
128 function save(forceSaveAs) 128 function save(forceSaveAs)
129 { 129 {
130 if (contentProvider instanceof WebInspector.UISourceCode) {
131 var uiSourceCode = /** @type {WebInspector.UISourceCode} */ cont entProvider;
132 if (uiSourceCode.isDirty()) {
133 doSave(forceSaveAs, uiSourceCode.workingCopy());
134 return;
135 }
136 }
130 contentProvider.requestContent(doSave.bind(this, forceSaveAs)); 137 contentProvider.requestContent(doSave.bind(this, forceSaveAs));
131 } 138 }
132 139
133 contextMenu.appendSeparator(); 140 contextMenu.appendSeparator();
134 contextMenu.appendItem(WebInspector.UIString("Save"), save.bind(this, fa lse)); 141 contextMenu.appendItem(WebInspector.UIString("Save"), save.bind(this, fa lse));
135 contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMe nuTitles() ? "Save as..." : "Save As..."), save.bind(this, true)); 142 contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMe nuTitles() ? "Save as..." : "Save As..."), save.bind(this, true));
136 } 143 }
137 } 144 }
138 145
139 WebInspector.HandlerRegistry.EventTypes = { 146 WebInspector.HandlerRegistry.EventTypes = {
(...skipping 30 matching lines...) Expand all
170 } 177 }
171 this.element.disabled = names.length <= 1; 178 this.element.disabled = names.length <= 1;
172 }, 179 },
173 180
174 _onChange: function(event) 181 _onChange: function(event)
175 { 182 {
176 var value = event.target.value; 183 var value = event.target.value;
177 this._handlerRegistry.activeHandler = value; 184 this._handlerRegistry.activeHandler = value;
178 } 185 }
179 } 186 }
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