Changeset 121751 in webkit


Ignore:
Timestamp:
Jul 3, 2012 2:49:46 AM (12 years ago)
Author:
apavlov@chromium.org
Message:

Web Inspector: [Elements] Text formatting is not retained when editing <script> or <style> contents as text
https://bugs.webkit.org/show_bug.cgi?id=90440

Reviewed by Vsevolod Vlasov.

  • inspector/front-end/ElementsTreeOutline.js:

(WebInspector.ElementsTreeElement.prototype._startEditingTextNode):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r121750 r121751  
     12012-07-03  Alexander Pavlov  <apavlov@chromium.org>
     2
     3        Web Inspector: [Elements] Text formatting is not retained when editing <script> or <style> contents as text
     4        https://bugs.webkit.org/show_bug.cgi?id=90440
     5
     6        Reviewed by Vsevolod Vlasov.
     7
     8        * inspector/front-end/ElementsTreeOutline.js:
     9        (WebInspector.ElementsTreeElement.prototype._startEditingTextNode):
     10
    1112012-07-03  Vsevolod Vlasov  <vsevik@chromium.org>
    212
  • trunk/Source/WebCore/inspector/front-end/ElementsTreeOutline.js

    r121112 r121751  
    11801180            return true;
    11811181
     1182        var container = textNode.enclosingNodeOrSelfWithClass("webkit-html-text-node");
     1183        if (container)
     1184            container.innerText = container.innerText; // Strip the CSS or JS highlighting if present.
    11821185        var config = new WebInspector.EditingConfig(this._textNodeEditingCommitted.bind(this), this._editingCancelled.bind(this));
    11831186        this._editing = WebInspector.startEditing(textNode, config);
Note: See TracChangeset for help on using the changeset viewer.