Bug 47800 - [PATCH] CSS scanner does not tokenize correctly vendor specific CSS properties (such as -moz-border-radius)
Summary: [PATCH] CSS scanner does not tokenize correctly vendor specific CSS propertie...
Status: NEW
Alias: None
Product: Batik - Now in Jira
Classification: Unclassified
Component: CSS (show other bugs)
Version: 1.8
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Batik Developer's Mailing list
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2009-09-08 05:09 UTC by Nicolas Garnier
Modified: 2009-10-18 09:24 UTC (History)
0 users



Attachments
Corrected Scanner.java (45.49 KB, text/plain)
2009-09-08 05:09 UTC, Nicolas Garnier
Details
PATCH file for Scanner.java (2.20 KB, patch)
2009-09-08 10:43 UTC, Nicolas Garnier
Details | Diff
PATCH file for Scanner.java (2.28 KB, patch)
2009-10-07 12:13 UTC, Nicolas Garnier
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Garnier 2009-09-08 05:09:12 UTC
Created attachment 24226 [details]
Corrected Scanner.java

CSS properties such as -moz-border-radius or -webkit-border-radius (all
properties starting with '-') are not tokenized correctly by the CSS scanner.

Instead of being tokenized as LexicalUnits.IDENTIFIER the first character is
tokenized as LexicalUnits.MINUS and the rest of the properties fails to
tokenize.

Corrected version of the Scanner.java file is attached.
Comment 1 Helder Magalhães 2009-09-08 07:55:35 UTC
(In reply to comment #0)
> Created an attachment (id=24226) [details]
> Corrected Scanner.java

Thanks for the report and the correction proposal. :-)


> Corrected version of the Scanner.java file is attached.

(Also about adding the "[PATCH]" prefix...) Note that attaching a patched file is not the same as attaching a patch. ;-)

I've tried to merge your file with the current trunk code but, given you provided no information about the Batik release where the file was taken, the process can harder. Please provide this information (Batik release and/or revision where this file was taken from) or attach a "real" patch (even better, if you are able to).
Comment 2 Nicolas Garnier 2009-09-08 10:43:27 UTC
Created attachment 24230 [details]
PATCH file for Scanner.java
Comment 3 Nicolas Garnier 2009-09-08 10:45:15 UTC
Hey Helder,

Thanks a lot for looking into this!

Sorry about not posting a patch file, it was pretty late last night and I really had to got to bed :D

The batik release I worked on is Batik 1.6 (checkout out from the tags tree)

I attached a PATCH file this time.
Please tell me if any regressions occurred or any other pbs.
Comment 4 Helder Magalhães 2009-09-18 06:18:49 UTC
(In reply to comment #3)
> The batik release I worked on is Batik 1.6 (checkout out from the tags tree)

This is a pretty outdated version... :-|


> Please tell me if any regressions occurred or any other pbs.

Regressions in which sense? Typically, one tries to assure no regressions are made. What may be happening is that you fix is already included in the current trunk version (1.8, as of this writing).

I'd invite you to compare the trunk source with the version 1.6 code and try to attach a patch to the current trunk version: as far as I know, there is no work in legacy versions. At least, that's what I would to in order to try integrating your bug fix into the trunk code... ;-)

I may be able to get my hands into this, but I currently can't predict if nor when.
Comment 5 Nicolas Garnier 2009-09-29 14:05:02 UTC
Hey Helder,

Sorry about the delay, I'm a little swamped at work but as soon as I can get some time I'll submit a patch for batik 1.8 (that should not be a pb). The bug still seems to be there in 1.8 but, just in case, I'll run some more tests when as soon as that crazy period at work is over :)

Cheers!
Comment 6 Nicolas Garnier 2009-10-07 12:13:22 UTC
Created attachment 24359 [details]
PATCH file for Scanner.java

Hey Helder,

Here is the PATCH file for Batik 1.8
(The bug was still there in Batik 1.8)

I hope this one will be the good one :D

Cheers!

Thanks again for your time
Comment 7 Helder Magalhães 2009-10-18 09:24:25 UTC
(In reply to comment #6)
> Here is the PATCH file for Batik 1.8
> (The bug was still there in Batik 1.8)

Updated target version accordingly.


> I hope this one will be the good one :D

Thanks, Nicolas! :-)

The patch now needs to be reviewed/committed by someone commit rights. Thomas, could you take a look at this and/or detail on further steps which are needed (regard test cases, maybe?) before this can be landed?