Open Bug 1326065 Opened 5 years ago Updated 3 years ago

[rtl] Image error messages are reversed on RTL

Categories

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

defect
Not set
normal

Tracking

()

ASSIGNED

People

(Reporter: tomer, Assigned: tomer)

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
You need to log in before you can comment on or make changes to this bug.