Re: [cssom-view] Origin of a canvas & scrollable element

On Fri, 19 Sep 2014 09:09:31 +0200, Simon Pieters <simonp@opera.com> wrote:

> Hi,
>
> So I'm trying to specify how scrollLeft et al work in CSSOM View:
>
> http://lists.w3.org/Archives/Public/www-archive/2014May/att-0007/dsc06430-zcorpan-whiteboard.jpg
>
> However, I'm having trouble finding anything in CSS that defines where  
> the origin is of a canvas or a scrollable element.
>
> What defines the correct rendering of these examples?
>
> http://software.hixie.ch/utilities/js/live-dom-viewer/saved/3188
> http://software.hixie.ch/utilities/js/live-dom-viewer/saved/3185
>
> Looking at http://www.w3.org/TR/CSS2/visudet.html#x1
>
> [[
> 1. The containing block in which the root element lives is a rectangle  
> called the initial containing block. For continuous media, it has the  
> dimensions of the viewport and is anchored at the canvas origin; it is  
> the page area for paged media. The 'direction' property of the initial  
> containing block is the same as for the root element.
> ]]
>
> there is no definition of "canvas origin" AFAICT.
>
> Further:
>
> [[
> 4. If the element has 'position: absolute', the containing block is  
> established by the nearest ancestor with a 'position' of 'absolute',  
> 'relative' or 'fixed', in the following way:
> ...
> 4.2 Otherwise, the containing block is formed by the padding edge of the  
> ancestor.
> ]]
>
> But if the containing block is a scrollable element, the padding edge  
> doesn't move when you scroll, yet the position:absolute element does  
> move in browsers. So that seems wrong.
>
> http://dev.w3.org/csswg/css-position/#def-containing-blocks is basically  
> the same thing.
>
> Am I missing something?

https://dvcs.w3.org/hg/csswg/rev/dea25bf8160f is what I have now. I still  
feel like I'm missing something.

-- 
Simon Pieters
Opera Software

Received on Monday, 22 September 2014 13:31:31 UTC