Hi guys, >> Diving into the viewport/reference-area relation some more, I think >> what I could as well have said from the beginning was: If the >> nearest ancestor reference area is the region-reference-area, then >> the position of a fixed-positioned area in the viewport is >> initially identical to that of an absolute-positioned area. >> >> By means of an example, if you have: >> >> <fo:block> >> <fo:block-container absolute-position="absolute" top="5%" left="5%"> >> ...</fo:block-container> >> <fo:block-container absolute-position="fixed" top="5%" left="15%"> >> ...</fo:block-container> >> >> Then the areas corresponding to the block-containers will be >> positioned at the resolved coördinates in the nearest ancestor >> reference area, whatever that is. In this case, the same top, >> slightly different left. >> >> My point: Even if the rest of the block's content gets clipped or >> even if the content gets clipped somewhere way above the block, >> both block-containers should still be rendered at the specified >> coördinates in the reference-area and so, initially also in the >> viewport-area. Those coördinates specify an absolute position in >> the reference-area for absolute-position="absolute" and a fixed >> position in the accompanying viewport-area for >> absolute-position="fixed".
The (1.1) spec says that if the positioning is... - absolute: the positions are taken with respect to the nearest ancestor reference area; - fixed: the positions are taken with respect to the page viewport (for paged media, like PDF) or the document viewport (for continuous media). But then 7.3, "Reference Rectangle for Percentage Computations", seems a bit confusing, at least for fixed positioning: "When the absolute-position is "fixed", the containing block is defined by the nearest ancestor viewport area." Normally you would assume that if you define a position wrt a certain area (i.c. the page viewport), percentages are also interpreted wrt to width and height of that same area. Then again, thinking about what is an "ancestor area": the way I see it, absolute and fixed positioning make an area break out of its FO ancestry. That is, if fo:block-container A is a direct child of fo:block-container B, but A's positioning is "fixed", the *area* generated by A is not a direct child of the area generated by B, but of the page-viewport area. This in turn means that A's "nearest ancestor viewport area" is the page viewport (or document viewport), and the apparent inconsistency vanishes. Granted, it's an interpretation, but it seems the most logical one to me. For visibility, this means: - On a continuous medium, a fixed-positioned area is 1) always visible if it lies completely within the document viewport 2) never visible if it's completely outside the viewport 3) clipped if it lies partly within the viewport All this independent of the scroll position of the document. - On a paged medium, the same applies, but now with respect to the page. So again, the fixed area may be visible, invisible or partly visible *on the page*, depending on size and offsets. Of course the area may be "out of sight" even if it's (partly or fully) visible, because you may scroll away from (that part of) the page, or turn pages in a book. But that doesn't affect the principal visibility. Scrolling through a PDF document has nothing to do with viewport/reference pairs *within* the document's area tree. - With absolutely-positioned areas, the visibility may change over time even if the entire page (or document) is always fully visible, because one or more of their ancestor reference-areas may be scrollable within their associated viewport. All this seems pretty logical and consistent to me, and (AFAIK) within the specification. So I hope I'm not just adding to the confusion here... :-) Yes, I think the spec could have been a lot clearer in places. Kind regards, Paul Vinkenoog