home *** CD-ROM | disk | FTP | other *** search
/ PC World 2005 December / PCWorld_2005-12_cd.bin / komunikace / netscape / nsb-install-8-0.exe / chrome / browser.jar / content / browser / search.xml < prev    next >
Extensible Markup Language  |  2005-09-26  |  23KB  |  593 lines

  1. <?xml version="1.0"?>
  2.  
  3.  
  4. <bindings id="SearchBindings"
  5.           xmlns="http://www.mozilla.org/xbl"
  6.           xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  7.           xmlns:xbl="http://www.mozilla.org/xbl">
  8.  
  9.   <binding id="searchbar-base">
  10.     <resources>
  11.       <stylesheet src="chrome://browser/content/searchbarBindings.css"/>
  12.       <stylesheet src="chrome://browser/skin/searchbar.css"/>
  13.     </resources>
  14.   </binding>
  15.  
  16.   <binding id="searchbar" extends="chrome://browser/content/search.xml#searchbar-base">
  17.       <!--
  18.                    type="autocomplete"
  19.                    autocompletepopup="SearchBarHistoryPopup"
  20.                    autocompletesearch="form-history"
  21.                    autocompletesearchparam="searchbar-history"
  22.                    disableautocomplete="true"
  23.                    enablehistory="true"
  24.       -->
  25.     <content>
  26.       <xul:stringbundle src="chrome://browser/locale/searchbar.properties"/>
  27.       <xul:textbox class="searchbar-textbox" flex="1"
  28.                    completeselectedindex="true"
  29.                    tabscrolling="true"
  30.                    onfocus="URLBarFocusHandler(event, this);"
  31.                    onmousedown="URLBarMouseDownHandler(event, this);"
  32.                    onclick="URLBarClickHandler(event, this);"
  33.                    xbl:inherits="searchengine,src">
  34.         <xul:button class="searchbar-dropmarker" type="menu"
  35.                     popup="_child" xbl:inherits="src">
  36.           <xul:menupopup anonid="searchbar-popup" position="after_start"
  37.                          datasources="rdf:internetsearch"
  38.                          ref="NC:SearchEngineRoot"
  39.                          sortResource="http://home.netscape.com/NC-rdf#Name" sortDirection="ascending"
  40.                          oncommand="if (this.parentNode) this.parentNode.parentNode.onEnginePopupCommand(event);"
  41.                          onpopupshowing="if (this.parentNode) this.parentNode.parentNode.onEnginePopupShowing(event);"
  42.                          onpopuphidden="if (this.parentNode) this.parentNode.parentNode.onEnginePopupHidden(event);">
  43.             <xul:template>
  44.               <xul:menuitem type="checkbox"
  45.                             uri="rdf:*" value="rdf:*"
  46.                             src="rdf:http://home.netscape.com/NC-rdf#Icon"
  47.                             label="rdf:http://home.netscape.com/NC-rdf#Name"/>
  48.             </xul:template>
  49.            <!--  <xul:menuseparator anonid="searchsize-menuseparator"/>
  50.                         <xul:menu anonid="searchsize-menu" label="Select size">
  51.                 <xul:menupopup label="Search Box Size" anonid="searchbar-size-popup" position="after_start"
  52.                              oncommand="if (this.parentNode) this.parentNode.parentNode.parentNode.parentNode.onSearchBoxSize(event);">
  53.                   <xul:menuitem anonid="searchbox-size-10em" type="radio" label="Short" name="searchbox-size" value="10em"/>
  54.                   <xul:menuitem anonid="searchbox-size-15em" type="radio" label="Medium" name="searchbox-size" value="15em"/>
  55.                   <xul:menuitem anonid="searchbox-size-19em" type="radio" label="Long" name="searchbox-size" value="19em"/>
  56.                 </xul:menupopup>
  57.             </xul:menu> -->
  58.           </xul:menupopup>
  59.         </xul:button>
  60.       </xul:textbox>
  61.       <xul:dropmarker class="searchbar-history-dropmarker"
  62.                       popup="SearchBarHistoryPopup">
  63.         <xul:image class="searchbar-history-dropmarker-image"/>
  64.       </xul:dropmarker>
  65.     </content>
  66.     <implementation>
  67.       <constructor><![CDATA[
  68.         var broadcaster = document.getElementById('searchEngineBroadcaster');
  69.         broadcaster.addEventListener('DOMAttrModified', this.onSearchEngineChange, false);
  70.       ]]></constructor>
  71.       <field name="mStringBundle"> document.getAnonymousNodes(this)[0] </field>
  72.       <field name="mTextbox"> document.getAnonymousNodes(this)[1] </field>
  73.       <method name="focus">
  74.         <body><![CDATA[
  75.           this.mTextbox.focus();
  76.         ]]></body>
  77.       </method>
  78.       <method name="clear">
  79.         <body><![CDATA[
  80.           this.mTextbox.value="";
  81.         ]]></body>
  82.       </method>
  83.       <method name="select">
  84.         <body><![CDATA[
  85.           this.mTextbox.select();
  86.         ]]></body>
  87.       </method>
  88.       <method name="onSearchEngineChange">
  89.         <parameter name="evt"/>
  90.         <body><![CDATA[
  91.           // MERC (ccampbell) added this function to watch search engine broadcaster
  92.           if (evt.attrName!='searchengine') return;
  93.           var searchbar = document.getElementById('searchbar');
  94.           searchbar.currentEngine = evt.newValue;
  95.           //searchbar.mTextbox.select();
  96.         ]]></body>
  97.       </method>
  98.     </implementation>
  99.   </binding>
  100.  
  101.   <binding id="searchbar-textbox" extends="chrome://global/content/bindings/autocomplete.xml#autocomplete">
  102.     <implementation>
  103.  
  104.       <constructor><![CDATA[
  105.         if (this.parentNode && this.parentNode.parentNode.parentNode.localName ==
  106.             "toolbarpaletteitem")
  107.           return;
  108.         setTimeout(function(a) { a.initialize(); }, 0, this);
  109.       ]]></constructor>
  110.  
  111.       <destructor><![CDATA[
  112.        if (this.parentNode && this.parentNode.parentNode.parentNode.localName ==
  113.             "toolbarpaletteitem")
  114.           return;
  115.         this.controllers.removeController(this.searchbarController);
  116.       ]]></destructor>
  117.  
  118.       <property name="mContextMenu" readonly="true">
  119.         <getter>
  120.           var textBox = document.getAnonymousElementByAttribute(this,
  121.                         "anonid", "textbox-input-box");
  122.           return document.getAnonymousElementByAttribute(textBox,
  123.                         "anonid", "input-box-contextmenu");
  124.         </getter>
  125.       </property>
  126.  
  127.       <method name="initialize">
  128.         <body><![CDATA[
  129.         
  130.         if (!this.parentNode || !this.mContextMenu) return;
  131.         
  132.           this.RDF = Components.classes["@mozilla.org/rdf/rdf-service;1"]
  133.                                .getService(Components.interfaces.nsIRDFService);
  134.           this.ISEARCHDS = this.RDF.GetDataSource("rdf:internetsearch");
  135.           this.FORMHISTSVC = Components
  136.                               .classes["@mozilla.org/satchel/form-history;1"]
  137.                               .getService(Components.interfaces.nsIFormHistory);
  138.           var engine = this.currentEngine;
  139.           if (!engine)
  140.             this.currentEngine = this.getDefaultEngine();
  141.           else {
  142.             var rEngine = this.RDF.GetResource(engine);
  143.             var rChild  = this.RDF.GetResource("http://home.netscape.com/NC-rdf#child");
  144.             if (!this.ISEARCHDS.hasArcIn(rEngine, rChild)) {
  145.               this.currentEngine = this.getDefaultEngine();
  146.             } // if default engine not found... XXXblake what to do now?
  147.           }
  148.  
  149.           var element;
  150.           element = document.createElementNS(XUL_NS, "menuseparator");
  151.           this.mContextMenu.appendChild(element);
  152.           element = document.createElementNS(XUL_NS, "menuitem");
  153.           element.setAttribute("label", this.mStringBundle
  154.                                .getString("cmd_clearHistory"));
  155.           element.setAttribute("accesskey", this.mStringBundle
  156.                                .getString("cmd_clearHistory_accesskey"));
  157.           element.setAttribute("cmd", "cmd_clearhistory");
  158.           this.mContextMenu.appendChild(element);
  159.           this.controllers.appendController(this.searchbarController);
  160.  
  161.         ]]></body>
  162.       </method>
  163.  
  164.       <field name="mStringBundle"> 
  165.       if (this.parentNode)
  166.       this.parentNode.mStringBundle </field>
  167.       <field name="RDF"/>
  168.       <field name="ISEARCHDS"/>
  169.       <field name="FORMHISTSVC"/>
  170.       <field name="SEARCH_HISTORY_FILE">"search-history.txt"</field>
  171.       <field name="PR_RDONLY">1</field>
  172.  
  173.  
  174.       <property name="currentEngine"
  175.                 onget="if (this.parentNode) return this.parentNode.getAttribute('searchengine'); else return null;">
  176.         <setter><![CDATA[
  177.           if (!val)
  178.             return;
  179.  
  180.           var broadcaster = document.getElementById('searchEngineBroadcaster');
  181.           broadcaster.setAttribute("searchengine", val);
  182.           const kNC_Icon = this.RDF.GetResource("http://home.netscape.com/NC-rdf#Icon");
  183.           var rEngine = this.RDF.GetResource(val);
  184.           broadcaster.setAttribute("src", this.readRDFString(rEngine, kNC_Icon));
  185.  
  186.           const kNC_Name = this.RDF.GetResource("http://home.netscape.com/NC-rdf#Name");
  187.           var pls = Components.classes["@mozilla.org/pref-localizedstring;1"]
  188.                               .createInstance(Components.interfaces.nsIPrefLocalizedString);
  189.           pls.data = this.readRDFString(rEngine, kNC_Name);
  190.           var PREF = Components.classes["@mozilla.org/preferences-service;1"]
  191.                                .getService(Components.interfaces.nsIPrefService)
  192.                                .getBranch(null);
  193.           PREF.setComplexValue("browser.search.selectedEngine",
  194.                                Components.interfaces.nsIPrefLocalizedString,
  195.                                pls);
  196.         ]]></setter>
  197.       </property>
  198.  
  199.       <property name="perfmon">
  200.         <getter><![CDATA[
  201.           if (!this.parentNode) return null;
  202.           var rEngine = this.RDF.GetResource(this.currentEngine);
  203.           const kNC_Name = this.RDF.GetResource("http://home.netscape.com/NC-rdf#Name");
  204.           var pls = Components.classes["@mozilla.org/pref-localizedstring;1"]
  205.                               .createInstance(Components.interfaces.nsIPrefLocalizedString);
  206.           var engineID = 'searchbar:'+this.readRDFString(rEngine, kNC_Name);
  207.           dump('search.xml: perfmon = '+engineID+'\n');
  208.           return engineID;
  209.         ]]></getter>
  210.       </property>
  211.  
  212.       <method name="getDefaultEngine">
  213.         <body><![CDATA[
  214.           var PREF = Components.classes["@mozilla.org/preferences-service;1"]
  215.                                .getService(Components.interfaces.nsIPrefService)
  216.                                .getBranch(null);
  217.           var defaultName = PREF.getComplexValue("browser.search.defaultenginename",
  218.                                                  Components.interfaces.nsIPrefLocalizedString).data;
  219.  
  220.           const kNC_Root  = this.RDF.GetResource("NC:SearchEngineRoot");
  221.           const kNC_child = this.RDF.GetResource("http://home.netscape.com/NC-rdf#child");
  222.           const kNC_Name  = this.RDF.GetResource("http://home.netscape.com/NC-rdf#Name");
  223.  
  224.           var arcs = this.ISEARCHDS.GetTargets(kNC_Root, kNC_child, true);
  225.           while (arcs.hasMoreElements()) {
  226.             var rEngine = arcs.getNext().QueryInterface(Components.interfaces.nsIRDFResource);
  227.             var name = this.readRDFString(rEngine, kNC_Name);
  228.             if (name == defaultName)
  229.               return rEngine.Value;
  230.           }
  231.           return null;
  232.         ]]></body>
  233.       </method>
  234.  
  235.       <method name="readRDFString">
  236.         <parameter name="aRes"/>
  237.         <parameter name="aProp"/>
  238.         <body><![CDATA[
  239.           var n = this.ISEARCHDS.GetTarget(aRes, aProp, true);
  240.           return n ? n.QueryInterface(Components.interfaces.nsIRDFLiteral).Value : null;
  241.         ]]></body>
  242.       </method>
  243.       <!--  // overload |onTextEntered| in autocomplete.xml -->
  244.       <method name="onTextEntered">
  245.         <body><![CDATA[
  246.           // CDC - Remember the text in the search history list
  247.           if (this.value) {
  248.             search.AddToHistory(this.value);
  249.           }
  250.  
  251.           // CDC - Count search provider hits
  252.           try {
  253.             if (perfmon) {
  254.               this.setAttribute('perfmon', this.perfmon);
  255.               perfmon.trackData(this);
  256.             }
  257.           } catch (ex) { }
  258.  
  259.           var ISEARCHSVC = Components.classes["@mozilla.org/rdf/datasource;1?name=internetsearch"]
  260.                                      .getService(Components.interfaces.nsIInternetSearchService);
  261.           var searchURL = ISEARCHSVC.GetInternetSearchURL(this.currentEngine,
  262.                                        this.value? encodeURIComponent(this.value):"",
  263.                                        0, 0, {value:0});
  264.  
  265.           if (!this.value) {
  266.             var uri = Components.classes['@mozilla.org/network/standard-url;1']
  267.                                 .createInstance(Components.interfaces.nsIURI);
  268.             uri.spec = searchURL;
  269.             searchURL = uri.host;
  270.             if (!searchURL)
  271.               return;
  272.           }
  273.  
  274.           // JMC - Why was this commented out?
  275.           SearchLoadURL(searchURL, this.mEnterEvent);
  276.         ]]></body>
  277.       </method>
  278.  
  279.         <method name="onSearchBoxSize">
  280.         <parameter name="aEvent"/>
  281.         <body><![CDATA[
  282.  
  283.         if (!this.parentNode) return; // JMC - Sanity check fixes BLT bug 127010
  284.  
  285.          var newSize;
  286.            newSize = aEvent.target.getAttribute("value");
  287.             this.parentNode.style.width = newSize;
  288.  
  289.               var prefService = Components.classes["@mozilla.org/preferences-service;1"]
  290.                            .getService(Components.interfaces.nsIPrefBranch);
  291.          prefService.setCharPref("browser.search.size",newSize);
  292.             /*
  293.             var menupopup = document.getAnonymousElementByAttribute(this, "anonid", "searchbar-size-popup");
  294.          var foundme = document.getAnonymousElementByAttribute(menupopup, "value", newSize);
  295.          if (foundme)
  296.              foundme.setAttribute("checked", "true");
  297.                */
  298.          this.focus();
  299.          this.select();
  300.  
  301.         ]]></body>
  302.       </method>
  303.  
  304.  
  305.       <method name="onEnginePopupCommand">
  306.         <parameter name="aEvent"/>
  307.         <body><![CDATA[
  308.           var target = aEvent.target
  309.           if (target.getAttribute("anonid") == "addengine-menuitem") {
  310.             var regionBundle = document.getElementById("bundle_browser_region");
  311.             loadURI(regionBundle.getString("searchEnginesURL"), null, null);
  312.           } else {
  313.             this.currentEngine = target.id;
  314.             this.focus();
  315.             this.select();
  316.           }
  317.         ]]></body>
  318.       </method>
  319.  
  320.       <method name="onEnginePopupShowing">
  321.         <parameter name="aEvent"/>
  322.         <body><![CDATA[
  323.             dump("\n\nOnEnginePopupShowing... executed! \n\n");
  324.             
  325.             if (!this.parentNode) return;
  326.             
  327.           var target = aEvent.target;
  328.           var element = document.getAnonymousElementByAttribute(this.parentNode,
  329.                            "anonid", "searchsize-menuseparator");
  330.  
  331.           if (!element)
  332.             return;
  333.  
  334.             var myParent = element.parentNode;
  335.  
  336.             myParent.removeChild(element);
  337.             myParent.appendChild(element);
  338.  
  339.           element = document.getAnonymousElementByAttribute(this.parentNode,
  340.                            "anonid", "searchsize-menu");
  341.  
  342.             myParent.removeChild(element);
  343.             myParent.appendChild(element);
  344.  
  345.           /* don't need any of this pucky
  346.           search.ReadSearchHistory();
  347.  
  348.           var target = aEvent.target;
  349.           var element = document.getAnonymousElementByAttribute(this.parentNode,
  350.                            "anonid", "clearhistory-menuitem");
  351.           if (element)
  352.             return;
  353.  
  354.           element = document.createElementNS(XUL_NS, "menuseparator");
  355.           target.appendChild(element);
  356.  
  357.           // MERC: add 'clear search history' menu item
  358.           element = document.createElementNS(XUL_NS, "menuitem");
  359.           element.setAttribute("label", "Clear search history");
  360.           element.setAttribute("anonid", "clearhistory-menuitem");
  361.           target.appendChild(element);
  362.           */
  363.  
  364.           /* MERC: Disable adding of new search engines
  365.           element = document.createElementNS(XUL_NS, "menuitem");
  366.           element.setAttribute("label", this.mStringBundle
  367.               .getString("cmd_addEngine"));
  368.           element.setAttribute("accesskey", this.mStringBundle
  369.               .getString("cmd_addEngine_accesskey"));
  370.           element.setAttribute("anonid", "addengine-menuitem");
  371.           target.appendChild(element);
  372.           */
  373.         ]]></body>
  374.       </method>
  375.  
  376.       <method name="onEnginePopupHidden">
  377.         <parameter name="aEvent"/>
  378.         <body><![CDATA[
  379.         if (!this.parentNode) return;
  380.         
  381.           var target = aEvent.target;
  382.           var element = document.getAnonymousElementByAttribute(this.parentNode,
  383.                            "anonid", "addengine-menuitem");
  384.           if (element) {
  385.             target.removeChild(target.lastChild);
  386.             target.removeChild(target.lastChild);
  387.           }
  388.         ]]></body>
  389.       </method>
  390.  
  391.       <!-- nsIController -->
  392.       <field name="searchbarController" readonly="true"><![CDATA[
  393.       ({
  394.         mOuter: this,
  395.  
  396.         supportsCommand: function (aCommand)
  397.         {
  398.           return aCommand == "cmd_clearhistory";
  399.         },
  400.  
  401.         isCommandEnabled: function (aCommand)
  402.         {
  403.            var entries = this.mOuter.ReadSearchHistory();
  404.            // MERC - JCH: If search history file is empty, array still ends up with size == 1.
  405.            return entries.length > 1;
  406.          
  407.            // return this.mOuter.FORMHISTSVC.nameExists(
  408.            //        this.mOuter.getAttribute("autocompletesearchparam"));
  409.         },
  410.  
  411.         doCommand: function (aCommand)
  412.         {
  413.             this.mOuter.ClearSearchHistory();
  414.           //this.mOuter.FORMHISTSVC.removeEntriesForName(
  415.           //    this.mOuter.getAttribute("autocompletesearchparam"));
  416.           //this.mOuter.value = "";
  417.         }
  418.       })
  419.       ]]></field>
  420.  
  421.       <!-- DND Observer -->
  422.       <field name="searchbarDNDObserver" readonly="true"><![CDATA[
  423.       ({
  424.         mOuter: this,
  425.  
  426.         onDrop: function (aEvent, aXferData, aDragSession)
  427.         {
  428.           var data = transferUtils.retrieveURLFromData(aXferData.data,
  429.                          aXferData.flavour.contentType);
  430.           if (data) {
  431.             // XXXBlake Workaround caret crash when you try to set the
  432.             // textbox's value on dropping
  433.             setTimeout(function(This, data, evt) { This.value = data; This.onTextEntered(evt); }, 0, this.mOuter, data, aEvent);
  434.           }
  435.         },
  436.  
  437.         getSupportedFlavours: function ()
  438.         {
  439.           var flavourSet = new FlavourSet();
  440.  
  441.           flavourSet.appendFlavour("text/unicode");
  442.           flavourSet.appendFlavour("text/x-moz-url");
  443.           flavourSet.appendFlavour("application/x-moz-file", "nsIFile");
  444.           return flavourSet;
  445.         }
  446.       })
  447.       ]]></field>
  448.  
  449.     
  450.       <!-- MERC - JCH: The following four methods address BLT# 150209 -->
  451.  
  452.       <method name="GetSearchHistoryFile">
  453.           <body><![CDATA[
  454.           dump('GetSearchHistoryFile(): '+this.SEARCH_HISTORY_FILE);
  455.  
  456.           // Get the user's profile directory
  457.           var profileDir = Components.classes["@mozilla.org/file/directory_service;1"]
  458.                                         .getService(Components.interfaces.nsIProperties)
  459.                                         .get("ProfD", Components.interfaces.nsILocalFile);
  460.           if (profileDir)
  461.           {
  462.               // Create file descriptor
  463.               var file = profileDir.clone();
  464.               file.append(this.SEARCH_HISTORY_FILE);
  465.               // returns nsILocalFile
  466.                 return file;
  467.           }
  468.          
  469.           ]]></body>
  470.       </method>
  471.  
  472.       <method name="EnsureSearchHistoryFileExists">      
  473.           <body><![CDATA[
  474.           dump('EnsureSearchHistoryFileExists()');
  475.  
  476.           var file = this.GetSearchHistoryFile();
  477.           if (!file.exists()) {
  478.             dump(' creating file: '+this.SEARCH_HISTORY_FILE);
  479.             file.create(Components.interfaces.nsIFile.NORMAL_FILE_TYPE, 0);
  480.           }
  481.           // returns nsILocalFile
  482.           return file; 
  483.           ]]></body>
  484.       </method>
  485.  
  486.       <method name="ReadSearchHistory">
  487.           <body><![CDATA[
  488.           dump('ReadSearchHistory()');
  489.  
  490.           var file = this.EnsureSearchHistoryFileExists();
  491.  
  492.           // Init the file input stream
  493.           var fis = Components.classes["@mozilla.org/network/file-input-stream;1"]
  494.                               .createInstance(Components.interfaces.nsIFileInputStream);
  495.           fis.init(file, this.PR_RDONLY, 0, 0);
  496.  
  497.           // Init a scriptable input stream
  498.           var sis = Components.classes["@mozilla.org/scriptableinputstream;1"]
  499.                               .createInstance(Components.interfaces.nsIScriptableInputStream);
  500.           sis.init(fis);
  501.  
  502.           // Read the file
  503.           var fileContents = sis.read(sis.available());
  504.  
  505.           // Close file
  506.           fis.close();
  507.  
  508.           // Return the lines as an array
  509.           return fileContents.split('\n');
  510.           ]]></body>
  511.       </method>
  512.  
  513.       <method name="ClearSearchHistory">
  514.           <body><![CDATA[
  515.           dump('ClearSearchHistory()');
  516.           var file = this.GetSearchHistoryFile();
  517.           if (file.exists()) 
  518.           {
  519.               // Init the file input stream
  520.               var fis = Components.classes["@mozilla.org/network/file-input-stream;1"]
  521.                                   .createInstance(Components.interfaces.nsIFileInputStream);
  522.               fis.init(file, this.PR_RDONLY, 0, 
  523.                        Components.interfaces.nsIFileInputStream.DELETE_ON_CLOSE);
  524.               fis.close();
  525.           }
  526.           // MERC (rpaul) clear the searchbar text
  527.           var searchbar = document.getElementById('searchbar');    
  528.           if (searchbar)
  529.           {
  530.               searchbar.clear();
  531.           }
  532.           ]]></body>
  533.       </method>
  534.  
  535.     </implementation>
  536.  
  537.     <handlers>
  538.  
  539.       <handler event="keypress" keycode="vk_up" modifiers="control" phase="capturing">
  540.         <![CDATA[
  541.           var currentEngine = this.currentEngine;
  542.           if (currentEngine) {
  543.           var searchEngineMenuitem = document.getAnonymousElementByAttribute(this.parentNode, "id", currentEngine);
  544.             var newEngine = searchEngineMenuitem.previousSibling;
  545.             if (newEngine)
  546.               this.currentEngine = newEngine.id;
  547.           }
  548.           event.preventDefault();
  549.           event.stopPropagation();
  550.         ]]>
  551.       </handler>
  552.  
  553.       <handler event="keypress" keycode="vk_down" modifiers="control" phase="capturing">
  554.         <![CDATA[
  555.           var currentEngine = this.currentEngine;
  556.           if (currentEngine) {
  557.             var searchEngineMenuitem = document.getAnonymousElementByAttribute(this.parentNode, "id", currentEngine);
  558.  
  559.             var newEngine = searchEngineMenuitem.nextSibling;
  560.  
  561.             if (newEngine)
  562.               this.currentEngine = newEngine.id;
  563.           }
  564.           event.preventDefault();
  565.           event.stopPropagation();
  566.         ]]>
  567.       </handler>
  568.  
  569.       <handler event="dragdrop" phase="capturing">
  570.         nsDragAndDrop.drop(event, this.searchbarDNDObserver);
  571.       </handler>
  572.  
  573.     </handlers>
  574.  
  575.   </binding>
  576.  
  577.   <binding id="searchbar-dropmarker" extends="chrome://browser/content/search.xml#searchbar-base">
  578.     <content>
  579.       <xul:stack flex="1">
  580.         <xul:hbox align="center">
  581.           <xul:image class="searchbar-engine-image" xbl:inherits="src"/>
  582.         </xul:hbox>
  583.         <xul:hbox align="end">
  584.             <xul:spacer flex="1"/>
  585.                 <xul:image class="searchbar-dropmarker-image"/>
  586.           </xul:hbox>
  587.       </xul:stack>
  588.       <children/>
  589.     </content>
  590.   </binding>
  591.  
  592. </bindings>
  593.