W3C home > Mailing lists > Public > www-style@w3.org > August 2012

Re: [cssom-view] value of scrollLeft in RTL situations is completely busted across browsers

From: Robert O'Callahan <robert@ocallahan.org>
Date: Thu, 9 Aug 2012 14:27:13 +1200
Message-ID: <CAOp6jLZs6tHfKpZJLm2EaDHgybaztJGeYq506qsf_fjM4X-h=A@mail.gmail.com>
To: Sylvain Galineau <sylvaing@microsoft.com>
Cc: "www-style@gtalbot.org" <www-style@gtalbot.org>, www-style <www-style@w3.org>, Shane Stephens <shans@google.com>, ML publc-i18n-bidi <public-i18n-bidi@w3.org>
On Thu, Aug 9, 2012 at 2:02 PM, Sylvain Galineau <sylvaing@microsoft.com>wrote:

> [Robert O'Callahan:]
>
> >That obviously would break if scrollLeft sometimes points in different
> directions.
> Why? Code that walks up the scrollLeft chain already is broken in RTL
> contexts today
> since browsers do different things.


True, that code is already broken for RTL on some browsers, but we might be
able to make it correct by changing the behavior of those browsers,
depending on how that code is used.

As for those libraries that use pageXOffset they
> would be presumably be unaffected by a change in scrollLeft?
>

Ah, I had assumed only IE supports pageXOffset, but indeed I'm incorrect,
and all major browsers support it. It's even in CSSOM View!

So then it's true we can change scrollLeft without breaking these
frameworks. That's good. I'm still a bit scared of making this change but
we can give it a go. I'd still like to hear from Webkit/Opera.

If we do make scrollLeft and pageXOffset different for RTL, we'll need to
decide which one scrollX maps to. I suppose making it equal scrollLeft is
most logical. We'll also have to define scrollTo() for RTL; making it
follow scrollLeft/scrollTop is what IE does, which seems reasonable.

Rob
-- 
“You have heard that it was said, ‘Love your neighbor and hate your enemy.’
But I tell you, love your enemies and pray for those who persecute you,
that you may be children of your Father in heaven. ... If you love those
who love you, what reward will you get? Are not even the tax collectors
doing that? And if you greet only your own people, what are you doing more
than others?" [Matthew 5:43-47]
Received on Thursday, 9 August 2012 02:27:41 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:58 GMT