Changeset 85794 in webkit
- Timestamp:
- May 4, 2011 3:20:45 PM (13 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r85785 r85794 1 2011-05-04 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Adam Roben. 4 5 WKView on Windows has no equivalent of Mac's -[WKView setDraws[Transparent]Background:] 6 https://bugs.webkit.org/show_bug.cgi?id=52009 7 <rdar://problem/8829746> 8 9 Add and implement WKViewSetDrawsTransparentBackground on windows. 10 11 * UIProcess/API/C/win/WKView.cpp: 12 (WKViewSetDrawsTransparentBackground): 13 (WKViewDrawsTransparentBackground): 14 Call through to the WebPageProxy object. 15 16 * UIProcess/API/C/win/WKView.h: 17 * UIProcess/win/WebView.cpp: 18 (WebKit::drawPageBackground): 19 Don't fill the rect with white if WebPageProxy::drawsBackground() or 20 WebPageProxy::drawsTransparentBackground() returns false. Because of limitations in Win32, 21 both drawsBackground and drawsTransparentBackground are pretty much equivalent. 22 23 (WebKit::WebView::paint): 24 Pass the WebPageProxy object to drawPageBackground. 25 1 26 2011-05-04 Tao Bai <michaelbai@chromium.org> 2 27 -
trunk/Source/WebKit2/UIProcess/API/C/win/WKView.cpp
r81082 r85794 104 104 toImpl(viewRef)->unapplyEditCommand(toImpl(command)); 105 105 } 106 107 void WKViewSetDrawsTransparentBackground(WKViewRef viewRef, bool drawsTransparentBackground) 108 { 109 toImpl(viewRef)->page()->setDrawsTransparentBackground(drawsTransparentBackground); 110 } 111 112 bool WKViewDrawsTransparentBackground(WKViewRef viewRef) 113 { 114 return toImpl(viewRef)->page()->drawsTransparentBackground(); 115 } 116 -
trunk/Source/WebKit2/UIProcess/API/C/win/WKView.h
r83229 r85794 79 79 WK_EXPORT WKViewFindIndicatorCallback WKViewGetFindIndicatorCallback(WKViewRef view, void** context); 80 80 81 WK_EXPORT void WKViewSetDrawsTransparentBackground(WKViewRef view, bool drawsTransparentBackground); 82 WK_EXPORT bool WKViewDrawsTransparentBackground(WKViewRef view); 83 81 84 #ifdef __cplusplus 82 85 } -
trunk/Source/WebKit2/UIProcess/win/WebView.cpp
r85699 r85794 634 634 } 635 635 636 static void drawPageBackground(HDC dc, const RECT& rect)637 { 638 // Mac checks WebPageProxy::drawsBackground and639 // WebPageProxy::drawsTransparentBackground here, but those are always false on640 // Windows currently (see <http://webkit.org/b/52009>). 636 static void drawPageBackground(HDC dc, const WebPageProxy* page, const RECT& rect) 637 { 638 if (!page->drawsBackground() || page->drawsTransparentBackground()) 639 return; 640 641 641 ::FillRect(dc, &rect, reinterpret_cast<HBRUSH>(COLOR_WINDOW + 1)); 642 642 } … … 654 654 for (size_t i = 0; i < unpaintedRects.size(); ++i) { 655 655 RECT winRect = unpaintedRects[i]; 656 drawPageBackground(hdc, unpaintedRects[i]);656 drawPageBackground(hdc, m_page.get(), unpaintedRects[i]); 657 657 } 658 658 } else 659 drawPageBackground(hdc, dirtyRect);659 drawPageBackground(hdc, m_page.get(), dirtyRect); 660 660 661 661 m_page->didDraw(); … … 664 664 m_page->didDraw(); 665 665 else 666 drawPageBackground(hdc, dirtyRect);666 drawPageBackground(hdc, m_page.get(), dirtyRect); 667 667 } 668 668 }
Note: See TracChangeset
for help on using the changeset viewer.