Summary: | Run UserAgentScripts through jsmin rather than the css preprocessor | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Jer Noble <jer.noble> | ||||||||
Component: | New Bugs | Assignee: | Jer Noble <jer.noble> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | calvaris, eric.carlson, thorton | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Description
Jer Noble
2014-01-24 08:35:11 PST
Created attachment 222109 [details]
Patch
Created attachment 222156 [details]
Patch
Apparently the Windows EWS bots don't have python2.7.
Comment on attachment 222156 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=222156&action=review > Source/WebCore/Scripts/make-js-file-arrays.py:2 > +# Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. Cool, you went back in time? Created attachment 222733 [details]
Patch
Now, in the future!
Comment on attachment 222733 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=222733&action=review > Source/WebCore/Scripts/make-js-file-arrays.py:31 > +def stringifyCodepoint(code): I think this can be replaced by code.encode('unicode-escape')? Comment on attachment 222733 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=222733&action=review > Source/WebCore/Scripts/make-js-file-arrays.py:60 > + print >> sourceFile, '#include "%s"' % os.path.basename(headerPath) Fairly sure % is deprecated and you should be using .format and the new syntax. > Source/WebCore/Scripts/make-js-file-arrays.py:73 > + characters = inputStream.read(-1) -1 is the default here, and weird to use explicitly (In reply to comment #6) > (From update of attachment 222733 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=222733&action=review > > > Source/WebCore/Scripts/make-js-file-arrays.py:60 > > + print >> sourceFile, '#include "%s"' % os.path.basename(headerPath) > > Fairly sure % is deprecated and you should be using .format and the new syntax. Only in Python 3.1. I don't think we've updated our script to all the 3.0 conventions yet. > > Source/WebCore/Scripts/make-js-file-arrays.py:73 > > + characters = inputStream.read(-1) > > -1 is the default here, and weird to use explicitly I'll remove it. Committed r163906: <http://trac.webkit.org/changeset/163906> (In reply to comment #7) > (In reply to comment #6) > > (From update of attachment 222733 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=222733&action=review > > > > > Source/WebCore/Scripts/make-js-file-arrays.py:60 > > > + print >> sourceFile, '#include "%s"' % os.path.basename(headerPath) > > > > Fairly sure % is deprecated and you should be using .format and the new syntax. > > Only in Python 3.1. I don't think we've updated our script to all the 3.0 conventions yet. Deprecated in 3+, sure, but string.format() is available in 2.x, so using it now just means less headache during the eventual transition :) I don't actually care either way. > > > Source/WebCore/Scripts/make-js-file-arrays.py:73 > > > + characters = inputStream.read(-1) > > > > -1 is the default here, and weird to use explicitly > > I'll remove it. (In reply to comment #9) > (In reply to comment #7) > > (In reply to comment #6) > > > (From update of attachment 222733 [details] [details] [details]) > > > View in context: https://bugs.webkit.org/attachment.cgi?id=222733&action=review > > > > > > > Source/WebCore/Scripts/make-js-file-arrays.py:60 > > > > + print >> sourceFile, '#include "%s"' % os.path.basename(headerPath) > > > > > > Fairly sure % is deprecated and you should be using .format and the new syntax. > > > > Only in Python 3.1. I don't think we've updated our script to all the 3.0 conventions yet. > > Deprecated in 3+, sure, but string.format() is available in 2.x, so using it now just means less headache during the eventual transition :) I don't actually care either way. Yep. I committed with .format(). :) |