Index: xpfe/global/jar.mn
===================================================================
RCS file: /cvsroot/mozilla/xpfe/global/jar.mn,v
retrieving revision 1.47
diff -u -9 -r1.47 jar.mn
--- jar.mn 2001/10/26 09:25:55 1.47
+++ jar.mn 2001/11/15 23:50:11
@@ -45,18 +45,20 @@
content/global/bindings/browser.xml (resources/content/bindings/browser.xml)
content/global/bindings/button.xml (resources/content/bindings/button.xml)
content/global/bindings/checkbox.xml (resources/content/bindings/checkbox.xml)
content/global/bindings/colorpicker.xml (resources/content/bindings/colorpicker.xml)
content/global/bindings/dialog.xml (resources/content/bindings/dialog.xml)
content/global/bindings/general.xml (resources/content/bindings/general.xml)
content/global/bindings/groupbox.xml (resources/content/bindings/groupbox.xml)
content/global/bindings/menu.xml (resources/content/bindings/menu.xml)
content/global/bindings/menulist.xml (resources/content/bindings/menulist.xml)
+ content/global/bindings/nulplugin.xml (resources/content/bindings/nulplugin.xml)
+ content/global/bindings/nulplugin.css (resources/content/bindings/nulplugin.css)
content/global/bindings/outliner.xml (resources/content/bindings/outliner.xml)
content/global/bindings/outliner.css (resources/content/bindings/outliner.css)
content/global/bindings/popup.xml (resources/content/bindings/popup.xml)
content/global/bindings/progressmeter.xml (resources/content/bindings/progressmeter.xml)
content/global/bindings/radio.xml (resources/content/bindings/radio.xml)
content/global/bindings/scrollbar.xml (resources/content/bindings/scrollbar.xml)
content/global/bindings/scrollbox.xml (resources/content/bindings/scrollbox.xml)
content/global/bindings/splitter.xml (resources/content/bindings/splitter.xml)
content/global/bindings/spinbuttons.xml (resources/content/bindings/spinbuttons.xml)
Index: xpfe/global/resources/content/bindings/nulplugin.css
===================================================================
RCS file: nulplugin.css
diff -N nulplugin.css
--- /dev/null Wed Apr 26 15:53:02 2000
+++ nulplugin.css Thu Nov 15 15:50:11 2001
@@ -0,0 +1,57 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: NPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Netscape Public License
+ * Version 1.1 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/NPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2001
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the NPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the NPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+.pluginBox {
+ width:100%;
+ height:100%;
+ padding: 2%;
+
+}
+
+.pluginOutline {
+ background: white;
+ color: black;
+ border: groove;
+ cursor: pointer;
+}
+
+#pluginClickMessage {
+ color: black;
+ font-family: Helvetica;
+ font-size: 12px;
+ -moz-user-select: none;
+}
+
Index: xpfe/global/resources/content/bindings/nulplugin.xml
===================================================================
RCS file: nulplugin.xml
diff -N nulplugin.xml
--- /dev/null Wed Apr 26 15:53:02 2000
+++ nulplugin.xml Thu Nov 15 15:50:11 2001
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Click here to get plugin
+
+
+
+
+
+
+ if (this.getAttribute("state") != "1") {
+ var element = document.getAnonymousElementByAttribute(this, "id", "pluginClickMessage");
+ if (element) {
+ var txt = element.firstChild;
+ if (txt)
+ element.removeChild(txt);
+ txt = document.createTextNode("Click here again after installing plugin");
+ element.appendChild(txt);
+ this.setAttribute("state","1");
+ }
+ } else {
+ navigator.plugins.refresh(false);
+ location.reload()
+ this.removeAttribute("state");
+ }
+
+ var isOKToGetPlugin = 0;
+ if (this.getAttribute("state") == "1") {
+ isOKToGetPlugin = confirm("This page contains a plugin that is not installed. Would you like to install this plugin now?");
+ if (isOKToGetPlugin) {
+ var redirPage = this.getAttribute('pluginurl');
+ if (!redirPage)
+ redirPage = this.getAttribute('pluginspage');
+ var win;
+ if (redirPage)
+ win = window.open(redirPage);
+ else
+ win = window.open("http://cgi.netscape.com/cgi-bin/plug-in_finder.cgi?" + this.getAttribute('type'));
+ }
+ }
+
+ if (!isOKToGetPlugin) {
+ var element = document.getAnonymousElementByAttribute(this, "id", "pluginClickMessage");
+ if (element) {
+ var txt = element.firstChild;
+ if (txt)
+ element.removeChild(txt);
+ txt = document.createTextNode("Click here to get plugin");
+ element.appendChild(txt);
+ this.removeAttribute("state");
+ }
+ }
+
+
+
+
+
\ No newline at end of file
Index: layout/html/base/src/MANIFEST_RES
===================================================================
RCS file: /cvsroot/mozilla/layout/html/base/src/MANIFEST_RES,v
retrieving revision 1.4
diff -u -9 -r1.4 MANIFEST_RES
--- MANIFEST_RES 2001/11/08 21:43:53 1.4
+++ MANIFEST_RES 2001/11/15 23:53:21
@@ -6,9 +6,10 @@
gopher-audio.gif
gopher-binary.gif
gopher-find.gif
gopher-image.gif
gopher-menu.gif
gopher-movie.gif
gopher-telnet.gif
gopher-text.gif
gopher-unknown.gif
+plugin-puzzle.gif
Index: layout/html/base/src/Makefile.in
===================================================================
RCS file: /cvsroot/mozilla/layout/html/base/src/Makefile.in,v
retrieving revision 1.71
diff -u -9 -r1.71 Makefile.in
--- Makefile.in 2001/11/08 21:43:53 1.71
+++ Makefile.in 2001/11/15 23:53:21
@@ -127,18 +127,19 @@
$(srcdir)/gopher-audio.gif \
$(srcdir)/gopher-binary.gif \
$(srcdir)/gopher-find.gif \
$(srcdir)/gopher-image.gif \
$(srcdir)/gopher-menu.gif \
$(srcdir)/gopher-movie.gif \
$(srcdir)/gopher-telnet.gif \
$(srcdir)/gopher-text.gif \
$(srcdir)/gopher-unknown.gif \
+ $(srcdir)/plugin-puzzle.gif \
$(NULL)
# we don't want the shared lib, but we want to force the creation of a static lib.
FORCE_STATIC_LIB = 1
include $(topsrcdir)/config/rules.mk
DEFINES += -D_IMPL_NS_HTML
Index: layout/html/base/src/makefile.win
===================================================================
RCS file: /cvsroot/mozilla/layout/html/base/src/makefile.win,v
retrieving revision 3.86
diff -u -9 -r3.86 makefile.win
--- makefile.win 2001/11/08 21:43:54 3.86
+++ makefile.win 2001/11/15 23:53:21
@@ -138,12 +138,13 @@
$(MAKE_INSTALL) gopher-audio.gif $(DIST)\bin\res\html
$(MAKE_INSTALL) gopher-binary.gif $(DIST)\bin\res\html
$(MAKE_INSTALL) gopher-find.gif $(DIST)\bin\res\html
$(MAKE_INSTALL) gopher-image.gif $(DIST)\bin\res\html
$(MAKE_INSTALL) gopher-menu.gif $(DIST)\bin\res\html
$(MAKE_INSTALL) gopher-movie.gif $(DIST)\bin\res\html
$(MAKE_INSTALL) gopher-telnet.gif $(DIST)\bin\res\html
$(MAKE_INSTALL) gopher-text.gif $(DIST)\bin\res\html
$(MAKE_INSTALL) gopher-unknown.gif $(DIST)\bin\res\html
+ $(MAKE_INSTALL) plugin-puzzle.gif $(DIST)\bin\res\html
clobber::
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib
Index: layout/html/base/src/plugin-puzzle.gif
===================================================================
RCS file: plugin-puzzle.gif
diff -N plugin-puzzle.gif
Binary files /dev/null and plugin-puzzle.gif differ
Index: layout/html/document/src/html.css
===================================================================
RCS file: /cvsroot/mozilla/layout/html/document/src/html.css,v
retrieving revision 3.138
diff -u -9 -r3.138 html.css
--- html.css 2001/11/11 01:35:25 3.138
+++ html.css 2001/11/15 23:53:22
@@ -31,18 +31,24 @@
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
@namespace url(http://www.w3.org/1999/xhtml); /* set default namespace to HTML */
+/* XBL Default Plugin: (in quirks because only on embed and applet tags) */
+embed[pluginfinder=xbl], applet[pluginfinder=xbl]{
+ display: inline-block;
+ -moz-binding: url(chrome://global/content/bindings/nulplugin.xml#PluginFinder);
+}
+
/* blocks */
html, div, map, dt, isindex, :-moz-anonymous-block, :cell-content {
display: block;
}
body {
display: block;
margin: 8px;
Index: layout/html/style/src/nsCSSFrameConstructor.cpp
===================================================================
RCS file: /cvsroot/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp,v
retrieving revision 1.655
diff -u -9 -r1.655 nsCSSFrameConstructor.cpp
--- nsCSSFrameConstructor.cpp 2001/11/14 23:55:44 1.655
+++ nsCSSFrameConstructor.cpp 2001/11/15 23:53:26
@@ -10520,21 +10520,19 @@
presShell->GetPlaceholderFrameFor(aFrame, &placeholderFrame);
}
// Get the previous sibling frame
nsIFrame* firstChild;
parentFrame->FirstChild(aPresContext, listName, &firstChild);
nsFrameList frameList(firstChild);
// See whether it's an IMG or an INPUT element (for image buttons)
- // or if it is an applet with no displayable children
- if (nsHTMLAtoms::img == tag.get() || nsHTMLAtoms::input == tag.get() ||
- (nsHTMLAtoms::applet == tag.get() && !HasDisplayableChildren(aPresContext, aFrame))) {
+ if (nsHTMLAtoms::img == tag.get() || nsHTMLAtoms::input == tag.get()) {
// Try and construct an alternate frame to use when the
// image can't be rendered
nsIFrame* newFrame;
rv = ConstructAlternateFrame(aPresShell, aPresContext, content, styleContext,
parentFrame, newFrame);
if (NS_SUCCEEDED(rv)) {
nsCOMPtr frameManager;
presShell->GetFrameManager(getter_AddRefs(frameManager));
@@ -10568,18 +10566,31 @@
nsIFrame* placeholderParentFrame;
placeholderFrame->GetParent(&placeholderParentFrame);
placeholderParentFrame->ReflowDirtyChild(aPresShell, placeholderFrame);
}
}
} else if ((nsHTMLAtoms::object == tag.get()) ||
(nsHTMLAtoms::embed == tag.get()) ||
(nsHTMLAtoms::applet == tag.get())) {
+
+ nsCOMPtr content;
+ aFrame->GetContent(getter_AddRefs(content));
+ if (content) {
+ // check if we want to display the XBL null plugin, aka default plugin, aka plugin finder
+ nsCOMPtr element = do_QueryInterface(content);
+ if (element) {
+ nsAutoString noplugin;
+ if (NS_SUCCEEDED(element->GetAttribute(NS_LITERAL_STRING("pluginfinder"), noplugin)))
+ return element->SetAttribute(NS_LITERAL_STRING("pluginfinder"), NS_ConvertASCIItoUCS2("xbl"));
+ }
+ }
+
// It's an OBJECT, EMBED, or APPLET, so we should display the contents
// instead
nsIFrame* absoluteContainingBlock;
nsIFrame* floaterContainingBlock;
nsIFrame* inFlowParent = parentFrame;
// If the OBJECT frame is out-of-flow, then get the placeholder frame's
// parent and use that when determining the absolute containing block and
// floater containing block
? modules/plugin/samples/default/windows/Debug
? modules/plugin/samples/default/windows/Npnul32.ncb
? modules/plugin/samples/default/windows/Npnul32.opt
? modules/plugin/tools/sdk/bin
? modules/plugin/tools/sdk/idl
? modules/plugin/tools/sdk/include
? modules/plugin/tools/sdk/samples/basic/windows/Debug
? modules/plugin/tools/spy/windows/Debug
? modules/plugin/tools/spy/windows/Files
? modules/plugin/tools/spy/windows/npspy.ncb
? modules/plugin/tools/spy/windows/npspy.opt
? modules/plugin/tools/spy/windows/npspy.plg
Index: modules/plugin/Makefile.in
===================================================================
RCS file: /cvsroot/mozilla/modules/plugin/Makefile.in,v
retrieving revision 1.12
diff -u -9 -r1.12 Makefile.in
--- Makefile.in 2001/08/10 07:35:38 1.12
+++ Makefile.in 2001/11/15 23:59:30
@@ -26,19 +26,18 @@
include $(DEPTH)/config/autoconf.mk
DIRS = base/public base/src
# These subdirs rely on GTK libraries and header files, it is not
# buildable on other non-GTK unix builds
ifdef MOZ_ENABLE_GTK
-DIRS += samples/default/unix
ifdef ENABLE_TESTS
DIRS += samples/simple
endif
endif
include $(topsrcdir)/config/rules.mk
Index: modules/plugin/makefile.win
===================================================================
RCS file: /cvsroot/mozilla/modules/plugin/makefile.win,v
retrieving revision 1.8
diff -u -9 -r1.8 makefile.win
--- makefile.win 2001/08/10 07:35:38 1.8
+++ makefile.win 2001/11/15 23:59:30
@@ -15,19 +15,19 @@
#//------------------------------------------------------------------------
#//
#// Specify any "command" targets. (ie. DIRS, INSTALL_FILES, ...)
#// (these must come before the common makefiles are included)
#//
#// DIRS - There are subdirectories to process
#//
#//------------------------------------------------------------------------
-DIRS= base\public base\src samples\default\windows
+DIRS= base\public base\src
#//------------------------------------------------------------------------
#//
#// Include the common makefile rules
#//
#//------------------------------------------------------------------------
include <$(DEPTH)\config\rules.mak>
PLUGIN_DIR=\
Index: modules/plugin/base/src/nsPluginHostImpl.cpp
===================================================================
RCS file: /cvsroot/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp,v
retrieving revision 1.327
diff -u -9 -r1.327 nsPluginHostImpl.cpp
--- nsPluginHostImpl.cpp 2001/11/14 06:45:20 1.327
+++ nsPluginHostImpl.cpp 2001/11/15 23:59:31
@@ -102,18 +102,19 @@
#include "nsIWindowWatcher.h"
#include "nsIScriptGlobalObject.h"
#include "nsIScriptGlobalObjectOwner.h"
#include "nsIPrincipal.h"
#include "nsIServiceManager.h"
#include "nsICookieStorage.h"
#include "nsICookieService.h"
+#include "nsIDOMElement.h"
#include "nsIDOMPlugin.h"
#include "nsIDOMMimeType.h"
#include "nsMimeTypes.h"
#include "prprf.h"
#include "nsIInputStreamTee.h"
#if defined(XP_PC) && !defined(XP_OS2)
#include "windows.h"
@@ -3260,21 +3261,28 @@
return rv;
nsresult result;
result = SetUpDefaultPluginInstance(aMimeType, aURL, aOwner);
if(result == NS_OK)
result = aOwner->GetInstance(instance);
- if(result != NS_OK) {
- DisplayNoDefaultPluginDialog(aMimeType);
- return NS_ERROR_FAILURE;
+ if(NS_FAILED(result) && aOwner) {
+ //DisplayNoDefaultPluginDialog(aMimeType);
+ nsCOMPtr pit2 = do_QueryInterface(aOwner);
+ if (pit2) {
+ nsCOMPtr element;
+ pit2->GetDOMElement(getter_AddRefs(element));
+ if (element)
+ element->SetAttribute(NS_LITERAL_STRING("pluginfinder"), nsAutoString());
+ } NS_ASSERTION(pit2, "owner doesn't implement plugin tag info 2");
+ return NS_ERROR_FAILURE;
}
rv = NS_OK;
}
// if we have a failure error, it means we found a plugin for the mimetype,
// but we had a problem with the entry point
if(rv == NS_ERROR_FAILURE)
return rv;