Bug 25881 - [PATCH] relative font-size gets calculated twice.
Summary: [PATCH] relative font-size gets calculated twice.
Status: CLOSED FIXED
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: general (show other bugs)
Version: trunk
Hardware: Other other
: P3 normal
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-03 21:03 UTC by Finn Bock
Modified: 2012-04-01 06:30 UTC (History)
0 users



Attachments
A unified diff against HEAD. (854 bytes, patch)
2004-01-03 21:04 UTC, Finn Bock
Details | Diff
A testcase .fo (518 bytes, text/plain)
2004-01-03 21:04 UTC, Finn Bock
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Finn Bock 2004-01-03 21:03:56 UTC
When the font-size property has a relative value that depends on font-size, the 
computation is done twice.

The testcase uses font-size="2em" which should be a 24pt font, but the result 
is shown in 48pt.
Comment 1 Finn Bock 2004-01-03 21:04:32 UTC
Created attachment 9787 [details]
A unified diff against HEAD.
Comment 2 Finn Bock 2004-01-03 21:04:48 UTC
Created attachment 9788 [details]
A testcase .fo
Comment 3 Glen Mazza 2004-01-04 05:35:21 UTC
Finn,

I ran this with your sample .FO before and after applying the patch, and saw no 
difference in the output.

Two days ago, however, I added in Simon's patch preventing the duplication of 
processing base-only attributes (including "font-size") in 
ConvertAttributeToProperty():

            if (subPropertyName == null) { // base attribute only found
                /* Do nothing if the base property has already been created.
                 * This is e.g. the case when a compound attribute was
                 * specified before the base attribute; in these cases
                 * the base attribute was already created in 
                 * findBaseProperty()
                 */
                if (getExplicitBaseProp(basePropertyName) != null) {
                    return;
                }

I think Simon's change already fixes the problem you're mentioning here--so 
your patch may not be needed.  Certainly, at least on my side, it appears the 
second processing of font-size is being ignored now.  

Comments?

Thanks,
Glen
Comment 4 Finn Bock 2004-01-04 21:36:19 UTC
Glen, you are absolutely right, Simon's patch fixes this problem too.

I'm sorry about the inconvenience.
Comment 5 Glenn Adams 2012-04-01 06:30:31 UTC
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed