janke99 / chromiumembedded

Automatically exported from code.google.com/p/chromiumembedded
0 stars 0 forks source link

Resizing window shows undesired background color and resize corner #1161

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Resize the window while heavy content like 
http://webkit.org/blog-files/3d-transforms/poster-circle.html is loaded. The 
content does not specifically need to be hardware accelerated.

What is the expected output? What do you see instead?
When the window size is increasing the newly exposed regions on right and 
bottom of the window should have the same background color as the host window. 
Instead, a grayish-blue color is shown on Windows. Also, a resize corner 
(grey/white box) flashes in the lower-right corner during resize on Windows.

Please use labels and text to provide additional information.
This applies to all CEF3 branches.

In the cefclient sample application the host background color can be specified 
by setting the hbrBackground member in MyRegisterClass. For example, to make 
the host background color black:

wcex.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);

The newly exposed regions of the browser window should then be black.

With the non-Aura Windows implementation (current release branches) 
WebContentsViewWin is the parent window of RenderWidgetHostViewWin. 
RenderWidgetHostViewWin paints the actual browser window contents. The problem 
is that WebContentsViewWin does not implement the WM_PAINT, WM_ERASEBKGND or 
WM_NCPAINT messages. These messages are instead passed to DefWindowProc where 
the default handling of WM_PAINT/WM_ERASEBKGND draws the gray-green background 
and the default handling of WM_NCPAINT draws the resize corner.

Original issue reported on code.google.com by magreenb...@gmail.com on 19 Dec 2013 at 11:41

GoogleCodeExporter commented 9 years ago
To see the background color while debugging you can set a breakpoint in 
RenderWidgetHostViewWin::CreateWnd. At that point in the load process the 
WebContentsViewWin window has already been created but the 
RenderWidgetHostViewWin window has not.

Original comment by magreenb...@gmail.com on 19 Dec 2013 at 11:43

GoogleCodeExporter commented 9 years ago
Fixed in 1547 branch revision 1551.

Original comment by magreenb...@gmail.com on 20 Dec 2013 at 12:12

GoogleCodeExporter commented 9 years ago
Fixed in 1650 branch revision 1552.

Original comment by magreenb...@gmail.com on 20 Dec 2013 at 11:29

GoogleCodeExporter commented 9 years ago
1547 branch revision 1554 fixes background color rendering on OS X.

1. Make NSView backgrounds transparent so that the NSWindow background color 
will display for non-accelerated content.
2. Add a new CefSettings.background_color option to configure the background 
color for accelerated content.

To change the background color to black in cefclient_mac.mm:

1. In createApp: call [mainWnd setBackgroundColor: NSColor.blackColor];
2. In main() set settings.background_color = CefColorSetARGB(255, 0, 0, 0);

Original comment by magreenb...@gmail.com on 3 Jan 2014 at 9:41

GoogleCodeExporter commented 9 years ago
@comment#4: Added in 1650 branch revision 1556.

Original comment by magreenb...@gmail.com on 3 Jan 2014 at 10:20

GoogleCodeExporter commented 9 years ago
Trunk revision 1559 allows customization of the background color on Windows via 
a new CefSettings.background_color setting.

Original comment by magreenb...@gmail.com on 7 Jan 2014 at 6:05

GoogleCodeExporter commented 9 years ago
A discussion of possible alternative implementations is here: 
https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/zXiBR5nfOFU

Original comment by magreenb...@gmail.com on 7 Jan 2014 at 6:07

GoogleCodeExporter commented 9 years ago
@comment#4: Added in trunk revision 1560.

Original comment by magreenb...@gmail.com on 7 Jan 2014 at 7:03

GoogleCodeExporter commented 9 years ago
No CEF/Chromium changes are required to show the correct background color on 
Linux. To set a black background color using GTK add the following in 
cefclient_gtk.cc main():

GdkColor color;
gdk_color_parse("black", &color);
gtk_widget_modify_bg(window, GTK_STATE_NORMAL, &color);

Original comment by magreenb...@gmail.com on 10 Jan 2014 at 4:47

GoogleCodeExporter commented 9 years ago
Issue 315 has been merged into this issue.

Original comment by magreenb...@gmail.com on 10 Feb 2014 at 7:11

GoogleCodeExporter commented 9 years ago
Issue 746 has been merged into this issue.

Original comment by magreenb...@gmail.com on 10 Feb 2014 at 8:35

GoogleCodeExporter commented 9 years ago
Trunk revision 1645 and 1750 branch revision 1646 fix additional Windows white 
flash on startup issues. Also filed related Chromium issue 
https://crbug.com/361235.

Original comment by magreenb...@gmail.com on 8 Apr 2014 at 7:36

GoogleCodeExporter commented 9 years ago
Issue 1252 has been merged into this issue.

Original comment by magreenb...@gmail.com on 15 Apr 2014 at 7:00

GoogleCodeExporter commented 9 years ago
@comment#12-13: Trunk revision 1656, 1916 branch revision 1657 and 1750 branch 
revision 1658 add CefBrowserSettings.background_color for custom background 
color assignment on a per-browser basis and fix assignment of the default color 
value.

Original comment by magreenb...@gmail.com on 15 Apr 2014 at 7:08

GoogleCodeExporter commented 9 years ago
Remove an unused patch to ContentBrowserClient in trunk revision 2044.

Original comment by magreenb...@gmail.com on 4 Mar 2015 at 1:16