Changeset 141230 in webkit


Ignore:
Timestamp:
Jan 30, 2013 12:05:23 AM (11 years ago)
Author:
commit-queue@webkit.org
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 <lushnikov@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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r141228 r141230  
     12013-01-30  Andrey Lushnikov  <lushnikov@chromium.org>
     2
     3        Web Inspector: DTE adds additional space to the end of line.
     4        https://bugs.webkit.org/show_bug.cgi?id=108192
     5
     6        Reviewed by Pavel Feldman.
     7
     8        Append overlay highlight spans before decorations elements and skip
     9        them in _collectLinesFromDom method.
     10
     11        No new tests.
     12
     13        * inspector/front-end/DefaultTextEditor.js:
     14        (WebInspector.TextEditorMainPanel.prototype._appendOverlayHighlight):
     15        (WebInspector.TextEditorMainPanel.prototype._collectLinesFromDOM):
     16
    1172013-01-29  Shinya Kawanaka  <shinyak@chromium.org>
    218
  • trunk/Source/WebCore/inspector/front-end/DefaultTextEditor.js

    r141111 r141230  
    18811881        for(var i = 0; i < metrics.length; ++i) {
    18821882            var highlightSpan = document.createElement("span");
     1883            highlightSpan._isOverlayHighlightElement = true;
    18831884            highlightSpan.addStyleClass(cssClass);
    18841885            highlightSpan.style.left = (metrics[i].left - extraWidth) + "px";
     
    18861887            highlightSpan.textContent = " ";
    18871888            highlightSpan.addStyleClass("text-editor-overlay-highlight");
    1888             lineRow.appendChild(highlightSpan);
     1889            lineRow.insertBefore(highlightSpan, lineRow.decorationsElement);
    18891890        }
    18901891    },
     
    25742575        var hasContent = false;
    25752576        for (var node = from ? from.nextSibling : this._container; node && node !== to; node = node.traverseNextNode(this._container)) {
    2576             if (node._isDecorationsElement) {
    2577                 // Skip all children of the decoration container.
     2577            // Skip all children of the decoration container and overlay highlight spans.
     2578            while (node && node !== to && (node._isDecorationsElement || node._isOverlayHighlightElement))
    25782579                node = node.nextSibling;
    2579                 if (!node || node === to)
    2580                     break;
    2581             }
     2580            if (!node || node === to)
     2581                break;
     2582
    25822583            hasContent = true;
    25832584            if (node.nodeName.toLowerCase() === "br")
Note: See TracChangeset for help on using the changeset viewer.