WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 127559
Run UserAgentScripts through jsmin rather than the css preprocessor
https://bugs.webkit.org/show_bug.cgi?id=127559
Summary
Run UserAgentScripts through jsmin rather than the css preprocessor
Jer Noble
Reported
2014-01-24 08:35:11 PST
Run UserAgentScripts through jsmin rather than the css preprocessor
Attachments
Patch
(5.83 KB, patch)
2014-01-24 08:52 PST
,
Jer Noble
no flags
Details
Formatted Diff
Diff
Patch
(5.98 KB, patch)
2014-01-24 14:35 PST
,
Jer Noble
no flags
Details
Formatted Diff
Diff
Patch
(5.96 KB, patch)
2014-01-30 14:12 PST
,
Jer Noble
thorton
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Jer Noble
Comment 1
2014-01-24 08:52:19 PST
Created
attachment 222109
[details]
Patch
Jer Noble
Comment 2
2014-01-24 14:35:10 PST
Created
attachment 222156
[details]
Patch Apparently the Windows EWS bots don't have python2.7.
Eric Carlson
Comment 3
2014-01-24 14:43:25 PST
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?
Jer Noble
Comment 4
2014-01-30 14:12:32 PST
Created
attachment 222733
[details]
Patch Now, in the future!
Tim Horton
Comment 5
2014-02-05 11:11:54 PST
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')?
Tim Horton
Comment 6
2014-02-05 11:16:52 PST
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
Jer Noble
Comment 7
2014-02-11 13:12:43 PST
(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.
Jer Noble
Comment 8
2014-02-11 13:31:06 PST
Committed
r163906
: <
http://trac.webkit.org/changeset/163906
>
Tim Horton
Comment 9
2014-02-11 13:35:03 PST
(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.
Jer Noble
Comment 10
2014-02-11 13:40:30 PST
(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(). :)
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug