Bug 83001

Summary: Introduce another file-to-array script
Product: WebKit Reporter: Kent Tamura <tkent>
Component: Tools / TestsAssignee: Kent Tamura <tkent>
Status: RESOLVED FIXED    
Severity: Normal CC: haraken, morrita
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 53961, 83011    
Attachments:
Description Flags
Patch haraken: review+

Description Kent Tamura 2012-04-02 23:33:53 PDT
Introduce another file-to-array script
Comment 1 Kent Tamura 2012-04-02 23:43:48 PDT
Created attachment 135280 [details]
Patch
Comment 2 Kent Tamura 2012-04-02 23:45:00 PDT
This will be used in Bug 53961.  A WIP patch in Bug 53961 demonstrates how to use this.
Comment 3 Kentaro Hara 2012-04-02 23:59:38 PDT
Comment on attachment 135280 [details]
Patch 

View in context: https://bugs.webkit.org/attachment.cgi?id=135280&action=review

> Source/WebCore/ChangeLog:12
> +        - No whitespace stripping for CSS files

Maybe we want to support an option to strip whitespaces in make-file-arrays.py, and then remove make-css-file-arrays.pl (in another patch).

> Source/WebCore/make-file-arrays.py:30
> +# Usage: make-file-arrays.py [--condition=condition-string] --out-h=<header-file-name> --out-cpp=<cpp-file-name> <input-file>...

Nit: [--condition=conditional-flag-name] might be descriptive.

> Source/WebCore/make-file-arrays.py:39
> +    result = re.match(r"(\w+)\.(\w+)", os.path.basename(file_name))

r"([\w\d_]+)\.([\w\d_]+))" might be better?
Comment 4 Kent Tamura 2012-04-03 00:03:43 PDT
(In reply to comment #3)
> (From update of attachment 135280 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=135280&action=review
> 
> > Source/WebCore/ChangeLog:12
> > +        - No whitespace stripping for CSS files
> 
> Maybe we want to support an option to strip whitespaces in make-file-arrays.py, and then remove make-css-file-arrays.pl (in another patch).

Yes.  I'd like to integrate make-css-file-arrays.pl and xxd.pl into this in the future.

> > Source/WebCore/make-file-arrays.py:30
> > +# Usage: make-file-arrays.py [--condition=condition-string] --out-h=<header-file-name> --out-cpp=<cpp-file-name> <input-file>...
> 
> Nit: [--condition=conditional-flag-name] might be descriptive.

We can specify this flag like --condition="ENABLE(CALENDAR_PICKER) && ENABLE(PAGE_POPUP)".  So, this isn't a name.

> > Source/WebCore/make-file-arrays.py:39
> > +    result = re.match(r"(\w+)\.(\w+)", os.path.basename(file_name))
> 
> r"([\w\d_]+)\.([\w\d_]+))" might be better?

Looks nice.  I'll apply it.
Comment 5 Kent Tamura 2012-04-03 00:15:11 PDT
Committed r112988: <http://trac.webkit.org/changeset/112988>