Web Inspector: [TextEditor] Line numbers out of sync after closing breakpoint conditi...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 Sep 2012 09:39:31 +0000 (09:39 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 Sep 2012 09:39:31 +0000 (09:39 +0000)
https://bugs.webkit.org/show_bug.cgi?id=96510

Patch by Andrey Adaikin <aandrey@chromium.org> on 2012-09-24
Reviewed by Vsevolod Vlasov.

Sync line heights on adding/removing decorations.

* inspector/front-end/DefaultTextEditor.js:
(WebInspector.TextEditorGutterChunk):
(WebInspector.TextEditorGutterChunk.prototype.addDecoration):
(WebInspector.TextEditorGutterChunk.prototype.removeDecoration):
(WebInspector.TextEditorGutterChunk.prototype.set expanded):
(WebInspector.TextEditorGutterChunk.prototype.get height):
(WebInspector.TextEditorGutterChunk.prototype._createRow):
(WebInspector.TextEditorMainChunk.prototype.addDecoration):
(WebInspector.TextEditorMainChunk.prototype.removeDecoration):
(WebInspector.TextEditorMainChunk.prototype.removeAllDecorations):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@129339 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/inspector/front-end/DefaultTextEditor.js

index 603016c..0ef0c55 100644 (file)
@@ -1,3 +1,23 @@
+2012-09-24  Andrey Adaikin  <aandrey@chromium.org>
+
+        Web Inspector: [TextEditor] Line numbers out of sync after closing breakpoint condition editor
+        https://bugs.webkit.org/show_bug.cgi?id=96510
+
+        Reviewed by Vsevolod Vlasov.
+
+        Sync line heights on adding/removing decorations.
+
+        * inspector/front-end/DefaultTextEditor.js:
+        (WebInspector.TextEditorGutterChunk):
+        (WebInspector.TextEditorGutterChunk.prototype.addDecoration):
+        (WebInspector.TextEditorGutterChunk.prototype.removeDecoration):
+        (WebInspector.TextEditorGutterChunk.prototype.set expanded):
+        (WebInspector.TextEditorGutterChunk.prototype.get height):
+        (WebInspector.TextEditorGutterChunk.prototype._createRow):
+        (WebInspector.TextEditorMainChunk.prototype.addDecoration):
+        (WebInspector.TextEditorMainChunk.prototype.removeDecoration):
+        (WebInspector.TextEditorMainChunk.prototype.removeAllDecorations):
+
 2012-09-21  Andrey Kosyakov  <caseq@chromium.org>
 
         Web Inspector: support saving HAR with resources content
index 3a45c6a..f90b902 100644 (file)
@@ -204,6 +204,7 @@ WebInspector.DefaultTextEditor.prototype = {
     {
         this._mainPanel.addDecoration(lineNumber, element);
         this._gutterPanel.addDecoration(lineNumber, element);
+        this._syncDecorationsForLine(lineNumber);
     },
 
     /**
@@ -214,6 +215,7 @@ WebInspector.DefaultTextEditor.prototype = {
     {
         this._mainPanel.removeDecoration(lineNumber, element);
         this._gutterPanel.removeDecoration(lineNumber, element);
+        this._syncDecorationsForLine(lineNumber);
     },
 
     /**