Changeset 76692 in webkit


Ignore:
Timestamp:
Jan 26, 2011 9:19:06 AM (13 years ago)
Author:
pfeldman@chromium.org
Message:

2011-01-26 Pavel Feldman <pfeldman@chromium.org>

Reviewed by Yury Semikhatsky.

Web Inspector: visualize \n in strings as unicode cr
symbol in stack variables sidebar.
https://bugs.webkit.org/show_bug.cgi?id=53162

  • inspector/front-end/ObjectPropertiesSection.js: (WebInspector.ObjectPropertyTreeElement.prototype.update):
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r76691 r76692  
     12011-01-26  Pavel Feldman  <pfeldman@chromium.org>
     2
     3        Reviewed by Yury Semikhatsky.
     4
     5        Web Inspector: visualize \n in strings as unicode cr
     6        symbol in stack variables sidebar.
     7        https://bugs.webkit.org/show_bug.cgi?id=53162
     8
     9        * inspector/front-end/ObjectPropertiesSection.js:
     10        (WebInspector.ObjectPropertyTreeElement.prototype.update):
     11
    1122011-01-26  Andrey Kosyakov  <caseq@chromium.org>
    213
  • trunk/Source/WebCore/inspector/front-end/ObjectPropertiesSection.js

    r73913 r76692  
    181181        this.valueElement = document.createElement("span");
    182182        this.valueElement.className = "value";
    183         this.valueElement.textContent = this.property.value.description;
     183
     184        var description = this.property.value.description;
     185        // Render \n as a nice unicode cr symbol.
     186        if (this.property.value.type === "string" && typeof description === "string")
     187            description = description.replace(/\n/g, "\u21B5");
     188        this.valueElement.textContent = description;
     189
    184190        if (this.property.isGetter)
    185191            this.valueElement.addStyleClass("dimmed");
Note: See TracChangeset for help on using the changeset viewer.