Title: [109323] trunk/Source/WebCore
- Revision
- 109323
- Author
- [email protected]
- Date
- 2012-03-01 00:22:20 -0800 (Thu, 01 Mar 2012)
Log Message
Web Inspector: add UISourceCode.isEditable property.
https://bugs.webkit.org/show_bug.cgi?id=79909
Reviewed by Vsevolod Vlasov.
* inspector/front-end/DebuggerPresentationModel.js:
(WebInspector.DebuggerPresentationModel.prototype.canEditScriptSource):
* inspector/front-end/RawSourceCode.js:
(WebInspector.RawSourceCode.prototype._createUISourceCode):
* inspector/front-end/UISourceCode.js:
(WebInspector.UISourceCode):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (109322 => 109323)
--- trunk/Source/WebCore/ChangeLog 2012-03-01 08:05:21 UTC (rev 109322)
+++ trunk/Source/WebCore/ChangeLog 2012-03-01 08:22:20 UTC (rev 109323)
@@ -1,3 +1,17 @@
+2012-02-29 Pavel Podivilov <[email protected]>
+
+ Web Inspector: add UISourceCode.isEditable property.
+ https://bugs.webkit.org/show_bug.cgi?id=79909
+
+ Reviewed by Vsevolod Vlasov.
+
+ * inspector/front-end/DebuggerPresentationModel.js:
+ (WebInspector.DebuggerPresentationModel.prototype.canEditScriptSource):
+ * inspector/front-end/RawSourceCode.js:
+ (WebInspector.RawSourceCode.prototype._createUISourceCode):
+ * inspector/front-end/UISourceCode.js:
+ (WebInspector.UISourceCode):
+
2012-02-29 Shinya Kawanaka <[email protected]>
Fallback elements in non-youngest shadow tree should not be rendered.
Modified: trunk/Source/WebCore/inspector/front-end/DebuggerPresentationModel.js (109322 => 109323)
--- trunk/Source/WebCore/inspector/front-end/DebuggerPresentationModel.js 2012-03-01 08:05:21 UTC (rev 109322)
+++ trunk/Source/WebCore/inspector/front-end/DebuggerPresentationModel.js 2012-03-01 08:22:20 UTC (rev 109323)
@@ -264,11 +264,7 @@
*/
canEditScriptSource: function(uiSourceCode)
{
- if (!WebInspector.debuggerModel.canSetScriptSource() || this._formatSource)
- return false;
- var rawSourceCode = uiSourceCode.rawSourceCode;
- var script = this._scriptForRawSourceCode(rawSourceCode);
- return script && !script.lineOffset && !script.columnOffset;
+ return WebInspector.debuggerModel.canSetScriptSource() && uiSourceCode.isEditable;
},
/**
Modified: trunk/Source/WebCore/inspector/front-end/RawSourceCode.js (109322 => 109323)
--- trunk/Source/WebCore/inspector/front-end/RawSourceCode.js 2012-03-01 08:05:21 UTC (rev 109322)
+++ trunk/Source/WebCore/inspector/front-end/RawSourceCode.js 2012-03-01 08:22:20 UTC (rev 109323)
@@ -259,6 +259,8 @@
{
var uiSourceCode = new WebInspector.UISourceCode(id, url, this, contentProvider);
uiSourceCode.isContentScript = this.isContentScript;
+ uiSourceCode.isEditable = this._scripts.length === 1 && !this._scripts[0].lineOffset && !this._scripts[0].columnOffset
+ && !this._formatted && !this._compilerSourceMapping;
return uiSourceCode;
},
Modified: trunk/Source/WebCore/inspector/front-end/UISourceCode.js (109322 => 109323)
--- trunk/Source/WebCore/inspector/front-end/UISourceCode.js 2012-03-01 08:05:21 UTC (rev 109322)
+++ trunk/Source/WebCore/inspector/front-end/UISourceCode.js 2012-03-01 08:22:20 UTC (rev 109323)
@@ -43,6 +43,7 @@
this._rawSourceCode = rawSourceCode;
this._contentProvider = contentProvider;
this.isContentScript = false;
+ this.isEditable = false;
/**
* @type Array.<function(string,string)>
*/
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes