Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 337405

Summary: XslfoDocumentBuilder assumes that image width is specified in pixels
Product: z_Archived Reporter: Torkild Resheim <torkildr>
Component: MylynAssignee: Torkild Resheim <torkildr>
Status: RESOLVED FIXED QA Contact: David Green <greensopinion>
Severity: normal    
Priority: P3 Keywords: contributed
Version: unspecified   
Target Milestone: 1.4.0   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 338891    
Bug Blocks:    
Attachments:
Description Flags
Patch to handle image width in both pixels and percent
greensopinion: iplog+
mylyn/context/zip
none
mylyn/context/zip none

Description Torkild Resheim CLA 2011-02-17 05:16:33 EST
The WikiText markup parser support image sizes being in pixels and in percent. The XslfoDocumentBuilder assumes that the image width is in pixels and does not support that the size may be specified in percent. Note that the HtmlDocumentBuilder does support both formats. In other words when generating HTML a image size of 50% will show up as normal. But when generating XSL:FO the size will be 50pixels.
Comment 1 Torkild Resheim CLA 2011-02-17 07:12:23 EST
Created attachment 189168 [details]
Patch to handle image width in both pixels and percent
Comment 2 Torkild Resheim CLA 2011-02-17 07:12:25 EST
Created attachment 189169 [details]
mylyn/context/zip
Comment 3 David Green CLA 2011-03-03 00:57:25 EST
Thanks, patch applied with minor changes.  I wrote  a JUnit test @org.eclipse.mylyn.wikitext.core.parser.XslfoDocumentBuilderTest@, feel free to expand on tests with future patches.
Comment 4 David Green CLA 2011-03-03 00:57:28 EST
Created attachment 190236 [details]
mylyn/context/zip
Comment 5 Steffen Pingel CLA 2011-03-03 01:38:33 EST
David, please note that we are past the contribution deadline for 1.4 (3.5). Shouldn't be a problem since we are still iterating over the IP log but please be aware that we can't accept any further contributions for this release cycle: http://dev.eclipse.org/mhonarc/lists/mylyn-dev/msg01202.html .
Comment 6 David Green CLA 2011-03-03 01:50:40 EST
Thanks for pointing that out Steffen.  If it's a problem I'll update the target milestone and we can build WikiText for 3.5 off a branch.