Closed Bug 338103 Opened 15 years ago Closed 15 years ago

regression: document.dir is "" unless it's set manually

Categories

(Core :: Layout: Text and Fonts, defect)

PowerPC
macOS
defect
Not set
major

Tracking

()

RESOLVED FIXED

People

(Reporter: mano, Unassigned)

References

Details

(Keywords: fixed1.8.1, regression)

Attachments

(1 file)

Found while working on bug 337998 (tested using a recent branch build):
 1. Open http://www.xslf.com
 2. choose one of the feeds from the feed menu button
 3. notice that "Switch Page Direction" work on second access only.

This is happening because the code in SwitchDocumentDirection relies on document.dir being either ltr or rtl:
    aWindow.document.dir = (aWindow.document.dir == "ltr" ? "rtl" : "ltr");

But document.dir seems to be an empty string before it is set manually. Note I've one semi-related change in my version of subscribe.xhtml - the <body> dir attribute is removed.
 
related to bug 80352 (which is supposed to be fixed on the branch)?
Flags: blocking1.9a1?
Flags: blocking1.8.1?
Hrm, this is actually a regression, it's reproducible in other LTR pages as well (e.g. bmo) where it worked fine in 1.8.0.
Severity: normal → major
Keywords: regression
Summary: document.dir is "" in firefox's subscribe.xhtml unless it is set manually → regression: document.dir is "" unless it's set manually
I can't reproduce this after backing out bug 80352
Depends on: 80352
Attached patch patchSplinter Review
Attachment #222194 - Flags: superreview?
Attachment #222194 - Flags: review?
Attachment #222194 - Flags: approval-branch-1.8.1?
Attachment #222194 - Flags: superreview?(bzbarsky)
Attachment #222194 - Flags: superreview?
Attachment #222194 - Flags: review?(bzbarsky)
Attachment #222194 - Flags: review?
Attachment #222194 - Flags: approval-branch-1.8.1?(bzbarsky)
Attachment #222194 - Flags: approval-branch-1.8.1?
Comment on attachment 222194 [details] [diff] [review]
patch

So who's the caller of SetBidi in this case?
Attachment #222194 - Flags: superreview?(bzbarsky)
Attachment #222194 - Flags: superreview+
Attachment #222194 - Flags: review?(bzbarsky)
Attachment #222194 - Flags: review+
Attachment #222194 - Flags: approval-branch-1.8.1?(bzbarsky)
Attachment #222194 - Flags: approval-branch-1.8.1+
GetUserPreferences from nsPresContext::Init

On branch that codepath doesn't always has a presshell, so I was crashing, which is why I put in that test in the branch version of bug 80352
Blocks: 80352
No longer depends on: 80352
Checked in
Status: NEW → RESOLVED
Closed: 15 years ago
Keywords: fixed1.8.1
Resolution: --- → FIXED
Flags: blocking1.9a1?
Flags: blocking1.8.1?
Component: Layout: BiDi Hebrew & Arabic → Layout: Text
QA Contact: layout.bidi → layout.fonts-and-text
You need to log in before you can comment on or make changes to this bug.