Open Bug 251820 Opened 20 years ago Updated 2 years ago

Need nsDOMNSDocument method for GetBidiEnabled

Categories

(Core :: DOM: Core & HTML, defect)

defect

Tracking

()

People

(Reporter: ilya.konstantinov+future, Unassigned)

References

Details

I need to expose 'bool nsIDocument::GetBidiEnabled()' to JS, so my JS code 
could know whether BiDi algorithms were applied to the document. I propose to 
do it by adding a new readonly(*) attribute to the nsDOMNSDocument IDL iface, 
called 'bidi' or 'isBidi' (the convention seems to be omitting the 'is' from 
boolean attributes). 
 
This is needed so we could make some XUL menuitems appear only when dealing 
with BiDi documents, in order not to clutter the menu for non-BiDi-interested 
users. 
 
* Readonly, since in current Mozilla code, changing this option (via 
nsIDocument::SetBidiEnabled) doesn't have the expected effect of disabling BiDi 
processing.
Whatever name you pick, it'll be visible to web scripts (and will lead to
namespace collisions with web content, so you want to pick names to minimize the
risk of that).
Hardware: Other → All
Blocks: 79676, bidiui
Hixie, any thoughts here? Something for WHATWG to think about?
Define "bidi is enabled". On some UAs, bidi is always enabled. Do you really 
mean "does the page contain any RTL characters or do any of the elements on the 
page have 'direction' computing to 'rtl'"?
Hixie: Yes, this is what this property really represents on Mozilla. My goal of
introducing this property, is to expose a Mozilla-specific internal detail to
the XUL.

I'll produce a patch once we finally decide that we'll have a use for this
property in our XUL. Asaf, what was agreed?
If that's what it means then yeah, it could make sense to have a property on the 
Document node that says whether or not that condition is met.

readonly attribute boolean containsRTLContent, maybe ?
(In reply to comment #4)
> Hixie: Yes, this is what this property really represents on Mozilla. My goal of
> introducing this property, is to expose a Mozilla-specific internal detail to
> the XUL.
> 
> I'll produce a patch once we finally decide that we'll have a use for this
> property in our XUL. Asaf, what was agreed?

After a long talk with mkaply, doron from IBM (doron is working on BiDi UI right
now) (and also Prog. and Simon), we decided to not have "dynmaic menus", meaning
, the BiDi UI will be shown considering your locale only (and maybe:
first-priority web-content-lang  as a second option).
No longer blocks: bidiui
Does that mean this is WONTFIX?
We still consider this....
QA Contact: ian → general
Component: DOM: Mozilla Extensions → DOM
Component: DOM → DOM: Core & HTML
Severity: minor → S4

The bug assignee is inactive on Bugzilla, so the assignee is being reset.

Assignee: ilya.konstantinov+future → nobody
You need to log in before you can comment on or make changes to this bug.