Title: [89128] trunk/Source/WebCore
- Revision
- 89128
- Author
- commit-qu...@webkit.org
- Date
- 2011-06-17 01:49:09 -0700 (Fri, 17 Jun 2011)
Log Message
2011-06-17 Andrey Adaikin <aand...@google.com>
Reviewed by Pavel Feldman.
Web Inspector: Source code which includes non-Latin character does not correspond to line number field on Inspector
https://bugs.webkit.org/show_bug.cgi?id=62845
* inspector/front-end/TextViewer.js:
(WebInspector.TextViewer.prototype._syncLineHeight):
(WebInspector.TextEditorGutterPanel):
(WebInspector.TextEditorGutterChunk.prototype.set expanded):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (89127 => 89128)
--- trunk/Source/WebCore/ChangeLog 2011-06-17 08:19:26 UTC (rev 89127)
+++ trunk/Source/WebCore/ChangeLog 2011-06-17 08:49:09 UTC (rev 89128)
@@ -1,3 +1,15 @@
+2011-06-17 Andrey Adaikin <aand...@google.com>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: Source code which includes non-Latin character does not correspond to line number field on Inspector
+ https://bugs.webkit.org/show_bug.cgi?id=62845
+
+ * inspector/front-end/TextViewer.js:
+ (WebInspector.TextViewer.prototype._syncLineHeight):
+ (WebInspector.TextEditorGutterPanel):
+ (WebInspector.TextEditorGutterChunk.prototype.set expanded):
+
2011-06-16 Yury Semikhatsky <yu...@chromium.org>
Reviewed by Pavel Feldman.
Modified: trunk/Source/WebCore/inspector/front-end/TextViewer.js (89127 => 89128)
--- trunk/Source/WebCore/inspector/front-end/TextViewer.js 2011-06-17 08:19:26 UTC (rev 89127)
+++ trunk/Source/WebCore/inspector/front-end/TextViewer.js 2011-06-17 08:49:09 UTC (rev 89128)
@@ -44,8 +44,9 @@
var exitTextChangeMode = this._exitInternalTextChangeMode.bind(this);
var syncScrollListener = this._syncScroll.bind(this);
var syncDecorationsForLineListener = this._syncDecorationsForLine.bind(this);
+ var syncLineHeightListener = this._syncLineHeight.bind(this);
this._mainPanel = new WebInspector.TextEditorMainPanel(this._textModel, url, syncScrollListener, syncDecorationsForLineListener, enterTextChangeMode, exitTextChangeMode);
- this._gutterPanel = new WebInspector.TextEditorGutterPanel(this._textModel, syncDecorationsForLineListener);
+ this._gutterPanel = new WebInspector.TextEditorGutterPanel(this._textModel, syncDecorationsForLineListener, syncLineHeightListener);
this.element.appendChild(this._mainPanel.element);
this.element.appendChild(this._gutterPanel.element);
@@ -229,6 +230,16 @@
}
},
+ _syncLineHeight: function(gutterRow) {
+ if (this._lineHeightSynced)
+ return;
+ if (gutterRow && gutterRow.offsetHeight) {
+ // Force equal line heights for the child panels.
+ this.element.style.setProperty("line-height", gutterRow.offsetHeight + "px");
+ this._lineHeightSynced = true;
+ }
+ },
+
_doubleClick: function(event)
{
if (!this.readOnly)
@@ -636,11 +647,12 @@
}
}
-WebInspector.TextEditorGutterPanel = function(textModel, syncDecorationsForLineListener)
+WebInspector.TextEditorGutterPanel = function(textModel, syncDecorationsForLineListener, syncLineHeightListener)
{
WebInspector.TextEditorChunkedPanel.call(this, textModel);
this._syncDecorationsForLineListener = syncDecorationsForLineListener;
+ this._syncLineHeightListener = syncLineHeightListener;
this.element = document.createElement("div");
this.element.className = "text-editor-lines";
@@ -798,6 +810,7 @@
this._expandedLineRows.push(lineRow);
}
parentElement.removeChild(this.element);
+ this._textViewer._syncLineHeightListener(this._expandedLineRows[0]);
} else {
var elementInserted = false;
for (var i = 0; i < this._expandedLineRows.length; ++i) {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes