Re: [blink-dev] Intent to Implement: CSS4 element(#some) support

70 views
Skip to first unread message
Message has been deleted

PhistucK

unread,
Dec 8, 2015, 2:27:37 PM12/8/15
to Alexey Solovey, blink-dev
You should ask around (and research, search the W3C lists for public signals) and see if other vendors are going to implement this, since currently only Firefox does (see below for details).

Here is a better version of the above -

Summary
The element() function takes element as a source and regards it as an image everywhere an <image> value can be entered (background-image, border-image, content (I guess) and others). This adds interesting use cases, such as element reflections and showing live thumbnails of next and previous slides or pages.

Interoperability and Compatibility Risk
Firefox implements element() prefixed, as -moz-element() and limits its usage to background and background-image.
No other browser implements it.



PhistucK

On Tue, Dec 8, 2015 at 5:51 PM, <act...@gmail.com> wrote:
Contact emails
act...@gmail.com

Spec
https://drafts.csswg.org/css-images-4/#funcdef-element

Summary
I think add new type of generated images: element. I thinking about get DOM element, or element from table, and draw on CSS background. I need get Image object of any html element from DOM. We already have Paint Source for CSS, uses getSourceImageForCanvas (or his modification). 

Interoperability and Compatibility Risk
We have some risk with compatibility of Mozilla element implementation. Also we have risk with painting of HTML elements. 

Ongoing technical constraints
I slightly described in Summary.

Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
I believe.

OWP launch tracking bug
https://code.google.com/p/chromium/issues/detail?id=108972

Requesting approval to ship?

No.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Ian Kilpatrick

unread,
Dec 8, 2015, 3:02:34 PM12/8/15
to PhistucK, Alexey Solovey, blink-dev
Also note that elementSources is likely[1] going to be removed in favour of using the CSS Paint API[2].

Thanks,
Ian




PhistucK

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Philip Rogers

unread,
Dec 8, 2015, 4:07:19 PM12/8/15
to Alexey Solovey, blink-dev
element.layoutObject()

These questions are very basic. Try looking at http://cs.chromium.org and poking around.

On Tue, Dec 8, 2015 at 1:01 PM, <act...@gmail.com> wrote:
I can't understand, how to get from DOM element layout object. 


среда, 9 декабря 2015 г., 4:12:01 UTC+8 пользователь act...@gmail.com написал:
1. And where will elementSources? CSS houdini probably unify with CSS4.
2. How to draw one skia canvas on another skia canvas?

Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Philip Jägenstedt

unread,
Dec 9, 2015, 5:18:45 AM12/9/15
to act...@gmail.com, blink-dev
acterhd, I would encourage you to first discuss this with the people you think would be reviewing this code. I can see no previous commits in Chromium from you, so if this your first contribution, it would probably be helpful to first take on smaller tasks, to get familiar with the code, tools and process.

On Wed, Dec 9, 2015 at 11:10 AM, <act...@gmail.com> wrote:
Help me. How to create GraphicsContext or PaintInfo from raw skCanvas (look "draw" function)? How to reflect? 
https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp&q=GraphicsContext&sq=package:chromium&type=cs
I don't want too many copy-pasting. Need real reflection.

среда, 9 декабря 2015 г., 18:05:58 UTC+8 пользователь act...@gmail.com написал:
I am not handle the job. We need helpers. I only know the theory of how to do it.

среда, 9 декабря 2015 г., 15:43:57 UTC+8 пользователь act...@gmail.com написал:
And yes, I planned to create new Image class. 

среда, 9 декабря 2015 г., 5:34:17 UTC+8 пользователь act...@gmail.com написал:
Here is begining code. I don't know will working reflections in future, or not. 

PassRefPtr<Image> CSSElementValue::image(const LayoutObject* layoutObject, const IntSize& size)
{
  PaintController::create();

Document * document = layoutObject->document();
HTMLElement * el = document->getElementById(m_elementID);
LayoutObject* layout = el.layoutObject();
  LayoutPoint point(0, 0);

  image = ElementImage::create(layout, point);
  layout.paint(image->paintInfo(), point);
}

ElementImage::ElementImage(LayoutObject * layout, LayoutPoint & point) {
    m_controller = PaintController::create();
    m_context = adoptPtr(new GraphicsContext(*m_paintController));
    m_paintInfo = PaintInfo(m_context, );
}

void ElementImage::drawElement(SkCanvas* canvas, const SkPaint& paint, ImageClampingMode clampMode){
    SkBitmap bitmap = ;
    m_content->canvas()->readPixels(bitmap, 0, 0);
    canvas.drawBitmap(bitmap, 0, 0);
};

среда, 9 декабря 2015 г., 5:07:19 UTC+8 пользователь Philip Rogers написал:

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Message has been deleted

Noel Gordon

unread,
Dec 9, 2015, 5:29:44 AM12/9/15
to Alexey Solovey, blink-dev
On 9 December 2015 at 21:22, <act...@gmail.com> wrote:
I early contributed small fix for -webkit-canvas() and toDataURL(). Now all code reviews is removed. 
I thinked that all will work as need. But they don't want hear me. 
Now -webkit-canvas() has removed. Patch for toDataURL developed by noel.

And I made the same recommendation to you at that time as Philip had just provided.

~noel

 
среда, 9 декабря 2015 г., 18:18:45 UTC+8 пользователь Philip Jägenstedt написал:
Message has been deleted
Message has been deleted

PhistucK

unread,
Dec 9, 2015, 6:28:04 AM12/9/15
to Philip Rogers, Philip Jägenstedt, Ian Kilpatrick, blink-dev
Perhaps it would be better if you can comment on the intent itself, rather than on the code...
Then if you happen to disapprove landing it, you could at least save him the research time (unless it is needed for your decision).


PhistucK

On Wed, Dec 9, 2015 at 12:56 PM, <act...@gmail.com> wrote:
And... I wanted complete work 2 days ago, but work even not began. 

среда, 9 декабря 2015 г., 18:45:00 UTC+8 пользователь act...@gmail.com написал:
I know that... I research around 1000 rows of code. I have one opinion. 
Element (Image object) will have only TiledDraw when draw elements (layouts). Another elements, such as canvas, image or video can be use Draw function. I think... 

I'm not present code. I not beginned working, I'm preparing, in research stage. I thinking plan, about how to make support of element(). 

среда, 9 декабря 2015 г., 18:29:44 UTC+8 пользователь Noel Gordon написал:
Message has been deleted

PhistucK

unread,
Dec 9, 2015, 6:51:47 AM12/9/15
to Alexey Solovey, blink-dev, Philip Rogers, Philip Jägenstedt, Ian Kilpatrick
I meant the API owners, not you. :)


PhistucK

On Wed, Dec 9, 2015 at 1:43 PM, <act...@gmail.com> wrote:
Well, if we talk about intention, I would say that's what. The fact that this opportunity no one has introduced, in addition to Mozilla. Not so long ago removed -webkit-canvas (). I can not leave chrome without at least one reflection.
The real problem - display canvas and other content on other elements. Yet no one has failed (or did not want) to implement all this. And in the browser chrome I see a prospect of the implementation element ().
The truth is I have not yet decided what to do with yet another feature - attr ().

I already know a little what will happen next. 

среда, 9 декабря 2015 г., 19:28:04 UTC+8 пользователь PhistucK написал:
Message has been deleted

PhistucK

unread,
Dec 9, 2015, 8:01:55 AM12/9/15
to Alexey Solovey, blink-dev
Please, keep technical feature development in the other, non-intent thread, you started. This is not the intention of the intent to implement thread.


PhistucK

On Wed, Dec 9, 2015 at 2:58 PM, <act...@gmail.com> wrote:
Oh... drawing of element doing by phases, I didn't know. And how to draw (near) all phases? 

среда, 9 декабря 2015 г., 19:51:47 UTC+8 пользователь PhistucK написал:
Reply all
Reply to author
Forward
Message has been deleted
0 new messages