Re: [chromium-dev] Why chromium does not CSS4 element() ?

73 views
Skip to first unread message
Message has been deleted

PhistucK

unread,
Dec 13, 2015, 6:51:14 AM12/13/15
to Alexey Solovey, Chromium-dev

On Sun, Dec 13, 2015 at 1:28 PM, Alexey Solovey <act...@gmail.com> wrote:
I already sended few feature requests to issues, all has been marked as dublicate. 

​Filing multiple issues or feature requests​ for the same thing should not get you anywhere. Making a lot of people star the (existing) issue may matter. Plus, many public posts and demos (by multiple people) of needed features that element() would enable (perhaps make them work in Firefox at the moment, since it supports it) can also be helpful.
In short, if there is a clear demand for the feature from a lot of developers, with proper use cases, it is more likely that it would be implemented.



PhistucK
Message has been deleted

PhistucK

unread,
Dec 13, 2015, 8:21:56 AM12/13/15
to Alexey Solovey, Chromium-dev
Again, your need alone is probably not sufficient for this. If there is a lot of interest, it will likely be implemented. Currently, your (and a few others) interest is not enough, I guess.

And I do not see your examples as something crucial, really. You can create those things without element().
Granted, a custom effect on an image is perhaps more difficult, but I think it can be done with filter: custom(#svg-filter), as well as 2D canvas or WebGL. By the way, how would element() help here?


PhistucK

On Sun, Dec 13, 2015 at 3:07 PM, Alexey Solovey <act...@gmail.com> wrote:
I can present some effects. For examples, custom video player, or custom effect on image. And through one element, without too many elements. 
First problem: for me hard make canvas video player (I mean buttons, volume, etc.), I did long time ago. 
Second problem: also need more time for create filter for image. Better make WebGL example. 

Early all this can be implemented by -webkit-canvas(). Also I know feature like custom formats support through JS (animated formats). Here is really need canvas, or API for create Animated WebP (if animation are simple). API of animated WebP can be faked by emscripten and basic JS. 
Message has been deleted

PhistucK

unread,
Dec 13, 2015, 9:49:44 AM12/13/15
to Alexey Solovey, Chromium-dev
I am not sure that creating a multi layer video player using a single element is an important goal, though.

Anyway, again. Few people are not enough interest. The way to get it into Chrome is to show more broad interest from many developers.


PhistucK

On Sun, Dec 13, 2015 at 3:34 PM, Alexey Solovey <act...@gmail.com> wrote:

Problem - create plug-in for universal element. I today found way create canvas-img-video tag without even "content", just replace "src" (or use canvas) and use CSS custom properties per-element. Need just setting CSS background (create img-like is possible, even padding and border will works, I know trick). It works for both browsers, but element() only for Firefox. If need, can be used url(), if need - element(), if need - anything <image> typed. All by JS.

Sad that chromium can't use element(). I can't create multi-layer video player with single element. I can't make animated (not just moving) generated content and background. I can't make support of custom image format without replacement image tags.

13 дек. 2015 г. 21:20 пользователь "PhistucK" <phis...@gmail.com> написал:
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Daniel Bratell

unread,
Dec 15, 2015, 3:32:50 AM12/15/15
to Chromium-dev, Alexey Solovey
On Sun, 13 Dec 2015 17:25:20 +0100, Alexey Solovey <act...@gmail.com>
wrote:

> Okay, if no reason, i'm go...
> I'm crying :(
> I want write chrome extension that replaces images to canvas...

External contributions to the Chromium project are very welcome, and
nobody wants to scare anyone away. That said:

Chromium is a massive project. It puts ridiculous strain on the
development environment (which is why it has custom build tools, and
custom tools in general) so it can be a bit overwhelming at first. Rest
assured that once you're past that hump you will join a lot of people that
has made it before you.

Some changes that might sound simple in a specification could require
changing tens or hundreds of thousands of line of code because that
feature was not envisioned by the people designing the code. CSS4
elements() might be such a change. While not impossible it's generally not
a good first task for anyone.

Every decision made in the Chromium project about standards support will
affect the web quite a lot. It may make future changes to the
specification impossible for instance because the most used implementation
will lock in certain behaviour. That means that it's important to be
careful when implementing something so that the web won't get stuck with
something that wasn't really good enough yet. This might also apply to
CSS4 element().

/Daniel

--
/* Opera Software, Linköping, Sweden: CET (UTC+1) */

Alexey Solovey

unread,
Dec 15, 2015, 4:10:08 AM12/15/15
to Daniel Bratell, Chromium-dev
I'm experimenting on rendering canvas on IMG or other elements. I made BMP generator. In right, BMP are slower than PNG (paradox?) in chrome. In Firefox all is OK, bmp faster on 125-200% (but I'm not interesting about speed of Firefox, need fast as possible in chrome). But... BMP faster if use pure ArrayBuffer, without Blob or Base64 encoding. 

Here is benchmark. 

Sad that W3C have no idea about create separate element() for paint source based only, not for elements... 
If me suggest vote about separate "element(fromDOM)" and "source(fromList)", I'm answer "yes"!

Alexey Solovey

unread,
Dec 15, 2015, 6:54:29 AM12/15/15
to Chromium-dev, act...@gmail.com
Also I think about division element() to sub-spec, such as source() and element(). First special for canvas, img and video, second for DOM elements. Also I thinking about merge CSS.elementSource(name, element) to source() spec. 
About chromium, I think two: 
- Or make element() for only canvas, img and video (i.e. paint sources). 
- Or make new CSS function named as source(), that used special for canvas, video or images. 
We can't instanced use for both for elements and graphics. Need begin from something simpler, that we can. 
I think W3C also make source(graphics)

вторник, 15 декабря 2015 г., 16:32:50 UTC+8 пользователь Daniel Bratell написал:
Reply all
Reply to author
Forward
0 new messages