RESOLVED FIXED 52009
WKView on Windows has no equivalent of Mac's -[WKView setDraws[Transparent]Background:]
https://bugs.webkit.org/show_bug.cgi?id=52009
Summary WKView on Windows has no equivalent of Mac's -[WKView setDraws[Transparent]Ba...
Adam Roben (:aroben)
Reported 2011-01-06 12:38:03 PST
WKView on Mac has the following APIs: -[WKView setDrawsBackground:] -[WKView setDrawsTransparentBackground:] These allow API clients to cause the WKView to be transparent or to have some other custom background. We have no equivalent of this on Windows (but don't need it, at the moment, either).
Attachments
Patch (4.34 KB, patch)
2011-05-04 14:51 PDT, Anders Carlsson
aroben: review+
Adam Roben (:aroben)
Comment 1 2011-01-06 12:38:33 PST
Anders Carlsson
Comment 2 2011-05-04 14:51:38 PDT
Adam Roben (:aroben)
Comment 3 2011-05-04 15:06:52 PDT
Comment on attachment 92319 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=92319&action=review > Source/WebKit2/UIProcess/win/WebView.cpp:642 > -static void drawPageBackground(HDC dc, const RECT& rect) > +static void drawPageBackground(HDC dc, const WebPageProxy* page, const RECT& rect) > { > - // Mac checks WebPageProxy::drawsBackground and > - // WebPageProxy::drawsTransparentBackground here, but those are always false on > - // Windows currently (see <http://webkit.org/b/52009>). > + if (!page->drawsBackground() || page->drawsTransparentBackground()) > + return; > + > ::FillRect(dc, &rect, reinterpret_cast<HBRUSH>(COLOR_WINDOW + 1)); > } Failing to paint parts of the HWND will lead to pixel smearing when Aero is disabled. That doesn't seem good!
Adam Roben (:aroben)
Comment 4 2011-05-04 15:17:13 PDT
Comment on attachment 92319 [details] Patch I guess this will perhaps someday be useful if we add a way to make a WS_EX_LAYERED WKView. Maybe we'll find other uses for it before then.
Anders Carlsson
Comment 5 2011-05-04 15:20:49 PDT
Note You need to log in before you can comment on or make changes to this bug.