Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit 80b9ebc

Browse files
committed
Backed out changeset d5d98779e401 (bug 846906) - again - for test failures on a CLOSED TREE.
1 parent cb5ab2f commit 80b9ebc

5 files changed

Lines changed: 1 addition & 243 deletions

File tree

docshell/test/chrome/Makefile.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ MOCHITEST_CHROME_FILES = \
9797
test_private_hidden_window.html \
9898
docshell_helpers.js \
9999
generic.html \
100-
test_bug846906.xul \
101100
$(NULL)
102101

103102
ifneq ($(MOZ_WIDGET_TOOLKIT),gtk2)

docshell/test/chrome/test_bug846906.xul

Lines changed: 0 additions & 78 deletions
This file was deleted.

widget/xpwidgets/PuppetWidget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ InvalidateRegion(nsIWidget* aWidget, const nsIntRegion& aRegion)
3636
/*static*/ already_AddRefed<nsIWidget>
3737
nsIWidget::CreatePuppetWidget(TabChild* aTabChild)
3838
{
39-
NS_ABORT_IF_FALSE(!aTabChild || nsIWidget::UsePuppetWidgets(),
39+
NS_ABORT_IF_FALSE(nsIWidget::UsePuppetWidgets(),
4040
"PuppetWidgets not allowed in this configuration");
4141

4242
nsCOMPtr<nsIWidget> widget = new PuppetWidget(aTabChild);

xpfe/appshell/public/nsIAppShellService.idl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include "nsISupports.idl"
77

88
interface nsIXULWindow;
9-
interface nsIWebNavigation;
109
interface nsIURI;
1110
interface nsIDOMWindow;
1211
interface nsIAppShell;
@@ -44,8 +43,6 @@ interface nsIAppShellService : nsISupports
4443
in long aInitialWidth,
4544
in long aInitialHeight);
4645

47-
nsIWebNavigation createWindowlessBrowser();
48-
4946
[noscript]
5047
void createHiddenWindow();
5148

xpfe/appshell/src/nsAppShellService.cpp

Lines changed: 0 additions & 160 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,6 @@
4646
#include "mozilla/Preferences.h"
4747
#include "mozilla/StartupTimeline.h"
4848

49-
#include "nsEmbedCID.h"
50-
#include "nsIWebBrowser.h"
51-
#include "nsIDocShell.h"
52-
5349
using namespace mozilla;
5450

5551
// Default URL for the hidden window, can be overridden by a pref on Mac
@@ -207,162 +203,6 @@ nsAppShellService::CreateTopLevelWindow(nsIXULWindow *aParent,
207203
return rv;
208204
}
209205

210-
/*
211-
* This class provides a stub implementation of nsIWebBrowserChrome2, as needed
212-
* by nsAppShellService::CreateWindowlessBrowser
213-
*/
214-
class WebBrowserChrome2Stub : public nsIWebBrowserChrome2,
215-
public nsIInterfaceRequestor {
216-
public:
217-
virtual ~WebBrowserChrome2Stub() {}
218-
NS_DECL_ISUPPORTS
219-
NS_DECL_NSIWEBBROWSERCHROME
220-
NS_DECL_NSIWEBBROWSERCHROME2
221-
NS_DECL_NSIINTERFACEREQUESTOR
222-
};
223-
224-
NS_INTERFACE_MAP_BEGIN(WebBrowserChrome2Stub)
225-
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIWebBrowserChrome)
226-
NS_INTERFACE_MAP_ENTRY(nsIWebBrowserChrome)
227-
NS_INTERFACE_MAP_ENTRY(nsIWebBrowserChrome2)
228-
NS_INTERFACE_MAP_ENTRY(nsIInterfaceRequestor)
229-
NS_INTERFACE_MAP_END
230-
231-
NS_IMPL_ADDREF(WebBrowserChrome2Stub)
232-
NS_IMPL_RELEASE(WebBrowserChrome2Stub)
233-
234-
NS_IMETHODIMP
235-
WebBrowserChrome2Stub::SetStatus(uint32_t aStatusType, const PRUnichar* aStatus)
236-
{
237-
return NS_OK;
238-
}
239-
240-
NS_IMETHODIMP
241-
WebBrowserChrome2Stub::GetWebBrowser(nsIWebBrowser** aWebBrowser)
242-
{
243-
NS_NOTREACHED("WebBrowserChrome2Stub::GetWebBrowser is not supported");
244-
return NS_ERROR_NOT_IMPLEMENTED;
245-
}
246-
247-
NS_IMETHODIMP
248-
WebBrowserChrome2Stub::SetWebBrowser(nsIWebBrowser* aWebBrowser)
249-
{
250-
NS_NOTREACHED("WebBrowserChrome2Stub::SetWebBrowser is not supported");
251-
return NS_ERROR_NOT_IMPLEMENTED;
252-
}
253-
254-
NS_IMETHODIMP
255-
WebBrowserChrome2Stub::GetChromeFlags(uint32_t* aChromeFlags)
256-
{
257-
*aChromeFlags = 0;
258-
return NS_OK;
259-
}
260-
261-
NS_IMETHODIMP
262-
WebBrowserChrome2Stub::SetChromeFlags(uint32_t aChromeFlags)
263-
{
264-
NS_NOTREACHED("WebBrowserChrome2Stub::SetChromeFlags is not supported");
265-
return NS_ERROR_NOT_IMPLEMENTED;
266-
}
267-
268-
NS_IMETHODIMP
269-
WebBrowserChrome2Stub::DestroyBrowserWindow()
270-
{
271-
NS_NOTREACHED("WebBrowserChrome2Stub::DestroyBrowserWindow is not supported");
272-
return NS_ERROR_NOT_IMPLEMENTED;
273-
}
274-
275-
NS_IMETHODIMP
276-
WebBrowserChrome2Stub::SizeBrowserTo(int32_t aCX, int32_t aCY)
277-
{
278-
NS_NOTREACHED("WebBrowserChrome2Stub::SizeBrowserTo is not supported");
279-
return NS_ERROR_NOT_IMPLEMENTED;
280-
}
281-
282-
NS_IMETHODIMP
283-
WebBrowserChrome2Stub::ShowAsModal()
284-
{
285-
NS_NOTREACHED("WebBrowserChrome2Stub::ShowAsModal is not supported");
286-
return NS_ERROR_NOT_IMPLEMENTED;
287-
}
288-
289-
NS_IMETHODIMP
290-
WebBrowserChrome2Stub::IsWindowModal(bool* aResult)
291-
{
292-
*aResult = false;
293-
return NS_OK;
294-
}
295-
296-
NS_IMETHODIMP
297-
WebBrowserChrome2Stub::ExitModalEventLoop(nsresult aStatus)
298-
{
299-
NS_NOTREACHED("WebBrowserChrome2Stub::ExitModalEventLoop is not supported");
300-
return NS_ERROR_NOT_IMPLEMENTED;
301-
}
302-
303-
NS_IMETHODIMP
304-
WebBrowserChrome2Stub::SetStatusWithContext(uint32_t aStatusType,
305-
const nsAString& aStatusText,
306-
nsISupports* aStatusContext)
307-
{
308-
return NS_OK;
309-
}
310-
311-
NS_IMETHODIMP
312-
WebBrowserChrome2Stub::GetInterface(const nsIID & aIID, void **aSink)
313-
{
314-
return QueryInterface(aIID, aSink);
315-
}
316-
317-
NS_IMETHODIMP
318-
nsAppShellService::CreateWindowlessBrowser(nsIWebNavigation **aResult)
319-
{
320-
/* First, we create an instance of nsWebBrowser. Instances of this class have
321-
* an associated doc shell, which is what we're interested in.
322-
*/
323-
nsCOMPtr<nsIWebBrowser> browser = do_CreateInstance(NS_WEBBROWSER_CONTRACTID);
324-
if (!browser) {
325-
NS_ERROR("Couldn't create instance of nsWebBrowser!");
326-
return NS_ERROR_FAILURE;
327-
}
328-
329-
/* Next, we set the container window for our instance of nsWebBrowser. Since
330-
* we don't actually have a window, we instead set the container window to be
331-
* an instance of WebBrowserChrome2Stub, which provides a stub implementation
332-
* of nsIWebBrowserChrome2.
333-
*/
334-
nsRefPtr<WebBrowserChrome2Stub> stub = new WebBrowserChrome2Stub();
335-
if (!stub) {
336-
NS_ERROR("Couldn't create instance of WebBrowserChrome2Stub!");
337-
return NS_ERROR_FAILURE;
338-
}
339-
browser->SetContainerWindow(stub);
340-
341-
nsCOMPtr<nsIWebNavigation> navigation = do_QueryInterface(browser);
342-
343-
nsCOMPtr<nsIDocShellTreeItem> item = do_QueryInterface(navigation);
344-
item->SetItemType(nsIDocShellTreeItem::typeContentWrapper);
345-
346-
/* A windowless web browser doesn't have an associated OS level window. To
347-
* accomplish this, we initialize the window associated with our instance of
348-
* nsWebBrowser with an instance of PuppetWidget, which provides a stub
349-
* implementation of nsIWidget.
350-
*/
351-
nsCOMPtr<nsIWidget> widget = nsIWidget::CreatePuppetWidget(nullptr);
352-
if (!widget) {
353-
NS_ERROR("Couldn't create instance of PuppetWidget");
354-
return NS_ERROR_FAILURE;
355-
}
356-
widget->Create(nullptr, 0, nsIntRect(nsIntPoint(0, 0), nsIntSize(0, 0)),
357-
nullptr, nullptr);
358-
nsCOMPtr<nsIBaseWindow> window = do_QueryInterface(navigation);
359-
window->InitWindow(0, widget, 0, 0, 0, 0);
360-
window->Create();
361-
362-
navigation.forget(aResult);
363-
return NS_OK;
364-
}
365-
366206
uint32_t
367207
nsAppShellService::CalculateWindowZLevel(nsIXULWindow *aParent,
368208
uint32_t aChromeMask)

0 commit comments

Comments
 (0)