[webkit-dev] WebKit render tree

Konstantin Tokarev annulen at yandex.ru
Wed Jun 1 03:55:29 PDT 2016



01.06.2016, 09:19, "Andy Somogyi" <somogyie at umail.iu.edu>:
> Hi,
>
> I’m a programming language researcher, and we are working on a new visual programming language.
>
> I’m investigating using WebCore as the rendering component of our language editing/visualization system.
>
> Essentially what I’d like to be able to do is to programmatically (C++) generate 1: a DOM tree of a new family of Element derived object, 2: rendering tree, 3: layout the tree, 4: attach a GraphicsContext to an existing window or bitmapped resource, and 5: use WebCore’s GraphicsContext to render the custom rendering tree. I’d also like to create a family of custom Element derived objects that would be attached to the rendering tree and use the rendering tree. I’d also like to respond to the standard events, i.e. mouse, keyboard, etc…

Are you really sure you need to go that deep?

Can't your goals be achieved with just custom DOM tree + style sheets + drawing that on exisisting resource using standard WebCore rendering machinery?

If this is the case I propose you to take a look at QtWebKit port, where you can build DOM in C++ and use custom QPainter/QPaintEngine for low-level drawing operations. Qt also provides you a way to simulate user input events like key presses or mouse moves, or you can filter out or override real input events.

Here is my fork which uses updated WebKit from 2016:

https://github.com/annulen/webkit
(See https://github.com/annulen/webkit/wiki for more details)

>
> Do you think this would be possible using WebCore as a library and have these custom render tree / dom tree derived objects live in my own library (this is really, really the way I’d prefer to do things), or do you think it would be better to add these objects directly into the WebCore library.
>
> I don’t think accessing any of the render tree objects in webcore would cause any issues on Mac/Unix, however, Windows sadly requires those EXPORT macros on each class def. If I added these, what would be the WebKit policy of accepting these changes?

I don't think exporting private APIs will be accepted, and I don't think it makes much sense because they may be changed at any time anyway. If you need them, you will be safer with your customized WebKit fork.


>
> What is the, for lack of a better word, the “viability” of WebKit on Windows? Our project fundamentally has to be cross-platform, and currently, I’m not aware of any webkit based browsers on Windows. I’m currently looking into using webkit, firefox or blink. I’ve essentially eliminated blink because their code is very hard to follow, much harder than webkit or firefox, and I think the webkit code is the easiest to understand and use. Webkit is currently my first choice, but my only hesitation is will webkit continued to be supported on Windows.

AFAIK, there is no indication that Windows support is going to be dropped anytime soon.

>
> thanks
>
> -- Andy Somogyi PhD
> School of Informatics and Computing
> Indiana University
> ,
>
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev


-- 
Regards,
Konstantin


More information about the webkit-dev mailing list