Erik van der Poel wrote:
> 
> Lina Kemel wrote:
> >
> > The problem is that we have to know at the same time: 1) tag/node info
> > (BDO) and 2) attribute (DIR). One place where those are available, is
> > nsPresContext::ResolveStyleContextFor, after style resolution.
> 
> That doesn't seem like the right place to look for the BDO element and
> DIR attribute.

I fully agree it's not the right place to do that, but couldn't find
another one, where the necessary info is available.

> It would probably be better to do it where other HTML elements and attributes are 
> "mapped to style". I forgot where that was, but I'm sure there are others in this 
> newsgroup that know where it is.

Appreciate any help.

> It is important to map this correctly, because there are certain rules
> about precedence when both HTML elements/attributes and CSS properties
> are fighting over the same piece of text.
> 
Our purpose here is to map the BDO element to the UNICODE_BIDI_OVERRIDE
style, on condition that the DIR attribute is present, but not to map
the DIR attribute itself. Also, we don't seem to interfere with the
existing precedence rules. So that the following would work:

  <style type="text/css">
    P {unicode-bidi: normal; direction: ltr}
  </style>
  <!unicode-bidi: normal - means that override is prohibited>

  ...

  <P><BDO dir=rtl>abc</BDO></P>


Thanks,
Lina

Reply via email to