[webkit-gtk] webkit2 missing webkit_web_view_set_transparent ?
Carlos Garcia Campos
cgarcia at igalia.com
Mon Dec 29 01:32:29 PST 2014
El dom, 21-12-2014 a las 02:42 +0100, Jérémy Lal escribió:
> webkit_web_view_set_transparent has disappeared from webkit2gtk's API.
Well, something that doesn't exist can't disappear :-)
webkit_web_view_set_transparent is in the WebKit1 API, but it's never
been in WebKit2 API, so it's not that it has been removed, but never
> Is there another way to achieve the same effect ?
It should be very easy to expose that in the WebKit2 API. What's exactly
your use case? I didn't even know that function existed in WebKit1 :-P
and I find it a bit confusing, it sounds like you can make a web view
transparent, when it's actually referring to the background color.
Looking at WebPageProxy I see at least 3 methods related to the
background and transparency:
- WebPageProxy::setDrawsBackground(): This ends up calling
FrameView::setTransparent() for every frame. It seems that when this is
set to true the document or base background color is ignored.
webkit_web_view_set_transparent() in WebKit1 calls
FrameView::setTransparent() for the main frame only.
- WebPageProxy::setDrawsTransparentBackground(): This calls
FrameView::setBaseBackgroundColor() for every frame. It sets the color
to Transparent when the called with true and White when called with
false. Surprisingly this is not what webkit_web_view_set_transparent()
does. Also, it seems that setDrawsBackground(false) is not exactly the
same as setDrawsTransparentBackground(true). When the frame view is set
transparent the background color is ignored and setCannotBlitToWindow()
is called, but when the background color is set to transparent, it's
used unless backgroundShouldExtendBeyondPage setting is true, in which
case the document background color is used.
- WebPageProxy::setBackgroundExtendsBeyondPage: And this one sets the
Also, other ports have methods to set a background color for the backing
So, I find all this a bit messy. Exposing these methods in our API is
easy, but first we need to understand what all those methods do, and
what we want to expose and how.
> webkit-gtk mailing list
> webkit-gtk at lists.webkit.org
Carlos Garcia Campos
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 181 bytes
Desc: This is a digitally signed message part
More information about the webkit-gtk