Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / devtools / front_end / UISourceCodeFrame.js
index caaffdd..4781422 100644 (file)
@@ -42,9 +42,16 @@ WebInspector.UISourceCodeFrame = function(uiSourceCode)
     this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.WorkingCopyChanged, this._onWorkingCopyChanged, this);
     this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.WorkingCopyCommitted, this._onWorkingCopyCommitted, this);
     this._updateStyle();
+    this.addShortcut(WebInspector.KeyboardShortcut.makeKey("s", WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta), this._commitEditing.bind(this));
 }
 
 WebInspector.UISourceCodeFrame.prototype = {
+    _commitEditing: function()
+    {
+        this.commitEditing();
+        return true;
+    },
+
     /**
      * @return {!WebInspector.UISourceCode}
      */
@@ -94,10 +101,7 @@ WebInspector.UISourceCodeFrame.prototype = {
         this._uiSourceCode.checkContentUpdated();
     },
 
-    /**
-     * @param {string} text
-     */
-    commitEditing: function(text)
+    commitEditing: function()
     {
         if (!this._uiSourceCode.isDirty())
             return;