Open Bug 1326065 Opened 7 years ago Updated 2 years ago

[rtl] Image error messages are reversed on RTL

Categories

(Core :: Layout: Images, Video, and HTML Frames, defect)

defect

Tracking

()

People

(Reporter: tomer, Unassigned)

References

()

Details

(Keywords: rtl)

Attachments

(4 files)

When viewing an image file that can't be loaded, the error message doesn't preserve the browser RTL. 

Steps to reproduce: Open the attached [broken] image file in a new browser window.
Assignee: nobody → tomer.moz.bugs
Status: NEW → ASSIGNED
Attachment #8822214 - Flags: review?(dbaron)
Comment on attachment 8822214 [details]
Bug 1326065 - [rtl] Images error message is reversed on RTL

https://reviewboard.mozilla.org/r/101194/#review101714

::: layout/style/TopLevelImageDocument.css:11
(Diff revision 1)
> +html:-moz-locale-dir(rtl) {
> +  direction: rtl;
> +}

This fix is causing problems when the image is larger than the viewport.
Could you perhaps attach a screenshot showing what the bug looks like? (in a browser with a RTL locale)
Flags: needinfo?(tomer.moz.bugs)
(In reply to Daniel Holbert [:dholbert] (vacation until 12/28) from comment #3)
> Could you perhaps attach a screenshot showing what the bug looks like? (in a
> browser with a RTL locale)

Sure! The attached image show how the alt message of the image in attachment 0. The next update will contain how it should behave.
Flags: needinfo?(tomer.moz.bugs)
Attached is the expected result. I've simulated it with <html dir="rtl"> as html{direction:rtl} doesn't feature horizontal scrolling for some reasons.
(In reply to Tomer Cohen :tomer from comment #5)
> Attached is the expected result. I've simulated it with <html dir="rtl"> as
> html{direction:rtl} doesn't feature horizontal scrolling for some reasons.

It really ought to, though.  See the code starting from ScrollFrameHelper::GetUnsnappedScrolledRectInternal or ScrollFrameHelper::GetScrolledRect, including the way IsBidiLTR (which seems suspiciously wrong for vertical writing -- not sure why it's not IsPhysicalLTR), and, through that, GetFrameForDir, are used for the aDirection parameter passed to nsLayoutUtils::GetScrolledRect.
Summary: [rtl] Images error message is reversed on RTL → [rtl] Image error message are reversed on RTL
Summary: [rtl] Image error message are reversed on RTL → [rtl] Image error messages are reversed on RTL
Comment on attachment 8822214 [details]
Bug 1326065 - [rtl] Images error message is reversed on RTL

https://reviewboard.mozilla.org/r/101194/#review102700

Given comment 2, cancelling review for now, but feel free to rerequest (including immediately, if I'm misunderstanding the status).
Attachment #8822214 - Flags: review?(dbaron)
Product: Core → Core Graveyard
Product: Core Graveyard → Core

The bug assignee didn't login in Bugzilla in the last 7 months, so the assignee is being reset.

Assignee: tomer.moz.bugs → nobody
Status: ASSIGNED → NEW

FWIW I just confirmed the bug still exists as-described. (I tested Hebrew-language Firefox 100, and I loaded the attached broken-image testcase, and [after resizing my browser] I confirmed that I see output like the screenshot in comment 4.)

hmm, I'm not seeing the issues that Tomer described as potential pitfalls when fixing this. Specifically:

  • I can add html { direction: rtl } to TopLevelImageDocument.css (in devtools at least, in a Hebrew-localized Firefox) and horizontal scrolling still seems to work just fine [regarding the issue described in comment 5]
  • I'm not seeing any problems (using this fix) when the image is larger than the viewport [regarding the issue described in comment 2]. The image overflows and I can scroll it.

Maybe we've fixed some underlying scrolling issues and we can just fix this now?

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: