Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
2011-04-26 Brent Fulgham <bfulgham@webkit.org>
Reviewed by Adam Roben. Implement a transparent WebView under Windows. This feature allows the user to create small web-based applications, similar to the dashboard on Mac OS X. https://bugs.webkit.org/show_bug.cgi?id=58300 * Interfaces/IWebViewPrivate.idl: Add new set/get accessors to change the state of a WebView into a Layered Window, or back into a standard window. * Interfaces/WebKit.idl: touch to force clean build * WebView.cpp: (WebView::WebView): Set layered window state in constructor. (WebView::updateBackingStore): Cleanup old bitmap when finished. (WebView::performLayeredWindowUpdate): New method to do the work of calling ::UpdateLayeredWindow for the WebView with proper alpha blending. (WebView::paint): Small change to prevent accelerated compositing when using a layered window. DirectX is not compatible with ::UpdateLayeredWindow (at least currently). (WebView::WebViewWndProc): Adjust main window procedure to avoid painting a default background on a layered window (this is handled by Windows during compositing), and to deal with paint messages properly in the layered window case. (WebView::active): The layered window is not a child window, so the active state logic is slightly different. (WebView::setUsesLayeredWindow): New set method for layered stated. When called, it will convert a WebView into a Layered Window. (WebView::usesLayeredWindow): Accessor * WebView.h: (WebView::setUsesLayeredWindow): Declare new accessor (WebView::usesLayeredWindow): Declare new accessor 2011-04-26 Brent Fulgham <bfulgham@webkit.org> Reviewed by Adam Roben. Update WinLauncher with command-line arguments to allow the transparency to be tested. Use --transparent to create a transparent view. Use --desktop to have the view fill the desktop area of the screen. https://bugs.webkit.org/show_bug.cgi?id=58300 * WinLauncher/WinLauncher.cpp: (usesLayeredWebView): New method to indicate that the program is running with layered windows (alpha-blended transparent windows). (shouldUseFullDesktop): New method to indicate that the program is running across the full desktop (less any task bars.) (resizeSubViews): Layered window mode doesn't have any winapi child windows, so this routine is exited early for that case. (subclassForLayeredWindow): Subclass the window so we can override its defaut message loop. (computeFullDesktopFrame): Convenience function to get the desktop region and update the frame dimensions appropriately. (_tWinMain): Updated to accept the new '--transparent' and '--desktop' arguments. (InitInstance): Modified to exit early for the transparent background case. WebKit will construct our primary window (with appropriate settings) so we don't need to create one ourselves. (WndProc): (TransparentWndProc): New message loop for transparent windows, since they need special handling to support dragging. Canonical link: https://commits.webkit.org/74712@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@84990 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Brent Fulgham
committed
Apr 27, 2011
1 parent
3e100e5
commit 653ab409a6519af1375aa25d0a20bf1e24d3f0af
Showing
7 changed files
with
367 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -301,3 +301,4 @@ library WebKit | ||
[default] interface IWebUserContentURLPattern; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.