Bug 112073 - Text alignment is wrong in http://www.juniper.net/customers/support/
Summary: Text alignment is wrong in http://www.juniper.net/customers/support/
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Unclassified
Component: khtml (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal with 40 votes (vote)
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-05 13:19 UTC by Hasso Tepper
Modified: 2007-04-12 08:32 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Minimal testcase (217 bytes, text/html)
2005-12-07 18:57 UTC, Hasso Tepper
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hasso Tepper 2005-09-05 13:19:59 UTC
Version:           3.4.90 (using KDE 3.4.90 (alpha1, >= 20050806), compiled sources)
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.13-rc6-git9-rt9

http://www.juniper.net/customers/support/ right column, Login box. Alignment of text "User ID (ex. bob@abc.net)" is wrong.
Comment 1 Hasso Tepper 2005-12-07 18:57:03 UTC
Created attachment 13812 [details]
Minimal testcase

Note, that problem appears with label only, if label tags are removed, it's
rendered correctly.
Comment 2 Germain Garand 2007-01-28 21:06:39 UTC
SVN commit 627993 by ggarand:

only allow spilling of line boxes if it's consistent with current 
directionality.
(cherry picked in Webcore's r7692 from David Hyatt <hyatt@apple.com>)

BUG: 112073



 M  +4 -1      bidi.cpp  


--- trunk/KDE/kdelibs/khtml/rendering/bidi.cpp #627992:627993
@@ -729,6 +729,8 @@
     switch(style()->textAlign()) {
         case LEFT:
         case KHTML_LEFT:
+            if (style()->direction() == RTL && totWidth > availableWidth)
+                x -= (totWidth - availableWidth);
             numSpaces = 0;
             break;
         case JUSTIFY:
@@ -742,7 +744,8 @@
                 break;
         case RIGHT:
         case KHTML_RIGHT:
-            x += availableWidth - totWidth;
+            if (style()->direction() == RTL || totWidth < availableWidth)
+                x += availableWidth - totWidth;
             numSpaces = 0;
             break;
         case CENTER:
Comment 3 Hasso Tepper 2007-04-12 08:32:57 UTC
Any chance to get it backported into branch as well?