Changeset 206192 in webkit


Ignore:
Timestamp:
Sep 20, 2016 6:03:22 PM (8 years ago)
Author:
Joseph Pecoraro
Message:

REGRESSION(r205692): Minified builds have broken inspector
https://bugs.webkit.org/show_bug.cgi?id=162327
<rdar://problem/28370137>

Reviewed by Matt Baker.

  • Scripts/cssmin.py:

(cssminify):
Converge on the newer cssmin that we mistakenly dropped in r205692.
This knows how to handle more cases.

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r206183 r206192  
     12016-09-20  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        REGRESSION(r205692): Minified builds have broken inspector
     4        https://bugs.webkit.org/show_bug.cgi?id=162327
     5        <rdar://problem/28370137>
     6
     7        Reviewed by Matt Baker.
     8
     9        * Scripts/cssmin.py:
     10        (cssminify):
     11        Converge on the newer cssmin that we mistakenly dropped in r205692.
     12        This knows how to handle more cases.
     13
    1142016-09-20  Filip Pizlo  <fpizlo@apple.com>
    215
  • trunk/Source/JavaScriptCore/Scripts/cssmin.py

    r191312 r206192  
    3131        (r"\n", ""),                   # delete new lines
    3232        (r"\s+", " "),                 # change multiple spaces to one space
    33         (r"\s?([;:{},+>])\s?", r"\1"), # delete space where it is not needed
     33        (r"\s?([;{},~>!])\s?", r"\1"), # delete space where it is not needed
     34        (r":\s", ":"),                 # delete spaces after colons, but not before. E.g. do not break selectors "a :focus", "b :matches(...)", "c :not(...)" where the leading space is significant
     35        (r"\s?([-+])(?:\s(?![0-9(])(?!var))", r"\1"), # delete whitespace around + and - when not followed by a number, paren, or var(). E.g. strip for selector "a + b" but not "calc(a + b)" which requires spaces.
    3436        (r";}", "}")                   # change ';}' to '}' because the semicolon is not needed
    3537    )
     
    4244if __name__ == "__main__":
    4345    import sys
     46    if sys.version_info[0] == 3 and sys.stdin.encoding != 'UTF-8':
     47        import io
     48        sys.stdin = io.TextIOWrapper(sys.stdin.buffer, encoding='UTF-8')
    4449    sys.stdout.write(cssminify(sys.stdin.read()))
Note: See TracChangeset for help on using the changeset viewer.