Merge bug 480306
authorAntonio Gomes (tonikitoo) <tonikitoo@gmail.com>
Mon, 04 May 2009 11:09:53 -0400
changeset 27973 9f7007400c515ff66ad059442bee31b4466642fc
parent 27972 8c64012db5eed8c1f0ad74a6b258045b2c867c4f (current diff)
parent 27971 3f6395b0b73d613c1f89e2676d9589fda73c5b16 (diff)
child 27974 a9f0cac42ceee63a624c6fc00df124b06cf9a8ae
push id6814
push usertonikitoo@gmail.com
push dateMon, 04 May 2009 15:10:56 +0000
treeherdermozilla-central@9f7007400c51 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs480306
milestone1.9.2a1pre
Merge bug 480306
--- a/content/xul/templates/tests/chrome/Makefile.in
+++ b/content/xul/templates/tests/chrome/Makefile.in
@@ -41,12 +41,215 @@ srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir	= content/xul/templates/tests/chrome
 
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES = \
 		test_bug476634.xul \
+		templates_shared.js \
+		animals.rdf \
+		animals.xml \
+		animals.sqlite \
+		test_tmpl_bindingsextendedsyntax.xul \
+		test_tmpl_bindingsmultiple.xul \
+		test_tmpl_bindingsquerysyntax.xul \
+		test_tmpl_bindingsreversed.xul \
+		test_tmpl_bindingssameastriple.xul \
+		test_tmpl_containerandmembervariablechanged.xul \
+		test_tmpl_containervariablechanged.xul \
+		test_tmpl_containmentattribute.xul \
+		test_tmpl_defaultcontainervariableisuri.xul \
+		test_tmpl_extendedsyntaxemptyconditions.xul \
+		test_tmpl_extendedsyntaxotherrefvariable.xul \
+		test_tmpl_extendedsyntaxremoveunmatched.xul \
+		test_tmpl_extendedsyntaxsimplevariablesubstitution.xul \
+		test_tmpl_extendedsyntaxtworulesrecurse.xul \
+		test_tmpl_extendedsyntaxusinganinterveningcontainer.xul \
+		test_tmpl_extendedsyntax.xul \
+		test_tmpl_extendedvariablesubstitution.xul \
+		test_tmpl_gridelement.xul \
+		test_tmpl_htmlelementextendedsyntaxwithbinding.xul \
+		test_tmpl_htmlelementquerysyntaxrecursive.xul \
+		test_tmpl_htmlelementquerysyntaxwithmultiplerules.xul \
+		test_tmpl_htmlelementsimplesyntaxusingatextnode.xul \
+		test_tmpl_htmlelementsimplesyntax.xul \
+		test_tmpl_listboxelement.xul \
+		test_tmpl_literalasmember.xul \
+		test_tmpl_membervariablechanged.xul \
+		test_tmpl_membervariablesubstitution.xul \
+		test_tmpl_menuelementrecursive.xul \
+		test_tmpl_menuelement.xul \
+		test_tmpl_menulistelement.xul \
+		test_tmpl_mixedsyntaxiscontainerisempty.xul \
+		test_tmpl_mixedsyntaxiscontainer.xul \
+		test_tmpl_mixedsyntaxisempty.xul \
+		test_tmpl_noactionuriattribute.xul \
+		test_tmpl_noaction.xul \
+		test_tmpl_parentconditions.xul \
+		test_tmpl_parentcontenttag.xul \
+		test_tmpl_parentsimplesyntax.xul \
+		test_tmpl_query3tripleswherecontains.xul \
+		test_tmpl_query3triples.xul \
+		test_tmpl_querymember3tripleswhereequals.xul \
+		test_tmpl_querymemberandtwotriples.xul \
+		test_tmpl_querymembertriplemembertriple.xul \
+		test_tmpl_queryresourcematch.xul \
+		test_tmpl_queryreversetriple.xul \
+		test_tmpl_queryselfwithtriple.xul \
+		test_tmpl_querysetone.xul \
+		test_tmpl_querysettwowithcondition.xul \
+		test_tmpl_querysettwo.xul \
+		test_tmpl_querysyntaxmultiplerulesfirstconditionall.xul \
+		test_tmpl_querysyntaxmultiplerulestwoconditions.xul \
+		test_tmpl_querysyntaxmultiplerules.xul \
+		test_tmpl_querysyntax.xul \
+		test_tmpl_querytripleandmembermerge.xul \
+		test_tmpl_querytripleobjecttosubject.xul \
+		test_tmpl_querytwomembersfiltered.xul \
+		test_tmpl_querytwomembers.xul \
+		test_tmpl_querytwotriples.xul \
+		test_tmpl_queryupwardsmember.xul \
+		test_tmpl_queryupwardsmembertripleandfilteringtriple.xul \
+		test_tmpl_querywithemptyconditions.xul \
+		test_tmpl_referenceasmember.xul \
+		test_tmpl_selfgenerationextendedsyntax.xul \
+		test_tmpl_selfgenerationsimplesyntax.xul \
+		test_tmpl_simplesyntaxenclosedinacontainerwitharule.xul \
+		test_tmpl_simplesyntaxenclosedinacontainer.xul \
+		test_tmpl_simplesyntaxiteratingoverasinglevalue.xul \
+		test_tmpl_simplesyntaxusinganinterveningcontainer.xul \
+		test_tmpl_simplesyntaxusingatextnode.xul \
+		test_tmpl_simplesyntaxusingcontainerasthegenerationelement.xul \
+		test_tmpl_simplesyntaxusingdontrecurse.xul \
+		test_tmpl_simplesyntaxusingrecursivegenerationagain.xul \
+		test_tmpl_simplesyntaxusingrecursivegeneration.xul \
+		test_tmpl_simplesyntaxwithtwovariablesused.xul \
+		test_tmpl_simplevariablesubstitutioncaretsatbeginningandend.xul \
+		test_tmpl_simplevariablesubstitutioncaretsubstitution.xul \
+		test_tmpl_simplevariablesubstitutionnovariable.xul \
+		test_tmpl_simplevariablesubstitutionquestionmarkaspartofvariable.xul \
+		test_tmpl_simplevariablesubstitutionquestionmarksubstitution.xul \
+		test_tmpl_simplevariablesubstitutiontextandvariable.xul \
+		test_tmpl_simplevariablesubstitutionvariableandtextconcatenated.xul \
+		test_tmpl_simplevariablesubstitutionvariablesconcatenated.xul \
+		test_tmpl_simplesyntaxfilterwithmultiplerules.xul \
+		test_tmpl_simplesyntaxfilterwithrule.xul \
+		test_tmpl_simplesyntaxfilter.xul \
+		test_tmpl_sortascendingquerysyntax.xul \
+		test_tmpl_sortdescendingquerysyntax.xul \
+		test_tmpl_sortunknownascendingquerysyntax.xul \
+		test_tmpl_sortresourceascendingquerysyntax.xul \
+		test_tmpl_sortresourcedescendingquerysyntax.xul \
+		test_tmpl_sortresourcesettopredicateascendingquerysyntax.xul \
+		test_tmpl_sortresourcesettopredicatedescendingquerysyntax.xul \
+		test_tmpl_sortresource2settopredicateascendingquerysyntax.xul \
+		test_tmpl_sortresource2settopredicatedescendingquerysyntax.xul \
+		test_tmpl_sorttworesourcessettopredicateascendingquerysyntax.xul \
+		test_tmpl_sorttworesourcesasstringsettopredicatedescendingquerysyntax.xul \
+		test_tmpl_sorttwovariablesascendingquerysyntax.xul \
+		test_tmpl_sorttwovariablesascendingsimplesyntax.xul \
+		test_tmpl_sorttwovariablesdescendingquerysyntax.xul \
+		test_tmpl_sortresource2descendingsimplesyntax.xul \
+		test_tmpl_sortascendingtworulesquerysyntax.xul \
+		test_tmpl_sortascendingtworuleswithcontainerquerysyntax.xul \
+		test_tmpl_sortascendingtworuleswithdifferentcontainerquerysyntax.xul \
+		test_tmpl_sortquerymemberandtwotriples.xul \
+		test_tmpl_storage_baddatasource.xul \
+		test_tmpl_storage_badquery.xul \
+		test_tmpl_storage_dynamicparameters.xul \
+		test_tmpl_storage_listbox.xul \
+		test_tmpl_storage_multiqueries.xul \
+		test_tmpl_storage_parameters.xul \
+		test_tmpl_storage_rule.xul \
+		test_tmpl_storage_simple.xul \
+		test_tmpl_storage_sortintegerasc.xul \
+		test_tmpl_storage_sortintegerdesc.xul \
+		test_tmpl_storage_sortstringasc.xul \
+		test_tmpl_storage_sortstringdesc.xul \
+		test_tmpl_storage_tree.xul \
+		test_tmpl_twogenerationnodes.xul \
+		test_tmpl_treeelementquerysyntaxtreebuilder.xul \
+		test_tmpl_treeelementquerysyntax.xul \
+		test_tmpl_treeelementsimplesyntaxrecursivetreebuilder.xul \
+		test_tmpl_treeelementsimplesyntaxrecursive.xul \
+		test_tmpl_treeelementsimplesyntaxnotrecursivetreebuilder.xul \
+		test_tmpl_treeelementsimplesyntaxnotrecursive.xul \
+		test_tmpl_treeelementquerysyntaxrecursivetreebuilder.xul \
+		test_tmpl_treeelementquerysyntaxrecursive.xul \
+		test_tmpl_treeelementquerysyntaxnotrecursivetreebuilder.xul \
+		test_tmpl_treeelementquerysyntaxnotrecursive.xul \
+		test_tmpl_treeelementquerysyntaxrecursivemultiplerulestreebuilder.xul \
+		test_tmpl_treeelementquerysyntaxrecursivemultiplerules.xul \
+		test_tmpl_treeelementtreecell.xul \
+		test_tmpl_treeelementtreecelltreebuilder.xul \
+		test_tmpl_treeelementtreecellsortascending.xul \
+		test_tmpl_treeelementtreecellsortascendingtreebuilder.xul \
+		test_tmpl_treeelementtreeitemonly.xul \
+		test_tmpl_treeelementtreeitemsortascending.xul \
+		test_tmpl_whereequals.xul \
+		test_tmpl_whereequalswrongcase.xul \
+		test_tmpl_whereequalssamevariable.xul \
+		test_tmpl_wheresubjectequalsvariable.xul \
+		test_tmpl_wherestartswith.xul \
+		test_tmpl_wherestartswithvariable.xul \
+		test_tmpl_wherestartswithunknownvariable.xul \
+		test_tmpl_wheresubjectstartswithvariable.xul \
+		test_tmpl_whereendswith.xul \
+		test_tmpl_wherecontains.xul \
+		test_tmpl_wherebeforeuppercase.xul \
+		test_tmpl_wherebeforelowercase.xul \
+		test_tmpl_whereafteruppercase.xul \
+		test_tmpl_whereafterlowercase.xul \
+		test_tmpl_whereequalsignorecase.xul \
+		test_tmpl_wherestartswithignorecase.xul \
+		test_tmpl_whereendswithignorecase.xul \
+		test_tmpl_wherecontainsignorecase.xul \
+		test_tmpl_wherebeforeignorecase.xul \
+		test_tmpl_whereafterignorecase.xul \
+		test_tmpl_whereequalsmultiple.xul \
+		test_tmpl_wherestartswithmultiple.xul \
+		test_tmpl_whereequalsnegation.xul \
+		test_tmpl_whereequalsnegationwrongcase.xul \
+		test_tmpl_whereequalsnegationignorecase.xul \
+		test_tmpl_whereequalsmultiplenegation.xul \
+		test_tmpl_whereequalsmultiplenegationignorecase.xul \
+		test_tmpl_wherestartswithnegation.xul \
+		test_tmpl_whereendswithnegation.xul \
+		test_tmpl_wherecontainsnegation.xul \
+		test_tmpl_wherebeforenegation.xul \
+		test_tmpl_whereafternegation.xul \
+		test_tmpl_wherenorel.xul \
+		test_tmpl_wherenovalue.xul \
+		test_tmpl_wherenosubject.xul \
+		test_tmpl_whereequalsresource.xul \
+		test_tmpl_wherecontainsresource.xul \
+		test_tmpl_wherecontainstwo.xul \
+		test_tmpl_whereequalsothervariable.xul \
+		test_tmpl_wheregreater.xul \
+		test_tmpl_whereless.xul \
+		test_tmpl_wheregreaternegation.xul \
+		test_tmpl_wherelessnegation.xul \
+		test_tmpl_whereequalsnumber.xul \
+		test_tmpl_wherecontainsnumber.xul \
+		test_tmpl_wheregreaterstring.xul \
+		test_tmpl_wherelessstring.xul \
+		test_tmpl_wheregreaternegationstring.xul \
+		test_tmpl_wherelessnegationstring.xul \
+		test_tmpl_wherecontainsnumberstring.xul \
+		test_tmpl_xmlquerysimple.xul \
+		test_tmpl_xmlquerywithdifferentmember.xul \
+		test_tmpl_xmlquerywithassign.xul \
+		test_tmpl_xmlquerywithassignmentandcondition.xul \
+		test_tmpl_xmlquerywithassignmentandconditiondontrecurse.xul \
+		test_tmpl_xmlquerywithbindinginbindings.xul \
+		test_tmpl_xmlquerywithbindinginrule.xul \
+		test_tmpl_xmlquerywithsort.xul \
+		test_tmpl_xmlquerywithsortotherfield.xul \
+		test_tmpl_xmlquerywithmultiplequeries.xul \
+		test_tmpl_xmlquerywithothertypes.xul \
+		test_tmpl_xmlquerywithinlinedata.xul \
+		test_tmpl_xmlquerywithinlinedatawithmultiplequeries.xul \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
 	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
--- a/layout/xul/base/src/nsSliderFrame.cpp
+++ b/layout/xul/base/src/nsSliderFrame.cpp
@@ -115,16 +115,18 @@ nsSliderFrame::Init(nsIContent*      aCo
   static PRBool gotPrefs = PR_FALSE;
   if (!gotPrefs) {
     gotPrefs = PR_TRUE;
 
     gMiddlePref = nsContentUtils::GetBoolPref("middlemouse.scrollbarPosition");
     gSnapMultiplier = nsContentUtils::GetIntPref("slider.snapMultiplier");
   }
 
+  mCurPos = GetCurrentPosition(aContent);
+
   CreateViewForFrame(PresContext(), this, GetStyleContext(), PR_TRUE);
   return rv;
 }
 
 NS_IMETHODIMP
 nsSliderFrame::RemoveFrame(nsIAtom*        aListName,
                            nsIFrame*       aOldFrame)
 {
--- a/layout/xul/base/src/nsXULTooltipListener.cpp
+++ b/layout/xul/base/src/nsXULTooltipListener.cpp
@@ -222,40 +222,56 @@ nsXULTooltipListener::MouseMove(nsIDOMEv
       (abs(mMouseScreenY - newMouseY) <= kTooltipMouseMoveTolerance))
     return NS_OK;
   mMouseScreenX = newMouseX;
   mMouseScreenY = newMouseY;
   mCachedMouseEvent = aMouseEvent;
 
   nsCOMPtr<nsIDOMEventTarget> eventTarget;
   aMouseEvent->GetCurrentTarget(getter_AddRefs(eventTarget));
-  
+
   nsCOMPtr<nsIContent> sourceContent = do_QueryInterface(eventTarget);
   mSourceNode = do_GetWeakReference(sourceContent);
 #ifdef MOZ_XUL
   mIsSourceTree = sourceContent->Tag() == nsGkAtoms::treechildren;
   if (mIsSourceTree)
     CheckTreeBodyMove(mouseEvent);
 #endif
 
   // as the mouse moves, we want to make sure we reset the timer to show it, 
   // so that the delay is from when the mouse stops moving, not when it enters
   // the node.
   KillTooltipTimer();
-    
+
   // If the mouse moves while the tooltip is up, hide it. If nothing is
   // showing and the tooltip hasn't been displayed since the mouse entered
   // the node, then start the timer to show the tooltip.
   if (!currentTooltip && !mTooltipShownOnce) {
+    // don't show tooltips attached to elements outside of a menu popup
+    // when hovering over an element inside it.
+    nsCOMPtr<nsIDOMEventTarget> eventTarget;
+    aMouseEvent->GetTarget(getter_AddRefs(eventTarget));
+    nsCOMPtr<nsIContent> targetContent = do_QueryInterface(eventTarget);
+    while (targetContent && targetContent != sourceContent) {
+      nsIAtom* tag = targetContent->Tag();
+      if (targetContent->GetNameSpaceID() == kNameSpaceID_XUL &&
+          (tag == nsGkAtoms::menupopup ||
+           tag == nsGkAtoms::panel ||
+           tag == nsGkAtoms::tooltip)) {
+        mSourceNode = nsnull;
+        return NS_OK;
+      }
+
+      targetContent = targetContent->GetParent();
+    }
+
     mTooltipTimer = do_CreateInstance("@mozilla.org/timer;1");
     if (mTooltipTimer) {
-      aMouseEvent->GetTarget(getter_AddRefs(eventTarget));
-      nsCOMPtr<nsIDOMNode> targetNode = do_QueryInterface(eventTarget);
-      mTargetNode = do_GetWeakReference(targetNode);
-      if (targetNode) {
+      mTargetNode = do_GetWeakReference(eventTarget);
+      if (mTargetNode) {
         nsresult rv = mTooltipTimer->InitWithFuncCallback(sTooltipCallback, this, 
                                                           kTooltipShowTime, nsITimer::TYPE_ONE_SHOT);
         if (NS_FAILED(rv)) {
           mTargetNode = nsnull;
           mSourceNode = nsnull;
         }
       }
     }
--- a/toolkit/toolkit-makefiles.sh
+++ b/toolkit/toolkit-makefiles.sh
@@ -217,16 +217,18 @@ MAKEFILES_content="
   content/xul/Makefile
   content/xul/content/Makefile
   content/xul/content/src/Makefile
   content/xul/document/Makefile
   content/xul/document/public/Makefile
   content/xul/document/src/Makefile
   content/xul/templates/public/Makefile
   content/xul/templates/src/Makefile
+  content/xul/templates/tests/Makefile
+  content/xul/templates/tests/chrome/Makefile
   content/xbl/Makefile
   content/xbl/public/Makefile
   content/xbl/src/Makefile
   content/xbl/builtin/Makefile
   content/xslt/Makefile
   content/xslt/public/Makefile
   content/xslt/src/Makefile
   content/xslt/src/base/Makefile