Changeset 189909 in webkit


Ignore:
Timestamp:
Sep 17, 2015 12:28:52 AM (9 years ago)
Author:
commit-queue@webkit.org
Message:

REGRESSION(r188427): Web Inspector: Extra whitespace left behind in styles sidebar after clicking in and out
https://bugs.webkit.org/show_bug.cgi?id=149197

Patch by Devin Rousso <Devin Rousso> on 2015-09-17
Reviewed by Timothy Hatcher.

In r188427, logic was added to preserve the leading whitespace of styles in a CSS file.
An unfortunate side effect of this was that extra newlines in between CSS properties
were treated as valid and left where they were. This is undesired behaviour and often
clutters the styles sidebar. These changes remove the extra newlines.

  • UserInterface/Views/CSSStyleDeclarationTextEditor.js:

(WebInspector.CSSStyleDeclarationTextEditor.prototype._formattedContent):

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r189907 r189909  
     12015-09-17  Devin Rousso  <dcrousso+webkit@gmail.com>
     2
     3        REGRESSION(r188427): Web Inspector: Extra whitespace left behind in styles sidebar after clicking in and out
     4        https://bugs.webkit.org/show_bug.cgi?id=149197
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        In r188427, logic was added to preserve the leading whitespace of styles in a CSS file.
     9        An unfortunate side effect of this was that extra newlines in between CSS properties
     10        were treated as valid and left where they were.  This is undesired behaviour and often
     11        clutters the styles sidebar.  These changes remove the extra newlines.
     12
     13        * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
     14        (WebInspector.CSSStyleDeclarationTextEditor.prototype._formattedContent):
     15
    1162015-09-16  Joseph Pecoraro  <pecoraro@apple.com>
    217
  • trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js

    r188427 r189909  
    727727        content += this._suffixWhitespace;
    728728
    729         return content;
     729        // This regular expression replacement removes extra newlines
     730        // in between properties while preserving leading whitespace
     731        return content.replace(/\s*\n\s*\n(\s*)/g, "\n$1");
    730732    }
    731733
Note: See TracChangeset for help on using the changeset viewer.