Title: [141230] trunk/Source/WebCore
- Revision
- 141230
- Author
- commit-qu...@webkit.org
- Date
- 2013-01-30 00:05:23 -0800 (Wed, 30 Jan 2013)
Log Message
Web Inspector: DTE adds additional space to the end of line.
https://bugs.webkit.org/show_bug.cgi?id=108192
Patch by Andrey Lushnikov <lushni...@chromium.org> on 2013-01-30
Reviewed by Pavel Feldman.
Append overlay highlight spans before decorations elements and skip
them in _collectLinesFromDom method.
No new tests.
* inspector/front-end/DefaultTextEditor.js:
(WebInspector.TextEditorMainPanel.prototype._appendOverlayHighlight):
(WebInspector.TextEditorMainPanel.prototype._collectLinesFromDOM):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (141229 => 141230)
--- trunk/Source/WebCore/ChangeLog 2013-01-30 07:48:12 UTC (rev 141229)
+++ trunk/Source/WebCore/ChangeLog 2013-01-30 08:05:23 UTC (rev 141230)
@@ -1,3 +1,19 @@
+2013-01-30 Andrey Lushnikov <lushni...@chromium.org>
+
+ Web Inspector: DTE adds additional space to the end of line.
+ https://bugs.webkit.org/show_bug.cgi?id=108192
+
+ Reviewed by Pavel Feldman.
+
+ Append overlay highlight spans before decorations elements and skip
+ them in _collectLinesFromDom method.
+
+ No new tests.
+
+ * inspector/front-end/DefaultTextEditor.js:
+ (WebInspector.TextEditorMainPanel.prototype._appendOverlayHighlight):
+ (WebInspector.TextEditorMainPanel.prototype._collectLinesFromDOM):
+
2013-01-29 Shinya Kawanaka <shin...@chromium.org>
Renderer is recreated unexpectedly after detach in HTMLInputElement
Modified: trunk/Source/WebCore/inspector/front-end/DefaultTextEditor.js (141229 => 141230)
--- trunk/Source/WebCore/inspector/front-end/DefaultTextEditor.js 2013-01-30 07:48:12 UTC (rev 141229)
+++ trunk/Source/WebCore/inspector/front-end/DefaultTextEditor.js 2013-01-30 08:05:23 UTC (rev 141230)
@@ -1880,12 +1880,13 @@
var cssClass = highlight.cssClass;
for(var i = 0; i < metrics.length; ++i) {
var highlightSpan = document.createElement("span");
+ highlightSpan._isOverlayHighlightElement = true;
highlightSpan.addStyleClass(cssClass);
highlightSpan.style.left = (metrics[i].left - extraWidth) + "px";
highlightSpan.style.width = (metrics[i].width + extraWidth * 2) + "px";
highlightSpan.textContent = " ";
highlightSpan.addStyleClass("text-editor-overlay-highlight");
- lineRow.appendChild(highlightSpan);
+ lineRow.insertBefore(highlightSpan, lineRow.decorationsElement);
}
},
@@ -2573,12 +2574,12 @@
var textContents = [];
var hasContent = false;
for (var node = from ? from.nextSibling : this._container; node && node !== to; node = node.traverseNextNode(this._container)) {
- if (node._isDecorationsElement) {
- // Skip all children of the decoration container.
+ // Skip all children of the decoration container and overlay highlight spans.
+ while (node && node !== to && (node._isDecorationsElement || node._isOverlayHighlightElement))
node = node.nextSibling;
- if (!node || node === to)
- break;
- }
+ if (!node || node === to)
+ break;
+
hasContent = true;
if (node.nodeName.toLowerCase() === "br")
textContents.push("\n");
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes