Re: [css-regions] Possible change to the Region interface

On 9/30/13 8:02 AM, "Simon Pieters" <> wrote:

>On Sat, 28 Sep 2013 00:52:32 +0200, Alan Stearns <>
>> Hey all,
>> I had a short conversation this week with Elliot Sprehn, who advised
>> we change the Region interface a bit.
>> Currently it's a supplemental interface that Element implements. The
>> original idea was that anything that could be made into a region could
>> also implement this interface. But it turns out it may not be practical
>> to
>> allow the Region interface to be implemented by (for instance) a future
>> CSSPseudoElement interface.
>FWIW PseudoElement is already specced:

It seems odd that I can get from an Element to a PseudoElement, but
there's no way to get back from the PseudoElement to the Element (or find
out which PseudoElement it is). Am I missing something?

In any case, it's easy enough to say in a spec:

Element implements Region
PseudoElement implements Region

But the question then is what happens with the NamedFlow.getRegions()
call, which is intended to return a sequence of Regions. If those Regions
can be either an Element or a PseudoElement, what then? Either we need to
have a common base class that both Element and PseudoElement can inherit
from, or we have to introduce multiple inheritance. Neither of those
options appear feasible in the WebKit/Blink codebase (for this one small
use case, at least).

So it seems to me that making Region a standalone interface would be a
better, incremental step.



Received on Monday, 30 September 2013 15:51:15 UTC