Re: Utility of background-composite and background-blend-mode?

On Thu, Mar 14, 2013 at 11:04 AM, Simon Fraser <smfr@me.com> wrote:

>
> On Mar 14, 2013, at 10:43 AM, Rik Cabanier <cabanier@gmail.com> wrote:
>
> On Thu, Mar 14, 2013 at 10:21 AM, L. David Baron <dbaron@dbaron.org>wrote:
>
>> On Thursday 2013-03-14 09:55 -0700, Rik Cabanier wrote:
>> > On Thu, Mar 14, 2013 at 9:19 AM, L. David Baron <dbaron@dbaron.org>
>> wrote:
>> >
>> > > On Thursday 2013-03-14 05:44 -0700, Dirk Schulze wrote:
>> > > > No, not WebKit's rules. And I do not think that we want to specify
>> > > > buffering. A behavior in situations like scrolling for blending
>> > > > should be specified and browser need to follow. I see that this
>> > > > can be challenging but would be most desireabale. After all,
>> > > > scrolling should not affect the browser experience of the user on
>> > > > the visual side - especially for blending.
>> > >
>> > > As I said in http://dbaron.org/log/20130306-compositing-blending , I
>> > > think there's a lot less to specify and a lot less to drive towards
>> > > interoperability if compositing and blending operations are limited
>> > > to things that create stacking contexts.  This limitation would be
>> > > present if background-blend-mode and background-composite are
>> > > dropped, which I think should be done.
>> >
>> >
>> > David,
>> > the exact same issue will happen if blending applies to elements (in
>> which
>> > case stacking contexts are created).
>> > For instance, an element with blending that is a child of an element
>> that
>> > uses fixed positioning will render differently today in FF and WK.
>> >
>> > Dropping background-blend-mode will not solve this problem.
>>
>> Dropping background-blend-mode simplifies it a lot, because you only
>> have to consider elements that form stacking contexts when
>> addressing it.
>
>
> Maybe I'm not seeing the problem that makes background-blend-mode harder.
> What would be the difference between:
>
> <div style="position: fixed">
>
> <img src="ducky.png" style="mix-blend-mode: multiply">
>
> and
>
> <div style="position:
> fixed;backgound:url('ducky.png');background-blend-mode:multiply">
>
> Both will render differently because 'position:fixed' creates an offscreen
> buffer in WK but not in FF
>
>
> I'm confused about background-blend-mode, and the spec <
> https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#background-blend-mode>
> is not helping.
>
> Does it blend with anything in other elements, or only between the
> background images/background color of the element to which it's applied?
>
> The spec's use of "the background images at a lower z-index." is confusing
> here. Is that "the background images of elements at a lower z-index", or
> "later  background images of the element"?
>
> If it's only within elements and not between them, I don't see why it
> matters whether position:fixed creates a group.
>
>
>From the spec:

Each background image will blend with the element's background and the
background images at a lower z-index


So, it will blend between elements.
David Baron previously proposed to group background images so they only
blended with each other and not the backdrop. (This would necessitate
creating a new off screen buffer.)
This is certainly viable, but not as powerful. Since we have to solve this
problem for regular elements anyway, I don't think it helps to group them.

Received on Thursday, 14 March 2013 18:22:03 UTC