Closed
Bug 427739
Opened 17 years ago
Closed 17 years ago
in RTL builds, popups for site identity and star hang the wrong way
Categories
(Firefox :: Address Bar, defect)
Firefox
Address Bar
Tracking
()
VERIFIED
FIXED
Firefox 3.1a1
People
(Reporter: mcdavis941.bugs, Assigned: ehsan.akhgari)
Details
(Keywords: rtl, Whiteboard: [has patch][has review][RC2-])
Attachments
(2 files, 2 obsolete files)
135.84 KB,
image/jpeg
|
Details | |
3.69 KB,
patch
|
ehsan.akhgari
:
review+
samuel.sidler+old
:
approval1.9.0.4-
|
Details | Diff | Splinter Review |
In RTL (hebrew) builds, the site identity and star popups hand toward the outsides of the window, when they should hang toward to middle of the location bar as they do in LTR builds.
Screenshot compares the layout in LTR vs RTL builds.
Using:
Mozilla/5.0 (Windows; U; Windows NT 5.1; he; rv:1.9pre) Gecko/2008040706 Minefield/3.0pre
Reporter | ||
Comment 1•17 years ago
|
||
Comment 2•17 years ago
|
||
I thought I had seen this before, but I can't now find another report.
Whiteboard: DUPEME
Updated•17 years ago
|
Flags: in-litmus?
Assignee | ||
Comment 3•17 years ago
|
||
This is an RTl bug, not a Hebrew-specific bug.
Summary: in RTL (hebrew) build, popups for site identity and star hang the wrong way → in RTL builds, popups for site identity and star hang the wrong way
Assignee | ||
Comment 4•17 years ago
|
||
I don't know of any dupe, and couldn't find one after an extensive search. I'll be posting a patch here.
Assignee: nobody → ehsan.akhgari
Whiteboard: DUPEME
Assignee | ||
Updated•17 years ago
|
Status: NEW → ASSIGNED
OS: Windows XP → All
Hardware: PC → All
Assignee | ||
Comment 5•17 years ago
|
||
Simple patch to reverse the direction in RTL mode.
Attachment #319791 -
Flags: review?(mano)
Assignee | ||
Updated•17 years ago
|
Attachment #319791 -
Flags: review?(mano) → review?(dao)
Comment 6•17 years ago
|
||
Comment on attachment 319791 [details] [diff] [review]
Patch (v1)
Please add a comment as to why this is right, e.g. that "they should hang toward to middle of the location bar".
>+ if (window.getComputedStyle(gBrowser, null).direction == "rtl")
Is gBrowser randomly chosen? Can you use document.documentElement instead, or read the chromedir attribute from somewhere?
Assignee | ||
Comment 7•17 years ago
|
||
(In reply to comment #6)
> (From update of attachment 319791 [details] [diff] [review])
> Please add a comment as to why this is right, e.g. that "they should hang
> toward to middle of the location bar".
Because the location bar stays LTR for the most part. The only thing which gets affected by the RTL setting is drop-down arrow for the location bar, which is an attempt to match the style for drop-down lists in RTL mode.
If they hang toward outside of the location bar, it wouldn't feel consistent with the LTR-ness of the location bar.
> >+ if (window.getComputedStyle(gBrowser, null).direction == "rtl")
>
> Is gBrowser randomly chosen? Can you use document.documentElement instead, or
> read the chromedir attribute from somewhere?
Hmmm, I could do that, but reading the computed style should be more robust, I guess, because that's what actually gets used during run-time. If the browser element is rasing any concerns, I could change that. Would you suggest document.documentElement is better? BTW, I used <http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/browser/base/content/tabbrowser.&rev=1.271&mark=1167-1169> as a pattern.
Comment 8•17 years ago
|
||
(In reply to comment #7)
> (In reply to comment #6)
> > (From update of attachment 319791 [details] [diff] [review] [details])
> > Please add a comment as to why this is right, e.g. that "they should hang
> > toward to middle of the location bar".
>
> Because the location bar stays LTR for the most part. The only thing which
> gets affected by the RTL setting is drop-down arrow for the location bar, which
> is an attempt to match the style for drop-down lists in RTL mode.
>
> If they hang toward outside of the location bar, it wouldn't feel consistent
> with the LTR-ness of the location bar.
So if the location bar was rtl, this wouldn't be an issue?
What I meant, though, is: Add a comment to the patch.
> Hmmm, I could do that, but reading the computed style should be more robust, I
> guess, because that's what actually gets used during run-time. If the browser
> element is rasing any concerns, I could change that. Would you suggest
> document.documentElement is better?
Yes, document.documentElement would make more sense since the location bar isn't a children of gBrowser.
chromdir would be faster, and I don't think there's a scenario where it would be incorrect.
Assignee | ||
Comment 9•17 years ago
|
||
(In reply to comment #8)
> (In reply to comment #7)
> > (In reply to comment #6)
> > > (From update of attachment 319791 [details] [diff] [review] [details] [details])
> > > Please add a comment as to why this is right, e.g. that "they should hang
> > > toward to middle of the location bar".
> >
> > Because the location bar stays LTR for the most part. The only thing which
> > gets affected by the RTL setting is drop-down arrow for the location bar, which
> > is an attempt to match the style for drop-down lists in RTL mode.
> >
> > If they hang toward outside of the location bar, it wouldn't feel consistent
> > with the LTR-ness of the location bar.
>
> So if the location bar was rtl, this wouldn't be an issue?
Yes, it wouldn't, because then for example the site identity button would appear at the right side of the location bar, and the popup would hang toward the left, and therefore, the middle of the location bar, as expected. The same logic applies to the bookmark properties dialog.
> What I meant, though, is: Add a comment to the patch.
Oh, sure. Sorry for the misunderstanding.
> > Hmmm, I could do that, but reading the computed style should be more robust, I
> > guess, because that's what actually gets used during run-time. If the browser
> > element is rasing any concerns, I could change that. Would you suggest
> > document.documentElement is better?
>
> Yes, document.documentElement would make more sense since the location bar
> isn't a children of gBrowser.
> chromdir would be faster, and I don't think there's a scenario where it would
> be incorrect.
OK, I used the chromedir attribute of urlbar in the new version of the patch.
Attachment #319791 -
Attachment is obsolete: true
Attachment #320362 -
Flags: review?(dao)
Attachment #319791 -
Flags: review?(dao)
Assignee | ||
Updated•17 years ago
|
Whiteboard: [has patch][needs review dao]
Comment 10•17 years ago
|
||
Comment on attachment 320362 [details] [diff] [review]
Patch (v1.1)
>+ if (document.getElementById("urlbar").getAttribute("chromedir") == "rtl")
>+ if (document.getElementById("urlbar").getAttribute("chromedir") == "rtl")
use gURLBar
Attachment #320362 -
Flags: review?(dao) → review+
Assignee | ||
Comment 11•17 years ago
|
||
(In reply to comment #10)
> (From update of attachment 320362 [details] [diff] [review])
> >+ if (document.getElementById("urlbar").getAttribute("chromedir") == "rtl")
>
> >+ if (document.getElementById("urlbar").getAttribute("chromedir") == "rtl")
>
> use gURLBar
Done. Carrying over the r+ flag.
Attachment #320362 -
Attachment is obsolete: true
Attachment #320382 -
Flags: review+
Assignee | ||
Updated•17 years ago
|
Flags: wanted1.9.0.x?
Whiteboard: [has patch][needs review dao] → [has patch][has review]
Assignee | ||
Updated•17 years ago
|
Whiteboard: [has patch][has review] → [has patch][has review][RC2?]
Updated•17 years ago
|
Whiteboard: [has patch][has review][RC2?] → [has patch][has review][RC2-]
Assignee | ||
Comment 13•17 years ago
|
||
Without this being fixed, RTL locales suffer from the weird directions. I think we should take this on 3.0.1, especially since it has a low-risk patch with r+.
Flags: blocking1.9.0.1?
Assignee | ||
Updated•17 years ago
|
Attachment #320382 -
Flags: approval1.9.0.1?
Updated•17 years ago
|
Flags: wanted1.9.0.x?
Flags: wanted1.9.0.x+
Flags: blocking1.9.0.1?
Flags: blocking1.9.0.1-
Updated•17 years ago
|
Attachment #320382 -
Flags: approval1.9.0.1? → approval1.9.0.2?
Comment 14•17 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3.1a1
Comment 15•17 years ago
|
||
Comment on attachment 320382 [details] [diff] [review]
Patch (v1.2)
Can we get a test for this patch before approving for 1.9?
Assignee | ||
Comment 16•17 years ago
|
||
(In reply to comment #15)
> (From update of attachment 320382 [details] [diff] [review])
> Can we get a test for this patch before approving for 1.9?
You mean an automated test? I'm not sure how I can test this as a chrometest... I assume that you're not looking for a litmus test of course...
Assignee | ||
Comment 17•17 years ago
|
||
Looking for help from sayrer. I need to know how I can go about creating an automated test for this patch. Thanks!
Comment 18•17 years ago
|
||
In a browser chrome test you could set the urlbar's chromedir attribute to "rtl" (given an ltr build), initiate a click on the identity button and check that the identity popup hangs the _wrong_ way (by comparing boxObject.screenX values). However, this would be pretty fragile and I wouldn't consider such a test overly useful. E.g. it would fail for no good reason if someone reimplements this using the computed style rather than the chromedir attribute.
Comment 19•17 years ago
|
||
Comment on attachment 320382 [details] [diff] [review]
Patch (v1.2)
Moving approval request out to 1.9.0.3.
Attachment #320382 -
Flags: approval1.9.0.2? → approval1.9.0.3?
Assignee | ||
Comment 20•17 years ago
|
||
(In reply to comment #18)
> In a browser chrome test you could set the urlbar's chromedir attribute to
> "rtl" (given an ltr build), initiate a click on the identity button and check
> that the identity popup hangs the _wrong_ way (by comparing boxObject.screenX
> values). However, this would be pretty fragile and I wouldn't consider such a
> test overly useful. E.g. it would fail for no good reason if someone
> reimplements this using the computed style rather than the chromedir attribute.
I agree that it would be too fragile. I can go ahead and write this test, but I guess a Litmus test would serve better here, especially with the Force RTL extension <https://addons.mozilla.org/addon/7438>.
What do you think, Samuel?
Comment 21•17 years ago
|
||
Let's go ahead and just get a Litmus test for this in lieu of an automated test.
Assignee | ||
Comment 22•17 years ago
|
||
Here's a shot at a Litmus test:
Testgroup: 3.0 Full Functional Tests (56)
Subgroup: UI Elements (890)
Testcase: Location bar popup direction in RTL mode.
Product: Firefox
Branch: 3.0
Author email: ehsan.akhgari@gmail.com
Steps to perform:
1. If you are using an RTL version of the browser (Hebrew, Arabic or Persian), skip to step 4.
2. If you don't already have the Force RTL extension, install it from <https://addons.mozilla.org/addon/7438> (requires login to AMO) and restart your browser.
3. From the Tools menu, select "Force RTL Direction".
4. Click on the site identity button.
5. Click on the star button if the current page is not already bookmarked.
6. Click on the star button.
Expected Results:
After step 4, the identity dialog which pops out should hang to the right side of the identity button you clicked, like the first picture of https://bugzilla.mozilla.org/attachment.cgi?id=314317. If the identity dialogs looks like the third picture, then the test has failed.
After step 6, the bookmark properties dialog which pops out should hang to the left side of the identity button you clicked, like the second picture of https://bugzilla.mozilla.org/attachment.cgi?id=314317. If the bookmark properties dialogs looks like the fourth picture, then the test has failed.
Regression Bug ID#: 427739
I'm not sure who to CC in order to get this in Litmus, so I'm trying Marcia...
Ehsan: testcase added as https://litmus.mozilla.org/show_test.cgi?id=7036.
Could you bump the version compatibility of https://addons.mozilla.org/en-US/firefox/addon/7438 to work with the nightlies? ftp://ftp.mozilla.org/pub/firefox/nightly/latest-mozilla-central-l10n/ doesn't seem to have any RTL-enabled builds...thanks!
Flags: in-litmus? → in-litmus+
Assignee | ||
Comment 24•17 years ago
|
||
(In reply to comment #23)
> Ehsan: testcase added as https://litmus.mozilla.org/show_test.cgi?id=7036.
Thanks for adding the testcase.
> Could you bump the version compatibility of
> https://addons.mozilla.org/en-US/firefox/addon/7438 to work with the nightlies?
> ftp://ftp.mozilla.org/pub/firefox/nightly/latest-mozilla-central-l10n/ doesn't
> seem to have any RTL-enabled builds...thanks!
Sure, done.
Verified FIXED using Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b1pre) Gecko/20080915032512 Minefield/3.1b1pre and the Force RTL add-on.
Status: RESOLVED → VERIFIED
Updated•17 years ago
|
Attachment #320382 -
Flags: approval1.9.0.4? → approval1.9.0.4-
Comment 26•17 years ago
|
||
Comment on attachment 320382 [details] [diff] [review]
Patch (v1.2)
We're opting not to take this in a maintenance release.
You need to log in
before you can comment on or make changes to this bug.
Description
•