On Tue, Feb 6, 2018, at 12:09 AM, Henri Sivonen wrote:
> We appear to track bidiness on the document and on the text nodes. The
> document-level comment says:
> /**
>    * Indicate the document contains bidi data.
>    * Currently, we cannot disable bidi, because once bidi is enabled,
>    * it affects a frame model irreversibly, and plays even though
>    * the document no longer contains bidi data.
>    */
> 
> As far as I can tell, after the document has been marked as being
> bidi, we stop updating the bidi bits on the text nodes. AFAICT, as
> soon as any text node becomes bidi, the document needs to become bidi
> and then we no longer care about maintaining the text node bidi bit.
> 
> So why do we have a bidi bit on the text nodes at all? Why don't we
> track bidiness on the document only?

I suppose you are talking about nsTextFragment::FragmentBits::mIsBidi?

Looking at callsites of nsTextFragment::IsBidi, my guess is that it is needed 
so that we don't need to scan a text node when it is bound to the tree for 
deciding whether we need to change the document bit.

But I'm not familiar with that code, so I'm just guessing.

- Xidorn
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to