Re: [css3-regions] Clarification on getRegionFlowRanges with display:none nodes

On Mon, Jun 25, 2012 at 4:54 PM, Alan Stearns <stearns@adobe.com> wrote:
> On 6/25/12 4:04 PM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:
>>On Thu, Jun 21, 2012 at 2:02 PM, Alan Stearns <stearns@adobe.com> wrote:
>>> The getRegionFlowRanges method returns the "fragment from the named flow
>>> that is laid out in the region."
>>>
>>> I am assuming the fragment includes nodes with display:none. If an node
>>> with display:none falls on a fragmentation boundary, there is some
>>> ambiguity as to which region the element is "laid out in."
>>>
>>> I propose to add this to the definition of getRegionFlowRanges:
>>>
>>> ---
>>> The Ranges returned may include nodes with display:none situated between
>>> other nodes laid out in the region. If a node with display:none falls
>>>on a
>>> fragmentation boundary, it is considered "laid out" in the region with
>>>the
>>> previous node. If the first node of a named flow has display:none it is
>>> considered "laid out" in the first region of the region chain.
>>> ---
>>
>>You're mixing levels here.  getRegionFlowRanges cares about the box
>>tree.  Elements that are display:none don't generate boxes at all.
>>Thus, they don't appear in the region at all, and won't be part of the
>>list of ranges returned by the function.
>
> Yes, I think you're right. My assumption about including nodes with
> display:none is suspect. I was looking at the Range object returning DOM
> fragments and thinking of what's "in" the region at that level. But we've
> already left that level based on which elements in the DOM are added to
> the named flow. So while each Range object may represent DOM, the sequence
> of Ranges returned can represent the box tree in more useful detail.
>
> Here's an example to see whether I'm thinking through this clearly now. In
> the style and markup below, if named-flow is contained in a single region,
> that region's getRegionFlowRanges() would return an sequence of three
> Range objects.
>
> .flow-content { flow-into: named-flow; }
> .none { display:none; }
>
> <p class="flow-content">1
> <p class="not-flow">2
> <p class="flow-content">3
> <p class="flow-content none">4
> <p class="flow-content">5

Yes, that's right.

~TJ

Received on Tuesday, 26 June 2012 00:02:03 UTC