[webkit-gtk] Changing the DOM from a separate thread / repaint issues

Thomas Hunger tehunger at gmail.com
Tue Nov 29 07:52:30 PST 2016


I'm currently trying to write a Haskell library which uses webkit2gtk to
render a UI. I have most things like the plugin process working, with one
exception: When I modify the DOM from a separate OS thread then rendering

Specifically, if I modify the DOM in response to an event (e.g.
"mousemove") I get the correct outcome. If I modify the DOM from a thread
then I get the correct DOM back from innerHTML, but the rendering is
broken. Sometimes I get all "p"s on one line, instead of separate
paragraphs. Sometimes nothing renders.

I feel that I need to tell the layout system that the DOM tree is dirty but
I couldn't figure out how to do that. Or maybe I'm barking up the wrong

Any help to get the correct rendering very appreciated!

All the best,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-gtk/attachments/20161129/e0c24885/attachment.html>

More information about the webkit-gtk mailing list