Open Bug 453523 Opened 16 years ago Updated 2 years ago

showing an embedded Browser without giving it content does not draw a blank background on win32

Categories

(Core :: Web Painting, defect)

1.9.0 Branch
x86
Windows 2000
defect

Tracking

()

UNCONFIRMED

People

(Reporter: grant_gayed, Unassigned)

Details

(Keywords: regression)

User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 2.0.50727) Build Identifier: Mozilla XULRunner 1.9.0.3pre - 2008090208 This is the win32 portion of bug 415789. I would have re-opened that bug, but I don't seem able to change its status now. (FWIW I don't think that comment 0 words like "I see this on Linux and Windows" and "it does not use gtkmozembed" indicate a report meant solely to address TestGtkEmbed). Our app embeds gecko for showing html content. When the embedded gecko is initially shown it does not have any content until a client sets a url on it. During this interval it should just appear as a blank control. Prior to 1.9 it did this, but as of 1.9 it no longer draws its background (win32 only). This looks "broken" for any app written before 1.9 that embeds a gecko browser without initial content. Reproducible: Always Steps to Reproduce: The snippet below demonstrates this with AWT+JavaXPCOM, just set the two static fields at the top to switch between 1.8.x and 1.9.x. With 1.8.x the embedded browser's rectangle is drawn on top of the Canvas' background, but with 1.9.x it isn't. import java.awt.*; import java.io.File; import org.mozilla.interfaces.*; import org.mozilla.xpcom.*; import sun.awt.windows.WComponentPeer; public class Test extends Canvas { static File GRE_PATH = new File("c:/xulrunner-1.9/xulrunner/"); static boolean is_1_9 = true; // static File GRE_PATH = new File("c:/xulrunner-1.8.1.3/xulrunner/"); // static boolean is_1_9 = false; public static void main(String[] args) { Frame frame = new Frame(); frame.setLayout(new BorderLayout()); frame.setBounds(100, 100, 400, 400); final Test test = new Test(); test.setBackground(Color.RED); frame.add(test, BorderLayout.CENTER); frame.setVisible(true); test.test(); } public void paint(Graphics g) { g.drawLine(0, 0, 400, 400); g.drawLine(0, 400, 400, 0); } public void test() { Mozilla mozilla = Mozilla.getInstance(); mozilla.initialize(GRE_PATH); mozilla.initEmbedding(GRE_PATH, GRE_PATH, null); long windowHandle = ((WComponentPeer) getPeer()).getHWnd(); nsIComponentManager componentManager = mozilla.getComponentManager(); String NS_IWEBBROWSER_CID = "F1EAC761-87E9-11d3-AF80-00A024FFC08C"; nsIWebBrowser webBrowser = (nsIWebBrowser) componentManager.createInstance( NS_IWEBBROWSER_CID, null, nsIWebBrowser.NS_IWEBBROWSER_IID); nsIBaseWindow baseWindow = (nsIBaseWindow) webBrowser .queryInterface(nsIBaseWindow.NS_IBASEWINDOW_IID); baseWindow.initWindow(windowHandle, 0, 0, 0, 300, 300); baseWindow.create(); baseWindow.setVisibility(true); nsIServiceManager serviceManager = mozilla.getServiceManager(); nsIAppStartup appStartup = (nsIAppStartup) serviceManager .getServiceByContractID("@mozilla.org/toolkit/app-startup;1", is_1_9 ? "6799abed-4721-4f51-9304-d1a2ea1df5d5" : /* 1.9 */ "e9b0f89b-0529-4d96-98a8-eb5b2b9a8383"); /* 1.8 */ appStartup.run(); } }
grant, do you see this when using newer firefox, either 3.6 or trunk builds?
Keywords: regression
Version: unspecified → 1.9.0 Branch
We have a workaround in place, but when I remove the workaround, yes, this problem still happens when embedding XULRunner 1.9.2.
Component: Layout: View Rendering → Layout: Web Painting
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.