Bug 425201

Summary: [SOLUTION] the firefox-1.5-pango-justified-range.patch breaks rasterization
Product: [Fedora] Fedora Reporter: Andy Shevchenko <andy>
Component: firefoxAssignee: Gecko Maintainer <gecko-bugs-nobody>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: medium    
Version: 7CC: behdad, leon, mcepl, tagoh
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: firefox3INSUFFICIENT_DATAmassClosing
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-04-09 14:05:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Use justify alignment.
none
Result with justify applied.
none
Clean version.
none
PosScript result for clean version. none

Description Andy Shevchenko 2007-12-14 16:38:06 UTC
Description of problem:
The construction with ALIGN="justify" does not correctly printed in the 
PostScript document (and on printer as well).

Version-Release number of selected component (if applicable):
All firefoxes with the applied firefox-1.5-pango-justified-range patch.

How reproducible:
Just see attachments and their comments.

Additional info:
Revert back the next line in the patch is solved issue.

>> //aRenderingContext.GetRangeWidth(top, aLength, offset, offset + 1, 
(PRUint32&)charWidth);
<< aRenderingContext.GetWidth(ch, charWidth);

P.S. The issue was tested on the Hebrew (UTF-8) HTML. The result the same as 
for russian/ukrainian.

Comment 1 Andy Shevchenko 2007-12-14 16:38:06 UTC
Created attachment 289181 [details]
Use justify alignment.

Comment 2 Andy Shevchenko 2007-12-14 16:39:38 UTC
Created attachment 289211 [details]
Result with justify applied.

Comment 3 Andy Shevchenko 2007-12-14 16:40:13 UTC
Created attachment 289221 [details]
Clean version.

Comment 4 Andy Shevchenko 2007-12-14 16:41:09 UTC
Created attachment 289231 [details]
PosScript result for clean version.

Comment 5 Christopher Aillon 2007-12-14 17:13:01 UTC
Behdad, this is your patch... what do you think?

Comment 6 Behdad Esfahbod 2007-12-16 20:15:50 UTC
It was actually Akira's patch.  CC'ing him.  I'll check it out tomorrow to see
if it's obviously wrong.

Comment 7 Behdad Esfahbod 2007-12-17 18:08:54 UTC
(In reply to comment #0)
> Description of problem:
> The construction with ALIGN="justify" does not correctly printed in the 
> PostScript document (and on printer as well).
> 
> Version-Release number of selected component (if applicable):
> All firefoxes with the applied firefox-1.5-pango-justified-range patch.
> 
> How reproducible:
> Just see attachments and their comments.
> 
> Additional info:
> Revert back the next line in the patch is solved issue.
> 
> >> //aRenderingContext.GetRangeWidth(top, aLength, offset, offset + 1, 
> (PRUint32&)charWidth);
> << aRenderingContext.GetWidth(ch, charWidth);

The bug is with that "offset + 1" which assumes that the character there is one
byte.  It should be "offset + charWidth" I guess.  Can someone try that and
commit/build/whatever if it fixes the problem?  Thanks.

> P.S. The issue was tested on the Hebrew (UTF-8) HTML. The result the same as 
> for russian/ukrainian.
  


Comment 8 Behdad Esfahbod 2007-12-17 18:09:33 UTC
There are three places in that patch that can use this fix.

Comment 9 Andy Shevchenko 2007-12-18 08:54:18 UTC
(In reply to comment #7)
> The bug is with that "offset + 1" which assumes that the character there is 
one
> byte.  It should be "offset + charWidth" I guess.

As I understand correctly the charWidth isn't a multibyte length but the 
rendered width in the real pixels. So am I wrong?


Comment 10 Behdad Esfahbod 2008-01-02 23:00:31 UTC
Oh is it?  In that case it needs more work.  I think that's the issue anyway,
the assumption that the char there is 1 unit.

Comment 11 Matěj Cepl 2008-02-21 22:34:33 UTC
At this point, we're going to only be taking security fixes and major stability
fixes into this release of Fedora.  However, we still want to ensure the bug is
fixed in the next version.  We'd appreciate if you could test Firefox 3,
available at http://www.mozilla.com/en-US/firefox/all-beta.html or now shipping
as the default in Fedora rawhide and provide feedback as to whether it still
exists so we can file a ticket upstream to try to fix it in Firefox 3 before it
is released.

Comment 12 Matěj Cepl 2008-02-21 22:35:47 UTC
At this point, we're going to only be taking security fixes and major stability
fixes into this release of Fedora.  However, we still want to ensure the bug is
fixed in the next version.  We'd appreciate if you could test Firefox 3,
available at http://www.mozilla.com/en-US/firefox/all-beta.html or now shipping
as the default in Fedora rawhide and provide feedback as to whether it still
exists so we can file a ticket upstream to try to fix it in Firefox 3 before it
is released.

Comment 13 Matěj Cepl 2008-04-09 14:05:03 UTC
Since there are insufficient details provided in this report for us to
investigate the issue further, and we have not received feedback to the
information we have requested above, we will assume the problem was not
reproducible, or has been fixed in one of the updates we have released for the
reporter's distribution.

Users who have experienced this problem are encouraged to upgrade to the latest
update of their distribution, and if this issue turns out to still be
reproducible in the latest update, please reopen this bug with additional
information.

Closing as INSUFFICIENT_DATA.

[This is a mass-closing request, if you think that this bug shouldn't be closed,
please, reopen with additional information.]