Merge last PGO-green changeset of mozilla-inbound to mozilla-central
authorEd Morley <emorley@mozilla.com>
Mon, 09 Jul 2012 12:38:37 +0100
changeset 98686 78e058c75a38b70dd8fce19cdd30339a54dbba0b
parent 98685 b6fb3d9bd1b9be91dd10ee3877ea45394a162941 (current diff)
parent 98675 d3cfb134c62540401cbcc56f695200af52ff8fb4 (diff)
child 98687 c205394bc02d40cc7da1215461a8e281286ff815
child 98746 072784f83257eac61d262d03b0a113e6dc536ee5
push id11600
push useremorley@mozilla.com
push dateMon, 09 Jul 2012 12:26:28 +0000
treeherdermozilla-inbound@c205394bc02d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone16.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge last PGO-green changeset of mozilla-inbound to mozilla-central
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -2996,19 +2996,19 @@
               if (tabWidth > this._tabDefaultMaxWidth)
                 tabWidth = this._tabDefaultMaxWidth;
             }
             tabWidth += "px";
             for (let i = numPinned; i < tabs.length; i++) {
               let tab = tabs[i];
               tab.style.setProperty("max-width", tabWidth, "important");
               if (!isEndTab) { // keep tabs the same width
-                tab.style.MozTransition = "none";
+                tab.style.transition = "none";
                 tab.clientTop; // flush styles to skip animation; see bug 649247
-                tab.style.MozTransition = "";
+                tab.style.transition = "";
               }
             }
             this._hasTabTempMaxWidth = true;
             this.tabbrowser.addEventListener("mousemove", this, false);
             window.addEventListener("mouseout", this, false);
           }
         ]]></body>
       </method>
--- a/browser/components/shell/src/nsWindowsShellService.cpp
+++ b/browser/components/shell/src/nsWindowsShellService.cpp
@@ -189,26 +189,29 @@ static SETTING gDDESettings[] = {
   { MAKE_KEY_NAME1("Software\\Classes\\FirefoxURL", SOD) },
 
   // Protocol Handlers
   { MAKE_KEY_NAME1("Software\\Classes\\FTP", SOD) },
   { MAKE_KEY_NAME1("Software\\Classes\\HTTP", SOD) },
   { MAKE_KEY_NAME1("Software\\Classes\\HTTPS", SOD) }
 };
 
+// See Bug 770883
+#if 0
 #if defined(MOZ_MAINTENANCE_SERVICE)
 
 #define ONLY_SERVICE_LAUNCHING
 #include "updatehelper.h"
 #include "updatehelper.cpp"
 
 static const char *kPrefetchClearedPref =
   "app.update.service.lastVersionPrefetchCleared";
 static nsCOMPtr<nsIThread> sThread;
 #endif
+#endif
 
 nsresult
 GetHelperPath(nsAutoString& aPath)
 {
   nsresult rv;
   nsCOMPtr<nsIProperties> directoryService = 
     do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
@@ -992,16 +995,18 @@ nsWindowsShellService::SetDesktopBackgro
   NS_ENSURE_SUCCESS(rv, rv);
 
   return regKey->Close();
 }
 
 nsWindowsShellService::nsWindowsShellService() : 
   mCheckedThisSession(false) 
 {
+// See Bug 770883
+#if 0
 #if defined(MOZ_MAINTENANCE_SERVICE)
 
   // Check to make sure the service is installed
   PRUint32 installed = 0;
   nsCOMPtr<nsIWindowsRegKey> regKey = 
     do_CreateInstance("@mozilla.org/windows-registry-key;1");
   if (!regKey || 
       NS_FAILED(regKey->Open(nsIWindowsRegKey::ROOT_KEY_LOCAL_MACHINE,
@@ -1036,32 +1041,38 @@ nsWindowsShellService::nsWindowsShellSer
   // service command.
   mTimer = do_CreateInstance(NS_TIMER_CONTRACTID);
   if (mTimer) {
     mTimer->InitWithFuncCallback(
       nsWindowsShellService::LaunchPrefetchClearCommand, 
       nsnull, CLEAR_PREFETCH_TIMEOUT_MS, nsITimer::TYPE_ONE_SHOT);
   }
 #endif
+#endif
 }
 
 nsWindowsShellService::~nsWindowsShellService()
 {
+// See Bug 770883
+#if 0
 #if defined(MOZ_MAINTENANCE_SERVICE)
  if (mTimer) {
     mTimer->Cancel();
     mTimer = nsnull;
   }
   if (sThread) {
     sThread->Shutdown();
     sThread = nsnull;
   }
 #endif
+#endif
 }
 
+// See Bug 770883
+#if 0
 #if defined(MOZ_MAINTENANCE_SERVICE)
 
 class ClearPrefetchEvent : public nsRunnable {
 public:
   ClearPrefetchEvent()
   {
   }
 
@@ -1074,26 +1085,29 @@ public:
     // If this command fails, it is not critical as prefetch will be cleared
     // on the next software update.
     StartServiceCommand(NS_ARRAY_LENGTH(updaterServiceArgv), 
                         updaterServiceArgv);
     return NS_OK;
   }
 };
 #endif
+#endif
 
 /**
  * For faster startup we attempt to clear the prefetch if the maintenance
  * service is installed.  Please see the definition of ClearPrefetch()
  * in toolkit/components/maintenanceservice/prefetch.cpp for more info.
  * For now the only application that gets prefetch cleaned is Firefox
  * since we have not done performance checking for other applications.
  * This is done on every update but also there is a one time operation done
  * from within the program for first time installs.
  */ 
+// See Bug 770883
+#if 0
 #if defined(MOZ_MAINTENANCE_SERVICE)
 void
 nsWindowsShellService::LaunchPrefetchClearCommand(nsITimer *aTimer, void*)
 {
   // Make sure we don't call this again from the application, it will be
   // called on each application update instead.
   nsCOMPtr<nsIPrefBranch> prefBranch;
   nsCOMPtr<nsIPrefService> prefs =
@@ -1108,16 +1122,17 @@ nsWindowsShellService::LaunchPrefetchCle
   // main thread, so start an event on another thread to handle the operation
   NS_NewThread(getter_AddRefs(sThread));
   if (sThread) {
     nsCOMPtr<nsIRunnable> prefetchEvent = new ClearPrefetchEvent();
     sThread->Dispatch(prefetchEvent, NS_DISPATCH_NORMAL);
   }
 }
 #endif
+#endif
 
 NS_IMETHODIMP
 nsWindowsShellService::OpenApplicationWithURI(nsIFile* aApplication,
                                               const nsACString& aURI)
 {
   nsresult rv;
   nsCOMPtr<nsIProcess> process = 
     do_CreateInstance("@mozilla.org/process/util;1", &rv);
--- a/content/base/src/nsGkAtomList.h
+++ b/content/base/src/nsGkAtomList.h
@@ -1745,16 +1745,17 @@ GK_ATOM(svgGFrame, "SVGGFrame")
 GK_ATOM(svgGlyphFrame, "SVGGlyphFrame")
 GK_ATOM(svgGradientFrame, "SVGGradientFrame")
 GK_ATOM(svgImageFrame, "SVGImageFrame")
 GK_ATOM(svgInnerSVGFrame, "SVGInnerSVGFrame")
 GK_ATOM(svgLinearGradientFrame, "SVGLinearGradientFrame")
 GK_ATOM(svgMarkerFrame, "SVGMarkerFrame")
 GK_ATOM(svgMaskFrame, "SVGMaskFrame")
 GK_ATOM(svgOuterSVGFrame, "SVGOuterSVGFrame")
+GK_ATOM(svgOuterSVGAnonChildFrame, "SVGOuterSVGAnonChildFrame")
 GK_ATOM(svgPathGeometryFrame, "SVGPathGeometryFrame")
 GK_ATOM(svgPatternFrame, "SVGPatternFrame")
 GK_ATOM(svgRadialGradientFrame, "SVGRadialGradientFrame")
 GK_ATOM(svgStopFrame, "SVGStopFrame")
 GK_ATOM(svgSwitchFrame, "SVGSwitchFrame")
 GK_ATOM(svgTextFrame, "SVGTextFrame")
 GK_ATOM(svgTextPathFrame, "SVGTextPathFrame")
 GK_ATOM(svgTSpanFrame, "SVGTSpanFrame")
--- a/content/base/src/nsXMLHttpRequest.cpp
+++ b/content/base/src/nsXMLHttpRequest.cpp
@@ -444,22 +444,22 @@ nsXMLHttpRequest::nsXMLHttpRequest()
     mUploadProgress(0), mUploadProgressMax(0),
     mRequestSentTime(0), mTimeoutMilliseconds(0),
     mErrorLoad(false), mWaitingForOnStopRequest(false),
     mProgressTimerIsActive(false), mProgressEventWasDelayed(false),
     mIsHtml(false),
     mWarnAboutMultipartHtml(false),
     mWarnAboutSyncHtml(false),
     mLoadLengthComputable(false), mLoadTotal(0),
+    mIsSystem(false),
+    mIsAnon(false),
     mFirstStartRequestSeen(false),
     mInLoadProgressEvent(false),
     mResultJSON(JSVAL_VOID),
-    mResultArrayBuffer(nsnull),
-    mIsAnon(false),
-    mIsSystem(false)
+    mResultArrayBuffer(nsnull)
 {
   nsLayoutStatics::AddRef();
 
   SetIsDOMBinding();
 #ifdef DEBUG
   StaticAssertions();
 #endif
 }
--- a/content/svg/content/src/nsSVGElement.cpp
+++ b/content/svg/content/src/nsSVGElement.cpp
@@ -918,23 +918,24 @@ nsSVGElement::sGraphicsMap[] = {
   { &nsGkAtoms::text_rendering },
   { &nsGkAtoms::visibility },
   { nsnull }
 };
 
 // PresentationAttributes-TextContentElements
 /* static */ const nsGenericElement::MappedAttributeEntry
 nsSVGElement::sTextContentElementsMap[] = {
-  { &nsGkAtoms::alignment_baseline },
-  { &nsGkAtoms::baseline_shift },
+  // Properties that we don't support are commented out.
+  // { &nsGkAtoms::alignment_baseline },
+  // { &nsGkAtoms::baseline_shift },
   { &nsGkAtoms::direction },
   { &nsGkAtoms::dominant_baseline },
-  { &nsGkAtoms::glyph_orientation_horizontal },
-  { &nsGkAtoms::glyph_orientation_vertical },
-  { &nsGkAtoms::kerning },
+  // { &nsGkAtoms::glyph_orientation_horizontal },
+  // { &nsGkAtoms::glyph_orientation_vertical },
+  // { &nsGkAtoms::kerning },
   { &nsGkAtoms::letter_spacing },
   { &nsGkAtoms::text_anchor },
   { &nsGkAtoms::text_decoration },
   { &nsGkAtoms::unicode_bidi },
   { &nsGkAtoms::word_spacing },
   { nsnull }
 };
 
--- a/dom/interfaces/css/nsIDOMCSS2Properties.idl
+++ b/dom/interfaces/css/nsIDOMCSS2Properties.idl
@@ -9,17 +9,17 @@
  * The nsIDOMCSS2Properties interface is a datatype for additional
  * reflection of data already provided in nsIDOMCSSStyleDeclaration in
  * the Document Object Model.
  *
  * For more information on this interface please see
  * http://www.w3.org/TR/DOM-Level-2-Style
  */
 
-[builtinclass, scriptable, uuid(bb40a531-d92b-44d6-a543-cfc25054d5eb)]
+[builtinclass, scriptable, uuid(492673d6-039b-4d94-a598-dbf82abc174f)]
 interface nsIDOMCSS2Properties : nsISupports
 {
            attribute DOMString        background;
                                         // raises(DOMException) on setting
 
            attribute DOMString        backgroundAttachment;
                                         // raises(DOMException) on setting
 
@@ -681,16 +681,31 @@ interface nsIDOMCSS2Properties : nsISupp
                                         // raises(DOMException) on setting
 
            attribute DOMString        MozTextDecorationLine;
                                         // raises(DOMException) on setting
 
            attribute DOMString        MozTextDecorationStyle;
                                         // raises(DOMException) on setting
 
+           attribute DOMString        transitionProperty;
+                                        // raises(DOMException) on setting
+
+           attribute DOMString        transitionDuration;
+                                        // raises(DOMException) on setting
+
+           attribute DOMString        transitionDelay;
+                                        // raises(DOMException) on setting
+
+           attribute DOMString        transitionTimingFunction;
+                                        // raises(DOMException) on setting
+
+           attribute DOMString        transition;
+                                        // raises(DOMException) on setting
+
            attribute DOMString        MozTransitionProperty;
                                         // raises(DOMException) on setting
 
            attribute DOMString        MozTransitionDuration;
                                         // raises(DOMException) on setting
 
            attribute DOMString        MozTransitionDelay;
                                         // raises(DOMException) on setting
@@ -705,16 +720,43 @@ interface nsIDOMCSS2Properties : nsISupp
                                         // raises(DOMException) on setting
 
            attribute DOMString        MozTabSize;
                                         // raises(DOMException) on setting
 
            attribute DOMString        resize;
                                         // raises(DOMException) on setting
 
+           attribute DOMString        animationName;
+                                        // raises(DOMException) on setting
+
+           attribute DOMString        animationDuration;
+                                        // raises(DOMException) on setting
+
+           attribute DOMString        animationDelay;
+                                        // raises(DOMException) on setting
+
+           attribute DOMString        animationTimingFunction;
+                                        // raises(DOMException) on setting
+
+           attribute DOMString        animationDirection;
+                                        // raises(DOMException) on setting
+
+           attribute DOMString        animationFillMode;
+                                        // raises(DOMException) on setting
+
+           attribute DOMString        animationIterationCount;
+                                        // raises(DOMException) on setting
+
+           attribute DOMString        animationPlayState;
+                                        // raises(DOMException) on setting
+
+           attribute DOMString        animation;
+                                        // raises(DOMException) on setting
+
            attribute DOMString        MozAnimationName;
                                         // raises(DOMException) on setting
 
            attribute DOMString        MozAnimationDuration;
                                         // raises(DOMException) on setting
 
            attribute DOMString        MozAnimationDelay;
                                         // raises(DOMException) on setting
--- a/dom/sms/src/ril/SmsDatabaseService.js
+++ b/dom/sms/src/ril/SmsDatabaseService.js
@@ -250,30 +250,32 @@ SmsDatabaseService.prototype = {
    *        Object containing the partial result arrays.
    * @param fiter
    *        Object containing the filter search criteria used to retrieved the
    *        partial results.
    *
    * return Array of keys containing the final result of createMessageList.
    */
   keyIntersection: function keyIntersection(keys, filter) {
+    // Always use keys[FILTER_TIMESTAMP] as base result set to be filtered.
+    // This ensures the result set is always sorted by timestamp.
     let result = keys[FILTER_TIMESTAMP];
     if (keys[FILTER_NUMBERS].length || filter.numbers) {
-      result = keys[FILTER_NUMBERS].filter(function(i) {
-        return result.indexOf(i) != -1;
+      result = result.filter(function(i) {
+        return keys[FILTER_NUMBERS].indexOf(i) != -1;
       });
     }
     if (keys[FILTER_DELIVERY].length || filter.delivery) {
-      result = keys[FILTER_DELIVERY].filter(function(i) {
-        return result.indexOf(i) != -1;
+      result = result.filter(function(i) {
+        return keys[FILTER_DELIVERY].indexOf(i) != -1;
       });
     }
     if (keys[FILTER_READ].length || filter.read) {
-      result = keys[FILTER_READ].filter(function(i) {
-        return result.indexOf(i) != -1;
+      result = result.filter(function(i) {
+        return keys[FILTER_READ].indexOf(i) != -1;
       });
     }
     return result;
   },
 
   /**
    * Helper function called after createMessageList gets the final result array
    * containing the list of primary keys of records that matches the provided
--- a/editor/libeditor/base/nsEditor.cpp
+++ b/editor/libeditor/base/nsEditor.cpp
@@ -1714,19 +1714,18 @@ nsEditor::MoveNode(nsIContent* aNode, ns
 }
 
 nsresult
 nsEditor::MoveNode(nsIDOMNode *aNode, nsIDOMNode *aParent, PRInt32 aOffset)
 {
   NS_ENSURE_TRUE(aNode && aParent, NS_ERROR_NULL_POINTER);
   nsresult res;
 
-  nsCOMPtr<nsIDOMNode> oldParent;
   PRInt32 oldOffset;
-  GetNodeLocation(aNode, address_of(oldParent), &oldOffset);
+  nsCOMPtr<nsIDOMNode> oldParent = GetNodeLocation(aNode, &oldOffset);
   
   if (aOffset == -1)
   {
     PRUint32 unsignedOffset;
     // magic value meaning "move to end of aParent"
     res = GetLengthOfDOMNode(aParent, unsignedOffset);
     NS_ENSURE_SUCCESS(res, res);
     aOffset = (PRInt32)unsignedOffset;
@@ -2927,19 +2926,18 @@ nsEditor::JoinNodesImpl(nsIDOMNode * aNo
     if (aNodeToKeepIsFirst)
       leftNode = aNodeToKeep;
     else
       leftNode = aNodeToJoin;
 
     PRUint32 firstNodeLength;
     result = GetLengthOfDOMNode(leftNode, firstNodeLength);
     NS_ENSURE_SUCCESS(result, result);
-    nsCOMPtr<nsIDOMNode> parent;
-    GetNodeLocation(aNodeToJoin, address_of(parent), &joinOffset);
-    GetNodeLocation(aNodeToKeep, address_of(parent), &keepOffset);
+    nsCOMPtr<nsIDOMNode> parent = GetNodeLocation(aNodeToJoin, &joinOffset);
+    parent = GetNodeLocation(aNodeToKeep, &keepOffset);
     
     // if selection endpoint is between the nodes, remember it as being
     // in the one that is going away instead.  This simplifies later selection
     // adjustment logic at end of this method.
     if (selStartNode)
     {
       if (selStartNode == parent)
       {
@@ -3117,28 +3115,31 @@ nsEditor::GetChildOffset(nsIDOMNode* aCh
   MOZ_ASSERT(parent && child);
 
   PRInt32 idx = parent->IndexOf(child);
   MOZ_ASSERT(idx != -1);
   return idx;
 }
 
 // static
-void
-nsEditor::GetNodeLocation(nsIDOMNode* aChild, nsCOMPtr<nsIDOMNode>* outParent,
-                          PRInt32* outOffset)
-{
-  MOZ_ASSERT(aChild && outParent && outOffset);
+already_AddRefed<nsIDOMNode>
+nsEditor::GetNodeLocation(nsIDOMNode* aChild, PRInt32* outOffset)
+{
+  MOZ_ASSERT(aChild && outOffset);
   *outOffset = -1;
 
+  nsCOMPtr<nsIDOMNode> parent;
+
   MOZ_ALWAYS_TRUE(NS_SUCCEEDED(
-    aChild->GetParentNode(getter_AddRefs(*outParent))));
-  if (*outParent) {
-    *outOffset = GetChildOffset(aChild, *outParent);
+    aChild->GetParentNode(getter_AddRefs(parent))));
+  if (parent) {
+    *outOffset = GetChildOffset(aChild, parent);
   }
+
+  return parent.forget();
 }
 
 // returns the number of things inside aNode.  
 // If aNode is text, returns number of characters. If not, returns number of children nodes.
 nsresult
 nsEditor::GetLengthOfDOMNode(nsIDOMNode *aNode, PRUint32 &aCount) 
 {
   aCount = 0;
--- a/editor/libeditor/base/nsEditor.h
+++ b/editor/libeditor/base/nsEditor.h
@@ -438,22 +438,21 @@ public:
   /**
    * Return the offset of aChild in aParent.  Asserts fatally if parent or
    * child is null, or parent is not child's parent.
    */
   static PRInt32 GetChildOffset(nsIDOMNode *aChild,
                                 nsIDOMNode *aParent);
 
   /**
-   *  Set outParent to the parent of aChild.
-   *  Set outOffset to the offset of aChild in outParent.
+   *  Set outOffset to the offset of aChild in the parent.
+   *  Returns the parent of aChild.
    */
-  static void GetNodeLocation(nsIDOMNode* aChild,
-                              nsCOMPtr<nsIDOMNode>* outParent,
-                              PRInt32* outOffset);
+  static already_AddRefed<nsIDOMNode> GetNodeLocation(nsIDOMNode* aChild,
+                                                      PRInt32* outOffset);
 
   /** returns the number of things inside aNode in the out-param aCount.  
     * @param  aNode is the node to get the length of.  
     *         If aNode is text, returns number of characters. 
     *         If not, returns number of children nodes.
     * @param  aCount [OUT] the result of the above calculation.
     */
   static nsresult GetLengthOfDOMNode(nsIDOMNode *aNode, PRUint32 &aCount);
--- a/editor/libeditor/base/nsSelectionState.cpp
+++ b/editor/libeditor/base/nsSelectionState.cpp
@@ -251,20 +251,18 @@ nsRangeUpdater::SelAdjDeleteNode(nsIDOMN
     return;
   }
   MOZ_ASSERT(aNode);
   PRUint32 i, count = mArray.Length();
   if (!count) {
     return;
   }
 
-  nsCOMPtr<nsIDOMNode> parent;
   PRInt32 offset = 0;
-  
-  nsEditor::GetNodeLocation(aNode, address_of(parent), &offset);
+  nsCOMPtr<nsIDOMNode> parent = nsEditor::GetNodeLocation(aNode, &offset);
   
   // check for range endpoints that are after aNode and in the same parent
   nsRangeStore *item;
   for (i=0; i<count; i++)
   {
     item = mArray[i];
     MOZ_ASSERT(item);
     
@@ -309,19 +307,18 @@ nsRangeUpdater::SelAdjSplitNode(nsIDOMNo
 {
   if (mLock) return NS_OK;  // lock set by Will/DidReplaceParent, etc...
   NS_ENSURE_TRUE(aOldRightNode && aNewLeftNode, NS_ERROR_NULL_POINTER);
   PRUint32 i, count = mArray.Length();
   if (!count) {
     return NS_OK;
   }
 
-  nsCOMPtr<nsIDOMNode> parent;
   PRInt32 offset;
-  nsEditor::GetNodeLocation(aOldRightNode, address_of(parent), &offset);
+  nsCOMPtr<nsIDOMNode> parent = nsEditor::GetNodeLocation(aOldRightNode, &offset);
   
   // first part is same as inserting aNewLeftnode
   nsresult result = SelAdjInsertNode(parent,offset-1);
   NS_ENSURE_SUCCESS(result, result);
 
   // next step is to check for range enpoints inside aOldRightNode
   nsRangeStore *item;
   
--- a/editor/libeditor/html/nsHTMLDataTransfer.cpp
+++ b/editor/libeditor/html/nsHTMLDataTransfer.cpp
@@ -536,19 +536,18 @@ nsHTMLEditor::DoInsertHTMLWithContext(co
             // Check if we are pasting into empty list item. If so
             // delete it and paste into parent list instead.
             if (nsHTMLEditUtils::IsListItem(parentNode))
             {
               bool isEmpty;
               rv = IsEmptyNode(parentNode, &isEmpty, true);
               if (NS_SUCCEEDED(rv) && isEmpty)
               {
-                nsCOMPtr<nsIDOMNode> listNode;
                 PRInt32 newOffset;
-                GetNodeLocation(parentNode, address_of(listNode), &newOffset);
+                nsCOMPtr<nsIDOMNode> listNode = GetNodeLocation(parentNode, &newOffset);
                 if (listNode)
                 {
                   DeleteNode(parentNode);
                   parentNode = listNode;
                   offsetOfNewNode = newOffset;
                 }
               }
             }
@@ -613,17 +612,17 @@ nsHTMLEditor::DoInsertHTMLWithContext(co
               lastInsertNode = GetChildAt(parentNode, offsetOfNewNode);
             }
           }
           curNode = parent;
         }
       }
       if (lastInsertNode)
       {
-        GetNodeLocation(lastInsertNode, address_of(parentNode), &offsetOfNewNode);
+        parentNode = GetNodeLocation(lastInsertNode, &offsetOfNewNode);
         offsetOfNewNode++;
       }
     }
 
     // Now collapse the selection to the end of what we just inserted:
     if (lastInsertNode) 
     {
       // set selection to the end of what we just pasted.
@@ -652,17 +651,17 @@ nsHTMLEditor::DoInsertHTMLWithContext(co
       if (IsTextNode(selNode) || (IsContainer(selNode) && !nsHTMLEditUtils::IsTable(selNode)))
       {
         rv = GetLengthOfDOMNode(selNode, (PRUint32&)selOffset);
         NS_ENSURE_SUCCESS(rv, rv);
       }
       else // we need to find a container for selection.  Look up.
       {
         tmp = selNode;
-        GetNodeLocation(tmp, address_of(selNode), &selOffset);
+        selNode = GetNodeLocation(tmp, &selOffset);
         ++selOffset;  // want to be *after* last leaf node in paste
       }
 
       // make sure we don't end up with selection collapsed after an invisible break node
       nsWSRunObject wsRunObj(this, selNode, selOffset);
       PRInt32 outVisOffset=0;
       PRInt16 visType=0;
       wsRunObj.PriorVisibleNode(selNode, selOffset, address_of(visNode),
@@ -672,34 +671,32 @@ nsHTMLEditor::DoInsertHTMLWithContext(co
         // we are after a break.  Is it visible?  Despite the name, 
         // PriorVisibleNode does not make that determination for breaks.
         // It also may not return the break in visNode.  We have to pull it
         // out of the nsWSRunObject's state.
         if (!IsVisBreak(wsRunObj.mStartReasonNode))
         {
           // don't leave selection past an invisible break;
           // reset {selNode,selOffset} to point before break
-          GetNodeLocation(wsRunObj.mStartReasonNode, address_of(selNode),
-                          &selOffset);
+          selNode = GetNodeLocation(wsRunObj.mStartReasonNode, &selOffset);
           // we want to be inside any inline style prior to break
           nsWSRunObject wsRunObj(this, selNode, selOffset);
           wsRunObj.PriorVisibleNode(selNode, selOffset, address_of(visNode),
                                     &outVisOffset, &visType);
           if (visType == nsWSRunObject::eText ||
               visType == nsWSRunObject::eNormalWS)
           {
             selNode = visNode;
             selOffset = outVisOffset;  // PriorVisibleNode already set offset to _after_ the text or ws
           }
           else if (visType == nsWSRunObject::eSpecial)
           {
             // prior visible thing is an image or some other non-text thingy.  
             // We want to be right after it.
-            GetNodeLocation(wsRunObj.mStartReasonNode, address_of(selNode),
-                            &selOffset);
+            selNode = GetNodeLocation(wsRunObj.mStartReasonNode, &selOffset);
             ++selOffset;
           }
         }
       }
       selection->Collapse(selNode, selOffset);
 
       // if we just pasted a link, discontinue link style
       nsCOMPtr<nsIDOMNode> link;
@@ -708,17 +705,17 @@ nsHTMLEditor::DoInsertHTMLWithContext(co
         // so, if we just pasted a link, I split it.  Why do that instead of just
         // nudging selection point beyond it?  Because it might have ended in a BR
         // that is not visible.  If so, the code above just placed selection
         // inside that.  So I split it instead.
         nsCOMPtr<nsIDOMNode> leftLink;
         PRInt32 linkOffset;
         rv = SplitNodeDeep(link, selNode, selOffset, &linkOffset, true, address_of(leftLink));
         NS_ENSURE_SUCCESS(rv, rv);
-        GetNodeLocation(leftLink, address_of(selNode), &selOffset);
+        selNode = GetNodeLocation(leftLink, &selOffset);
         selection->Collapse(selNode, selOffset+1);
       }
     }
   }
 
   return mRules->DidDoAction(selection, &ruleInfo, rv);
 }
 
@@ -2004,19 +2001,18 @@ nsHTMLEditor::InsertAsPlaintextQuotation
   {
     *aNodeInserted = newNode;
     NS_IF_ADDREF(*aNodeInserted);
   }
 
   // Set the selection to just after the inserted node:
   if (NS_SUCCEEDED(rv) && newNode)
   {
-    nsCOMPtr<nsIDOMNode> parent;
     PRInt32 offset;
-    GetNodeLocation(newNode, address_of(parent), &offset);
+    nsCOMPtr<nsIDOMNode> parent = GetNodeLocation(newNode, &offset);
     if (parent) {
       selection->Collapse(parent, offset + 1);
     }
   }
   return rv;
 }
 
 NS_IMETHODIMP
@@ -2089,19 +2085,18 @@ nsHTMLEditor::InsertAsCitedQuotation(con
   {
     *aNodeInserted = newNode;
     NS_IF_ADDREF(*aNodeInserted);
   }
 
   // Set the selection to just after the inserted node:
   if (NS_SUCCEEDED(rv) && newNode)
   {
-    nsCOMPtr<nsIDOMNode> parent;
     PRInt32 offset;
-    GetNodeLocation(newNode, address_of(parent), &offset);
+    nsCOMPtr<nsIDOMNode> parent = GetNodeLocation(newNode, &offset);
     if (parent) {
       selection->Collapse(parent, offset + 1);
     }
   }
   return rv;
 }
 
 
--- a/editor/libeditor/html/nsHTMLEditRules.cpp
+++ b/editor/libeditor/html/nsHTMLEditRules.cpp
@@ -750,22 +750,21 @@ nsHTMLEditRules::GetAlignment(bool *aMix
   *aAlign = nsIHTMLEditor::eLeft;
 
   // get selection
   nsCOMPtr<nsISelection>selection;
   nsresult res = mHTMLEditor->GetSelection(getter_AddRefs(selection));
   NS_ENSURE_SUCCESS(res, res);
 
   // get selection location
-  nsCOMPtr<nsIDOMNode> parent;
   nsCOMPtr<nsIDOMElement> rootElem = do_QueryInterface(mHTMLEditor->GetRoot());
   NS_ENSURE_TRUE(rootElem, NS_ERROR_FAILURE);
 
   PRInt32 offset, rootOffset;
-  nsEditor::GetNodeLocation(rootElem, address_of(parent), &rootOffset);
+  nsCOMPtr<nsIDOMNode> parent = nsEditor::GetNodeLocation(rootElem, &rootOffset);
   res = mHTMLEditor->GetStartNodeAndOffset(selection, getter_AddRefs(parent), &offset);
   NS_ENSURE_SUCCESS(res, res);
 
   // is the selection collapsed?
   nsCOMPtr<nsIDOMNode> nodeToExamine;
   if (selection->Collapsed()) {
     // if it is, we want to look at 'parent' and its ancestors
     // for divs with alignment on them
@@ -1198,17 +1197,17 @@ nsHTMLEditRules::WillInsert(nsISelection
     else block1 = mHTMLEditor->GetBlockNodeParent(selNode);
     block2 = mHTMLEditor->GetBlockNodeParent(priorNode);
   
     if (block1 == block2)
     {
       // if we are here then the selection is right after a mozBR
       // that is in the same block as the selection.  We need to move
       // the selection start to be before the mozBR.
-      nsEditor::GetNodeLocation(priorNode, address_of(selNode), &selOffset);
+      selNode = nsEditor::GetNodeLocation(priorNode, &selOffset);
       res = aSelection->Collapse(selNode,selOffset);
       NS_ENSURE_SUCCESS(res, res);
     }
   }
 
   if (mDidDeleteSelection &&
       (mTheAction == nsEditor::kOpInsertText ||
        mTheAction == nsEditor::kOpInsertIMEText ||
@@ -1603,17 +1602,17 @@ nsHTMLEditRules::StandardBreakImpl(nsIDO
       // reset {node,aOffset} to the point where link was split
       node = linkParent;
       aOffset = newOffset;
     }
     res = wsObj.InsertBreak(address_of(node), &aOffset,
                             address_of(brNode), nsIEditor::eNone);
   }
   NS_ENSURE_SUCCESS(res, res);
-  nsEditor::GetNodeLocation(brNode, address_of(node), &aOffset);
+  node = nsEditor::GetNodeLocation(brNode, &aOffset);
   NS_ENSURE_TRUE(node, NS_ERROR_NULL_POINTER);
   if (bAfterBlock && bBeforeBlock) {
     // we just placed a br between block boundaries.  This is the one case
     // where we want the selection to be before the br we just placed, as the
     // br will be on a new line, rather than at end of prior line.
     selPriv->SetInterlinePosition(true);
     res = aSelection->Collapse(node, aOffset);
   } else {
@@ -1625,19 +1624,18 @@ nsHTMLEditRules::StandardBreakImpl(nsIDO
                           &visOffset, &wsType);
     if (wsType == nsWSRunObject::eBreak) {
       // the next thing after the break we inserted is another break.  Move
       // the 2nd break to be the first breaks sibling.  This will prevent them
       // from being in different inline nodes, which would break
       // SetInterlinePosition().  It will also assure that if the user clicks
       // away and then clicks back on their new blank line, they will still
       // get the style from the line above.
-      nsCOMPtr<nsIDOMNode> brParent;
       PRInt32 brOffset;
-      nsEditor::GetNodeLocation(secondBR, address_of(brParent), &brOffset);
+      nsCOMPtr<nsIDOMNode> brParent = nsEditor::GetNodeLocation(secondBR, &brOffset);
       if (brParent != node || brOffset != aOffset + 1) {
         res = mHTMLEditor->MoveNode(secondBR, node, aOffset+1);
         NS_ENSURE_SUCCESS(res, res);
       }
     }
     // SetInterlinePosition(true) means we want the caret to stick to the
     // content on the "right".  We want the caret to stick to whatever is past
     // the break.  This is because the break is on the same line we were on,
@@ -1693,17 +1691,17 @@ nsHTMLEditRules::SplitMailCites(nsISelec
                           &visOffset, &wsType);
     if (wsType==nsWSRunObject::eBreak)
     {
       // ok, we are just before a break.  is it inside the mailquote?
       PRInt32 unused;
       if (nsEditorUtils::IsDescendantOf(visNode, citeNode, &unused))
       {
         // it is.  so lets reset our selection to be just after it.
-        mHTMLEditor->GetNodeLocation(visNode, address_of(selNode), &selOffset);
+        selNode = mHTMLEditor->GetNodeLocation(visNode, &selOffset);
         ++selOffset;
       }
     }
      
     nsCOMPtr<nsIDOMNode> brNode;
     res = mHTMLEditor->SplitNodeDeep(citeNode, selNode, selOffset, &newOffset, 
                        true, address_of(leftCite), address_of(rightCite));
     NS_ENSURE_SUCCESS(res, res);
@@ -1958,17 +1956,17 @@ nsHTMLEditRules::WillDeleteSelection(Sel
 
           In any other case we set the position to 
           startnode -1 and interlineposition to false,
           only moving the caret to the end-of-hr-line position.
         */
 
         bool moveOnly = true;
 
-        nsEditor::GetNodeLocation(visNode, address_of(selNode), &selOffset);
+        selNode = nsEditor::GetNodeLocation(visNode, &selOffset);
 
         bool interLineIsRight;
         res = aSelection->GetInterlinePosition(&interLineIsRight);
         NS_ENSURE_SUCCESS(res, res);
 
         if (startNode == selNode &&
             startOffset -1 == selOffset &&
             !interLineIsRight)
@@ -2504,17 +2502,17 @@ nsHTMLEditRules::GetGoodSelPointForNode(
       PRUint32 len;
       res = mHTMLEditor->GetLengthOfDOMNode(aNode, len);
       *outSelOffset = PRInt32(len);
       NS_ENSURE_SUCCESS(res, res);
     }
   }
   else 
   {
-    nsEditor::GetNodeLocation(aNode, outSelNode, outSelOffset);
+    *outSelNode = nsEditor::GetNodeLocation(aNode, outSelOffset);
     if (!nsTextEditUtils::IsBreak(aNode) || mHTMLEditor->IsVisBreak(aNode))
     {
       if (aAction == nsIEditor::ePrevious)
         (*outSelOffset)++;
     }
   }
   return res;
 }
@@ -2847,19 +2845,19 @@ nsHTMLEditRules::DidDeleteSelection(nsIS
                                 IsPlaintextEditor());
   NS_ENSURE_SUCCESS(res, res);
   if (citeNode) {
     nsCOMPtr<nsINode> cite = do_QueryInterface(citeNode);
     bool isEmpty = true, seenBR = false;
     mHTMLEditor->IsEmptyNodeImpl(cite, &isEmpty, true, true, false, &seenBR);
     if (isEmpty)
     {
-      nsCOMPtr<nsIDOMNode> parent, brNode;
+      nsCOMPtr<nsIDOMNode> brNode;
       PRInt32 offset;
-      nsEditor::GetNodeLocation(citeNode, address_of(parent), &offset);
+      nsCOMPtr<nsIDOMNode> parent = nsEditor::GetNodeLocation(citeNode, &offset);
       res = mHTMLEditor->DeleteNode(citeNode);
       NS_ENSURE_SUCCESS(res, res);
       if (parent && seenBR)
       {
         res = mHTMLEditor->CreateBR(parent, offset, address_of(brNode));
         NS_ENSURE_SUCCESS(res, res);
         aSelection->Collapse(parent, offset);
       }
@@ -2988,17 +2986,17 @@ nsHTMLEditRules::WillMakeList(nsISelecti
   nsCOMPtr<nsIDOMNode> curList;
   nsCOMPtr<nsIDOMNode> prevListItem;
 
   for (PRInt32 i = 0; i < listCount; i++) {
     // here's where we actually figure out what to do
     nsCOMPtr<nsIDOMNode> newBlock;
     nsCOMPtr<nsIDOMNode> curNode = arrayOfNodes[i];
     PRInt32 offset;
-    nsEditor::GetNodeLocation(curNode, address_of(curParent), &offset);
+    curParent = nsEditor::GetNodeLocation(curNode, &offset);
 
     // make sure we don't assemble content that is in different table cells
     // into the same list.  respect table cell boundaries when listifying.
     if (curList) {
       bool bInDifTblElems;
       res = InDifferentTableElements(curList, curNode, &bInDifTblElems);
       NS_ENSURE_SUCCESS(res, res);
       if (bInDifTblElems) {
@@ -3047,19 +3045,18 @@ nsHTMLEditRules::WillMakeList(nsISelecti
     if (nsHTMLEditUtils::IsListItem(curNode)) {
       if (mHTMLEditor->GetTag(curParent) != listTypeAtom) {
         // list item is in wrong type of list. if we don't have a curList,
         // split the old list and make a new list of correct type.
         if (!curList || nsEditorUtils::IsDescendantOf(curNode, curList)) {
           res = mHTMLEditor->SplitNode(curParent, offset,
                                        getter_AddRefs(newBlock));
           NS_ENSURE_SUCCESS(res, res);
-          nsCOMPtr<nsIDOMNode> parent;
           PRInt32 offset;
-          nsEditor::GetNodeLocation(curParent, address_of(parent), &offset);
+          nsCOMPtr<nsIDOMNode> parent = nsEditor::GetNodeLocation(curParent, &offset);
           res = mHTMLEditor->CreateNode(*aListType, parent, offset,
                                         getter_AddRefs(curList));
           NS_ENSURE_SUCCESS(res, res);
         }
         // move list item to new list
         res = mHTMLEditor->MoveNode(curNode, curList, -1);
         NS_ENSURE_SUCCESS(res, res);
         // convert list item type if needed
@@ -3202,17 +3199,17 @@ nsHTMLEditRules::WillRemoveList(nsISelec
   
   // Only act on lists or list items in the array
   nsCOMPtr<nsIDOMNode> curParent;
   for (i=0; i<listCount; i++)
   {
     // here's where we actually figure out what to do
     nsIDOMNode* curNode = arrayOfNodes[i];
     PRInt32 offset;
-    nsEditor::GetNodeLocation(curNode, address_of(curParent), &offset);
+    curParent = nsEditor::GetNodeLocation(curNode, &offset);
     
     if (nsHTMLEditUtils::IsListItem(curNode))  // unlist this listitem
     {
       bool bOutOfList;
       do
       {
         res = PopListItem(curNode, &bOutOfList);
         NS_ENSURE_SUCCESS(res, res);
@@ -3506,17 +3503,17 @@ nsHTMLEditRules::WillCSSIndent(nsISelect
   {
     // here's where we actually figure out what to do
     nsCOMPtr<nsIDOMNode> curNode = arrayOfNodes[i];
 
     // Ignore all non-editable nodes.  Leave them be.
     if (!mHTMLEditor->IsEditable(curNode)) continue;
 
     PRInt32 offset;
-    nsEditor::GetNodeLocation(curNode, address_of(curParent), &offset);
+    curParent = nsEditor::GetNodeLocation(curNode, &offset);
     
     // some logic for putting list items into nested lists...
     if (nsHTMLEditUtils::IsList(curParent))
     {
       sibling = nsnull;
 
       // Check for whether we should join a list that follows curNode.
       // We do this if the next element is a list, and the list is of the
@@ -3689,17 +3686,17 @@ nsHTMLEditRules::WillHTMLIndent(nsISelec
   {
     // here's where we actually figure out what to do
     nsCOMPtr<nsIDOMNode> curNode = arrayOfNodes[i];
 
     // Ignore all non-editable nodes.  Leave them be.
     if (!mHTMLEditor->IsEditable(curNode)) continue;
 
     PRInt32 offset;
-    nsEditor::GetNodeLocation(curNode, address_of(curParent), &offset);
+    curParent = nsEditor::GetNodeLocation(curNode, &offset);
      
     // some logic for putting list items into nested lists...
     if (nsHTMLEditUtils::IsList(curParent))
     {
       sibling = nsnull;
 
       // Check for whether we should join a list that follows curNode.
       // We do this if the next element is a list, and the list is of the
@@ -3770,17 +3767,17 @@ nsHTMLEditRules::WillHTMLIndent(nsISelec
       // array of nodes to act on, that are in the same list item.  Since
       // we only want to indent that li once, we must keep track of the most
       // recent indented list item, and not indent it if we find another node
       // to act on that is still inside the same li.
       nsCOMPtr<nsIDOMNode> listitem=IsInListItem(curNode);
       if (listitem)
       {
         if (indentedLI == listitem) continue;  // already indented this list item
-        nsEditor::GetNodeLocation(listitem, address_of(curParent), &offset);
+        curParent = nsEditor::GetNodeLocation(listitem, &offset);
         // check to see if curList is still appropriate.  Which it is if
         // curNode is still right after it in the same list.
         if (curList)
         {
           sibling = nsnull;
           mHTMLEditor->GetPriorHTMLSibling(curNode, address_of(sibling));
         }
          
@@ -3878,17 +3875,17 @@ nsHTMLEditRules::WillOutdent(nsISelectio
     PRInt32 listCount = arrayOfNodes.Count();
     PRInt32 i;
     nsCOMPtr<nsIDOMNode> curParent;
     for (i=0; i<listCount; i++)
     {
       // here's where we actually figure out what to do
       nsCOMPtr<nsIDOMNode> curNode = arrayOfNodes[i];
       PRInt32 offset;
-      nsEditor::GetNodeLocation(curNode, address_of(curParent), &offset);
+      curParent = nsEditor::GetNodeLocation(curNode, &offset);
       
       // is it a blockquote?
       if (nsHTMLEditUtils::IsBlockquote(curNode)) 
       {
         // if it is a blockquote, remove it.
         // So we need to finish up dealng with any curBlockQuote first.
         if (curBlockQuote)
         {
@@ -4086,27 +4083,27 @@ nsHTMLEditRules::WillOutdent(nsISelectio
       // push selection past end of rememberedLeftBQ
       nsCOMPtr<nsIDOMNode> sNode;
       PRInt32 sOffset;
       mHTMLEditor->GetStartNodeAndOffset(aSelection, getter_AddRefs(sNode), &sOffset);
       if (rememberedLeftBQ &&
           ((sNode == rememberedLeftBQ) || nsEditorUtils::IsDescendantOf(sNode, rememberedLeftBQ)))
       {
         // selection is inside rememberedLeftBQ - push it past it.
-        nsEditor::GetNodeLocation(rememberedLeftBQ, address_of(sNode), &sOffset);
+        sNode = nsEditor::GetNodeLocation(rememberedLeftBQ, &sOffset);
         sOffset++;
         aSelection->Collapse(sNode, sOffset);
       }
       // and pull selection before beginning of rememberedRightBQ
       mHTMLEditor->GetStartNodeAndOffset(aSelection, getter_AddRefs(sNode), &sOffset);
       if (rememberedRightBQ &&
           ((sNode == rememberedRightBQ) || nsEditorUtils::IsDescendantOf(sNode, rememberedRightBQ)))
       {
         // selection is inside rememberedRightBQ - push it before it.
-        nsEditor::GetNodeLocation(rememberedRightBQ, address_of(sNode), &sOffset);
+        sNode = nsEditor::GetNodeLocation(rememberedRightBQ, &sOffset);
         aSelection->Collapse(sNode, sOffset);
       }
     }
     return NS_OK;
   }
   return res;
 }
 
@@ -4139,35 +4136,35 @@ nsHTMLEditRules::SplitBlock(nsIDOMNode *
                             nsIDOMNode *aStartChild, 
                             nsIDOMNode *aEndChild,
                             nsCOMPtr<nsIDOMNode> *aLeftNode,
                             nsCOMPtr<nsIDOMNode> *aRightNode,
                             nsCOMPtr<nsIDOMNode> *aMiddleNode)
 {
   NS_ENSURE_TRUE(aBlock && aStartChild && aEndChild, NS_ERROR_NULL_POINTER);
   
-  nsCOMPtr<nsIDOMNode> startParent, endParent, leftNode, rightNode;
+  nsCOMPtr<nsIDOMNode> leftNode, rightNode;
   PRInt32 startOffset, endOffset, offset;
   nsresult res;
 
   // get split point location
-  nsEditor::GetNodeLocation(aStartChild, address_of(startParent), &startOffset);
+  nsCOMPtr<nsIDOMNode> startParent = nsEditor::GetNodeLocation(aStartChild, &startOffset);
   
   // do the splits!
   res = mHTMLEditor->SplitNodeDeep(aBlock, startParent, startOffset, &offset, 
                                    true, address_of(leftNode), address_of(rightNode));
   NS_ENSURE_SUCCESS(res, res);
   if (rightNode)  aBlock = rightNode;
 
   // remember left portion of block if caller requested
   if (aLeftNode) 
     *aLeftNode = leftNode;
 
   // get split point location
-  nsEditor::GetNodeLocation(aEndChild, address_of(endParent), &endOffset);
+  nsCOMPtr<nsIDOMNode> endParent = nsEditor::GetNodeLocation(aEndChild, &endOffset);
   endOffset++;  // want to be after lastBQChild
 
   // do the splits!
   res = mHTMLEditor->SplitNodeDeep(aBlock, endParent, endOffset, &offset, 
                                    true, address_of(leftNode), address_of(rightNode));
   NS_ENSURE_SUCCESS(res, res);
   if (leftNode)  aBlock = leftNode;
   
@@ -4546,17 +4543,17 @@ nsHTMLEditRules::WillAlign(nsISelection 
   for (PRInt32 i = 0; i < listCount; ++i) {
     // here's where we actually figure out what to do
     nsCOMPtr<nsIDOMNode> curNode = arrayOfNodes[i];
 
     // Ignore all non-editable nodes.  Leave them be.
     if (!mHTMLEditor->IsEditable(curNode)) continue;
 
     PRInt32 offset;
-    nsEditor::GetNodeLocation(curNode, address_of(curParent), &offset);
+    curParent = nsEditor::GetNodeLocation(curNode, &offset);
 
     // the node is a table element, an horiz rule, a paragraph, a div
     // or a section header; in HTML 4, it can directly carry the ALIGN
     // attribute and we don't need to nest it, just set the alignment.
     // In CSS, assign the corresponding CSS styles in AlignBlock
     if (nsHTMLEditUtils::SupportsAlignAttr(curNode))
     {
       nsCOMPtr<nsIDOMElement> curElem = do_QueryInterface(curNode);
@@ -4765,33 +4762,31 @@ nsHTMLEditRules::CheckForEmptyBlock(nsID
       res = mHTMLEditor->IsEmptyNode(block, &bIsEmptyNode, true, false);
       NS_ENSURE_SUCCESS(res, res);
     }
   }
 
   nsCOMPtr<nsIContent> emptyContent = do_QueryInterface(emptyBlock);
   if (emptyBlock && emptyContent->IsEditable())
   {
-    nsCOMPtr<nsIDOMNode> blockParent;
     PRInt32 offset;
-    nsEditor::GetNodeLocation(emptyBlock, address_of(blockParent), &offset);
+    nsCOMPtr<nsIDOMNode> blockParent = nsEditor::GetNodeLocation(emptyBlock, &offset);
     NS_ENSURE_TRUE(blockParent && offset >= 0, NS_ERROR_FAILURE);
 
     if (nsHTMLEditUtils::IsListItem(emptyBlock))
     {
       // are we the first list item in the list?
       bool bIsFirst;
       res = mHTMLEditor->IsFirstEditableChild(emptyBlock, &bIsFirst);
       NS_ENSURE_SUCCESS(res, res);
       if (bIsFirst)
       {
-        nsCOMPtr<nsIDOMNode> listParent;
         PRInt32 listOffset;
-        nsEditor::GetNodeLocation(blockParent, address_of(listParent),
-                                  &listOffset);
+        nsCOMPtr<nsIDOMNode> listParent = nsEditor::GetNodeLocation(blockParent,
+                                                                    &listOffset);
         NS_ENSURE_TRUE(listParent && listOffset >= 0, NS_ERROR_FAILURE);
         // if we are a sublist, skip the br creation
         if (!nsHTMLEditUtils::IsList(listParent))
         {
           // create a br before list
           nsCOMPtr<nsIDOMNode> brNode;
           res = mHTMLEditor->CreateBR(listParent, listOffset, address_of(brNode));
           NS_ENSURE_SUCCESS(res, res);
@@ -4829,21 +4824,19 @@ nsHTMLEditRules::CheckForInvisibleBR(nsI
 
   if (aWhere == kBlockEnd)
   {
     nsCOMPtr<nsIDOMNode> rightmostNode =
       mHTMLEditor->GetRightmostChild(aBlock, true); // no block crossing
 
     if (rightmostNode)
     {
-      nsCOMPtr<nsIDOMNode> nodeParent;
       PRInt32 nodeOffset;
-
-      nsEditor::GetNodeLocation(rightmostNode, address_of(nodeParent),
-                                &nodeOffset);
+      nsCOMPtr<nsIDOMNode> nodeParent = nsEditor::GetNodeLocation(rightmostNode,
+                                                                  &nodeOffset);
       runTest = true;
       testNode = nodeParent;
       // use offset + 1, because we want the last node included in our
       // evaluation
       testOffset = nodeOffset + 1;
     }
   }
   else if (aOffset)
@@ -4974,17 +4967,18 @@ nsHTMLEditRules::ExpandSelectionForDelet
         if ( nsHTMLEditUtils::IsTableElement(wsObj.mStartReasonNode) ||
             (selCommon == wsObj.mStartReasonNode)                    ||
             (rootElement == wsObj.mStartReasonNode) )
         {
           stillLooking = false;
         }
         else
         { 
-          nsEditor::GetNodeLocation(wsObj.mStartReasonNode, address_of(selStartNode), &selStartOffset);
+          selStartNode = nsEditor::GetNodeLocation(wsObj.mStartReasonNode,
+                                                   &selStartOffset);
         }
       }
       else
       {
         stillLooking = false;
       }
     }
   }
@@ -5006,33 +5000,33 @@ nsHTMLEditRules::ExpandSelectionForDelet
         }
         else
         { 
           if (!firstBRParent)
           {
             firstBRParent = selEndNode;
             firstBROffset = selEndOffset;
           }
-          nsEditor::GetNodeLocation(wsObj.mEndReasonNode, address_of(selEndNode), &selEndOffset);
+          selEndNode = nsEditor::GetNodeLocation(wsObj.mEndReasonNode, &selEndOffset);
           ++selEndOffset;
         }
       }
       else if (wsType == nsWSRunObject::eThisBlock)
       {
         // we want to keep looking up.  But stop if we are crossing table element
         // boundaries, or if we hit the root.
         if ( nsHTMLEditUtils::IsTableElement(wsObj.mEndReasonNode) ||
             (selCommon == wsObj.mEndReasonNode)                    ||
             (rootElement == wsObj.mEndReasonNode) )
         {
           stillLooking = false;
         }
         else
         { 
-          nsEditor::GetNodeLocation(wsObj.mEndReasonNode, address_of(selEndNode), &selEndOffset);
+          selEndNode = nsEditor::GetNodeLocation(wsObj.mEndReasonNode, &selEndOffset);
           ++selEndOffset;
         }
        }
       else
       {
         stillLooking = false;
       }
     }
@@ -5145,39 +5139,38 @@ nsHTMLEditRules::NormalizeSelection(nsIS
     // eThisBlock and eOtherBlock conveniently distinquish cases
     // of going "down" into a block and "up" out of a block.
     if (wsEndObj.mStartReason == nsWSRunObject::eOtherBlock) 
     {
       // endpoint is just after the close of a block.
       nsCOMPtr<nsIDOMNode> child = mHTMLEditor->GetRightmostChild(wsEndObj.mStartReasonNode, true);
       if (child)
       {
-        nsEditor::GetNodeLocation(child, address_of(newEndNode), &newEndOffset);
+        newEndNode = nsEditor::GetNodeLocation(child, &newEndOffset);
         ++newEndOffset; // offset *after* child
       }
       // else block is empty - we can leave selection alone here, i think.
     }
     else if (wsEndObj.mStartReason == nsWSRunObject::eThisBlock)
     {
       // endpoint is just after start of this block
       nsCOMPtr<nsIDOMNode> child;
       res = mHTMLEditor->GetPriorHTMLNode(endNode, endOffset, address_of(child));
       if (child)
       {
-        nsEditor::GetNodeLocation(child, address_of(newEndNode),
-                                  &newEndOffset);
+        newEndNode = nsEditor::GetNodeLocation(child, &newEndOffset);
         ++newEndOffset; // offset *after* child
       }
       // else block is empty - we can leave selection alone here, i think.
     }
     else if (wsEndObj.mStartReason == nsWSRunObject::eBreak)
     {                                       
       // endpoint is just after break.  lets adjust it to before it.
-      nsEditor::GetNodeLocation(wsEndObj.mStartReasonNode,
-                                address_of(newEndNode), &newEndOffset);
+      newEndNode = nsEditor::GetNodeLocation(wsEndObj.mStartReasonNode,
+                                             &newEndOffset);
     }
   }
   
   
   // similar dealio for start of range
   nsWSRunObject wsStartObj(mHTMLEditor, startNode, startOffset);
   // is there any intervening visible whitespace?  if so we can't push selection past that,
   // it would visibly change maening of users selection
@@ -5188,38 +5181,36 @@ nsHTMLEditRules::NormalizeSelection(nsIS
     // eThisBlock and eOtherBlock conveniently distinquish cases
     // of going "down" into a block and "up" out of a block.
     if (wsStartObj.mEndReason == nsWSRunObject::eOtherBlock) 
     {
       // startpoint is just before the start of a block.
       nsCOMPtr<nsIDOMNode> child = mHTMLEditor->GetLeftmostChild(wsStartObj.mEndReasonNode, true);
       if (child)
       {
-        nsEditor::GetNodeLocation(child, address_of(newStartNode),
-                                  &newStartOffset);
+        newStartNode = nsEditor::GetNodeLocation(child, &newStartOffset);
       }
       // else block is empty - we can leave selection alone here, i think.
     }
     else if (wsStartObj.mEndReason == nsWSRunObject::eThisBlock)
     {
       // startpoint is just before end of this block
       nsCOMPtr<nsIDOMNode> child;
       res = mHTMLEditor->GetNextHTMLNode(startNode, startOffset, address_of(child));
       if (child)
       {
-        nsEditor::GetNodeLocation(child, address_of(newStartNode),
-                                  &newStartOffset);
+        newStartNode = nsEditor::GetNodeLocation(child, &newStartOffset);
       }
       // else block is empty - we can leave selection alone here, i think.
     }
     else if (wsStartObj.mEndReason == nsWSRunObject::eBreak)
     {                                       
       // startpoint is just before a break.  lets adjust it to after it.
-      nsEditor::GetNodeLocation(wsStartObj.mEndReasonNode,
-                                address_of(newStartNode), &newStartOffset);
+      newStartNode = nsEditor::GetNodeLocation(wsStartObj.mEndReasonNode,
+                                               &newStartOffset);
       ++newStartOffset; // offset *after* break
     }
   }
   
   // there is a demented possiblity we have to check for.  We might have a very strange selection
   // that is not collapsed and yet does not contain any editable content, and satisfies some of the
   // above conditions that cause tweaking.  In this case we don't want to tweak the selection into
   // a block it was never in, etc.  There are a variety of strategies one might use to try to
@@ -6054,18 +6045,17 @@ nsHTMLEditRules::BustUpInlinesAtBRs(nsID
     PRInt32 splitOffset, resultOffset, i;
     inNode->GetParentNode(getter_AddRefs(inlineParentNode));
     
     for (i=0; i< listCount; i++)
     {
       breakNode = arrayOfBreaks[i];
       NS_ENSURE_TRUE(breakNode, NS_ERROR_NULL_POINTER);
       NS_ENSURE_TRUE(splitDeepNode, NS_ERROR_NULL_POINTER);
-      nsEditor::GetNodeLocation(breakNode, address_of(splitParentNode),
-                                &splitOffset);
+      splitParentNode = nsEditor::GetNodeLocation(breakNode, &splitOffset);
       res = mHTMLEditor->SplitNodeDeep(splitDeepNode, splitParentNode, splitOffset,
                           &resultOffset, false, address_of(leftNode), address_of(rightNode));
       NS_ENSURE_SUCCESS(res, res);
       // put left node in node list
       if (leftNode)
       {
         // might not be a left node.  a break might have been at the very
         // beginning of inline container, in which case splitnodedeep
@@ -6255,19 +6245,18 @@ nsresult
 nsHTMLEditRules::ReturnInHeader(nsISelection *aSelection, 
                                 nsIDOMNode *aHeader, 
                                 nsIDOMNode *aNode, 
                                 PRInt32 aOffset)
 {
   NS_ENSURE_TRUE(aSelection && aHeader && aNode, NS_ERROR_NULL_POINTER);  
   
   // remeber where the header is
-  nsCOMPtr<nsIDOMNode> headerParent;
   PRInt32 offset;
-  nsEditor::GetNodeLocation(aHeader, address_of(headerParent), &offset);
+  nsCOMPtr<nsIDOMNode> headerParent = nsEditor::GetNodeLocation(aHeader, &offset);
 
   // get ws code to adjust any ws
   nsCOMPtr<nsIDOMNode> selNode = aNode;
   nsresult res = nsWSRunObject::PrepareToSplitAcrossBlocks(mHTMLEditor,
                                                            address_of(selNode),
                                                            &aOffset);
   NS_ENSURE_SUCCESS(res, res);
 
@@ -6316,17 +6305,17 @@ nsHTMLEditRules::ReturnInHeader(nsISelec
       res = mHTMLEditor->CreateBR(pNode, 0, address_of(brNode));
       NS_ENSURE_SUCCESS(res, res);
 
       // set selection to before the break
       res = aSelection->Collapse(pNode, 0);
     }
     else
     {
-      nsEditor::GetNodeLocation(sibling, address_of(headerParent), &offset);
+      headerParent = nsEditor::GetNodeLocation(sibling, &offset);
       // put selection after break
       res = aSelection->Collapse(headerParent,offset+1);
     }
   }
   else
   {
     // put selection at front of righthand heading
     res = aSelection->Collapse(aHeader,0);
@@ -6347,19 +6336,18 @@ nsHTMLEditRules::ReturnInParagraph(nsISe
 {
   if (!aSelection || !aPara || !aNode || !aCancel || !aHandled) {
     return NS_ERROR_NULL_POINTER;
   }
   *aCancel = false;
   *aHandled = false;
   nsresult res;
 
-  nsCOMPtr<nsIDOMNode> parent;
   PRInt32 offset;
-  nsEditor::GetNodeLocation(aNode, address_of(parent), &offset);
+  nsCOMPtr<nsIDOMNode> parent = nsEditor::GetNodeLocation(aNode, &offset);
 
   bool doesCRCreateNewP = mHTMLEditor->GetReturnInParagraphCreatesNewParagraph();
 
   bool newBRneeded = false;
   nsCOMPtr<nsIDOMNode> sibling;
 
   if (aNode == aPara && doesCRCreateNewP) {
     // we are at the edges of the block, newBRneeded not needed!
@@ -6476,19 +6464,18 @@ nsHTMLEditRules::SplitParagraph(nsIDOMNo
   // look inside any containers that are up front.
   nsCOMPtr<nsIDOMNode> child = mHTMLEditor->GetLeftmostChild(rightPara, true);
   if (mHTMLEditor->IsTextNode(child) || mHTMLEditor->IsContainer(child))
   {
     aSelection->Collapse(child,0);
   }
   else
   {
-    nsCOMPtr<nsIDOMNode> parent;
     PRInt32 offset;
-    nsEditor::GetNodeLocation(child, address_of(parent), &offset);
+    nsCOMPtr<nsIDOMNode> parent = nsEditor::GetNodeLocation(child, &offset);
     aSelection->Collapse(parent,offset);
   }
   return res;
 }
 
 
 ///////////////////////////////////////////////////////////////////////////
 // ReturnInListItem: do the right thing for returns pressed in list items
@@ -6508,31 +6495,29 @@ nsHTMLEditRules::ReturnInListItem(nsISel
   
   // sanity check
   NS_PRECONDITION(true == nsHTMLEditUtils::IsListItem(aListItem),
                   "expected a list item and didn't get one");
   
   // get the listitem parent and the active editing host.
   nsIContent* rootContent = mHTMLEditor->GetActiveEditingHost();
   nsCOMPtr<nsIDOMNode> rootNode = do_QueryInterface(rootContent);
-  nsCOMPtr<nsIDOMNode> list;
   PRInt32 itemOffset;
-  nsEditor::GetNodeLocation(aListItem, address_of(list), &itemOffset);
+  nsCOMPtr<nsIDOMNode> list = nsEditor::GetNodeLocation(aListItem, &itemOffset);
 
   // if we are in an empty listitem, then we want to pop up out of the list
   // but only if prefs says it's ok and if the parent isn't the active editing host.
   bool isEmpty;
   res = IsEmptyBlock(aListItem, &isEmpty, true, false);
   NS_ENSURE_SUCCESS(res, res);
   if (isEmpty && (rootNode != list) && mReturnInEmptyLIKillsList)
   {
     // get the list offset now -- before we might eventually split the list
-    nsCOMPtr<nsIDOMNode> listparent;
     PRInt32 offset;
-    nsEditor::GetNodeLocation(list, address_of(listparent), &offset);
+    nsCOMPtr<nsIDOMNode> listparent = nsEditor::GetNodeLocation(list, &offset);
 
     // are we the last list item in the list?
     bool bIsLast;
     res = mHTMLEditor->IsLastEditableChild(aListItem, &bIsLast);
     NS_ENSURE_SUCCESS(res, res);
     if (!bIsLast)
     {
       // we need to split the list!
@@ -6598,55 +6583,52 @@ nsHTMLEditRules::ReturnInListItem(nsISel
     } else {
       res = mHTMLEditor->IsEmptyNode(aListItem, &bIsEmptyNode, true);
       NS_ENSURE_SUCCESS(res, res);
       if (bIsEmptyNode) 
       {
         nsCOMPtr<nsIAtom> nodeAtom = nsEditor::GetTag(aListItem);
         if (nodeAtom == nsEditProperty::dd || nodeAtom == nsEditProperty::dt)
         {
-          nsCOMPtr<nsIDOMNode> list;
           PRInt32 itemOffset;
-          nsEditor::GetNodeLocation(aListItem, address_of(list), &itemOffset);
+          nsCOMPtr<nsIDOMNode> list = nsEditor::GetNodeLocation(aListItem, &itemOffset);
 
           nsAutoString listTag((nodeAtom == nsEditProperty::dt) ? NS_LITERAL_STRING("dd") : NS_LITERAL_STRING("dt"));
           nsCOMPtr<nsIDOMNode> newListItem;
           res = mHTMLEditor->CreateNode(listTag, list, itemOffset+1, getter_AddRefs(newListItem));
           NS_ENSURE_SUCCESS(res, res);
           res = mEditor->DeleteNode(aListItem);
           NS_ENSURE_SUCCESS(res, res);
           return aSelection->Collapse(newListItem, 0);
         }
 
         nsCOMPtr<nsIDOMNode> brNode;
         res = mHTMLEditor->CopyLastEditableChildStyles(prevItem, aListItem, getter_AddRefs(brNode));
         NS_ENSURE_SUCCESS(res, res);
         if (brNode) 
         {
-          nsCOMPtr<nsIDOMNode> brParent;
           PRInt32 offset;
-          nsEditor::GetNodeLocation(brNode, address_of(brParent), &offset);
+          nsCOMPtr<nsIDOMNode> brParent = nsEditor::GetNodeLocation(brNode, &offset);
           return aSelection->Collapse(brParent, offset);
         }
       }
       else
       {
         nsWSRunObject wsObj(mHTMLEditor, aListItem, 0);
         nsCOMPtr<nsIDOMNode> visNode;
         PRInt32 visOffset = 0;
         PRInt16 wsType;
         wsObj.NextVisibleNode(aListItem, 0, address_of(visNode),
                               &visOffset, &wsType);
         if ( (wsType==nsWSRunObject::eSpecial)  || 
              (wsType==nsWSRunObject::eBreak)    ||
              nsHTMLEditUtils::IsHR(visNode) ) 
         {
-          nsCOMPtr<nsIDOMNode> parent;
           PRInt32 offset;
-          nsEditor::GetNodeLocation(visNode, address_of(parent), &offset);
+          nsCOMPtr<nsIDOMNode> parent = nsEditor::GetNodeLocation(visNode, &offset);
           return aSelection->Collapse(parent, offset);
         }
         else
         {
           return aSelection->Collapse(visNode, visOffset);
         }
       }
     }
@@ -6675,17 +6657,17 @@ nsHTMLEditRules::MakeBlockquote(nsCOMArr
   
   nsCOMPtr<nsIDOMNode> prevParent;
   
   PRInt32 i;
   for (i=0; i<listCount; i++)
   {
     // get the node to act on, and its location
     curNode = arrayOfNodes[i];
-    nsEditor::GetNodeLocation(curNode, address_of(curParent), &offset);
+    curParent = nsEditor::GetNodeLocation(curNode, &offset);
 
     // if the node is a table element or list item, dive inside
     if (nsHTMLEditUtils::IsTableElementButNotTable(curNode) || 
         nsHTMLEditUtils::IsListItem(curNode))
     {
       curBlock = 0;  // forget any previous block
       // recursion time
       nsCOMArray<nsIDOMNode> childArray;
@@ -6873,17 +6855,17 @@ nsHTMLEditRules::ApplyBlockStyle(nsCOMAr
   // reset list count
   listCount = arrayOfNodes.Count();
   
   PRInt32 i;
   for (i=0; i<listCount; i++)
   {
     // get the node to act on, and its location
     curNode = arrayOfNodes[i];
-    nsEditor::GetNodeLocation(curNode, address_of(curParent), &offset);
+    curParent = nsEditor::GetNodeLocation(curNode, &offset);
     nsAutoString curNodeTag;
     nsEditor::GetTagString(curNode, curNodeTag);
     ToLowerCase(curNodeTag);
  
     // is it already the right kind of block?
     if (curNodeTag == *aBlockTag)
     {
       curBlock = 0;  // forget any previous block used for previous inline nodes
@@ -7065,18 +7047,18 @@ nsHTMLEditRules::JoinNodesSmart( nsIDOMN
       aNodeRight && 
       aOutMergeParent &&
       aOutMergeOffset, NS_ERROR_NULL_POINTER);
   
   nsresult res = NS_OK;
   // caller responsible for:
   //   left & right node are same type
   PRInt32 parOffset;
-  nsCOMPtr<nsIDOMNode> parent, rightParent;
-  nsEditor::GetNodeLocation(aNodeLeft, address_of(parent), &parOffset);
+  nsCOMPtr<nsIDOMNode> rightParent;
+  nsCOMPtr<nsIDOMNode> parent = nsEditor::GetNodeLocation(aNodeLeft, &parOffset);
   aNodeRight->GetParentNode(getter_AddRefs(rightParent));
 
   // if they don't have the same parent, first move the 'right' node 
   // to after the 'left' one
   if (parent != rightParent)
   {
     res = mHTMLEditor->MoveNode(aNodeRight, parent, parOffset);
     NS_ENSURE_SUCCESS(res, res);
@@ -7337,34 +7319,30 @@ nsHTMLEditRules::PinSelectionToNewBlock(
     PRUint32 endPoint;
     if (mHTMLEditor->IsTextNode(tmp) || mHTMLEditor->IsContainer(tmp))
     {
       res = nsEditor::GetLengthOfDOMNode(tmp, endPoint);
       NS_ENSURE_SUCCESS(res, res);
     }
     else
     {
-      nsCOMPtr<nsIDOMNode> tmp2;
-      nsEditor::GetNodeLocation(tmp, address_of(tmp2), (PRInt32*)&endPoint);
-      tmp = tmp2;
+      tmp = nsEditor::GetNodeLocation(tmp, (PRInt32*)&endPoint);
       endPoint++;  // want to be after this node
     }
     return aSelection->Collapse(tmp, (PRInt32)endPoint);
   }
   else
   {
     // selection is before block.  put at start of block.
     nsCOMPtr<nsIDOMNode> tmp = mNewBlock;
     mHTMLEditor->GetFirstEditableChild(mNewBlock, address_of(tmp));
     PRInt32 offset;
     if (!(mHTMLEditor->IsTextNode(tmp) || mHTMLEditor->IsContainer(tmp)))
     {
-      nsCOMPtr<nsIDOMNode> tmp2;
-      nsEditor::GetNodeLocation(tmp, address_of(tmp2), &offset);
-      tmp = tmp2;
+      tmp = nsEditor::GetNodeLocation(tmp, &offset);
     }
     return aSelection->Collapse(tmp, 0);
   }
 }
 
 nsresult 
 nsHTMLEditRules::CheckInterlinePosition(nsISelection *aSelection)
 {
@@ -7428,17 +7406,17 @@ nsHTMLEditRules::AdjustSelection(nsISele
   nsresult res = mHTMLEditor->GetStartNodeAndOffset(aSelection, getter_AddRefs(selNode), &selOffset);
   NS_ENSURE_SUCCESS(res, res);
   temp = selNode;
   
   // are we in an editable node?
   while (!mHTMLEditor->IsEditable(selNode))
   {
     // scan up the tree until we find an editable place to be
-    nsEditor::GetNodeLocation(temp, address_of(selNode), &selOffset);
+    selNode = nsEditor::GetNodeLocation(temp, &selOffset);
     NS_ENSURE_TRUE(selNode, NS_ERROR_FAILURE);
     temp = selNode;
   }
   
   // make sure we aren't in an empty block - user will see no cursor.  If this
   // is happening, put a <br> in the block if allowed.
   nsCOMPtr<nsIDOMNode> theblock;
   if (IsBlockNode(selNode)) theblock = selNode;
@@ -7491,17 +7469,17 @@ nsHTMLEditRules::AdjustSelection(nsISele
         if (!mHTMLEditor->IsVisBreak(nearNode))
         {
           // need to insert special moz BR. Why?  Because if we don't
           // the user will see no new line for the break.  Also, things
           // like table cells won't grow in height.
           nsCOMPtr<nsIDOMNode> brNode;
           res = CreateMozBR(selNode, selOffset, getter_AddRefs(brNode));
           NS_ENSURE_SUCCESS(res, res);
-          nsEditor::GetNodeLocation(brNode, address_of(selNode), &selOffset);
+          selNode = nsEditor::GetNodeLocation(brNode, &selOffset);
           // selection stays *before* moz-br, sticking to it
           selPriv->SetInterlinePosition(true);
           res = aSelection->Collapse(selNode,selOffset);
           NS_ENSURE_SUCCESS(res, res);
         }
         else
         {
           nsCOMPtr<nsIDOMNode> nextNode;
@@ -7547,17 +7525,17 @@ nsHTMLEditRules::AdjustSelection(nsISele
       PRInt32 offset = 0;
       // put selection in right place:
       if (aAction == nsIEditor::ePrevious)
         textNode->GetLength((PRUint32*)&offset);
       res = aSelection->Collapse(nearNode,offset);
     }
     else  // must be break or image
     {
-      nsEditor::GetNodeLocation(nearNode, address_of(selNode), &selOffset);
+      selNode = nsEditor::GetNodeLocation(nearNode, &selOffset);
       if (aAction == nsIEditor::ePrevious) selOffset++;  // want to be beyond it if we backed up to it
       res = aSelection->Collapse(selNode, selOffset);
     }
   }
   return res;
 }
 
 
@@ -7778,17 +7756,17 @@ nsHTMLEditRules::RemoveEmptyNodes()
     res = mHTMLEditor->IsEmptyNode(delNode, &bIsEmptyNode, false, true);
     NS_ENSURE_SUCCESS(res, res);
     if (!bIsEmptyNode)
     {
       // we are deleting a cite that has just a br.  We want to delete cite, 
       // but preserve br.
       nsCOMPtr<nsIDOMNode> parent, brNode;
       PRInt32 offset;
-      nsEditor::GetNodeLocation(delNode, address_of(parent), &offset);
+      parent = nsEditor::GetNodeLocation(delNode, &offset);
       res = mHTMLEditor->CreateBR(parent, offset, address_of(brNode));
       NS_ENSURE_SUCCESS(res, res);
     }
     res = mHTMLEditor->DeleteNode(delNode);
     NS_ENSURE_SUCCESS(res, res);
   }
   
   return res;
@@ -7904,29 +7882,27 @@ nsresult
 nsHTMLEditRules::PopListItem(nsIDOMNode *aListItem, bool *aOutOfList)
 {
   // check parms
   NS_ENSURE_TRUE(aListItem && aOutOfList, NS_ERROR_NULL_POINTER);
   
   // init out params
   *aOutOfList = false;
   
-  nsCOMPtr<nsIDOMNode> curParent;
   nsCOMPtr<nsIDOMNode> curNode( do_QueryInterface(aListItem));
   PRInt32 offset;
-  nsEditor::GetNodeLocation(curNode, address_of(curParent), &offset);
+  nsCOMPtr<nsIDOMNode> curParent = nsEditor::GetNodeLocation(curNode, &offset);
     
   if (!nsHTMLEditUtils::IsListItem(curNode))
     return NS_ERROR_FAILURE;
     
   // if it's first or last list item, don't need to split the list
   // otherwise we do.
-  nsCOMPtr<nsIDOMNode> curParPar;
   PRInt32 parOffset;
-  nsEditor::GetNodeLocation(curParent, address_of(curParPar), &parOffset);
+  nsCOMPtr<nsIDOMNode> curParPar = nsEditor::GetNodeLocation(curParent, &parOffset);
   
   bool bIsFirstListItem;
   nsresult res = mHTMLEditor->IsFirstEditableChild(curNode, &bIsFirstListItem);
   NS_ENSURE_SUCCESS(res, res);
 
   bool bIsLastListItem;
   res = mHTMLEditor->IsLastEditableChild(curNode, &bIsLastListItem);
   NS_ENSURE_SUCCESS(res, res);
@@ -8697,17 +8673,17 @@ nsHTMLEditRules::WillAbsolutePosition(ns
   {
     // here's where we actually figure out what to do
     nsCOMPtr<nsIDOMNode> curNode = arrayOfNodes[i];
 
     // Ignore all non-editable nodes.  Leave them be.
     if (!mHTMLEditor->IsEditable(curNode)) continue;
 
     PRInt32 offset;
-    nsEditor::GetNodeLocation(curNode, address_of(curParent), &offset);
+    curParent = nsEditor::GetNodeLocation(curNode, &offset);
      
     // some logic for putting list items into nested lists...
     if (nsHTMLEditUtils::IsList(curParent))
     {
       // check to see if curList is still appropriate.  Which it is if
       // curNode is still right after it in the same list.
       if (curList)
       {
@@ -8720,19 +8696,17 @@ nsHTMLEditRules::WillAbsolutePosition(ns
         nsAutoString listTag;
         nsEditor::GetTagString(curParent,listTag);
         ToLowerCase(listTag);
         // create a new nested list of correct type
         res = SplitAsNeeded(&listTag, address_of(curParent), &offset);
         NS_ENSURE_SUCCESS(res, res);
         if (!curPositionedDiv) {
           PRInt32 parentOffset;
-          nsCOMPtr<nsIDOMNode> curParentParent;
-          nsEditor::GetNodeLocation(curParent, address_of(curParentParent),
-                                    &parentOffset);
+          nsCOMPtr<nsIDOMNode> curParentParent = nsEditor::GetNodeLocation(curParent, &parentOffset);
           res = mHTMLEditor->CreateNode(divType, curParentParent, parentOffset, getter_AddRefs(curPositionedDiv));
           mNewBlock = curPositionedDiv;
         }
         res = mHTMLEditor->CreateNode(listTag, curPositionedDiv, -1, getter_AddRefs(curList));
         NS_ENSURE_SUCCESS(res, res);
         // curList is now the correct thing to put curNode in
         // remember our new block for postprocessing
         // mNewBlock = curList;
@@ -8751,17 +8725,17 @@ nsHTMLEditRules::WillAbsolutePosition(ns
       // array of nodes to act on, that are in the same list item.  Since
       // we only want to indent that li once, we must keep track of the most
       // recent indented list item, and not indent it if we find another node
       // to act on that is still inside the same li.
       nsCOMPtr<nsIDOMNode> listitem=IsInListItem(curNode);
       if (listitem)
       {
         if (indentedLI == listitem) continue;  // already indented this list item
-        nsEditor::GetNodeLocation(listitem, address_of(curParent), &offset);
+        curParent = nsEditor::GetNodeLocation(listitem, &offset);
         // check to see if curList is still appropriate.  Which it is if
         // curNode is still right after it in the same list.
         if (curList)
         {
           sibling = nsnull;
           mHTMLEditor->GetPriorHTMLSibling(curNode, address_of(sibling));
         }
          
@@ -8770,19 +8744,17 @@ nsHTMLEditRules::WillAbsolutePosition(ns
           nsAutoString listTag;
           nsEditor::GetTagString(curParent,listTag);
           ToLowerCase(listTag);
           // create a new nested list of correct type
           res = SplitAsNeeded(&listTag, address_of(curParent), &offset);
           NS_ENSURE_SUCCESS(res, res);
           if (!curPositionedDiv) {
           PRInt32 parentOffset;
-          nsCOMPtr<nsIDOMNode> curParentParent;
-          nsEditor::GetNodeLocation(curParent, address_of(curParentParent),
-                                    &parentOffset);
+          nsCOMPtr<nsIDOMNode> curParentParent = nsEditor::GetNodeLocation(curParent, &parentOffset);
           res = mHTMLEditor->CreateNode(divType, curParentParent, parentOffset, getter_AddRefs(curPositionedDiv));
             mNewBlock = curPositionedDiv;
           }
           res = mHTMLEditor->CreateNode(listTag, curPositionedDiv, -1, getter_AddRefs(curList));
           NS_ENSURE_SUCCESS(res, res);
         }
         res = mHTMLEditor->MoveNode(listitem, curList, -1);
         NS_ENSURE_SUCCESS(res, res);
--- a/editor/libeditor/html/nsHTMLEditor.cpp
+++ b/editor/libeditor/html/nsHTMLEditor.cpp
@@ -521,17 +521,17 @@ nsHTMLEditor::BeginningOfDocument()
     {
       selNode = visNode;
       selOffset = visOffset;
       done = true;
     }
     else if ((visType==nsWSRunObject::eBreak)    ||
              (visType==nsWSRunObject::eSpecial))
     {
-      GetNodeLocation(visNode, address_of(selNode), &selOffset);
+      selNode = GetNodeLocation(visNode, &selOffset);
       done = true;
     }
     else if (visType==nsWSRunObject::eOtherBlock)
     {
       // By definition of nsWSRunObject, a block element terminates 
       // a whitespace run. That is, although we are calling a method 
       // that is named "NextVisibleNode", the node returned
       // might not be visible/editable!
@@ -541,27 +541,27 @@ nsHTMLEditor::BeginningOfDocument()
       if (!IsContainer(visNode))
       {
         // However, we were given a block that is not a container.
         // Since the block can not contain anything that's visible,
         // such a block only makes sense if it is visible by itself,
         // like a <hr>
         // We want to place the caret in front of that block.
 
-        GetNodeLocation(visNode, address_of(selNode), &selOffset);
+        selNode = GetNodeLocation(visNode, &selOffset);
         done = true;
       }
       else
       {
         bool isEmptyBlock;
         if (NS_SUCCEEDED(IsEmptyNode(visNode, &isEmptyBlock)) &&
             isEmptyBlock)
         {
           // skip the empty block
-          GetNodeLocation(visNode, address_of(curNode), &curOffset);
+          curNode = GetNodeLocation(visNode, &curOffset);
           ++curOffset;
         }
         else
         {
           curNode = visNode;
           curOffset = 0;
         }
         // keep looping
@@ -936,17 +936,17 @@ bool nsHTMLEditor::IsVisBreak(nsIDOMNode
   NS_ENSURE_TRUE(nextNode, false);  // this break is trailer in block, it's not visible
   if (IsBlockNode(nextNode))
     return false; // break is right before a block, it's not visible
     
   // sigh.  We have to use expensive whitespace calculation code to 
   // determine what is going on
   nsCOMPtr<nsIDOMNode> selNode, tmp;
   PRInt32 selOffset;
-  GetNodeLocation(aNode, address_of(selNode), &selOffset);
+  selNode = GetNodeLocation(aNode, &selOffset);
   selOffset++; // lets look after the break
   nsWSRunObject wsObj(this, selNode, selOffset);
   nsCOMPtr<nsIDOMNode> visNode;
   PRInt32 visOffset=0;
   PRInt16 visType=0;
   wsObj.NextVisibleNode(selNode, selOffset, address_of(visNode), &visOffset, &visType);
   if (visType & nsWSRunObject::eBlock)
     return false;
@@ -1463,20 +1463,18 @@ nsHTMLEditor::NormalizeEOLInsertPosition
     return;
 
   if (prevVisType & nsWSRunObject::eBreak)
     return;
 
   if (prevVisType & nsWSRunObject::eThisBlock)
     return;
 
-  nsCOMPtr<nsIDOMNode> brNode;
   PRInt32 brOffset=0;
-
-  GetNodeLocation(nextVisNode, address_of(brNode), &brOffset);
+  nsCOMPtr<nsIDOMNode> brNode = GetNodeLocation(nextVisNode, &brOffset);
 
   *insertParentNode = brNode;
   *insertOffset = brOffset + 1;
 }
 
 NS_IMETHODIMP
 nsHTMLEditor::InsertElementAtSelection(nsIDOMElement* aElement, bool aDeleteSelection)
 {
--- a/editor/libeditor/html/nsHTMLEditorStyle.cpp
+++ b/editor/libeditor/html/nsHTMLEditorStyle.cpp
@@ -932,39 +932,39 @@ nsresult nsHTMLEditor::PromoteRangeIfSta
   res = inRange->GetEndOffset(&endOffset);
   NS_ENSURE_SUCCESS(res, res);
 
   tmp = startNode;
   while ( tmp && 
           !nsTextEditUtils::IsBody(tmp) &&
           !nsHTMLEditUtils::IsNamedAnchor(tmp))
   {
-    GetNodeLocation(tmp, address_of(parent), &tmpOffset);
+    parent = GetNodeLocation(tmp, &tmpOffset);
     tmp = parent;
   }
   NS_ENSURE_TRUE(tmp, NS_ERROR_NULL_POINTER);
   if (nsHTMLEditUtils::IsNamedAnchor(tmp))
   {
-    GetNodeLocation(tmp, address_of(parent), &tmpOffset);
+    parent = GetNodeLocation(tmp, &tmpOffset);
     startNode = parent;
     startOffset = tmpOffset;
   }
 
   tmp = endNode;
   while ( tmp && 
           !nsTextEditUtils::IsBody(tmp) &&
           !nsHTMLEditUtils::IsNamedAnchor(tmp))
   {
-    GetNodeLocation(tmp, address_of(parent), &tmpOffset);
+    parent = GetNodeLocation(tmp, &tmpOffset);
     tmp = parent;
   }
   NS_ENSURE_TRUE(tmp, NS_ERROR_NULL_POINTER);
   if (nsHTMLEditUtils::IsNamedAnchor(tmp))
   {
-    GetNodeLocation(tmp, address_of(parent), &tmpOffset);
+    parent = GetNodeLocation(tmp, &tmpOffset);
     endNode = parent;
     endOffset = tmpOffset + 1;
   }
 
   res = inRange->SetStart(startNode, startOffset);
   NS_ENSURE_SUCCESS(res, res);
   res = inRange->SetEnd(endNode, endOffset);
   return res;
@@ -986,27 +986,27 @@ nsresult nsHTMLEditor::PromoteInlineRang
   res = inRange->GetEndOffset(&endOffset);
   NS_ENSURE_SUCCESS(res, res);
   
   while ( startNode && 
           !nsTextEditUtils::IsBody(startNode) && 
           IsEditable(startNode) &&
           IsAtFrontOfNode(startNode, startOffset) )
   {
-    GetNodeLocation(startNode, address_of(parent), &startOffset);
+    parent = GetNodeLocation(startNode, &startOffset);
     startNode = parent;
   }
   NS_ENSURE_TRUE(startNode, NS_ERROR_NULL_POINTER);
   
   while ( endNode && 
           !nsTextEditUtils::IsBody(endNode) && 
           IsEditable(endNode) &&
           IsAtEndOfNode(endNode, endOffset) )
   {
-    GetNodeLocation(endNode, address_of(parent), &endOffset);
+    parent = GetNodeLocation(endNode, &endOffset);
     endNode = parent;
     endOffset++;  // we are AFTER this node
   }
   NS_ENSURE_TRUE(endNode, NS_ERROR_NULL_POINTER);
   
   res = inRange->SetStart(startNode, startOffset);
   NS_ENSURE_SUCCESS(res, res);
   res = inRange->SetEnd(endNode, endOffset);
--- a/editor/libeditor/html/nsWSRunObject.cpp
+++ b/editor/libeditor/html/nsWSRunObject.cpp
@@ -111,19 +111,18 @@ nsWSRunObject::PrepareToDeleteRange(nsHT
 }
 
 nsresult 
 nsWSRunObject::PrepareToDeleteNode(nsHTMLEditor *aHTMLEd, 
                                    nsIDOMNode *aNode)
 {
   NS_ENSURE_TRUE(aNode && aHTMLEd, NS_ERROR_NULL_POINTER);
   
-  nsCOMPtr<nsIDOMNode> parent;
   PRInt32 offset;
-  aHTMLEd->GetNodeLocation(aNode, address_of(parent), &offset);
+  nsCOMPtr<nsIDOMNode> parent = aHTMLEd->GetNodeLocation(aNode, &offset);
   
   nsWSRunObject leftWSObj(aHTMLEd, parent, offset);
   nsWSRunObject rightWSObj(aHTMLEd, parent, offset+1);
 
   return leftWSObj.PrepareToDeleteRangePriv(&rightWSObj);
 }
 
 nsresult 
--- a/editor/libeditor/text/nsPlaintextDataTransfer.cpp
+++ b/editor/libeditor/text/nsPlaintextDataTransfer.cpp
@@ -223,18 +223,17 @@ nsresult nsPlaintextEditor::InsertFromDr
     // subtree so make sure the content we insert goes before
     // the root of the subtree.
     //
     // XXX: Note that inserting before the subtree matches the
     //      current behavior when dropping on top of an image.
     //      The decision for dropping before or after the
     //      subtree should really be done based on coordinates.
 
-    GetNodeLocation(userSelectNode, address_of(newSelectionParent),
-                    &newSelectionOffset);
+    newSelectionParent = GetNodeLocation(userSelectNode, &newSelectionOffset);
 
     NS_ENSURE_TRUE(newSelectionParent, NS_ERROR_FAILURE);
   }
 
   // Check if mouse is in the selection
   // if so, jump through some hoops to determine if mouse is over selection (bail)
   // and whether user wants to copy selection or delete it
   if (!isCollapsed)
--- a/editor/libeditor/text/nsPlaintextEditor.cpp
+++ b/editor/libeditor/text/nsPlaintextEditor.cpp
@@ -422,37 +422,36 @@ nsPlaintextEditor::CreateBRImpl(nsCOMPtr
   // we need to insert a br.  unfortunately, we may have to split a text node to do it.
   nsCOMPtr<nsIDOMNode> node = *aInOutParent;
   PRInt32 theOffset = *aInOutOffset;
   nsCOMPtr<nsIDOMCharacterData> nodeAsText = do_QueryInterface(node);
   NS_NAMED_LITERAL_STRING(brType, "br");
   nsCOMPtr<nsIDOMNode> brNode;
   if (nodeAsText)  
   {
-    nsCOMPtr<nsIDOMNode> tmp;
     PRInt32 offset;
     PRUint32 len;
     nodeAsText->GetLength(&len);
-    GetNodeLocation(node, address_of(tmp), &offset);
+    nsCOMPtr<nsIDOMNode> tmp = GetNodeLocation(node, &offset);
     NS_ENSURE_TRUE(tmp, NS_ERROR_FAILURE);
     if (!theOffset)
     {
       // we are already set to go
     }
     else if (theOffset == (PRInt32)len)
     {
       // update offset to point AFTER the text node
       offset++;
     }
     else
     {
       // split the text node
       res = SplitNode(node, theOffset, getter_AddRefs(tmp));
       NS_ENSURE_SUCCESS(res, res);
-      GetNodeLocation(node, address_of(tmp), &offset);
+      tmp = GetNodeLocation(node, &offset);
     }
     // create br
     res = CreateNode(brType, tmp, offset, getter_AddRefs(brNode));
     NS_ENSURE_SUCCESS(res, res);
     *aInOutParent = tmp;
     *aInOutOffset = offset+1;
   }
   else
@@ -460,19 +459,18 @@ nsPlaintextEditor::CreateBRImpl(nsCOMPtr
     res = CreateNode(brType, node, theOffset, getter_AddRefs(brNode));
     NS_ENSURE_SUCCESS(res, res);
     (*aInOutOffset)++;
   }
 
   *outBRNode = brNode;
   if (*outBRNode && (aSelect != eNone))
   {
-    nsCOMPtr<nsIDOMNode> parent;
     PRInt32 offset;
-    GetNodeLocation(*outBRNode, address_of(parent), &offset);
+    nsCOMPtr<nsIDOMNode> parent = GetNodeLocation(*outBRNode, &offset);
 
     nsCOMPtr<nsISelection> selection;
     res = GetSelection(getter_AddRefs(selection));
     NS_ENSURE_SUCCESS(res, res);
     nsCOMPtr<nsISelectionPrivate> selPriv(do_QueryInterface(selection));
     if (aSelect == eNext)
     {
       // position selection after br
@@ -519,17 +517,17 @@ nsPlaintextEditor::InsertBR(nsCOMPtr<nsI
   PRInt32 selOffset;
   res = GetStartNodeAndOffset(selection, getter_AddRefs(selNode), &selOffset);
   NS_ENSURE_SUCCESS(res, res);
   
   res = CreateBR(selNode, selOffset, outBRNode);
   NS_ENSURE_SUCCESS(res, res);
     
   // position selection after br
-  GetNodeLocation(*outBRNode, address_of(selNode), &selOffset);
+  selNode = GetNodeLocation(*outBRNode, &selOffset);
   nsCOMPtr<nsISelectionPrivate> selPriv(do_QueryInterface(selection));
   selPriv->SetInterlinePosition(true);
   return selection->Collapse(selNode, selOffset+1);
 }
 
 nsresult
 nsPlaintextEditor::ExtendSelectionForDelete(nsISelection *aSelection,
                                             nsIEditor::EDirection *aAction)
@@ -1560,19 +1558,18 @@ nsPlaintextEditor::SelectEntireDocument(
   PRInt32 selOffset;
   nsCOMPtr<nsIDOMNode> selNode;
   rv = GetEndNodeAndOffset(aSelection, getter_AddRefs(selNode), &selOffset);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIDOMNode> childNode = GetChildAt(selNode, selOffset - 1);
 
   if (childNode && nsTextEditUtils::IsMozBR(childNode)) {
-    nsCOMPtr<nsIDOMNode> parentNode;
     PRInt32 parentOffset;
-    GetNodeLocation(childNode, address_of(parentNode), &parentOffset);
+    nsCOMPtr<nsIDOMNode> parentNode = GetNodeLocation(childNode, &parentOffset);
 
     return aSelection->Extend(parentNode, parentOffset);
   }
 
   return NS_OK;
 }
 
 already_AddRefed<nsIDOMEventTarget>
--- a/editor/libeditor/text/nsTextEditRules.cpp
+++ b/editor/libeditor/text/nsTextEditRules.cpp
@@ -412,19 +412,18 @@ nsTextEditRules::CollapseSelectionToTrai
   PRUint32 length;
   res = nodeAsText->GetLength(&length);
   NS_ENSURE_SUCCESS(res, res);
 
   // nothing to do if we're not at the end of the text node
   if (selOffset != PRInt32(length))
     return NS_OK;
 
-  nsCOMPtr<nsIDOMNode> parentNode;
   PRInt32 parentOffset;
-  nsEditor::GetNodeLocation(selNode, address_of(parentNode), &parentOffset);
+  nsCOMPtr<nsIDOMNode> parentNode = nsEditor::GetNodeLocation(selNode, &parentOffset);
 
   nsCOMPtr<nsIDOMNode> root = do_QueryInterface(mEditor->GetRoot());
   NS_ENSURE_TRUE(root, NS_ERROR_NULL_POINTER);
   if (parentNode != root) return NS_OK;
 
   nsCOMPtr<nsIDOMNode> nextNode = mEditor->GetChildAt(parentNode,
                                                       parentOffset + 1);
   if (nextNode && nsTextEditUtils::IsMozBR(nextNode))
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -134,16 +134,18 @@ nsIFrame*
 NS_NewHTMLVideoFrame (nsIPresShell* aPresShell, nsStyleContext* aContext);
 #endif
 
 #include "nsSVGTextContainerFrame.h"
 
 nsIFrame*
 NS_NewSVGOuterSVGFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 nsIFrame*
+NS_NewSVGOuterSVGAnonChildFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
+nsIFrame*
 NS_NewSVGInnerSVGFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 nsIFrame*
 NS_NewSVGPathGeometryFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 nsIFrame*
 NS_NewSVGGFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 nsIFrame*
 NS_NewSVGGenericContainerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 nsIFrame*
@@ -2402,35 +2404,40 @@ nsCSSFrameConstructor::ConstructDocEleme
                         contentFrame);
     *aNewFrame = contentFrame;
     processChildren = true;
   }
   else
 #endif
   if (aDocElement->IsSVG()) {
     if (aDocElement->Tag() == nsGkAtoms::svg) {
-      contentFrame = NS_NewSVGOuterSVGFrame(mPresShell, styleContext);
-      if (NS_UNLIKELY(!contentFrame)) {
-        return NS_ERROR_OUT_OF_MEMORY;
-      }
-      InitAndRestoreFrame(state, aDocElement,
-                          state.GetGeometricParent(display,
-                                                   mDocElementContainingBlock),
-                          nsnull, contentFrame);
-
-      // AddChild takes care of transforming the frame tree for fixed-pos
-      // or abs-pos situations
+      // We're going to call the right function ourselves, so no need to give a
+      // function to this FrameConstructionData.
+
+      // XXXbz on the other hand, if we converted this whole function to
+      // FrameConstructionData/Item, then we'd need the right function
+      // here... but would probably be able to get away with less code in this
+      // function in general.
+      // Use a null PendingBinding, since our binding is not in fact pending.
+      static const FrameConstructionData rootSVGData = FCDATA_DECL(0, nsnull);
+      nsRefPtr<nsStyleContext> extraRef(styleContext);
+      FrameConstructionItem item(&rootSVGData, aDocElement,
+                                 aDocElement->Tag(), kNameSpaceID_SVG,
+                                 nsnull, extraRef.forget(), true);
+
       nsFrameItems frameItems;
-      rv = state.AddChild(contentFrame, frameItems, aDocElement,
-                          styleContext, mDocElementContainingBlock);
-      if (NS_FAILED(rv) || frameItems.IsEmpty()) {
+      rv = ConstructOuterSVG(state, item, mDocElementContainingBlock,
+                             styleContext->GetStyleDisplay(),
+                             frameItems, &contentFrame);
+      if (NS_FAILED(rv))
         return rv;
-      }
+      if (!contentFrame || frameItems.IsEmpty())
+        return NS_ERROR_FAILURE;
       *aNewFrame = frameItems.FirstChild();
-      processChildren = true;
+      NS_ASSERTION(frameItems.OnlyChild(), "multiple root element frames");
     } else {
       return NS_ERROR_FAILURE;
     }
   } else {
     bool docElemIsTable = (display->mDisplay == NS_STYLE_DISPLAY_TABLE);
     if (docElemIsTable) {
       // We're going to call the right function ourselves, so no need to give a
       // function to this FrameConstructionData.
@@ -2493,18 +2500,19 @@ nsCSSFrameConstructor::ConstructDocEleme
   if (!isChild) {
     mRootElementStyleFrame = mRootElementFrame;
   }
 
   if (processChildren) {
     // Still need to process the child content
     nsFrameItems childItems;
 
-    NS_ASSERTION(!nsLayoutUtils::GetAsBlock(contentFrame),
-                 "Only XUL and SVG frames should reach here");
+    NS_ASSERTION(!nsLayoutUtils::GetAsBlock(contentFrame) &&
+                 !contentFrame->IsFrameOfType(nsIFrame::eSVG),
+                 "Only XUL frames should reach here");
     // Use a null PendingBinding, since our binding is not in fact pending.
     ProcessChildren(state, aDocElement, styleContext, contentFrame, true,
                     childItems, false, nsnull);
 
     // Set the initial child lists
     contentFrame->SetInitialChildList(kPrincipalList, childItems);
   }
 
@@ -4697,16 +4705,92 @@ nsCSSFrameConstructor::FindMathMLData(El
     SIMPLE_MATHML_CREATE(menclose_, NS_NewMathMLmencloseFrame),
     SIMPLE_MATHML_CREATE(semantics_, NS_NewMathMLsemanticsFrame)
   };
 
   return FindDataByTag(aTag, aElement, aStyleContext, sMathMLData,
                        ArrayLength(sMathMLData));
 }
 
+
+// Construct an nsSVGOuterSVGFrame, the anonymous child that wraps its real
+// children, and its descendant frames.
+nsresult
+nsCSSFrameConstructor::ConstructOuterSVG(nsFrameConstructorState& aState,
+                                         FrameConstructionItem&   aItem,
+                                         nsIFrame*                aParentFrame,
+                                         const nsStyleDisplay*    aDisplay,
+                                         nsFrameItems&            aFrameItems,
+                                         nsIFrame**               aNewFrame)
+{
+  nsIContent* const content = aItem.mContent;
+  nsStyleContext* const styleContext = aItem.mStyleContext;
+
+  nsresult rv = NS_OK;
+
+  // Create the nsSVGOuterSVGFrame:
+  nsIFrame* newFrame = NS_NewSVGOuterSVGFrame(mPresShell, styleContext);
+
+  nsIFrame* geometricParent =
+    aState.GetGeometricParent(styleContext->GetStyleDisplay(),
+                              aParentFrame);
+
+  InitAndRestoreFrame(aState, content, geometricParent, nsnull, newFrame);
+
+  // Create the pseudo SC for the anonymous wrapper child as a child of the SC:
+  nsRefPtr<nsStyleContext> scForAnon;
+  scForAnon = mPresShell->StyleSet()->
+    ResolveAnonymousBoxStyle(nsCSSAnonBoxes::mozSVGOuterSVGAnonChild,
+                             styleContext);
+
+  // Create the anonymous inner wrapper frame
+  nsIFrame* innerFrame = NS_NewSVGOuterSVGAnonChildFrame(mPresShell, scForAnon);
+
+  if (!innerFrame) {
+    newFrame->Destroy();
+    return NS_ERROR_OUT_OF_MEMORY;
+  }
+
+  InitAndRestoreFrame(aState, content, newFrame, nsnull, innerFrame);
+
+  // Put the newly created frames into the right child list
+  SetInitialSingleChild(newFrame, innerFrame);
+
+  rv = aState.AddChild(newFrame, aFrameItems, content, styleContext,
+                       aParentFrame);
+  if (NS_FAILED(rv)) {
+    return rv;
+  }
+
+  if (!mRootElementFrame) {
+    // The frame we're constructing will be the root element frame.
+    // Set mRootElementFrame before processing children.
+    mRootElementFrame = newFrame;
+  }
+
+  nsFrameItems childItems;
+
+  // Process children
+  if (aItem.mFCData->mBits & FCDATA_USE_CHILD_ITEMS) {
+    rv = ConstructFramesFromItemList(aState, aItem.mChildItems,
+                                     innerFrame, childItems);
+  } else {
+    rv = ProcessChildren(aState, content, styleContext, innerFrame,
+                         true, childItems, false, aItem.mPendingBinding);
+  }
+  // XXXbz what about cleaning up?
+  if (NS_FAILED(rv)) return rv;
+
+  // Set the inner wrapper frame's initial primary list
+  innerFrame->SetInitialChildList(kPrincipalList, childItems);
+
+  *aNewFrame = newFrame;
+  return rv;
+}
+
 // Only outer <svg> elements can be floated or positioned.  All other SVG
 // should be in-flow.
 #define SIMPLE_SVG_FCDATA(_func)                                        \
   FCDATA_DECL(FCDATA_DISALLOW_OUT_OF_FLOW |                             \
               FCDATA_SKIP_ABSPOS_PUSH |                                 \
               FCDATA_DISALLOW_GENERATED_CONTENT,  _func)
 #define SIMPLE_SVG_CREATE(_tag, _func)            \
   { &nsGkAtoms::_tag, SIMPLE_SVG_FCDATA(_func) }
@@ -4784,18 +4868,17 @@ nsCSSFrameConstructor::FindSVGData(Eleme
   if (aTag == nsGkAtoms::svg && !parentIsSVG) {
     // We need outer <svg> elements to have an nsSVGOuterSVGFrame regardless
     // of whether they fail conditional processing attributes, since various
     // SVG frames assume that one exists.  We handle the non-rendering
     // of failing outer <svg> element contents like <switch> statements,
     // and do the PassesConditionalProcessingTests call in
     // nsSVGOuterSVGFrame::Init.
     static const FrameConstructionData sOuterSVGData =
-      FCDATA_DECL(FCDATA_SKIP_ABSPOS_PUSH | FCDATA_DISALLOW_GENERATED_CONTENT,
-                  NS_NewSVGOuterSVGFrame);
+      FULL_CTOR_FCDATA(0, &nsCSSFrameConstructor::ConstructOuterSVG);
     return &sOuterSVGData;
   }
   
   nsCOMPtr<DOMSVGTests> tests(do_QueryInterface(aElement));
   if (tests && !tests->PassesConditionalProcessingTests()) {
     // Elements with failing conditional processing attributes never get
     // rendered.  Note that this is not where we select which frame in a
     // <switch> to render!  That happens in nsSVGSwitchFrame::PaintSVG.
--- a/layout/base/nsCSSFrameConstructor.h
+++ b/layout/base/nsCSSFrameConstructor.h
@@ -1346,16 +1346,28 @@ private:
   // we know for sure that the content is not something that should get a frame
   // constructed by tag.
   static const FrameConstructionData*
     FindXULDisplayData(const nsStyleDisplay* aDisplay,
                        Element* aElement,
                        nsStyleContext* aStyleContext);
 
 // SVG - rods
+  /**
+   * Construct an nsSVGOuterSVGFrame, the anonymous child that wraps its real
+   * children, and its descendant frames.  This is the FrameConstructionData
+   * callback used for the job.
+   */
+  nsresult ConstructOuterSVG(nsFrameConstructorState& aState,
+                             FrameConstructionItem&   aItem,
+                             nsIFrame*                aParentFrame,
+                             const nsStyleDisplay*    aDisplay,
+                             nsFrameItems&            aFrameItems,
+                             nsIFrame**               aNewFrame);
+
   static const FrameConstructionData* FindSVGData(Element* aElement,
                                                   nsIAtom* aTag,
                                                   PRInt32 aNameSpaceID,
                                                   nsIFrame* aParentFrame,
                                                   nsStyleContext* aStyleContext);
 
   /* Not static because it does PropagateScrollToViewport.  If this
      changes, make this static */
--- a/layout/base/tests/test_bug731777.html
+++ b/layout/base/tests/test_bug731777.html
@@ -20,17 +20,17 @@
   #inner {
       margin: 0px;
       width: 480px;
       border: 2px solid blue;
       height: 220px;
       background-color: #844BCA;
       
       -moz-transform: rotateY(91deg) translateX(0px) translateZ(0px);
-      -moz-transition: 5s;
+      transition: 5s;
   }
     
   </style>
 </head>
 <body>
 <div id="container">
   <div id="inner"></div>
 </div>
--- a/layout/generic/nsFrameIdList.h
+++ b/layout/generic/nsFrameIdList.h
@@ -142,16 +142,17 @@ FRAME_ID(nsSVGGFrame)
 FRAME_ID(nsSVGGlyphFrame)
 FRAME_ID(nsSVGGradientFrame)
 FRAME_ID(nsSVGImageFrame)
 FRAME_ID(nsSVGInnerSVGFrame)
 FRAME_ID(nsSVGLinearGradientFrame)
 FRAME_ID(nsSVGMarkerFrame)
 FRAME_ID(nsSVGMaskFrame)
 FRAME_ID(nsSVGOuterSVGFrame)
+FRAME_ID(nsSVGOuterSVGAnonChildFrame)
 FRAME_ID(nsSVGPaintServerFrame)
 FRAME_ID(nsSVGPathGeometryFrame)
 FRAME_ID(nsSVGPatternFrame)
 FRAME_ID(nsSVGRadialGradientFrame)
 FRAME_ID(nsSVGStopFrame)
 FRAME_ID(nsSVGSwitchFrame)
 FRAME_ID(nsSVGTextContainerFrame)
 FRAME_ID(nsSVGTextFrame)
--- a/layout/generic/nsHTMLReflowState.cpp
+++ b/layout/generic/nsHTMLReflowState.cpp
@@ -591,17 +591,16 @@ nsHTMLReflowState::InitFrameType(nsIAtom
 {
   const nsStyleDisplay *disp = mStyleDisplay;
   nsCSSFrameType frameType;
 
   // Section 9.7 of the CSS2 spec indicates that absolute position
   // takes precedence over float which takes precedence over display.
   // XXXldb nsRuleNode::ComputeDisplayData should take care of this, right?
   // Make sure the frame was actually moved out of the flow, and don't
-
   // just assume what the style says, because we might not have had a
   // useful float/absolute containing block
 
   DISPLAY_INIT_TYPE(frame, this);
 
   if (aFrameType == nsGkAtoms::tableFrame) {
     mFrameType = NS_CSS_FRAME_TYPE_BLOCK;
     return;
@@ -1637,16 +1636,17 @@ CalcQuirkContainingBlockHeight(const nsH
       result -= GetVerticalMarginBorderPadding(secondAncestorRS);
     }
     break;
   }
 
   // Make sure not to return a negative height here!
   return NS_MAX(result, 0);
 }
+
 // Called by InitConstraints() to compute the containing block rectangle for
 // the element. Handles the special logic for absolutely positioned elements
 void
 nsHTMLReflowState::ComputeContainingBlockRectangle(nsPresContext*          aPresContext,
                                                    const nsHTMLReflowState* aContainingBlockRS,
                                                    nscoord&                 aContainingBlockWidth,
                                                    nscoord&                 aContainingBlockHeight)
 {
@@ -1667,17 +1667,17 @@ nsHTMLReflowState::ComputeContainingBloc
       // completely bogus (eg initial reflow), this code shouldn't even be
       // called, since the code in nsInlineFrame::Reflow will pass in
       // the containing block dimensions to our constructor.
       // XXXbz we should be taking the in-flows into account too, but
       // that's very hard.
       nsMargin computedBorder = aContainingBlockRS->mComputedBorderPadding -
         aContainingBlockRS->mComputedPadding;
       aContainingBlockWidth = aContainingBlockRS->frame->GetRect().width -
-        computedBorder.LeftRight();;
+        computedBorder.LeftRight();
       NS_ASSERTION(aContainingBlockWidth >= 0,
                    "Negative containing block width!");
       aContainingBlockHeight = aContainingBlockRS->frame->GetRect().height -
         computedBorder.TopBottom();
       NS_ASSERTION(aContainingBlockHeight >= 0,
                    "Negative containing block height!");
     } else {
       // If the ancestor is block-level, the containing block is formed by the
--- a/layout/generic/nsIFrame.h
+++ b/layout/generic/nsIFrame.h
@@ -896,17 +896,17 @@ public:
   NS_DECLARE_FRAME_PROPERTY(OutlineInnerRectProperty, DestroyRect)
   NS_DECLARE_FRAME_PROPERTY(PreEffectsBBoxProperty, DestroyRect)
   NS_DECLARE_FRAME_PROPERTY(PreTransformOverflowAreasProperty,
                             DestroyOverflowAreas)
 
   // The initial overflow area passed to FinishAndStoreOverflow. This is only set
   // on frames that Preserve3D(), and when at least one of the overflow areas
   // differs from the frame bound rect.
-  NS_DECLARE_FRAME_PROPERTY(InitialOverflowProperty, DestroyOverflowAreas);
+  NS_DECLARE_FRAME_PROPERTY(InitialOverflowProperty, DestroyOverflowAreas)
 
   NS_DECLARE_FRAME_PROPERTY(UsedMarginProperty, DestroyMargin)
   NS_DECLARE_FRAME_PROPERTY(UsedPaddingProperty, DestroyMargin)
   NS_DECLARE_FRAME_PROPERTY(UsedBorderProperty, DestroyMargin)
 
   NS_DECLARE_FRAME_PROPERTY(ScrollLayerCount, nsnull)
 
   NS_DECLARE_FRAME_PROPERTY(LineBaselineOffset, nsnull)
@@ -2970,17 +2970,17 @@ protected:
 
   /**
    * Search for the first paragraph boundary before or after the given position
    * @param  aPos See description in nsFrameSelection.h. The following fields are
    *              used by this method: 
    *              Input: mDirection
    *              Output: mResultContent, mContentOffset
    */
-   nsresult PeekOffsetParagraph(nsPeekOffsetStruct *aPos);
+  nsresult PeekOffsetParagraph(nsPeekOffsetStruct *aPos);
 
 private:
   nsOverflowAreas* GetOverflowAreasProperty();
   nsRect GetVisualOverflowFromDeltas() const {
     NS_ABORT_IF_FALSE(mOverflow.mType != NS_FRAME_OVERFLOW_LARGE,
                       "should not be called when overflow is in a property");
     // Calculate the rect using deltas from the frame's border rect.
     // Note that the mOverflow.mDeltas fields are unsigned, but we will often
--- a/layout/generic/nsTextFrame.h
+++ b/layout/generic/nsTextFrame.h
@@ -391,17 +391,17 @@ public:
   }
 
   // Get the DOM content range mapped by this frame after excluding
   // whitespace subject to start-of-line and end-of-line trimming.
   // The textrun must have been created before calling this.
   struct TrimmedOffsets {
     PRInt32 mStart;
     PRInt32 mLength;
-    PRInt32 GetEnd() { return mStart + mLength; }
+    PRInt32 GetEnd() const { return mStart + mLength; }
   };
   TrimmedOffsets GetTrimmedOffsets(const nsTextFragment* aFrag,
                                    bool aTrimAfter);
 
   // Similar to Reflow(), but for use from nsLineLayout
   void ReflowText(nsLineLayout& aLineLayout, nscoord aAvailableWidth,
                   nsRenderingContext* aRenderingContext, bool aShouldBlink,
                   nsHTMLReflowMetrics& aMetrics, nsReflowStatus& aStatus);
--- a/layout/generic/nsTextFrameThebes.cpp
+++ b/layout/generic/nsTextFrameThebes.cpp
@@ -5344,32 +5344,32 @@ nsTextFrame::PaintTextWithSelection(gfxC
   return true;
 }
 
 nscolor
 nsTextFrame::GetCaretColorAt(PRInt32 aOffset)
 {
   NS_PRECONDITION(aOffset >= 0, "aOffset must be positive");
 
+  nscolor result = nsFrame::GetCaretColorAt(aOffset);
   gfxSkipCharsIterator iter = EnsureTextRun(nsTextFrame::eInflated);
   PropertyProvider provider(this, iter, nsTextFrame::eInflated);
   PRInt32 contentOffset = provider.GetStart().GetOriginalOffset();
   PRInt32 contentLength = provider.GetOriginalLength();
   NS_PRECONDITION(aOffset >= contentOffset &&
                   aOffset <= contentOffset + contentLength,
                   "aOffset must be in the frame's range");
   PRInt32 offsetInFrame = aOffset - contentOffset;
   if (offsetInFrame < 0 || offsetInFrame >= contentLength) {
-    return nsFrame::GetCaretColorAt(aOffset);
+    return result;
   }
 
   nsTextPaintStyle textPaintStyle(this);
   SelectionDetails* details = GetSelectionDetails();
   SelectionDetails* sdptr = details;
-  nscolor result = nsFrame::GetCaretColorAt(aOffset);
   SelectionType type = 0;
   while (sdptr) {
     PRInt32 start = NS_MAX(0, sdptr->mStart - contentOffset);
     PRInt32 end = NS_MIN(contentLength, sdptr->mEnd - contentOffset);
     if (start <= offsetInFrame && offsetInFrame < end &&
         (type == 0 || sdptr->mType < type)) {
       nscolor foreground, background;
       if (GetSelectionTextColors(sdptr->mType, textPaintStyle,
--- a/layout/reftests/css-transitions/transitions-inline-already-wrapped-1.html
+++ b/layout/reftests/css-transitions/transitions-inline-already-wrapped-1.html
@@ -1,12 +1,12 @@
 <html class="reftest-wait">
 <title>Test for CSS transitions and re-wrapping of inlines</title>
 <style type="text/css">
-#test { -moz-transition: 5s color linear 200s; }
+#test { transition: 5s color linear 200s; }
 </style>
 <script type="text/javascript">
 
 window.onload = run;
 
 function run() {
   var test = document.getElementById("test");
   var unused = test.offsetWidth;
--- a/layout/reftests/css-transitions/transitions-inline-already-wrapped-2.html
+++ b/layout/reftests/css-transitions/transitions-inline-already-wrapped-2.html
@@ -1,12 +1,12 @@
 <html class="reftest-wait">
 <title>Test for CSS transitions and re-wrapping of inlines</title>
 <style type="text/css">
-#test { -moz-transition: 20ms color linear 0; }
+#test { transition: 20ms color linear 0; }
 </style>
 <script type="text/javascript">
 
 window.onload = run;
 
 function run() {
   var test = document.getElementById("test");
   var unused = test.offsetWidth;
--- a/layout/reftests/css-transitions/transitions-inline-rewrap-1.html
+++ b/layout/reftests/css-transitions/transitions-inline-rewrap-1.html
@@ -1,12 +1,12 @@
 <html class="reftest-wait">
 <title>Test for CSS transitions and re-wrapping of inlines</title>
 <style type="text/css">
-#test { -moz-transition: 5s color linear 200s; }
+#test { transition: 5s color linear 200s; }
 </style>
 <script type="text/javascript">
 
 window.onload = run;
 
 function run() {
   var test = document.getElementById("test");
   var unused = test.offsetWidth;
--- a/layout/reftests/css-transitions/transitions-inline-rewrap-2.html
+++ b/layout/reftests/css-transitions/transitions-inline-rewrap-2.html
@@ -1,12 +1,12 @@
 <html class="reftest-wait">
 <title>Test for CSS transitions and re-wrapping of inlines</title>
 <style type="text/css">
-#test { -moz-transition: 20ms color linear 0; }
+#test { transition: 20ms color linear 0; }
 </style>
 <script type="text/javascript">
 
 window.onload = run;
 
 function run() {
   var test = document.getElementById("test");
   var unused = test.offsetWidth;
--- a/layout/reftests/svg/sizing/reftest.list
+++ b/layout/reftests/svg/sizing/reftest.list
@@ -6,16 +6,18 @@
 #
 # SVG's <svg> element is a "replaced element". The main specification texts
 # covering how the <svg> element is sized are:
 #
 #   http://www.w3.org/TR/SVGMobile12/coords.html#InitialViewport
 #   http://www.w3.org/TR/SVGMobile12/coords.html#IntrinsicSizing
 #   http://www.w3.org/TR/CSS21/visudet.html
 
+!= scrollbars-01.svg scrollbars-01-anti-ref.svg
+!= scrollbars-02.svg scrollbars-01-anti-ref.svg
 
 # Standalone tests
 #
 # To get reasonable test coverage of the implementation of the replaced element
 # algorythm we test all permutations of the CSS 'width' and 'height' properties
 # having the values zero, auto, a px value or a percentage value, and of the
 # intrinsic width and height (the 'width' and 'height' attributes) having the
 # values zero, a px value or a percentage value. This gives us 4*4*3*3 == 144
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/sizing/scrollbars-01-anti-ref.svg
@@ -0,0 +1,11 @@
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
+
+  <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=771935 -->
+
+  <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/sizing/scrollbars-01.svg
@@ -0,0 +1,13 @@
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="101%">
+
+  <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=771935 -->
+
+  <title>Test that we're given scrollbars if wider than the browser's content area</title>
+
+  <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/sizing/scrollbars-02.svg
@@ -0,0 +1,13 @@
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="101%">
+
+  <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=771935 -->
+
+  <title>Test that we're given scrollbars if wider than the browser's content area</title>
+
+  <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
--- a/layout/style/crashtests/605689-1.html
+++ b/layout/style/crashtests/605689-1.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <script>
 
 function boom()
 {
   var r = document.documentElement;
   r.style.display = "table-cell";
-  r.style.MozTransitionProperty = "x";
-  window.getComputedStyle(r).MozTransitionProperty;
+  r.style.transitionProperty = "x";
+  window.getComputedStyle(r).transitionProperty;
 }
 
 </script>
 <body onload="boom();"></body>
--- a/layout/style/crashtests/729126-1.html
+++ b/layout/style/crashtests/729126-1.html
@@ -1,10 +1,10 @@
 <!DOCTYPE html>
 <html>
-<body style="-moz-transition-duration: 1ms"></body>
+<body style="transition-duration: 1ms"></body>
 <script>
 var body = document.body;
 /* flush */ getComputedStyle(body, "").background;
 body.style.background = 'url(none.png), repeat';
 /* flush */ getComputedStyle(body, "").background;
 </script>
 </html>
--- a/layout/style/crashtests/729126-2.html
+++ b/layout/style/crashtests/729126-2.html
@@ -1,10 +1,10 @@
 <!DOCTYPE html>
 <html>
-<body style="background-size: cover; -moz-transition-duration: 1ms"></body>
+<body style="background-size: cover; transition-duration: 1ms"></body>
 <script>
 var body = document.body;
 /* flush */ getComputedStyle(body, "").backgroundSize;
 body.style.backgroundSize = 'contain';
 /* flush */ getComputedStyle(body, "").backgroundSize;
 </script>
 </html>
--- a/layout/style/nsCSSAnonBoxList.h
+++ b/layout/style/nsCSSAnonBoxList.h
@@ -76,9 +76,10 @@ CSS_ANON_BOX(moztreeline, ":-moz-tree-li
 CSS_ANON_BOX(moztreetwisty, ":-moz-tree-twisty")
 CSS_ANON_BOX(moztreeimage, ":-moz-tree-image")
 CSS_ANON_BOX(moztreecelltext, ":-moz-tree-cell-text")
 CSS_ANON_BOX(moztreecheckbox, ":-moz-tree-checkbox")
 CSS_ANON_BOX(moztreeprogressmeter, ":-moz-tree-progressmeter")
 CSS_ANON_BOX(moztreedropfeedback, ":-moz-tree-drop-feedback")
 #endif
 
+CSS_ANON_BOX(mozSVGOuterSVGAnonChild, ":-moz-svg-outer-svg-anon-child")
 CSS_ANON_BOX(mozSVGForeignContent, ":-moz-svg-foreign-content")
--- a/layout/style/nsCSSParser.cpp
+++ b/layout/style/nsCSSParser.cpp
@@ -1493,17 +1493,18 @@ CSSParserImpl::ParseAtRule(RuleAppendFun
   } else if (mToken.mIdent.LowerCaseEqualsLiteral("font-face")) {
     parseFunc = &CSSParserImpl::ParseFontFaceRule;
     newSection = eCSSSection_General;
 
   } else if (mToken.mIdent.LowerCaseEqualsLiteral("page")) {
     parseFunc = &CSSParserImpl::ParsePageRule;
     newSection = eCSSSection_General;
 
-  } else if (mToken.mIdent.LowerCaseEqualsLiteral("-moz-keyframes")) {
+  } else if (mToken.mIdent.LowerCaseEqualsLiteral("-moz-keyframes") ||
+             mToken.mIdent.LowerCaseEqualsLiteral("keyframes")) {
     parseFunc = &CSSParserImpl::ParseKeyframesRule;
     newSection = eCSSSection_General;
 
   } else {
     if (!NonMozillaVendorIdentifier(mToken.mIdent)) {
       REPORT_UNEXPECTED_TOKEN(PEUnknownAtRule);
       OUTPUT_ERROR();
     }
--- a/layout/style/nsCSSPropAliasList.h
+++ b/layout/style/nsCSSPropAliasList.h
@@ -37,8 +37,22 @@
 
 CSS_PROP_ALIAS(-moz-transform, transform, MozTransform, "")
 CSS_PROP_ALIAS(-moz-transform-origin, transform_origin, MozTransformOrigin, "")
 CSS_PROP_ALIAS(-moz-perspective-origin, perspective_origin, MozPerspectiveOrigin, "")
 CSS_PROP_ALIAS(-moz-perspective, perspective, MozPerspective, "")
 CSS_PROP_ALIAS(-moz-transform-style, transform_style, MozTransformStyle, "")
 CSS_PROP_ALIAS(-moz-backface-visibility, backface_visibility, MozBackfaceVisibility, "")
 CSS_PROP_ALIAS(-moz-border-image, border_image, MozBorderImage, "")
+CSS_PROP_ALIAS(-moz-transition, transition, MozTransition, "")
+CSS_PROP_ALIAS(-moz-transition-delay, transition_delay, MozTransitionDelay, "")
+CSS_PROP_ALIAS(-moz-transition-duration, transition_duration, MozTransitionDuration, "")
+CSS_PROP_ALIAS(-moz-transition-property, transition_property, MozTransitionProperty, "")
+CSS_PROP_ALIAS(-moz-transition-timing-function, transition_timing_function, MozTransitionTimingFunction, "")
+CSS_PROP_ALIAS(-moz-animation, animation, MozAnimation, "")
+CSS_PROP_ALIAS(-moz-animation-delay, animation_delay, MozAnimationDelay, "")
+CSS_PROP_ALIAS(-moz-animation-direction, animation_direction, MozAnimationDirection, "")
+CSS_PROP_ALIAS(-moz-animation-duration, animation_duration, MozAnimationDuration, "")
+CSS_PROP_ALIAS(-moz-animation-fill-mode, animation_fill_mode, MozAnimationFillMode, "")
+CSS_PROP_ALIAS(-moz-animation-iteration-count, animation_iteration_count, MozAnimationIterationCount, "")
+CSS_PROP_ALIAS(-moz-animation-name, animation_name, MozAnimationName, "")
+CSS_PROP_ALIAS(-moz-animation-play-state, animation_play_state, MozAnimationPlayState, "")
+CSS_PROP_ALIAS(-moz-animation-timing-function, animation_timing_function, MozAnimationTimingFunction, "")
--- a/layout/style/nsCSSPropList.h
+++ b/layout/style/nsCSSPropList.h
@@ -343,107 +343,107 @@ CSS_PROP_FONT(
         CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE,
     "",
     0,
     kFontKTable,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 #endif
 CSS_PROP_SHORTHAND(
-    -moz-animation,
+    animation,
     animation,
-    CSS_PROP_DOMPROP_PREFIXED(Animation),
+    Animation,
     CSS_PROPERTY_PARSE_FUNCTION,
     "")
 CSS_PROP_DISPLAY(
-    -moz-animation-delay,
+    animation-delay,
     animation_delay,
-    CSS_PROP_DOMPROP_PREFIXED(AnimationDelay),
+    AnimationDelay,
     CSS_PROPERTY_PARSE_VALUE_LIST |
         CSS_PROPERTY_VALUE_LIST_USES_COMMAS,
     "",
     VARIANT_TIME, // used by list parsing
     nsnull,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 CSS_PROP_DISPLAY(
-    -moz-animation-direction,
+    animation-direction,
     animation_direction,
-    CSS_PROP_DOMPROP_PREFIXED(AnimationDirection),
+    AnimationDirection,
     CSS_PROPERTY_PARSE_VALUE_LIST |
         CSS_PROPERTY_VALUE_LIST_USES_COMMAS,
     "",
     VARIANT_KEYWORD, // used by list parsing
     kAnimationDirectionKTable,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 CSS_PROP_DISPLAY(
-    -moz-animation-duration,
+    animation-duration,
     animation_duration,
-    CSS_PROP_DOMPROP_PREFIXED(AnimationDuration),
+    AnimationDuration,
     CSS_PROPERTY_PARSE_VALUE_LIST |
         CSS_PROPERTY_VALUE_LIST_USES_COMMAS,
     "",
     VARIANT_TIME, // used by list parsing
     nsnull,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 CSS_PROP_DISPLAY(
-    -moz-animation-fill-mode,
+    animation-fill-mode,
     animation_fill_mode,
-    CSS_PROP_DOMPROP_PREFIXED(AnimationFillMode),
+    AnimationFillMode,
     CSS_PROPERTY_PARSE_VALUE_LIST |
         CSS_PROPERTY_VALUE_LIST_USES_COMMAS,
     "",
     VARIANT_KEYWORD, // used by list parsing
     kAnimationFillModeKTable,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 CSS_PROP_DISPLAY(
-    -moz-animation-iteration-count,
+    animation-iteration-count,
     animation_iteration_count,
-    CSS_PROP_DOMPROP_PREFIXED(AnimationIterationCount),
+    AnimationIterationCount,
     CSS_PROPERTY_PARSE_VALUE_LIST |
         // nonnegative per
         // http://lists.w3.org/Archives/Public/www-style/2011Mar/0355.html
         CSS_PROPERTY_VALUE_NONNEGATIVE |
         CSS_PROPERTY_VALUE_LIST_USES_COMMAS,
     "",
     VARIANT_KEYWORD | VARIANT_NUMBER, // used by list parsing
     kAnimationIterationCountKTable,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 CSS_PROP_DISPLAY(
-    -moz-animation-name,
+    animation-name,
     animation_name,
-    CSS_PROP_DOMPROP_PREFIXED(AnimationName),
+    AnimationName,
     CSS_PROPERTY_PARSE_VALUE_LIST |
         CSS_PROPERTY_VALUE_LIST_USES_COMMAS,
     "",
     // FIXME: The spec should say something about 'inherit' and 'initial'
     // not being allowed.
     VARIANT_NONE | VARIANT_IDENTIFIER_NO_INHERIT, // used by list parsing
     nsnull,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 CSS_PROP_DISPLAY(
-    -moz-animation-play-state,
+    animation-play-state,
     animation_play_state,
-    CSS_PROP_DOMPROP_PREFIXED(AnimationPlayState),
+    AnimationPlayState,
     CSS_PROPERTY_PARSE_VALUE_LIST |
         CSS_PROPERTY_VALUE_LIST_USES_COMMAS,
     "",
     VARIANT_KEYWORD, // used by list parsing
     kAnimationPlayStateKTable,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 CSS_PROP_DISPLAY(
-    -moz-animation-timing-function,
+    animation-timing-function,
     animation_timing_function,
-    CSS_PROP_DOMPROP_PREFIXED(AnimationTimingFunction),
+    AnimationTimingFunction,
     CSS_PROPERTY_PARSE_VALUE_LIST |
         CSS_PROPERTY_VALUE_LIST_USES_COMMAS,
     "",
     VARIANT_KEYWORD | VARIANT_TIMING_FUNCTION, // used by list parsing
     kTransitionTimingFunctionKTable,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 CSS_PROP_SHORTHAND(
@@ -2661,58 +2661,58 @@ CSS_PROP_POSITION(
     CSS_PROPERTY_PARSE_VALUE |
         CSS_PROPERTY_STORES_CALC,
     "",
     VARIANT_AHLP | VARIANT_CALC,
     nsnull,
     offsetof(nsStylePosition, mOffset),
     eStyleAnimType_Sides_Top)
 CSS_PROP_SHORTHAND(
-    -moz-transition,
+    transition,
     transition,
-    CSS_PROP_DOMPROP_PREFIXED(Transition),
+    Transition,
     CSS_PROPERTY_PARSE_FUNCTION,
     "")
 CSS_PROP_DISPLAY(
-    -moz-transition-delay,
+    transition-delay,
     transition_delay,
-    CSS_PROP_DOMPROP_PREFIXED(TransitionDelay),
+    TransitionDelay,
     CSS_PROPERTY_PARSE_VALUE_LIST |
         CSS_PROPERTY_VALUE_LIST_USES_COMMAS,
     "",
     VARIANT_TIME, // used by list parsing
     nsnull,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 CSS_PROP_DISPLAY(
-    -moz-transition-duration,
+    transition-duration,
     transition_duration,
-    CSS_PROP_DOMPROP_PREFIXED(TransitionDuration),
+    TransitionDuration,
     CSS_PROPERTY_PARSE_VALUE_LIST |
         CSS_PROPERTY_VALUE_LIST_USES_COMMAS,
     "",
     VARIANT_TIME, // used by list parsing
     nsnull,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 CSS_PROP_DISPLAY(
-    -moz-transition-property,
+    transition-property,
     transition_property,
-    CSS_PROP_DOMPROP_PREFIXED(TransitionProperty),
+    TransitionProperty,
     CSS_PROPERTY_PARSE_FUNCTION |
         CSS_PROPERTY_VALUE_LIST_USES_COMMAS,
     "",
     VARIANT_IDENTIFIER | VARIANT_NONE | VARIANT_ALL, // used only in shorthand
     nsnull,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 CSS_PROP_DISPLAY(
-    -moz-transition-timing-function,
+    transition-timing-function,
     transition_timing_function,
-    CSS_PROP_DOMPROP_PREFIXED(TransitionTimingFunction),
+    TransitionTimingFunction,
     CSS_PROPERTY_PARSE_VALUE_LIST |
         CSS_PROPERTY_VALUE_LIST_USES_COMMAS,
     "",
     VARIANT_KEYWORD | VARIANT_TIMING_FUNCTION, // used by list parsing
     kTransitionTimingFunctionKTable,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 CSS_PROP_TEXTRESET(
--- a/layout/style/nsCSSRules.cpp
+++ b/layout/style/nsCSSRules.cpp
@@ -2012,17 +2012,17 @@ nsCSSKeyframesRule::GetType(PRUint16* aT
 {
   *aType = nsIDOMCSSRule::MOZ_KEYFRAMES_RULE;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsCSSKeyframesRule::GetCssText(nsAString& aCssText)
 {
-  aCssText.AssignLiteral("@-moz-keyframes ");
+  aCssText.AssignLiteral("@keyframes ");
   aCssText.Append(mName);
   aCssText.AppendLiteral(" {\n");
   nsAutoString tmp;
   for (PRUint32 i = 0, i_end = mRules.Count(); i != i_end; ++i) {
     static_cast<nsCSSKeyframeRule*>(mRules[i])->GetCssText(tmp);
     aCssText.Append(tmp);
     aCssText.AppendLiteral("\n");
   }
--- a/layout/style/nsComputedDOMStyle.cpp
+++ b/layout/style/nsComputedDOMStyle.cpp
@@ -4613,16 +4613,25 @@ nsComputedDOMStyle::GetQueryableProperty
    * Properties commented out with // are not yet implemented            *
    * Properties commented out with //// are shorthands and not queryable *
   \* ******************************************************************* */
   static const ComputedStyleMapEntry map[] = {
     /* ***************************** *\
      * Implementations of CSS styles *
     \* ***************************** */
 
+    //// COMPUTED_STYLE_MAP_ENTRY(animation,                Animation),
+    COMPUTED_STYLE_MAP_ENTRY(animation_delay,               AnimationDelay),
+    COMPUTED_STYLE_MAP_ENTRY(animation_direction,           AnimationDirection),
+    COMPUTED_STYLE_MAP_ENTRY(animation_duration,            AnimationDuration),
+    COMPUTED_STYLE_MAP_ENTRY(animation_fill_mode,           AnimationFillMode),
+    COMPUTED_STYLE_MAP_ENTRY(animation_iteration_count,     AnimationIterationCount),
+    COMPUTED_STYLE_MAP_ENTRY(animation_name,                AnimationName),
+    COMPUTED_STYLE_MAP_ENTRY(animation_play_state,          AnimationPlayState),
+    COMPUTED_STYLE_MAP_ENTRY(animation_timing_function,     AnimationTimingFunction),
     COMPUTED_STYLE_MAP_ENTRY(backface_visibility,           BackfaceVisibility),
     //// COMPUTED_STYLE_MAP_ENTRY(background,               Background),
     COMPUTED_STYLE_MAP_ENTRY(background_attachment,         BackgroundAttachment),
     COMPUTED_STYLE_MAP_ENTRY(background_clip,               BackgroundClip),
     COMPUTED_STYLE_MAP_ENTRY(background_color,              BackgroundColor),
     COMPUTED_STYLE_MAP_ENTRY(background_image,              BackgroundImage),
     COMPUTED_STYLE_MAP_ENTRY(background_origin,             BackgroundOrigin),
     COMPUTED_STYLE_MAP_ENTRY(background_position,           BackgroundPosition),
@@ -4735,16 +4744,21 @@ nsComputedDOMStyle::GetQueryableProperty
     COMPUTED_STYLE_MAP_ENTRY_LAYOUT(text_indent,            TextIndent),
     COMPUTED_STYLE_MAP_ENTRY(text_overflow,                 TextOverflow),
     COMPUTED_STYLE_MAP_ENTRY(text_shadow,                   TextShadow),
     COMPUTED_STYLE_MAP_ENTRY(text_transform,                TextTransform),
     COMPUTED_STYLE_MAP_ENTRY_LAYOUT(top,                    Top),
     COMPUTED_STYLE_MAP_ENTRY_LAYOUT(transform,              Transform),
     COMPUTED_STYLE_MAP_ENTRY_LAYOUT(transform_origin,       TransformOrigin),
     COMPUTED_STYLE_MAP_ENTRY(transform_style,               TransformStyle),
+    //// COMPUTED_STYLE_MAP_ENTRY(transition,               Transition),
+    COMPUTED_STYLE_MAP_ENTRY(transition_delay,              TransitionDelay),
+    COMPUTED_STYLE_MAP_ENTRY(transition_duration,           TransitionDuration),
+    COMPUTED_STYLE_MAP_ENTRY(transition_property,           TransitionProperty),
+    COMPUTED_STYLE_MAP_ENTRY(transition_timing_function,    TransitionTimingFunction),
     COMPUTED_STYLE_MAP_ENTRY(unicode_bidi,                  UnicodeBidi),
     COMPUTED_STYLE_MAP_ENTRY_LAYOUT(vertical_align,         VerticalAlign),
     COMPUTED_STYLE_MAP_ENTRY(visibility,                    Visibility),
     COMPUTED_STYLE_MAP_ENTRY(white_space,                   WhiteSpace),
     // COMPUTED_STYLE_MAP_ENTRY(widows,                     Widows),
     COMPUTED_STYLE_MAP_ENTRY_LAYOUT(width,                  Width),
     COMPUTED_STYLE_MAP_ENTRY(word_break,                    WordBreak),
     COMPUTED_STYLE_MAP_ENTRY(word_spacing,                  WordSpacing),
@@ -4754,24 +4768,16 @@ nsComputedDOMStyle::GetQueryableProperty
     /* ******************************* *\
      * Implementations of -moz- styles *
     \* ******************************* */
 
 #ifdef MOZ_FLEXBOX
     COMPUTED_STYLE_MAP_ENTRY(align_items,                   AlignItems),
     COMPUTED_STYLE_MAP_ENTRY(align_self,                    AlignSelf),
 #endif // MOZ_FLEXBOX
-    COMPUTED_STYLE_MAP_ENTRY(animation_delay,               AnimationDelay),
-    COMPUTED_STYLE_MAP_ENTRY(animation_direction,           AnimationDirection),
-    COMPUTED_STYLE_MAP_ENTRY(animation_duration,            AnimationDuration),
-    COMPUTED_STYLE_MAP_ENTRY(animation_fill_mode,           AnimationFillMode),
-    COMPUTED_STYLE_MAP_ENTRY(animation_iteration_count,     AnimationIterationCount),
-    COMPUTED_STYLE_MAP_ENTRY(animation_name,                AnimationName),
-    COMPUTED_STYLE_MAP_ENTRY(animation_play_state,          AnimationPlayState),
-    COMPUTED_STYLE_MAP_ENTRY(animation_timing_function,     AnimationTimingFunction),
     COMPUTED_STYLE_MAP_ENTRY(appearance,                    Appearance),
     COMPUTED_STYLE_MAP_ENTRY(_moz_background_inline_policy, BackgroundInlinePolicy),
     COMPUTED_STYLE_MAP_ENTRY(binding,                       Binding),
     COMPUTED_STYLE_MAP_ENTRY(border_bottom_colors,          BorderBottomColors),
     COMPUTED_STYLE_MAP_ENTRY(border_left_colors,            BorderLeftColors),
     COMPUTED_STYLE_MAP_ENTRY(border_right_colors,           BorderRightColors),
     COMPUTED_STYLE_MAP_ENTRY(border_top_colors,             BorderTopColors),
     COMPUTED_STYLE_MAP_ENTRY(box_align,                     BoxAlign),
@@ -4812,20 +4818,16 @@ nsComputedDOMStyle::GetQueryableProperty
     COMPUTED_STYLE_MAP_ENTRY(stack_sizing,                  StackSizing),
     COMPUTED_STYLE_MAP_ENTRY(_moz_tab_size,                 TabSize),
     COMPUTED_STYLE_MAP_ENTRY(text_align_last,               TextAlignLast),
     COMPUTED_STYLE_MAP_ENTRY(text_blink,                    MozTextBlink),
     COMPUTED_STYLE_MAP_ENTRY(text_decoration_color,         TextDecorationColor),
     COMPUTED_STYLE_MAP_ENTRY(text_decoration_line,          TextDecorationLine),
     COMPUTED_STYLE_MAP_ENTRY(text_decoration_style,         TextDecorationStyle),
     COMPUTED_STYLE_MAP_ENTRY(text_size_adjust,              TextSizeAdjust),
-    COMPUTED_STYLE_MAP_ENTRY(transition_delay,              TransitionDelay),
-    COMPUTED_STYLE_MAP_ENTRY(transition_duration,           TransitionDuration),
-    COMPUTED_STYLE_MAP_ENTRY(transition_property,           TransitionProperty),
-    COMPUTED_STYLE_MAP_ENTRY(transition_timing_function,    TransitionTimingFunction),
     COMPUTED_STYLE_MAP_ENTRY(user_focus,                    UserFocus),
     COMPUTED_STYLE_MAP_ENTRY(user_input,                    UserInput),
     COMPUTED_STYLE_MAP_ENTRY(user_modify,                   UserModify),
     COMPUTED_STYLE_MAP_ENTRY(user_select,                   UserSelect),
     COMPUTED_STYLE_MAP_ENTRY(_moz_window_shadow,            WindowShadow),
 
     /* ***************************** *\
      * Implementations of SVG styles *
--- a/layout/style/test/property_database.js
+++ b/layout/style/test/property_database.js
@@ -38,85 +38,85 @@ function initial_font_family_is_sans_ser
 	// 'sans-serif'.
 	var div = document.createElement("div");
 	div.setAttribute("style", "font: -moz-initial");
 	return getComputedStyle(div, "").fontFamily == "sans-serif";
 }
 var gInitialFontFamilyIsSansSerif = initial_font_family_is_sans_serif();
 
 var gCSSProperties = {
-	"-moz-animation": {
-		domProp: "MozAnimation",
+	"animation": {
+		domProp: "animation",
 		inherited: false,
 		type: CSS_TYPE_TRUE_SHORTHAND,
-		subproperties: [ "-moz-animation-name", "-moz-animation-duration", "-moz-animation-timing-function", "-moz-animation-delay", "-moz-animation-direction", "-moz-animation-fill-mode", "-moz-animation-iteration-count" ],
+		subproperties: [ "animation-name", "animation-duration", "animation-timing-function", "animation-delay", "animation-direction", "animation-fill-mode", "animation-iteration-count" ],
 		initial_values: [ "none none 0s 0s ease normal 1.0", "none", "0s", "ease", "normal", "1.0" ],
 		other_values: [ "bounce 1s linear 2s", "bounce 1s 2s linear", "bounce linear 1s 2s", "linear bounce 1s 2s", "linear 1s bounce 2s", "linear 1s 2s bounce", "1s bounce linear 2s", "1s bounce 2s linear", "1s 2s bounce linear", "1s linear bounce 2s", "1s linear 2s bounce", "1s 2s linear bounce", "bounce linear 1s", "bounce 1s linear", "linear bounce 1s", "linear 1s bounce", "1s bounce linear", "1s linear bounce", "1s 2s bounce", "1s bounce 2s", "bounce 1s 2s", "1s 2s linear", "1s linear 2s", "linear 1s 2s", "bounce 1s", "1s bounce", "linear 1s", "1s linear", "1s 2s", "2s 1s", "bounce", "linear", "1s", "height", "2s", "ease-in-out", "2s ease-in", "opacity linear", "ease-out 2s", "2s color, 1s bounce, 500ms height linear, 1s opacity 4s cubic-bezier(0.0, 0.1, 1.0, 1.0)", "1s \\32bounce linear 2s", "1s -bounce linear 2s", "1s -\\32bounce linear 2s", "1s \\32 0bounce linear 2s", "1s -\\32 0bounce linear 2s", "1s \\2bounce linear 2s", "1s -\\2bounce linear 2s", "2s, 1s bounce", "1s bounce, 2s", "2s all, 1s bounce", "1s bounce, 2s all", "1s bounce, 2s none", "2s none, 1s bounce", "2s bounce, 1s all", "2s all, 1s bounce" ],
 		invalid_values: [  "2s inherit", "inherit 2s", "2s bounce, 1s inherit", "2s inherit, 1s bounce", "2s initial" ]
 	},
-	"-moz-animation-delay": {
-		domProp: "MozAnimationDelay",
+	"animation-delay": {
+		domProp: "animationDelay",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "0s", "0ms" ],
 		other_values: [ "1s", "250ms", "-100ms", "-1s", "1s, 250ms, 2.3s"],
 		invalid_values: [ "0", "0px" ]
 	},
-	"-moz-animation-direction": {
-		domProp: "MozAnimationDirection",
+	"animation-direction": {
+		domProp: "animationDirection",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "normal" ],
 		other_values: [ "alternate", "normal, alternate", "alternate, normal", "normal, normal", "normal, normal, normal", "reverse", "alternate-reverse", "normal, reverse, alternate-reverse, alternate" ],
 		invalid_values: [ "normal normal", "inherit, normal", "reverse-alternate" ]
 	},
-	"-moz-animation-duration": {
-		domProp: "MozAnimationDuration",
+	"animation-duration": {
+		domProp: "animationDuration",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "0s", "0ms" ],
 		other_values: [ "1s", "250ms", "-1ms", "-2s", "1s, 250ms, 2.3s"],
 		invalid_values: [ "0", "0px" ]
 	},
-	"-moz-animation-fill-mode": {
-		domProp: "MozAnimationFillMode",
+	"animation-fill-mode": {
+		domProp: "animationFillMode",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "none" ],
 		other_values: [ "forwards", "backwards", "both", "none, none", "forwards, backwards", "forwards, none", "none, both" ],
 		invalid_values: [ "all"]
 	},
-	"-moz-animation-iteration-count": {
-		domProp: "MozAnimationIterationCount",
+	"animation-iteration-count": {
+		domProp: "animationIterationCount",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "1" ],
 		other_values: [ "infinite", "0", "0.5", "7.75", "-0.0", "1, 2, 3", "infinite, 2", "1, infinite" ],
 		// negatives forbidden per
 		// http://lists.w3.org/Archives/Public/www-style/2011Mar/0355.html
 		invalid_values: [ "none", "-1", "-0.5", "-1, infinite", "infinite, -3" ]
 	},
-	"-moz-animation-name": {
-		domProp: "MozAnimationName",
+	"animation-name": {
+		domProp: "animationName",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "none" ],
 		other_values: [ "all", "ball", "mall", "color", "bounce, bubble, opacity", "foobar", "auto", "\\32bounce", "-bounce", "-\\32bounce", "\\32 0bounce", "-\\32 0bounce", "\\2bounce", "-\\2bounce" ],
 		invalid_values: [ "bounce, initial", "initial, bounce", "bounce, inherit", "inherit, bounce" ]
 	},
-	"-moz-animation-play-state": {
-		domProp: "MozAnimationPlayState",
+	"animation-play-state": {
+		domProp: "animationPlayState",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "running" ],
 		other_values: [ "paused", "running, running", "paused, running", "paused, paused", "running, paused", "paused, running, running, running, paused, running" ],
 		invalid_values: [ "0" ]
 	},
-	"-moz-animation-timing-function": {
-		domProp: "MozAnimationTimingFunction",
+	"animation-timing-function": {
+		domProp: "animationTimingFunction",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "ease", "cubic-bezier(0.25, 0.1, 0.25, 1.0)" ],
 		other_values: [ "linear", "ease-in", "ease-out", "ease-in-out", "linear, ease-in, cubic-bezier(0.1, 0.2, 0.8, 0.9)", "cubic-bezier(0.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.25, 1.5, 0.75, -0.5)", "step-start", "step-end", "steps(1)", "steps(2, start)", "steps(386)", "steps(3, end)" ],
 		invalid_values: [ "none", "auto", "cubic-bezier(0.25, 0.1, 0.25)", "cubic-bezier(0.25, 0.1, 0.25, 0.25, 1.0)", "cubic-bezier(-0.5, 0.5, 0.5, 0.5)", "cubic-bezier(1.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.5, 0.5, -0.5, 0.5)", "cubic-bezier(0.5, 0.5, 1.5, 0.5)", "steps(2, step-end)", "steps(0)", "steps(-2)", "steps(0, step-end, 1)" ]
 	},
 	"-moz-appearance": {
 		domProp: "MozAppearance",
@@ -3138,51 +3138,51 @@ var gCSSProperties = {
 			"-moz-calc(-2px)",
 			"-moz-calc(50%)",
 			"-moz-calc(3*25px)",
 			"-moz-calc(25px*3)",
 			"-moz-calc(3*25px + 50%)",
 		],
 		invalid_values: []
 	},
-	"-moz-transition": {
-		domProp: "MozTransition",
+	"transition": {
+		domProp: "transition",
 		inherited: false,
 		type: CSS_TYPE_TRUE_SHORTHAND,
-		subproperties: [ "-moz-transition-property", "-moz-transition-duration", "-moz-transition-timing-function", "-moz-transition-delay" ],
+		subproperties: [ "transition-property", "transition-duration", "transition-timing-function", "transition-delay" ],
 		initial_values: [ "all 0s ease 0s", "all", "0s", "0s 0s", "ease" ],
 		other_values: [ "width 1s linear 2s", "width 1s 2s linear", "width linear 1s 2s", "linear width 1s 2s", "linear 1s width 2s", "linear 1s 2s width", "1s width linear 2s", "1s width 2s linear", "1s 2s width linear", "1s linear width 2s", "1s linear 2s width", "1s 2s linear width", "width linear 1s", "width 1s linear", "linear width 1s", "linear 1s width", "1s width linear", "1s linear width", "1s 2s width", "1s width 2s", "width 1s 2s", "1s 2s linear", "1s linear 2s", "linear 1s 2s", "width 1s", "1s width", "linear 1s", "1s linear", "1s 2s", "2s 1s", "width", "linear", "1s", "height", "2s", "ease-in-out", "2s ease-in", "opacity linear", "ease-out 2s", "2s color, 1s width, 500ms height linear, 1s opacity 4s cubic-bezier(0.0, 0.1, 1.0, 1.0)", "1s \\32width linear 2s", "1s -width linear 2s", "1s -\\32width linear 2s", "1s \\32 0width linear 2s", "1s -\\32 0width linear 2s", "1s \\2width linear 2s", "1s -\\2width linear 2s" ],
 		invalid_values: [ "2s, 1s width", "1s width, 2s", "2s all, 1s width", "1s width, 2s all", "1s width, 2s none", "2s none, 1s width", "2s inherit", "inherit 2s", "2s width, 1s inherit", "2s inherit, 1s width", "2s initial", "2s all, 1s width", "2s width, 1s all" ]
 	},
-	"-moz-transition-delay": {
-		domProp: "MozTransitionDelay",
+	"transition-delay": {
+		domProp: "transitionDelay",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "0s", "0ms" ],
 		other_values: [ "1s", "250ms", "-100ms", "-1s", "1s, 250ms, 2.3s"],
 		invalid_values: [ "0", "0px" ]
 	},
-	"-moz-transition-duration": {
-		domProp: "MozTransitionDuration",
+	"transition-duration": {
+		domProp: "transitionDuration",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "0s", "0ms" ],
 		other_values: [ "1s", "250ms", "-1ms", "-2s", "1s, 250ms, 2.3s"],
 		invalid_values: [ "0", "0px" ]
 	},
-	"-moz-transition-property": {
-		domProp: "MozTransitionProperty",
+	"transition-property": {
+		domProp: "transitionProperty",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "all" ],
 		other_values: [ "none", "left", "top", "color", "width, height, opacity", "foobar", "auto", "\\32width", "-width", "-\\32width", "\\32 0width", "-\\32 0width", "\\2width", "-\\2width" ],
 		invalid_values: [ "none, none", "all, all", "color, none", "none, color", "all, color", "color, all", "inherit, color", "color, inherit", "initial, color", "color, initial", "none, color", "color, none", "all, color", "color, all" ]
 	},
-	"-moz-transition-timing-function": {
-		domProp: "MozTransitionTimingFunction",
+	"transition-timing-function": {
+		domProp: "transitionTimingFunction",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "ease", "cubic-bezier(0.25, 0.1, 0.25, 1.0)" ],
 		other_values: [ "linear", "ease-in", "ease-out", "ease-in-out", "linear, ease-in, cubic-bezier(0.1, 0.2, 0.8, 0.9)", "cubic-bezier(0.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.25, 1.5, 0.75, -0.5)", "step-start", "step-end", "steps(1)", "steps(2, start)", "steps(386)", "steps(3, end)" ],
 		invalid_values: [ "none", "auto", "cubic-bezier(0.25, 0.1, 0.25)", "cubic-bezier(0.25, 0.1, 0.25, 0.25, 1.0)", "cubic-bezier(-0.5, 0.5, 0.5, 0.5)", "cubic-bezier(1.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.5, 0.5, -0.5, 0.5)", "cubic-bezier(0.5, 0.5, 1.5, 0.5)", "steps(2, step-end)", "steps(0)", "steps(-2)", "steps(0, step-end, 1)" ]
 	},
 	"unicode-bidi": {
 		domProp: "unicodeBidi",
--- a/layout/style/test/test_animations.html
+++ b/layout/style/test/test_animations.html
@@ -4,104 +4,104 @@
 https://bugzilla.mozilla.org/show_bug.cgi?id=435442
 -->
 <head>
   <title>Test for css3-animations (Bug 435442)</title>
   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <script type="application/javascript" src="animation_utils.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
   <style type="text/css">
-  @-moz-keyframes anim1 {
+  @keyframes anim1 {
      0% { margin-left: 0px }
      50% { margin-left: 80px }
      100% { margin-left: 100px }
   }
-  @-moz-keyframes anim2 {
+  @keyframes anim2 {
     from { margin-right: 0 } to { margin-right: 100px }
   }
-  @-moz-keyframes anim3 {
+  @keyframes anim3 {
     from { margin-top: 0 } to { margin-top: 100px }
   }
-  @-moz-keyframes anim4 {
+  @keyframes anim4 {
     from { margin-bottom: 0 } to { margin-bottom: 100px }
   }
-  @-moz-keyframes anim5 {
+  @keyframes anim5 {
     from { margin-left: 0 } to { margin-left: 100px }
   }
 
-  @-moz-keyframes kf1 {
+  @keyframes kf1 {
     50% { margin-top: 50px }
     to { margin-top: 150px }
   }
-  @-moz-keyframes kf2 {
+  @keyframes kf2 {
     from { margin-top: 150px }
     50% { margin-top: 50px }
   }
-  @-moz-keyframes kf3 {
+  @keyframes kf3 {
     25% { margin-top: 100px }
   }
-  @-moz-keyframes kf4 {
+  @keyframes kf4 {
     to, from { display: inline; margin-top: 37px }
   }
-  @-moz-keyframes kf_cascade1 {
+  @keyframes kf_cascade1 {
     from { padding-top: 50px }
     50%, from { padding-top: 30px }      /* wins: 0% */
     75%, 85%, 50% { padding-top: 20px }  /* wins: 75%, 50% */
     100%, 85% { padding-top: 70px }      /* wins: 100% */
     85.1% { padding-top: 60px }          /* wins: 85.1% */
     85% { padding-top: 30px }            /* wins: 85% */
   }
-  @-moz-keyframes kf_cascade2 { from, to { margin-top: 100px } }
-  @-moz-keyframes kf_cascade2 { from, to { margin-left: 200px } }
-  @-moz-keyframes kf_cascade2 { from, to { margin-left: 300px } }
-  @-moz-keyframes kf_tf1 {
-    0%   { padding-bottom: 20px; -moz-animation-timing-function: ease }
+  @keyframes kf_cascade2 { from, to { margin-top: 100px } }
+  @keyframes kf_cascade2 { from, to { margin-left: 200px } }
+  @keyframes kf_cascade2 { from, to { margin-left: 300px } }
+  @keyframes kf_tf1 {
+    0%   { padding-bottom: 20px; animation-timing-function: ease }
     25%  { padding-bottom: 60px; }
-    50%  { padding-bottom: 160px; -moz-animation-timing-function: steps(5) }
-    75%  { padding-bottom: 120px; -moz-animation-timing-function: linear }
-    100% { padding-bottom: 20px; -moz-animation-timing-function: ease-out }
+    50%  { padding-bottom: 160px; animation-timing-function: steps(5) }
+    75%  { padding-bottom: 120px; animation-timing-function: linear }
+    100% { padding-bottom: 20px; animation-timing-function: ease-out }
   }
 
   #withbefore::before, #withafter::after {
     content: "";
-    -moz-animation: anim2 1s linear alternate infinite;
+    animation: anim2 1s linear alternate infinite;
   }
 
-  @-moz-keyframes multiprop {
+  @keyframes multiprop {
     0% {
       padding-top: 10px; padding-left: 30px;
-      -moz-animation-timing-function: ease;
+      animation-timing-function: ease;
     }
     25% {
       padding-left: 50px;
-      -moz-animation-timing-function: ease-out;
+      animation-timing-function: ease-out;
     }
     50% {
       padding-top: 40px;
     }
     75% {
       padding-top: 80px; padding-left: 60px;
-      -moz-animation-timing-function: ease-in;
+      animation-timing-function: ease-in;
     }
   }
 
-  @-moz-keyframes uaoverride {
+  @keyframes uaoverride {
     0%, 100% { line-height: 3; margin-top: 20px }
     50% { margin-top: 120px }
   }
 
-  @-moz-keyframes cascade {
+  @keyframes cascade {
     0%, 25%, 100% { top: 0 }
     50%, 75% { top: 100px }
     0%, 75%, 100% { left: 0 }
     25%, 50% { left: 100px }
   }
-  @-moz-keyframes cascade2 {
+  @keyframes cascade2 {
     0% { text-indent: 0 }
-    25% { text-indent: 30px; -moz-animation-timing-function: ease-in } /* beaten by rule below */
+    25% { text-indent: 30px; animation-timing-function: ease-in } /* beaten by rule below */
     50% { text-indent: 0 }
     25% { text-indent: 50px }
     100% { text-indent: 100px }
   }
   </style>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=435442">Mozilla Bug 435442</a>
@@ -189,17 +189,17 @@ advance_clock(0);
  */
 
 // Test that animations don't affect the computed value before the
 // start of the animation or after its end.  Test without
 // animation-fill-mode, but then repeat the test with all the values of
 // animation-fill-mode.
 function test_fill_mode(fill_mode, fills_backwards, fills_forwards)
 {
-  var style = "margin-left: 30px; -moz-animation: 10s 3s anim1 linear";
+  var style = "margin-left: 30px; animation: 10s 3s anim1 linear";
   var desc;
   if (fill_mode.length > 0) {
     style += " " + fill_mode;
     desc = "fill mode " + fill_mode + ": ";
   } else {
     desc = "default fill mode: ";
   }
   new_div(style);
@@ -249,17 +249,17 @@ function test_fill_mode(fill_mode, fills
 test_fill_mode("", false, false);
 test_fill_mode("none", false, false);
 test_fill_mode("forwards", false, true);
 test_fill_mode("backwards", true, false);
 test_fill_mode("both", true, true);
 
 // Test that animations continue running when the animation name
 // list is changed.
-new_div("-moz-animation: anim1 linear 10s");
+new_div("animation: anim1 linear 10s");
   is(cs.getPropertyValue("margin-top"), "0px",
      "just anim1, margin-top at start");
   is(cs.getPropertyValue("margin-right"), "0px",
      "just anim1, margin-right at start");
   is(cs.getPropertyValue("margin-bottom"), "0px",
      "just anim1, margin-bottom at start");
   is(cs.getPropertyValue("margin-left"), "0px",
      "just anim1, margin-left at start");
@@ -268,17 +268,17 @@ advance_clock(1000);
      "just anim1, margin-top at 1s");
   is(cs.getPropertyValue("margin-right"), "0px",
      "just anim1, margin-right at 1s");
   is(cs.getPropertyValue("margin-bottom"), "0px",
      "just anim1, margin-bottom at 1s");
   is(cs.getPropertyValue("margin-left"), "16px",
      "just anim1, margin-left at 1s");
 // append anim2
-div.style.MozAnimation = "anim1 linear 10s, anim2 linear 10s";
+div.style.animation = "anim1 linear 10s, anim2 linear 10s";
   is(cs.getPropertyValue("margin-top"), "0px",
      "anim1 + anim2, margin-top at 1s");
   is(cs.getPropertyValue("margin-right"), "0px",
      "anim1 + anim2, margin-right at 1s");
   is(cs.getPropertyValue("margin-bottom"), "0px",
      "anim1 + anim2, margin-bottom at 1s");
   is(cs.getPropertyValue("margin-left"), "16px",
      "anim1 + anim2, margin-left at 1s");
@@ -287,17 +287,17 @@ advance_clock(1000);
      "anim1 + anim2, margin-top at 2s");
   is(cs.getPropertyValue("margin-right"), "10px",
      "anim1 + anim2, margin-right at 2s");
   is(cs.getPropertyValue("margin-bottom"), "0px",
      "anim1 + anim2, margin-bottom at 2s");
   is(cs.getPropertyValue("margin-left"), "32px",
      "anim1 + anim2, margin-left at 2s");
 // prepend anim3
-div.style.MozAnimation = "anim3 linear 10s, anim1 linear 10s, anim2 linear 10s";
+div.style.animation = "anim3 linear 10s, anim1 linear 10s, anim2 linear 10s";
   is(cs.getPropertyValue("margin-top"), "0px",
      "anim3 + anim1 + anim2, margin-top at 2s");
   is(cs.getPropertyValue("margin-right"), "10px",
      "anim3 + anim1 + anim2, margin-right at 2s");
   is(cs.getPropertyValue("margin-bottom"), "0px",
      "anim3 + anim1 + anim2, margin-bottom at 2s");
   is(cs.getPropertyValue("margin-left"), "32px",
      "anim3 + anim1 + anim2, margin-left at 2s");
@@ -306,17 +306,17 @@ advance_clock(1000);
      "anim3 + anim1 + anim2, margin-top at 3s");
   is(cs.getPropertyValue("margin-right"), "20px",
      "anim3 + anim1 + anim2, margin-right at 3s");
   is(cs.getPropertyValue("margin-bottom"), "0px",
      "anim3 + anim1 + anim2, margin-bottom at 3s");
   is(cs.getPropertyValue("margin-left"), "48px",
      "anim3 + anim1 + anim2, margin-left at 3s");
 // remove anim2 from end
-div.style.MozAnimation = "anim3 linear 10s, anim1 linear 10s";
+div.style.animation = "anim3 linear 10s, anim1 linear 10s";
   is(cs.getPropertyValue("margin-top"), "10px",
      "anim3 + anim1, margin-top at 3s");
   is(cs.getPropertyValue("margin-right"), "0px",
      "anim3 + anim1, margin-right at 3s");
   is(cs.getPropertyValue("margin-bottom"), "0px",
      "anim3 + anim1, margin-bottom at 3s");
   is(cs.getPropertyValue("margin-left"), "48px",
      "anim3 + anim1, margin-left at 3s");
@@ -325,17 +325,17 @@ advance_clock(1000);
      "anim3 + anim1, margin-top at 4s");
   is(cs.getPropertyValue("margin-right"), "0px",
      "anim3 + anim1, margin-right at 4s");
   is(cs.getPropertyValue("margin-bottom"), "0px",
      "anim3 + anim1, margin-bottom at 4s");
   is(cs.getPropertyValue("margin-left"), "64px",
      "anim3 + anim1, margin-left at 4s");
 // swap anim1 and anim3, change duration of anim3
-div.style.MozAnimation = "anim1 linear 10s, anim3 linear 5s";
+div.style.animation = "anim1 linear 10s, anim3 linear 5s";
   is(cs.getPropertyValue("margin-top"), "40px",
      "anim1 + anim3, margin-top at 4s");
   is(cs.getPropertyValue("margin-right"), "0px",
      "anim1 + anim3, margin-right at 4s");
   is(cs.getPropertyValue("margin-bottom"), "0px",
      "anim1 + anim3, margin-bottom at 4s");
   is(cs.getPropertyValue("margin-left"), "64px",
      "anim1 + anim3, margin-left at 4s");
@@ -344,28 +344,28 @@ advance_clock(1000);
      "anim1 + anim3, margin-top at 5s");
   is(cs.getPropertyValue("margin-right"), "0px",
      "anim1 + anim3, margin-right at 5s");
   is(cs.getPropertyValue("margin-bottom"), "0px",
      "anim1 + anim3, margin-bottom at 5s");
   is(cs.getPropertyValue("margin-left"), "80px",
      "anim1 + anim3, margin-left at 5s");
 // list anim1 twice, last duration wins, original start time still applies
-div.style.MozAnimation = "anim1 linear 10s, anim3 linear 5s, anim1 linear 20s";
+div.style.animation = "anim1 linear 10s, anim3 linear 5s, anim1 linear 20s";
   is(cs.getPropertyValue("margin-top"), "60px",
      "anim1 + anim3 + anim1, margin-top at 5s");
   is(cs.getPropertyValue("margin-right"), "0px",
      "anim1 + anim3 + anim1, margin-right at 5s");
   is(cs.getPropertyValue("margin-bottom"), "0px",
      "anim1 + anim3 + anim1, margin-bottom at 5s");
   is(cs.getPropertyValue("margin-left"), "40px",
      "anim1 + anim3 + anim1, margin-left at 5s");
 // drop one of the anim1, and list anim5 as well, which animates
 // the same property as anim1
-div.style.MozAnimation = "anim3 linear 5s, anim1 linear 20s, anim5 linear 10s";
+div.style.animation = "anim3 linear 5s, anim1 linear 20s, anim5 linear 10s";
   is(cs.getPropertyValue("margin-top"), "60px",
      "anim3 + anim1 + anim5, margin-top at 5s");
   is(cs.getPropertyValue("margin-right"), "0px",
      "anim3 + anim1 + anim5, margin-right at 5s");
   is(cs.getPropertyValue("margin-bottom"), "0px",
      "anim3 + anim1 + anim5, margin-bottom at 5s");
   is(cs.getPropertyValue("margin-left"), "0px",
      "anim3 + anim1 + anim5, margin-left at 5s");
@@ -374,17 +374,17 @@ advance_clock(1000);
      "anim3 + anim1 + anim5, margin-top at 6s");
   is(cs.getPropertyValue("margin-right"), "0px",
      "anim3 + anim1 + anim5, margin-right at 6s");
   is(cs.getPropertyValue("margin-bottom"), "0px",
      "anim3 + anim1 + anim5, margin-bottom at 6s");
   is(cs.getPropertyValue("margin-left"), "10px",
      "anim3 + anim1 + anim5, margin-left at 6s");
 // now swap the anim5 and anim1 order
-div.style.MozAnimation = "anim3 linear 5s, anim5 linear 10s, anim1 linear 20s";
+div.style.animation = "anim3 linear 5s, anim5 linear 10s, anim1 linear 20s";
   is(cs.getPropertyValue("margin-top"), "80px",
      "anim3 + anim1 + anim5, margin-top at 6s");
   is(cs.getPropertyValue("margin-right"), "0px",
      "anim3 + anim1 + anim5, margin-right at 6s");
   is(cs.getPropertyValue("margin-bottom"), "0px",
      "anim3 + anim1 + anim5, margin-bottom at 6s");
   is(cs.getPropertyValue("margin-left"), "48px",
      "anim3 + anim1 + anim5, margin-left at 6s");
@@ -393,38 +393,38 @@ advance_clock(1000);
      "anim3 + anim1 + anim5, margin-top at 7s");
   is(cs.getPropertyValue("margin-right"), "0px",
      "anim3 + anim1 + anim5, margin-right at 7s");
   is(cs.getPropertyValue("margin-bottom"), "0px",
      "anim3 + anim1 + anim5, margin-bottom at 7s");
   is(cs.getPropertyValue("margin-left"), "56px",
      "anim3 + anim1 + anim5, margin-left at 7s");
 // swap anim1 and anim5 back
-div.style.MozAnimation = "anim3 linear 5s, anim1 linear 20s, anim5 linear 10s";
+div.style.animation = "anim3 linear 5s, anim1 linear 20s, anim5 linear 10s";
   is(cs.getPropertyValue("margin-top"), "0px",
      "anim3 + anim1 + anim5, margin-top at 7s");
   is(cs.getPropertyValue("margin-right"), "0px",
      "anim3 + anim1 + anim5, margin-right at 7s");
   is(cs.getPropertyValue("margin-bottom"), "0px",
      "anim3 + anim1 + anim5, margin-bottom at 7s");
   is(cs.getPropertyValue("margin-left"), "20px",
      "anim3 + anim1 + anim5, margin-left at 7s");
 advance_clock(100);
   is(cs.getPropertyValue("margin-top"), "0px",
      "anim3 + anim1 + anim5, margin-top at 7.1s");
 // Change the animation fill mode on the completed animation.
-div.style.MozAnimation = "anim3 linear 5s forwards, anim1 linear 20s, anim5 linear 10s";
+div.style.animation = "anim3 linear 5s forwards, anim1 linear 20s, anim5 linear 10s";
   is(cs.getPropertyValue("margin-top"), "100px",
      "anim3 + anim1 + anim5, margin-top at 7.1s, with fill mode");
 advance_clock(900);
   is(cs.getPropertyValue("margin-top"), "100px",
      "anim3 + anim1 + anim5, margin-top at 8s, with fill mode");
 // Change the animation duration on the completed animation, so it is
 // no longer completed.
-div.style.MozAnimation = "anim3 linear 10s, anim1 linear 20s, anim5 linear 10s";
+div.style.animation = "anim3 linear 10s, anim1 linear 20s, anim5 linear 10s";
   is(cs.getPropertyValue("margin-top"), "60px",
      "anim3 + anim1 + anim5, margin-top at 8s, with fill mode");
   is(cs.getPropertyValue("margin-left"), "30px",
      "anim3 + anim1 + anim5, margin-left at 8s");
 done_div();
 
 /*
  * css3-animations:  3. Keyframes
@@ -433,17 +433,17 @@ done_div();
  * Also see test_keyframes_rules.html .
  */
 
 // Test the rules on keyframes that lack a 0% or 100% rule:
 // (simultaneously, test that reverse animations have their keyframes
 // run backwards)
 
 // 100px at 0%, 50px at 50%, 150px at 100%
-new_div("margin-top: 100px; -moz-animation: kf1 ease 1s alternate infinite");
+new_div("margin-top: 100px; animation: kf1 ease 1s alternate infinite");
 is(cs.marginTop, "100px", "no-0% at 0.0s");
 advance_clock(100);
 is_approx(px_to_num(cs.marginTop), 100 - 50 * gTF.ease(0.2), 0.01,
           "no-0% at 0.1s");
 advance_clock(200);
 is_approx(px_to_num(cs.marginTop), 100 - 50 * gTF.ease(0.6), 0.01,
           "no-0% at 0.3s");
 advance_clock(200);
@@ -468,17 +468,17 @@ is_approx(px_to_num(cs.marginTop), 100 -
 advance_clock(200);
 is_approx(px_to_num(cs.marginTop), 100 - 50 * gTF.ease(0.2), 0.01,
           "no-0% at 1.9s");
 advance_clock(100);
 is(cs.marginTop, "100px", "no-0% at 2.0s");
 done_div();
 
 // 150px at 0%, 50px at 50%, 100px at 100%
-new_div("margin-top: 100px; -moz-animation: kf2 ease-in 1s alternate infinite");
+new_div("margin-top: 100px; animation: kf2 ease-in 1s alternate infinite");
 is(cs.marginTop, "150px", "no-100% at 0.0s");
 advance_clock(100);
 is_approx(px_to_num(cs.marginTop), 150 - 100 * gTF.ease_in(0.2), 0.01,
           "no-100% at 0.1s");
 advance_clock(200);
 is_approx(px_to_num(cs.marginTop), 150 - 100 * gTF.ease_in(0.6), 0.01,
           "no-100% at 0.3s");
 advance_clock(200);
@@ -504,17 +504,17 @@ advance_clock(200);
 is_approx(px_to_num(cs.marginTop), 150 - 100 * gTF.ease_in(0.2), 0.01,
           "no-100% at 1.9s");
 advance_clock(100);
 is(cs.marginTop, "150px", "no-100% at 2.0s");
 done_div();
 
 
 // 50px at 0%, 100px at 25%, 50px at 100%
-new_div("margin-top: 50px; -moz-animation: kf3 ease-out 1s alternate infinite");
+new_div("margin-top: 50px; animation: kf3 ease-out 1s alternate infinite");
 is(cs.marginTop, "50px", "no-0%-no-100% at 0.0s");
 advance_clock(50);
 is_approx(px_to_num(cs.marginTop), 50 + 50 * gTF.ease_out(0.2), 0.01,
           "no-0%-no-100% at 0.05s");
 advance_clock(100);
 is_approx(px_to_num(cs.marginTop), 50 + 50 * gTF.ease_out(0.6), 0.01,
           "no-0%-no-100% at 0.15s");
 advance_clock(100);
@@ -542,41 +542,41 @@ is_approx(px_to_num(cs.marginTop), 50 + 
 advance_clock(50);
 is(cs.marginTop, "50px", "no-0%-no-100% at 2.0s");
 done_div();
 
 // Test that non-animatable properties are ignored.
 // Simultaneously, test that the block is still honored, and that
 // we still override the value when two consecutive keyframes have
 // the same value.
-new_div("-moz-animation: kf4 ease 10s");
+new_div("animation: kf4 ease 10s");
 is(cs.display, "block",
    "non-animatable properties should be ignored (linear, 0s)");
 is(cs.marginTop, "37px",
    "animatable properties should still apply (linear, 0s)");
 advance_clock(1000);
 is(cs.display, "block",
    "non-animatable properties should be ignored (linear, 1s)");
 is(cs.marginTop, "37px",
    "animatable properties should still apply (linear, 1s)");
 done_div();
-new_div("-moz-animation: kf4 step-start 10s");
+new_div("animation: kf4 step-start 10s");
 is(cs.display, "block",
    "non-animatable properties should be ignored (step-start, 0s)");
 is(cs.marginTop, "37px",
    "animatable properties should still apply (step-start, 0s)");
 advance_clock(1000);
 is(cs.display, "block",
    "non-animatable properties should be ignored (step-start, 1s)");
 is(cs.marginTop, "37px",
    "animatable properties should still apply (step-start, 1s)");
 done_div();
 
 // Test cascading of the keyframes within an @keyframes rule.
-new_div("-moz-animation: kf_cascade1 linear 10s");
+new_div("animation: kf_cascade1 linear 10s");
 //   0%: 30px
 //  50%: 20px
 //  75%: 20px
 //  85%: 30px
 //  85.1%: 60px
 // 100%: 70px
 is(cs.paddingTop, "30px", "kf_cascade1 at 0s");
 advance_clock(2500);
@@ -593,26 +593,26 @@ advance_clock(500);
 is(cs.paddingTop, "30px", "kf_cascade1 at 8.5s");
 advance_clock(10);
 is(cs.paddingTop, "60px", "kf_cascade1 at 8.51s");
 advance_clock(745);
 is(cs.paddingTop, "65px", "kf_cascade1 at 9.2505s");
 done_div();
 
 // Test cascading of the @keyframes rules themselves.
-new_div("-moz-animation: kf_cascade2 linear 10s");
+new_div("animation: kf_cascade2 linear 10s");
 is(cs.marginTop, "0px", "@keyframes rule with margin-top should be ignored");
 is(cs.marginLeft, "300px", "last @keyframes rule with margin-left should win");
 done_div();
 
 /*
  * css3-animations:  3.1. Timing functions for keyframes
  * http://dev.w3.org/csswg/css3-animations/#timing-functions-for-keyframes-
  */
-new_div("-moz-animation: kf_tf1 ease-in 10s alternate infinite");
+new_div("animation: kf_tf1 ease-in 10s alternate infinite");
 is(cs.paddingBottom, "20px",
    "keyframe timing functions test at 0s (test needed for flush)");
 advance_clock(1000);
 is_approx(px_to_num(cs.paddingBottom), 20 + 40 * gTF.ease(0.4), 0.01,
           "keyframe timing functions test at 1s");
 advance_clock(1000);
 is_approx(px_to_num(cs.paddingBottom), 20 + 40 * gTF.ease(0.8), 0.01,
           "keyframe timing functions test at 2s");
@@ -671,17 +671,17 @@ advance_clock(1000);
 is_approx(px_to_num(cs.paddingBottom), 20 + 40 * gTF.ease(0.4), 0.01,
           "keyframe timing functions test at 39s");
 advance_clock(1000);
 is(cs.paddingBottom, "20px",
    "keyframe timing functions test at 40s");
 done_div();
 
 // spot-check the same thing without alternate
-new_div("-moz-animation: kf_tf1 ease-in 10s infinite");
+new_div("animation: kf_tf1 ease-in 10s infinite");
 is(cs.paddingBottom, "20px",
    "keyframe timing functions test at 0s (test needed for flush)");
 advance_clock(11000);
 is_approx(px_to_num(cs.paddingBottom), 20 + 40 * gTF.ease(0.4), 0.01,
           "keyframe timing functions test at 11s");
 advance_clock(3000);
 is_approx(px_to_num(cs.paddingBottom), 60 + 100 * gTF.ease_in(0.6), 0.01,
           "keyframe timing functions test at 14s");
@@ -701,31 +701,31 @@ done_div();
 // animation-name is reasonably well-tested up in the tests for Section
 // 2, particularly the tests that "Test that animations continue running
 // when the animation name list is changed."
 
 // Test that 'animation-name: none' steps the animation, and setting
 // it again starts a new one.
 
 new_div("");
-div.style.MozAnimation = "anim2 ease-in-out 10s";
+div.style.animation = "anim2 ease-in-out 10s";
 is(cs.marginRight, "0px", "after setting animation-name to anim2");
 advance_clock(1000);
 is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_in_out(0.1), 0.01,
           "before changing animation-name to none");
-div.style.MozAnimationName = "none";
+div.style.animationName = "none";
 is(cs.marginRight, "0px", "after changing animation-name to none");
 advance_clock(1000);
 is(cs.marginRight, "0px", "after changing animation-name to none plus 1s");
-div.style.MozAnimationName = "anim2";
+div.style.animationName = "anim2";
 is(cs.marginRight, "0px", "after changing animation-name to anim2");
 advance_clock(1000);
 is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_in_out(0.1), 0.01,
           "at 1s in animation when animation-name no longer none again");
-div.style.MozAnimationName = "none";
+div.style.animationName = "none";
 is(cs.marginRight, "0px", "after changing animation-name to none");
 advance_clock(1000);
 is(cs.marginRight, "0px", "after changing animation-name to none plus 1s");
 done_div();
 
 /*
  * css3-animations:  3.3. The 'animation-duration' Property
  * http://dev.w3.org/csswg/css3-animations/#the-animation-duration-property-
@@ -741,17 +741,17 @@ done_div();
  */
 
 // tested in tests for section 3.1
 
 /*
  * css3-animations:  3.5. The 'animation-iteration-count' Property
  * http://dev.w3.org/csswg/css3-animations/#the-animation-iteration-count-property-
  */
-new_div("-moz-animation: anim2 ease-in 10s 0.3 forwards");
+new_div("animation: anim2 ease-in 10s 0.3 forwards");
 is(cs.marginRight, "0px", "animation-iteration-count test 1 at 0s");
 advance_clock(2000);
 is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_in(0.2), 0.01,
           "animation-iteration-count test 1 at 2s");
 advance_clock(900);
 is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_in(0.29), 0.01,
           "animation-iteration-count test 1 at 2.9s");
 advance_clock(100);
@@ -760,17 +760,17 @@ is_approx(px_to_num(cs.marginRight), 100
 advance_clock(100);
 is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_in(0.3), 0.01,
           "animation-iteration-count test 1 at 3.1s");
 advance_clock(5000);
 is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_in(0.3), 0.01,
           "animation-iteration-count test 1 at 8.1s");
 done_div();
 
-new_div("-moz-animation: anim2 ease-in 10s 0.3, anim3 ease-out 20s 1.2 alternate forwards, anim4 ease-in-out 5s 1.6 forwards");
+new_div("animation: anim2 ease-in 10s 0.3, anim3 ease-out 20s 1.2 alternate forwards, anim4 ease-in-out 5s 1.6 forwards");
 is(cs.marginRight, "0px", "animation-iteration-count test 2 at 0s");
 is(cs.marginTop, "0px", "animation-iteration-count test 3 at 0s");
 is(cs.marginBottom, "0px", "animation-iteration-count test 4 at 0s");
 advance_clock(2000);
 is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_in(0.2), 0.01,
           "animation-iteration-count test 2 at 2s");
 is_approx(px_to_num(cs.marginTop), 100 * gTF.ease_out(0.1), 0.01,
           "animation-iteration-count test 3 at 2s");
@@ -821,205 +821,205 @@ done_div();
 
 /*
  * css3-animations:  3.6. The 'animation-direction' Property
  * http://dev.w3.org/csswg/css3-animations/#the-animation-direction-property-
  */
 
 // Tested in tests for sections 3.1 and 3.5.
 
-new_div("-moz-animation: anim2 ease-in 10s infinite");
-div.style.MozAnimationDirection = "normal";
+new_div("animation: anim2 ease-in 10s infinite");
+div.style.animationDirection = "normal";
 is(cs.marginRight, "0px", "animation-direction test 1 (normal) at 0s");
-div.style.MozAnimationDirection = "reverse";
+div.style.animationDirection = "reverse";
 is(cs.marginRight, "100px", "animation-direction test 1 (reverse) at 0s");
-div.style.MozAnimationDirection = "alternate";
+div.style.animationDirection = "alternate";
 is(cs.marginRight, "0px", "animation-direction test 1 (alternate) at 0s");
-div.style.MozAnimationDirection = "alternate-reverse";
+div.style.animationDirection = "alternate-reverse";
 is(cs.marginRight, "100px", "animation-direction test 1 (alternate-reverse) at 0s");
 advance_clock(2000);
-div.style.MozAnimationDirection = "normal";
+div.style.animationDirection = "normal";
 is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_in(0.2), 0.01,
           "animation-direction test 1 (normal) at 2s");
-div.style.MozAnimationDirection = "reverse";
+div.style.animationDirection = "reverse";
 is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_in(0.8), 0.01,
           "animation-direction test 1 (reverse) at 2s");
-div.style.MozAnimationDirection = "alternate";
+div.style.animationDirection = "alternate";
 is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_in(0.2), 0.01,
           "animation-direction test 1 (alternate) at 2s");
-div.style.MozAnimationDirection = "alternate-reverse";
+div.style.animationDirection = "alternate-reverse";
 is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_in(0.8), 0.01,
           "animation-direction test 1 (alternate-reverse) at 2s");
 advance_clock(5000);
-div.style.MozAnimationDirection = "normal";
+div.style.animationDirection = "normal";
 is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_in(0.7), 0.01,
           "animation-direction test 1 (normal) at 7s");
-div.style.MozAnimationDirection = "reverse";
+div.style.animationDirection = "reverse";
 is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_in(0.3), 0.01,
           "animation-direction test 1 (reverse) at 7s");
-div.style.MozAnimationDirection = "alternate";
+div.style.animationDirection = "alternate";
 is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_in(0.7), 0.01,
           "animation-direction test 1 (alternate) at 7s");
-div.style.MozAnimationDirection = "alternate-reverse";
+div.style.animationDirection = "alternate-reverse";
 is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_in(0.3), 0.01,
           "animation-direction test 1 (alternate-reverse) at 7s");
 advance_clock(5000);
-div.style.MozAnimationDirection = "normal";
+div.style.animationDirection = "normal";
 is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_in(0.2), 0.01,
           "animation-direction test 1 (normal) at 12s");
-div.style.MozAnimationDirection = "reverse";
+div.style.animationDirection = "reverse";
 is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_in(0.8), 0.01,
           "animation-direction test 1 (reverse) at 12s");
-div.style.MozAnimationDirection = "alternate";
+div.style.animationDirection = "alternate";
 is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_in(0.8), 0.01,
           "animation-direction test 1 (alternate) at 12s");
-div.style.MozAnimationDirection = "alternate-reverse";
+div.style.animationDirection = "alternate-reverse";
 is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_in(0.2), 0.01,
           "animation-direction test 1 (alternate-reverse) at 12s");
 advance_clock(10000);
-div.style.MozAnimationDirection = "normal";
+div.style.animationDirection = "normal";
 is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_in(0.2), 0.01,
           "animation-direction test 1 (normal) at 22s");
-div.style.MozAnimationDirection = "reverse";
+div.style.animationDirection = "reverse";
 is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_in(0.8), 0.01,
           "animation-direction test 1 (reverse) at 22s");
-div.style.MozAnimationDirection = "alternate";
+div.style.animationDirection = "alternate";
 is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_in(0.2), 0.01,
           "animation-direction test 1 (alternate) at 22s");
-div.style.MozAnimationDirection = "alternate-reverse";
+div.style.animationDirection = "alternate-reverse";
 is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_in(0.8), 0.01,
           "animation-direction test 1 (alternate-reverse) at 22s");
 advance_clock(30000);
-div.style.MozAnimationDirection = "normal";
+div.style.animationDirection = "normal";
 is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_in(0.2), 0.01,
           "animation-direction test 1 (normal) at 52s");
-div.style.MozAnimationDirection = "reverse";
+div.style.animationDirection = "reverse";
 is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_in(0.8), 0.01,
           "animation-direction test 1 (reverse) at 52s");
-div.style.MozAnimationDirection = "alternate";
+div.style.animationDirection = "alternate";
 is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_in(0.8), 0.01,
           "animation-direction test 1 (alternate) at 52s");
-div.style.MozAnimationDirection = "alternate-reverse";
+div.style.animationDirection = "alternate-reverse";
 is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_in(0.2), 0.01,
           "animation-direction test 1 (alternate-reverse) at 52s");
 done_div();
 
 /*
  * css3-animations:  3.7. The 'animation-play-state' Property
  * http://dev.w3.org/csswg/css3-animations/#the-animation-play-state-property-
  */
 
 // simple test with just one animation
 new_div("");
-div.style.MozAnimationTimingFunction = "ease";
-div.style.MozAnimationName = "anim1";
-div.style.MozAnimationDuration = "1s";
-div.style.MozAnimationDirection = "alternate";
-div.style.MozAnimationIterationCount = "2";
+div.style.animationTimingFunction = "ease";
+div.style.animationName = "anim1";
+div.style.animationDuration = "1s";
+div.style.animationDirection = "alternate";
+div.style.animationIterationCount = "2";
 is(cs.marginLeft, "0px", "animation-play-state test 1, at 0s");
 advance_clock(250);
 is_approx(px_to_num(cs.marginLeft), 80 * gTF.ease(0.5), 0.01,
           "animation-play-state test 1 at 250ms");
-div.style.MozAnimationPlayState = "paused";
+div.style.animationPlayState = "paused";
 is_approx(px_to_num(cs.marginLeft), 80 * gTF.ease(0.5), 0.01,
           "animation-play-state test 1 at 250ms");
 advance_clock(250);
 is_approx(px_to_num(cs.marginLeft), 80 * gTF.ease(0.5), 0.01,
           "animation-play-state test 1 still at 500ms");
-div.style.MozAnimationPlayState = "running";
+div.style.animationPlayState = "running";
 is_approx(px_to_num(cs.marginLeft), 80 * gTF.ease(0.5), 0.01,
           "animation-play-state test 1 still at 500ms");
 advance_clock(500);
 is_approx(px_to_num(cs.marginLeft), 80 + 20 * gTF.ease(0.5), 0.01,
           "animation-play-state test 1 at 1000ms");
 advance_clock(250);
 is(cs.marginLeft, "100px", "animation-play-state test 1 at 1250ms");
 advance_clock(250);
 is_approx(px_to_num(cs.marginLeft), 80 + 20 * gTF.ease(0.5), 0.01,
           "animation-play-state test 1 at 1500ms");
-div.style.MozAnimationPlayState = "paused";
+div.style.animationPlayState = "paused";
 is_approx(px_to_num(cs.marginLeft), 80 + 20 * gTF.ease(0.5), 0.01,
           "animation-play-state test 1 at 1500ms");
 advance_clock(2000);
 is_approx(px_to_num(cs.marginLeft), 80 + 20 * gTF.ease(0.5), 0.01,
           "animation-play-state test 1 at 3500ms");
 advance_clock(500);
 is_approx(px_to_num(cs.marginLeft), 80 + 20 * gTF.ease(0.5), 0.01,
           "animation-play-state test 1 at 4000ms");
-div.style.MozAnimationPlayState = "";
+div.style.animationPlayState = "";
 is_approx(px_to_num(cs.marginLeft), 80 + 20 * gTF.ease(0.5), 0.01,
           "animation-play-state test 1 at 4000ms");
 advance_clock(500);
 is_approx(px_to_num(cs.marginLeft), 80 * gTF.ease(0.5), 0.01,
           "animation-play-state test 1 at 4500ms");
 advance_clock(250);
 is(cs.marginLeft, "0px", "animation-play-state test 1, at 4750ms");
 advance_clock(250);
 is(cs.marginLeft, "0px", "animation-play-state test 1, at 5000ms");
 done_div();
 
 // more complicated test with multiple animations (and different directions
 // and iteration counts)
 new_div("");
-div.style.MozAnimationTimingFunction = "ease-out, ease-in, ease-in-out";
-div.style.MozAnimationName = "anim2, anim3, anim4";
-div.style.MozAnimationDuration = "1s, 2s, 1s";
-div.style.MozAnimationDirection = "alternate, normal, normal";
-div.style.MozAnimationIterationCount = "4, 2, infinite";
+div.style.animationTimingFunction = "ease-out, ease-in, ease-in-out";
+div.style.animationName = "anim2, anim3, anim4";
+div.style.animationDuration = "1s, 2s, 1s";
+div.style.animationDirection = "alternate, normal, normal";
+div.style.animationIterationCount = "4, 2, infinite";
 is(cs.marginRight, "0px", "animation-play-state test 2, at 0s");
 is(cs.marginTop, "0px", "animation-play-state test 3, at 0s");
 is(cs.marginBottom, "0px", "animation-play-state test 4, at 0s");
 advance_clock(250);
-div.style.MozAnimationPlayState = "paused, running"; // pause 1 and 3
+div.style.animationPlayState = "paused, running"; // pause 1 and 3
 is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_out(0.25), 0.01,
           "animation-play-state test 2 at 250ms");
 is_approx(px_to_num(cs.marginTop), 100 * gTF.ease_in(0.125), 0.01,
           "animation-play-state test 3 at 250ms");
 is_approx(px_to_num(cs.marginBottom), 100 * gTF.ease_in_out(0.25), 0.01,
           "animation-play-state test 4 at 250ms");
 advance_clock(250);
 is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_out(0.25), 0.01,
           "animation-play-state test 2 at 500ms");
 is_approx(px_to_num(cs.marginTop), 100 * gTF.ease_in(0.25), 0.01,
           "animation-play-state test 3 at 500ms");
 is_approx(px_to_num(cs.marginBottom), 100 * gTF.ease_in_out(0.25), 0.01,
           "animation-play-state test 4 at 500ms");
-div.style.MozAnimationPlayState = "paused, running, running"; // unpause 3
+div.style.animationPlayState = "paused, running, running"; // unpause 3
 is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_out(0.25), 0.01,
           "animation-play-state test 2 at 500ms");
 is_approx(px_to_num(cs.marginTop), 100 * gTF.ease_in(0.25), 0.01,
           "animation-play-state test 3 at 500ms");
 is_approx(px_to_num(cs.marginBottom), 100 * gTF.ease_in_out(0.25), 0.01,
           "animation-play-state test 4 at 500ms");
 advance_clock(250);
 is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_out(0.25), 0.01,
           "animation-play-state test 2 at 750ms");
 is_approx(px_to_num(cs.marginTop), 100 * gTF.ease_in(0.375), 0.01,
           "animation-play-state test 3 at 750ms");
 is_approx(px_to_num(cs.marginBottom), 100 * gTF.ease_in_out(0.5), 0.01,
           "animation-play-state test 4 at 750ms");
-div.style.MozAnimationPlayState = "running, paused"; // unpause 1, pause 2
+div.style.animationPlayState = "running, paused"; // unpause 1, pause 2
 advance_clock(0); // notify refresh observers
 advance_clock(250);
 is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_out(0.5), 0.01,
           "animation-play-state test 2 at 1000ms");
 is_approx(px_to_num(cs.marginTop), 100 * gTF.ease_in(0.375), 0.01,
           "animation-play-state test 3 at 1000ms");
 is_approx(px_to_num(cs.marginBottom), 100 * gTF.ease_in_out(0.75), 0.01,
           "animation-play-state test 4 at 1000ms");
-div.style.MozAnimationPlayState = "paused"; // pause all
+div.style.animationPlayState = "paused"; // pause all
 advance_clock(0); // notify refresh observers
 advance_clock(3000);
 is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_out(0.5), 0.01,
           "animation-play-state test 2 at 4000ms");
 is_approx(px_to_num(cs.marginTop), 100 * gTF.ease_in(0.375), 0.01,
           "animation-play-state test 3 at 4000ms");
 is_approx(px_to_num(cs.marginBottom), 100 * gTF.ease_in_out(0.75), 0.01,
           "animation-play-state test 4 at 4000ms");
-div.style.MozAnimationPlayState = "running, paused"; // pause 2
+div.style.animationPlayState = "running, paused"; // pause 2
 advance_clock(0); // notify refresh observers
 advance_clock(850);
 is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_out(0.65), 0.01,
           "animation-play-state test 2 at 4850ms");
 is_approx(px_to_num(cs.marginTop), 100 * gTF.ease_in(0.375), 0.01,
           "animation-play-state test 3 at 4850ms");
 is_approx(px_to_num(cs.marginBottom), 100 * gTF.ease_in_out(0.6), 0.01,
           "animation-play-state test 4 at 4850ms");
@@ -1038,17 +1038,17 @@ is_approx(px_to_num(cs.marginTop), 100 *
 is_approx(px_to_num(cs.marginBottom), 100 * gTF.ease_in_out(0.2), 0.01,
           "animation-play-state test 4 at 7450ms");
 advance_clock(100);
 is(cs.marginRight, "0px", "animation-play-state test 2 at 7550ms");
 is_approx(px_to_num(cs.marginTop), 100 * gTF.ease_in(0.375), 0.01,
           "animation-play-state test 3 at 7550ms");
 is_approx(px_to_num(cs.marginBottom), 100 * gTF.ease_in_out(0.3), 0.01,
           "animation-play-state test 4 at 7550ms");
-div.style.MozAnimationPlayState = "running"; // unpause 2
+div.style.animationPlayState = "running"; // unpause 2
 advance_clock(0); // notify refresh observers
 advance_clock(1000);
 is(cs.marginRight, "0px", "animation-play-state test 2 at 7550ms");
 is_approx(px_to_num(cs.marginTop), 100 * gTF.ease_in(0.875), 0.01,
           "animation-play-state test 3 at 7550ms");
 is_approx(px_to_num(cs.marginBottom), 100 * gTF.ease_in_out(0.3), 0.01,
           "animation-play-state test 4 at 7550ms");
 advance_clock(500);
@@ -1077,84 +1077,84 @@ is_approx(px_to_num(cs.marginBottom), 10
 done_div();
 
 /*
  * css3-animations:  3.8. The 'animation-delay' Property
  * http://dev.w3.org/csswg/css3-animations/#the-animation-delay-property-
  */
 
 // test positive delay
-new_div("-moz-animation: anim2 1s 0.5s ease-out");
+new_div("animation: anim2 1s 0.5s ease-out");
 is(cs.marginRight, "0px", "positive delay test at 0ms");
 advance_clock(400);
 is(cs.marginRight, "0px", "positive delay test at 400ms");
 advance_clock(100);
 is(cs.marginRight, "0px", "positive delay test at 500ms");
 advance_clock(100);
 is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_out(0.1), 0.01,
           "positive delay test at 500ms");
 done_div();
 
 // test dynamic changes to delay (i.e., that we only check delay once,
 // at the very start of the animation)
-new_div("-moz-animation: anim2 1s 0.5s ease-out");
+new_div("animation: anim2 1s 0.5s ease-out");
 is(cs.marginRight, "0px", "dynamic delay delay test at 0ms");
 advance_clock(400);
 is(cs.marginRight, "0px", "dynamic delay delay test at 400ms");
-div.style.MozAnimationDelay = "0.2s";
+div.style.animationDelay = "0.2s";
 advance_clock(0);
 advance_clock(100);
 is(cs.marginRight, "0px", "dynamic delay delay test at 500ms");
 advance_clock(100);
 is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_out(0.1), 0.01,
           "dynamic delay delay test at 500ms");
-div.style.MozAnimationDelay = "1s";
+div.style.animationDelay = "1s";
 advance_clock(0);
 advance_clock(100);
 is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_out(0.2), 0.01,
           "dynamic delay delay test at 500ms");
 done_div();
 
 // test delay and play-state interaction
-new_div("-moz-animation: anim2 1s 0.5s ease-out");
+new_div("animation: anim2 1s 0.5s ease-out");
 is(cs.marginRight, "0px", "delay and play-state delay test at 0ms");
 advance_clock(400);
 is(cs.marginRight, "0px", "delay and play-state delay test at 400ms");
-div.style.MozAnimationPlayState = "paused";
+div.style.animationPlayState = "paused";
 advance_clock(0);
 advance_clock(100);
 is(cs.marginRight, "0px", "delay and play-state delay test at 500ms");
 advance_clock(500);
 is(cs.marginRight, "0px", "delay and play-state delay test at 1000ms");
-div.style.MozAnimationPlayState = "running";
+div.style.animationPlayState = "running";
 advance_clock(0);
 advance_clock(100);
 is(cs.marginRight, "0px", "delay and play-state delay test at 1100ms");
 advance_clock(100);
 is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_out(0.1), 0.01,
           "delay and play-state delay test at 1200ms");
-div.style.MozAnimationPlayState = "paused";
+div.style.animationPlayState = "paused";
 advance_clock(0);
 advance_clock(100);
 is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_out(0.1), 0.01,
           "delay and play-state delay test at 1300ms");
 done_div();
 
 // test negative delay and implicit starting values
 new_div("margin-top: 1000px");
 advance_clock(300);
 div.style.marginTop = "100px";
-div.style.MozAnimation = "kf1 1s -0.1s ease-in";
+div.style.animation = "kf1 1s -0.1s ease-in";
 is_approx(px_to_num(cs.marginTop), 100 - 50 * gTF.ease_in(0.2), 0.01,
           "delay and implicit starting values test");
 done_div();
 
 // test large negative delay that causes the animation to start
 // in the fourth iteration
-new_div("-moz-animation: anim2 1s -3.6s ease-in 5 alternate forwards");
+new_div("animation: anim2 1s -3.6s ease-in 5 alternate forwards");
 listen(); // rely on no flush having happened yet
 is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_in(0.4), 0.01,
           "large negative delay test at 0ms");
 check_events([{ type: 'animationstart', target: div,
                 animationName: 'anim2', elapsedTime: 3.6 }],
              "right after start in large negative delay test");
 advance_clock(380);
 is_approx(px_to_num(cs.marginRight), 100 * gTF.ease_in(0.02), 0.01,
@@ -1227,17 +1227,17 @@ advance_clock(300);
 is(cs_after.marginRight, "30px", ":after test at 2300ms");
 check_events([], "no events should be fired for animations on :after");
 done_div();
 
 /**
  * Test handling of properties that are present in only some of the
  * keyframes.
  */
-new_div("-moz-animation: multiprop 1s ease-in-out alternate infinite");
+new_div("animation: multiprop 1s ease-in-out alternate infinite");
 is(cs.paddingTop, "10px", "multiprop top at 0ms");
 is(cs.paddingLeft, "30px", "multiprop top at 0ms");
 advance_clock(100);
 is_approx(px_to_num(cs.paddingTop), 10 + 30 * gTF.ease(0.2), 0.01,
           "multiprop top at 100ms");
 is_approx(px_to_num(cs.paddingLeft), 30 + 20 * gTF.ease(0.4), 0.01,
           "multiprop left at 100ms");
 advance_clock(200);
@@ -1275,82 +1275,82 @@ is_approx(px_to_num(cs.paddingTop), 10 +
           "multiprop top at 1900ms");
 is_approx(px_to_num(cs.paddingLeft), 30 + 20 * gTF.ease(0.4), 0.01,
           "multiprop left at 1900ms");
 done_div();
 
 // Test for https://bugzilla.mozilla.org/show_bug.cgi?id=651456 -- make
 // sure that refreshing of animations doesn't break when we get two
 // refreshes with the same timestamp.
-new_div("-moz-animation: anim2 1s linear");
+new_div("animation: anim2 1s linear");
 is(cs.marginRight, "0px", "bug 651456 at 0ms");
 advance_clock(100);
 is(cs.marginRight, "10px", "bug 651456 at 100ms (1)");
 advance_clock(0); // still forces a refresh
 is(cs.marginRight, "10px", "bug 651456 at 100ms (2)");
 advance_clock(100);
 is(cs.marginRight, "20px", "bug 651456 at 200ms");
 done_div();
 
 // Test that UA !important rules override animations.
 // This test depends on forms.css having a rule
 //   select { line-height: !important }
 // If that rule changes, we should rewrite it to depend on a different rule.
 new_element("select", "");
 var default_line_height = cs.lineHeight;
 done_div();
-new_element("select", "-moz-animation: uaoverride 2s linear infinite");
+new_element("select", "animation: uaoverride 2s linear infinite");
 is(cs.lineHeight, default_line_height,
    "animations should not override UA !important at 0ms");
 is(cs.marginTop, "20px",
    "rest of animation should still work when UA !important present at 0ms");
 advance_clock(200);
 is(cs.lineHeight, default_line_height,
    "animations should not override UA !important at 200ms");
 is(cs.marginTop, "40px",
    "rest of animation should still work when UA !important present at 200ms");
 done_div();
 
 // Test interaction of animations and restyling (Bug 686656).
 // This test depends on kf3 getting its 0% and 100% values from the
 // rules below it in the cascade; we're checking that the animation
 // isn't rebuilt when the restyles happen.
-new_div("-moz-animation: kf3 1s linear forwards");
+new_div("animation: kf3 1s linear forwards");
 is(cs.marginTop, "0px", "bug 686656 test 1 at 0ms");
 advance_clock(250);
 display.style.color = "blue";
 is(cs.marginTop, "100px", "bug 686656 test 1 at 250ms");
 advance_clock(375);
 is(cs.marginTop, "50px", "bug 686656 test 1 at 625ms");
 advance_clock(375);
 is(cs.marginTop, "0px", "bug 686656 test 1 at 1000ms");
 done_div();
 display.style.color = "";
 
 // Test interaction of animations and restyling (Bug 686656),
 // with reframing.
 // This test depends on kf3 getting its 0% and 100% values from the
 // rules below it in the cascade; we're checking that the animation
 // isn't rebuilt when the restyles happen.
-new_div("-moz-animation: kf3 1s linear forwards");
+new_div("animation: kf3 1s linear forwards");
 is(cs.marginTop, "0px", "bug 686656 test 2 at 0ms");
 advance_clock(250);
 display.style.overflow = "scroll";
 is(cs.marginTop, "100px", "bug 686656 test 2 at 250ms");
 advance_clock(375);
 is(cs.marginTop, "50px", "bug 686656 test 2 at 625ms");
 advance_clock(375);
 is(cs.marginTop, "0px", "bug 686656 test 2 at 1000ms");
 done_div();
 display.style.overflow = "";
 
 // Test that cascading between keyframes rules is per-property rather
 // than per-rule (bug ), and that the timing function isn't taken from a
 // rule that's skipped.  (Bug 738003)
-new_div("-moz-animation: cascade 1s linear forwards; position: relative");
+new_div("animation: cascade 1s linear forwards; position: relative");
 is(cs.top, "0px", "cascade test (top) at 0ms");
 is(cs.left, "0px", "cascade test (top) at 0ms");
 advance_clock(125);
 is(cs.top, "0px", "cascade test (top) at 125ms");
 is(cs.left, "50px", "cascade test (top) at 125ms");
 advance_clock(125);
 is(cs.top, "0px", "cascade test (top) at 250ms");
 is(cs.left, "100px", "cascade test (top) at 250ms");
@@ -1369,17 +1369,17 @@ is(cs.left, "0px", "cascade test (top) a
 advance_clock(125);
 is(cs.top, "50px", "cascade test (top) at 875ms");
 is(cs.left, "0px", "cascade test (top) at 875ms");
 advance_clock(125);
 is(cs.top, "0px", "cascade test (top) at 1000ms");
 is(cs.left, "0px", "cascade test (top) at 1000ms");
 done_div();
 
-new_div("-moz-animation: cascade2 8s linear forwards");
+new_div("animation: cascade2 8s linear forwards");
 is(cs.textIndent, "0px", "cascade2 test at 0s");
 advance_clock(1000);
 is(cs.textIndent, "25px", "cascade2 test at 1s");
 advance_clock(1000);
 is(cs.textIndent, "50px", "cascade2 test at 2s");
 advance_clock(1000);
 is(cs.textIndent, "25px", "cascade2 test at 3s");
 advance_clock(1000);
--- a/layout/style/test/test_bug716226.html
+++ b/layout/style/test/test_bug716226.html
@@ -4,17 +4,17 @@
 https://bugzilla.mozilla.org/show_bug.cgi?id=716226
 -->
 <head>
   <meta charset="utf-8">
   <title>Test for Bug 716226</title>
   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
   <style id="s">
-    @-moz-keyframes foo { }
+    @keyframes foo { }
   </style>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=716226">Mozilla Bug 716226</a>
 <p id="display"></p>
 <div id="content" style="display: none">
   
 </div>
--- a/layout/style/test/test_garbage_at_end_of_declarations.html
+++ b/layout/style/test/test_garbage_at_end_of_declarations.html
@@ -50,32 +50,32 @@ var gAllowsExtra = {
   "font": { "caption": true, "icon": true, "menu": true, "message-box": true,
             "small-caption": true, "status-bar": true },
   "voice-family": {},
 };
 
 /* These are the reverse of the above list; they're the unusual values
    that do allow extra keywords afterwards */
 var gAllowsExtraUnusual = {
-  "-moz-transition": { "all": true, "0s": true, "0s 0s": true, "ease": true,
-                       "1s 2s linear": true, "1s linear 2s": true,
-                       "linear 1s 2s": true, "linear 1s": true,
-                       "1s linear": true, "1s 2s": true, "2s 1s": true,
-                       "linear": true, "1s": true, "2s": true,
-                       "ease-in-out": true, "2s ease-in": true,
-                       "ease-out 2s": true },
-  "-moz-animation": { "none": true, "0s": true, "ease": true,
-                      "normal": true, "running": true, "1.0": true,
-                      "1s 2s linear": true, "1s linear 2s": true,
-                      "linear 1s 2s": true, "linear 1s": true,
-                      "1s linear": true, "1s 2s": true, "2s 1s": true,
-                      "linear": true, "1s": true, "2s": true,
-                      "ease-in-out": true, "2s ease-in": true,
-                      "ease-out 2s": true, "1s bounce, 2s": true,
-                      "1s bounce, 2s none": true },
+  "transition": { "all": true, "0s": true, "0s 0s": true, "ease": true,
+                  "1s 2s linear": true, "1s linear 2s": true,
+                  "linear 1s 2s": true, "linear 1s": true,
+                  "1s linear": true, "1s 2s": true, "2s 1s": true,
+                  "linear": true, "1s": true, "2s": true,
+                  "ease-in-out": true, "2s ease-in": true,
+                  "ease-out 2s": true },
+  "animation": { "none": true, "0s": true, "ease": true,
+                 "normal": true, "running": true, "1.0": true,
+                 "1s 2s linear": true, "1s linear 2s": true,
+                 "linear 1s 2s": true, "linear 1s": true,
+                 "1s linear": true, "1s 2s": true, "2s 1s": true,
+                 "linear": true, "1s": true, "2s": true,
+                 "ease-in-out": true, "2s ease-in": true,
+                 "ease-out 2s": true, "1s bounce, 2s": true,
+                 "1s bounce, 2s none": true },
 };
 
 function test_property(property)
 {
   var info = gCSSProperties[property];
 
   function test_value(value) {
     if (property in gAllowsExtra &&
--- a/layout/style/test/test_keyframes_rules.html
+++ b/layout/style/test/test_keyframes_rules.html
@@ -4,17 +4,17 @@
 https://bugzilla.mozilla.org/show_bug.cgi?id=577974
 -->
 <head>
   <title>Test for Bug 577974</title>
   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
   <style id="style">
 
-  @-moz-keyframes bounce {
+  @keyframes bounce {
     from {
       margin-left: 0
     }
 
     /*
      * These rules should get dropped due to syntax errors.  The script
      * below tests that the 25% rule following them is at cssRules[1].
      */
@@ -70,17 +70,17 @@ is(bounce.cssRules[0].type, 8, "keyframe
 is(bounce.cssRules[0].keyText, "0%", "keyframe rule keyText");
 is(bounce.cssRules[1].keyText, "25%", "keyframe rule keyText");
 is(bounce.cssRules[2].keyText, "75%, 85%", "keyframe rule keyText");
 is(bounce.cssRules[3].keyText, "100%", "keyframe rule keyText");
 is(bounce.cssRules[0].style.marginLeft, "0px", "keyframe rule style");
 is(bounce.cssRules[1].style.marginLeft, "25px", "keyframe rule style");
 
 is(bounce.cssRules[0].cssText, "0% { margin-left: 0px; }");
-is(bounce.cssText, "@-moz-keyframes bouncier {\n" +
+is(bounce.cssText, "@keyframes bouncier {\n" +
                    "0% { margin-left: 0px; }\n" +
                    "25% { margin-left: 25px; }\n" +
                    "75%, 85% { margin-left: 90px; }\n" +
                    "100% { margin-left: 100px; }\n" +
                    "}");
 
 bounce.cssRules[1].keyText = "from, 1"; // syntax error
 bounce.cssRules[1].keyText = "from, x"; // syntax error
--- a/layout/style/test/test_rules_out_of_sheets.html
+++ b/layout/style/test/test_rules_out_of_sheets.html
@@ -96,17 +96,17 @@ rule = make_rule_and_remove_sheet("@medi
                                   });
 try {
   rule.style.color = "";
 } catch(ex) {}
 try {
   rule.style.color = "fuchsia";
 } catch(ex) {}
 
-rule = make_rule_and_remove_sheet("@-moz-keyframes a { from { color: blue } }");
+rule = make_rule_and_remove_sheet("@keyframes a { from { color: blue } }");
 rule.insertRule("from { color: fuchsia}");
 rule.deleteRule("from");
 rule.name = "b";
 rule.cssRules[0].keyText = "50%";
 
 ok(true, "didn't crash");
 
 </script>
--- a/layout/style/test/test_shorthand_property_getters.html
+++ b/layout/style/test/test_shorthand_property_getters.html
@@ -148,28 +148,28 @@ is(e.style.background, "", "should not h
 e.setAttribute("style", "background-clip: border-box, padding-box, border-box; background-origin: border-box, padding-box, padding-box; background-size: auto, auto, auto; background-color: blue; background-image: url(404.png), none, url(404-2.png); background-attachment: fixed, scroll, scroll; background-position: top left, center, 30px 50px, bottom; background-repeat: repeat-x, repeat, no-repeat");
 is(e.style.background, "", "should not have background shorthand (background-position too long)");
 e.setAttribute("style", "background-clip: border-box, padding-box, border-box; background-origin: border-box, padding-box, padding-box; background-size: auto, auto, auto; background-color: blue; background-image: url(404.png), none, url(404-2.png); background-attachment: fixed, scroll, scroll; background-position: top left, center, 30px 50px; background-repeat: repeat-x, repeat");
 is(e.style.background, "", "should not have background shorthand (background-repeat too short)");
 e.setAttribute("style", "background-clip: border-box, padding-box, border-box; background-origin: border-box, padding-box, padding-box; background-size: auto, auto, auto, auto; background-color: blue; background-image: url(404.png), none, url(404-2.png); background-attachment: fixed, scroll, scroll; background-position: top left, center, 30px 50px; background-repeat: repeat-x, repeat, no-repeat");
 is(e.style.background, "", "should not have background shorthand (background-size too long)");
 
 // Check that we only serialize transition when the lists are the same length.
-e.setAttribute("style", "-moz-transition-property: color, width; -moz-transition-duration: 1s, 200ms; -moz-transition-timing-function: ease-in, linear; -moz-transition-delay: 0s, 1s");
-isnot(e.style.MozTransition, "", "should have -moz-transition shorthand (lists same length)");
-e.setAttribute("style", "-moz-transition-property: color, width, left; -moz-transition-duration: 1s, 200ms; -moz-transition-timing-function: ease-in, linear; -moz-transition-delay: 0s, 1s");
-is(e.style.MozTransition, "", "should not have -moz-transition shorthand (lists different lengths)");
-e.setAttribute("style", "-moz-transition-property: all; -moz-transition-duration: 1s, 200ms; -moz-transition-timing-function: ease-in, linear; -moz-transition-delay: 0s, 1s");
-is(e.style.MozTransition, "", "should not have -moz-transition shorthand (lists different lengths)");
-e.setAttribute("style", "-moz-transition-property: color, width; -moz-transition-duration: 1s, 200ms, 300ms; -moz-transition-timing-function: ease-in, linear; -moz-transition-delay: 0s, 1s");
-is(e.style.MozTransition, "", "should not have -moz-transition shorthand (lists different lengths)");
-e.setAttribute("style", "-moz-transition-property: color, width; -moz-transition-duration: 1s, 200ms; -moz-transition-timing-function: ease-in, linear, ease-out; -moz-transition-delay: 0s, 1s");
-is(e.style.MozTransition, "", "should not have -moz-transition shorthand (lists different lengths)");
-e.setAttribute("style", "-moz-transition-property: color, width; -moz-transition-duration: 1s, 200ms; -moz-transition-timing-function: ease-in, linear; -moz-transition-delay: 0s, 1s, 0s");
-is(e.style.MozTransition, "", "should not have -moz-transition shorthand (lists different lengths)");
+e.setAttribute("style", "transition-property: color, width; transition-duration: 1s, 200ms; transition-timing-function: ease-in, linear; transition-delay: 0s, 1s");
+isnot(e.style.transition, "", "should have transition shorthand (lists same length)");
+e.setAttribute("style", "transition-property: color, width, left; transition-duration: 1s, 200ms; transition-timing-function: ease-in, linear; transition-delay: 0s, 1s");
+is(e.style.transition, "", "should not have transition shorthand (lists different lengths)");
+e.setAttribute("style", "transition-property: all; transition-duration: 1s, 200ms; transition-timing-function: ease-in, linear; transition-delay: 0s, 1s");
+is(e.style.transition, "", "should not have transition shorthand (lists different lengths)");
+e.setAttribute("style", "transition-property: color, width; transition-duration: 1s, 200ms, 300ms; transition-timing-function: ease-in, linear; transition-delay: 0s, 1s");
+is(e.style.transition, "", "should not have transition shorthand (lists different lengths)");
+e.setAttribute("style", "transition-property: color, width; transition-duration: 1s, 200ms; transition-timing-function: ease-in, linear, ease-out; transition-delay: 0s, 1s");
+is(e.style.transition, "", "should not have transition shorthand (lists different lengths)");
+e.setAttribute("style", "transition-property: color, width; transition-duration: 1s, 200ms; transition-timing-function: ease-in, linear; transition-delay: 0s, 1s, 0s");
+is(e.style.transition, "", "should not have transition shorthand (lists different lengths)");
 
 // Check that the 'border' shorthand resets 'border-image' and
 // '-moz-border-*-colors', but that other 'border-*' shorthands don't
 // (bug 482692).
 e.setAttribute("style", 'border-image: url("foo.png") 5 5 5 5 / 5 5 5 5 / 5 5 5 5 repeat repeat; border-left: medium solid green');
 is(e.style.cssText,
    'border-image: url("foo.png") 5 5 5 5 / 5 5 5 5 / 5 5 5 5 repeat repeat; border-left: medium solid green;',
    "border-left does NOT reset border-image");
--- a/layout/style/test/test_transitions.html
+++ b/layout/style/test/test_transitions.html
@@ -17,17 +17,17 @@ https://bugzilla.mozilla.org/show_bug.cg
   #display .before::before, #display .after::after {
     display: block;
     width: 0;
     text-indent: 0;
   }
   #display .before.started::before, #display .after.started::after {
     width: 100px;
     text-indent: 100px;
-    -moz-transition: 8s width ease-in-out, 8s text-indent ease-in-out;
+    transition: 8s width ease-in-out, 8s text-indent ease-in-out;
   }
   #display .before::before {
     content: "Before";
   }
   #display .after::after {
     content: "After";
   }
 
@@ -120,33 +120,33 @@ var div = document.getElementById("displ
 // Set up all the elements on which we are going to start transitions.
 
 // We have two reference elements to check the expected timing range.
 // They both have 8s linear transitions from 0 to 1000px.
 function make_reference_p() {
     var p = document.createElement("p");
     p.appendChild(document.createTextNode("reference"));
     p.style.textIndent = "0px";
-    p.style.MozTransition = "8s text-indent linear";
+    p.style.transition = "8s text-indent linear";
     div.appendChild(p);
     return p;
 }
 var earlyref = make_reference_p();
 var earlyrefcs = getComputedStyle(earlyref, "");
 
 // Test all timing functions using a set of 8-second transitions, which
 // we check at times 0, 2s, 4s, 6s, and 8s.
 var tftests = [];
 for (var tf in timingFunctions) {
     var p = document.createElement("p");
     var t = document.createTextNode("transition-timing-function: " + tf);
     p.appendChild(t);
     p.style.textIndent = "0px";
-    p.style.MozTransition = "8s text-indent linear";
-    p.style.MozTransitionTimingFunction = tf;
+    p.style.transition = "8s text-indent linear";
+    p.style.transitionTimingFunction = tf;
     div.appendChild(p);
     is(getComputedStyle(p, "").textIndent, "0px",
        "should be zero before changing value");
     tftests.push([ p, tf ]);
 }
 
 // Check that the timing function continues even when we restyle in the
 // middle.
@@ -154,17 +154,17 @@ var interrupt_tests = [];
 for each (var restyleParent in [true, false]) {
     for (var itime = 2; itime < 8; itime += 2) {
         var p = document.createElement("p");
         var t = document.createTextNode("interrupt on " +
                                         (restyleParent ? "parent" : "node itself") +
                                         " at " + itime + "s");
         p.appendChild(t);
         p.style.textIndent = "0px";
-        p.style.MozTransition = "8s text-indent cubic-bezier(0, 1, 1, 0)";
+        p.style.transition = "8s text-indent cubic-bezier(0, 1, 1, 0)";
         if (restyleParent) {
           var d = document.createElement("div");
           d.appendChild(p);
           div.appendChild(d);
         } else {
           div.appendChild(p);
         }
         is(getComputedStyle(p, "").textIndent, "0px",
@@ -181,48 +181,48 @@ for each (var restyleParent in [true, fa
 // with 'ease-out' timing function.
 var delay_tests = {};
 for (var d = -4; d <= 4; ++d) {
     var p = document.createElement("p");
     var delay = d + "s";
     var t = document.createTextNode("transition-delay: " + delay);
     p.appendChild(t);
     p.style.marginLeft = "0px";
-    p.style.MozTransition = "4s margin-left ease-out " + delay;
+    p.style.transition = "4s margin-left ease-out " + delay;
     div.appendChild(p);
     is(getComputedStyle(p, "").marginLeft, "0px",
        "should be zero before changing value");
     delay_tests[d] = p;
 }
 
 // Test transition-delay values of -4s through 4s on a 4s transition
 // with duration of zero.
 var delay_zero_tests = {};
 for (var d = -4; d <= 4; ++d) {
     var p = document.createElement("p");
     var delay = d + "s";
     var t = document.createTextNode("transition-delay: " + delay);
     p.appendChild(t);
     p.style.marginLeft = "0px";
-    p.style.MozTransition = "0s margin-left linear " + delay;
+    p.style.transition = "0s margin-left linear " + delay;
     div.appendChild(p);
     is(getComputedStyle(p, "").marginLeft, "0px",
        "should be zero before changing value");
     delay_zero_tests[d] = p;
 }
 
 // Test that changing the value on an already-running transition to the
 // value it currently happens to have resets the transition.
 function make_reset_test(transition, description)
 {
     var p = document.createElement("p");
     var t = document.createTextNode(description);
     p.appendChild(t);
     p.style.marginLeft = "0px";
-    p.style.MozTransition = transition;
+    p.style.transition = transition;
     div.appendChild(p);
     is(getComputedStyle(p, "").marginLeft, "0px",
        "should be zero before changing value");
     return p;
 }
 var reset_test = make_reset_test("4s margin-left ease-out 4s", "transition-delay reset to starting point");
 var reset_test_reference = make_reset_test("4s margin-left linear -3s", "reference for previous test (reset test)");
 
@@ -261,18 +261,18 @@ var descendant_tests = [
 for (var i in descendant_tests) {
     var test = descendant_tests[i];
     test.parentNode = document.createElement("div");
     test.childNode = document.createElement("p");
     test.parentNode.appendChild(test.childNode);
     test.childNode.appendChild(document.createTextNode(
         "parent with \"" + test.parent_transition + "\" and " +
         "child with \"" + test.child_transition + "\""));
-    test.parentNode.style.MozTransition = test.parent_transition;
-    test.childNode.style.MozTransition = test.child_transition;
+    test.parentNode.style.transition = test.parent_transition;
+    test.childNode.style.transition = test.child_transition;
     test.parentNode.style.textIndent = "50px"; // transition from 50 to 150
     test.parentNode.style.letterSpacing = "10px"; // transition from 10 to 5
     div.appendChild(test.parentNode);
     var parentCS = getComputedStyle(test.parentNode, "");
     var childCS = getComputedStyle(test.childNode, "");
     is(parentCS.textIndent, "50px",
        "parent text-indent should be 50px before changing");
     is(parentCS.letterSpacing, "10px",
@@ -285,36 +285,36 @@ for (var i in descendant_tests) {
 }
 
 // For all of these transitions, the transition for margin-left should
 // have a duration of 8s, and the default timing function (ease) and
 // delay (0).
 // This is because we're implementing the proposal in
 // http://lists.w3.org/Archives/Public/www-style/2009Aug/0109.html
 var number_tests = [
-  { style: "-moz-transition: 4s margin, 8s margin-left" },
-  { style: "-moz-transition: 4s margin-left, 8s margin" },
-  { style: "-moz-transition-property: margin-left; " +
-             "-moz-transition-duration: 8s, 2s" },
-  { style: "-moz-transition-property: margin-left, margin-left; " + 
-             "-moz-transition-duration: 2s, 8s" },
-  { style: "-moz-transition-property: margin-left, margin-left, margin-left; " +
-             "-moz-transition-duration: 8s, 2s" },
-  { style: "-moz-transition-property: margin-left; " +
-             "-moz-transition-duration: 8s, 16s" },
-  { style: "-moz-transition-property: margin-left, margin-left; " + 
-             "-moz-transition-duration: 16s, 8s" },
-  { style: "-moz-transition-property: margin-left, margin-left, margin-left; " +
-             "-moz-transition-duration: 8s, 16s" },
-  { style: "-moz-transition-property: text-indent,word-spacing,margin-left; " +
-             "-moz-transition-duration: 8s; " +
-             "-moz-transition-delay: 0, 8s" },
-  { style: "-moz-transition-property: text-indent,word-spacing,margin-left; " +
-             "-moz-transition-duration: 8s, 16s; " +
-             "-moz-transition-delay: 8s, 8s, 0, 8s, 8s, 8s" },
+  { style: "transition: 4s margin, 8s margin-left" },
+  { style: "transition: 4s margin-left, 8s margin" },
+  { style: "transition-property: margin-left; " +
+             "transition-duration: 8s, 2s" },
+  { style: "transition-property: margin-left, margin-left; " + 
+             "transition-duration: 2s, 8s" },
+  { style: "transition-property: margin-left, margin-left, margin-left; " +
+             "transition-duration: 8s, 2s" },
+  { style: "transition-property: margin-left; " +
+             "transition-duration: 8s, 16s" },
+  { style: "transition-property: margin-left, margin-left; " + 
+             "transition-duration: 16s, 8s" },
+  { style: "transition-property: margin-left, margin-left, margin-left; " +
+             "transition-duration: 8s, 16s" },
+  { style: "transition-property: text-indent,word-spacing,margin-left; " +
+             "transition-duration: 8s; " +
+             "transition-delay: 0, 8s" },
+  { style: "transition-property: text-indent,word-spacing,margin-left; " +
+             "transition-duration: 8s, 16s; " +
+             "transition-delay: 8s, 8s, 0, 8s, 8s, 8s" },
 ];
 
 for (var i in number_tests) {
     var test = number_tests[i];
     var p = document.createElement("p");
     p.setAttribute("style", test.style);
     var t = document.createTextNode(test.style);
     p.appendChild(t);
@@ -328,17 +328,17 @@ for (var i in number_tests) {
 // Test transitions that are also from-display:none, to-display:none, and
 // display:none throughout.
 var from_none_test, to_none_test, always_none_test;
 function make_display_test(initially_none, text)
 {
     var p = document.createElement("p");
     p.appendChild(document.createTextNode(text));
     p.style.textIndent = "0px";
-    p.style.MozTransition = "8s text-indent ease-in-out";
+    p.style.transition = "8s text-indent ease-in-out";
     if (initially_none)
         p.style.display = "none";
     div.appendChild(p);
     return p;
 }
 from_none_test   = make_display_test(true,  "transition from display:none");
 to_none_test     = make_display_test(false, "transition to display:none");
 always_none_test = make_display_test(true,  "transition always display:none");
--- a/layout/style/test/test_transitions_and_zoom.html
+++ b/layout/style/test/test_transitions_and_zoom.html
@@ -5,17 +5,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 -->
 <head>
   <title>Test for Bug 583219</title>
   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
   <style type="text/css">
 
   #display {
-    -moz-transition: margin-left 1s linear;
+    transition: margin-left 1s linear;
   }
 
   </style>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=583219">Mozilla Bug 583219</a>
 <p id="display"></p>
 <pre id="test">
--- a/layout/style/test/test_transitions_bug537151.html
+++ b/layout/style/test/test_transitions_bug537151.html
@@ -5,17 +5,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 -->
 <head>
   <title>Test for Bug 537151</title>
   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
   <style type="text/css">
 
   #display {
-    -moz-transition: margin-left 200ms;
+    transition: margin-left 200ms;
   }
 
   </style>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=537151">Mozilla Bug 537151</a>
 <p id="display">Paragraph</p>
 <pre id="test">
--- a/layout/style/test/test_transitions_cancel_near_end.html
+++ b/layout/style/test/test_transitions_cancel_near_end.html
@@ -7,17 +7,17 @@ https://bugzilla.mozilla.org/show_bug.cg
   <title>Test for Bug 613888</title>
   <script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
   <style type="text/css">
     #animated-elements-container > span {
       color: black;
       background: white;
-      -moz-transition:
+      transition:
         color 10s ease-out,
         background 1s ease-out;
     }
     #animated-elements-container > span.another {
       color: white;
       background: black;
     }
   </style>
--- a/layout/style/test/test_transitions_computed_value_combinations.html
+++ b/layout/style/test/test_transitions_computed_value_combinations.html
@@ -33,44 +33,44 @@ function myrand()
                  Math.ceil(rand_state) == Math.floor(rand_state);
   return rand_state / 0x100000000; // return value in [0,1)
 }
 
 // We want to test a bunch of values for each property.
 // Each of these values will also have a "computed" property filled in
 // below, so that we ensure it always computes to the same value.
 var values = {
-  "-moz-transition-duration":
+  "transition-duration":
     [
       { lone: true,  specified: "-moz-initial" },
       { lone: false, specified: "2s" },
       { lone: false, specified: "0s" },
       { lone: false, specified: "430ms" },
       { lone: false, specified: "-1s" },
     ],
-  "-moz-transition-property":
+  "transition-property":
     [
       { lone: true,  specified: "-moz-initial" },
       { lone: true,  specified: "none" },
       { lone: true,  specified: "all" },
       { lone: false, specified: "color" },
       { lone: false, specified: "border-spacing" },
       // Make sure to test the "unknown property" case.
       { lone: false, specified: "unsupported-property" },
       { lone: false, specified: "-other-unsupported-property" },
     ],
-  "-moz-transition-timing-function":
+  "transition-timing-function":
     [
       { lone: true,  specified: "-moz-initial" },
       { lone: false, specified: "linear" },
       { lone: false, specified: "ease" },
       { lone: false, specified: "ease-in-out" },
       { lone: false, specified: "cubic-bezier(0, 0, 0.63, 1.00)" },
     ],
-  "-moz-transition-delay":
+  "transition-delay":
     [
       { lone: true,  specified: "-moz-initial" },
       { lone: false, specified: "2s" },
       { lone: false, specified: "0s" },
       { lone: false, specified: "430ms" },
       { lone: false, specified: "-1s" },
     ],
 };
--- a/layout/style/test/test_transitions_computed_values.html
+++ b/layout/style/test/test_transitions_computed_values.html
@@ -22,92 +22,92 @@ https://bugzilla.mozilla.org/show_bug.cg
  * computed value stays the same
  */
 
 var p = document.getElementById("content");
 var c = document.createElement("div");
 p.appendChild(c);
 var cs = getComputedStyle(c, "");
 
-p.style.MozTransitionProperty = "margin-left, margin-right";
-c.style.MozTransitionProperty = "inherit";
-is(cs.MozTransitionProperty, "margin-left, margin-right",
+p.style.transitionProperty = "margin-left, margin-right";
+c.style.transitionProperty = "inherit";
+is(cs.transitionProperty, "margin-left, margin-right",
    "computed style match with no other properties");
-c.style.MozTransitionDuration = "5s";
-is(cs.MozTransitionProperty, "margin-left, margin-right",
+c.style.transitionDuration = "5s";
+is(cs.transitionProperty, "margin-left, margin-right",
    "computed style match with shorter property");
-is(cs.MozTransitionDuration, "5s",
+is(cs.transitionDuration, "5s",
    "shorter property not extended");
-c.style.MozTransitionDuration = "5s, 4s, 3s, 2000ms";
-is(cs.MozTransitionProperty, "margin-left, margin-right",
+c.style.transitionDuration = "5s, 4s, 3s, 2000ms";
+is(cs.transitionProperty, "margin-left, margin-right",
    "computed style match with longer property");
-is(cs.MozTransitionDuration, "5s, 4s, 3s, 2s",
+is(cs.transitionDuration, "5s, 4s, 3s, 2s",
    "longer property computed correctly");
-p.style.MozTransitionProperty = "";
-c.style.MozTransitionProperty = "";
-c.style.MozTransitionDuration = "";
+p.style.transitionProperty = "";
+c.style.transitionProperty = "";
+c.style.transitionDuration = "";
 
 // and repeat the above set of tests with property and duration swapped
-p.style.MozTransitionDuration = "5s, 4s";
-c.style.MozTransitionDuration = "inherit";
-is(cs.MozTransitionDuration, "5s, 4s",
+p.style.transitionDuration = "5s, 4s";
+c.style.transitionDuration = "inherit";
+is(cs.transitionDuration, "5s, 4s",
    "computed style match with no other properties");
-c.style.MozTransitionProperty = "margin-left";
-is(cs.MozTransitionDuration, "5s, 4s",
+c.style.transitionProperty = "margin-left";
+is(cs.transitionDuration, "5s, 4s",
    "computed style match with shorter property");
-is(cs.MozTransitionProperty, "margin-left",
+is(cs.transitionProperty, "margin-left",
    "shorter property not extended");
-c.style.MozTransitionProperty =
+c.style.transitionProperty =
   "margin-left, margin-right, margin-top, margin-bottom";
-is(cs.MozTransitionDuration, "5s, 4s",
+is(cs.transitionDuration, "5s, 4s",
    "computed style match with longer property");
-is(cs.MozTransitionProperty,
+is(cs.transitionProperty,
    "margin-left, margin-right, margin-top, margin-bottom",
    "longer property computed correctly");
-p.style.MozTransitionDuration = "";
-c.style.MozTransitionDuration = "";
-c.style.MozTransitionProperty = "";
+p.style.transitionDuration = "";
+c.style.transitionDuration = "";
+c.style.transitionProperty = "";
 
 // And do the same pair of tests for animations:
 
-p.style.MozAnimationName = "bounce, roll";
-c.style.MozAnimationName = "inherit";
-is(cs.MozAnimationName, "bounce, roll",
+p.style.animationName = "bounce, roll";
+c.style.animationName = "inherit";
+is(cs.animationName, "bounce, roll",
    "computed style match with no other properties");
-c.style.MozAnimationDuration = "5s";
-is(cs.MozAnimationName, "bounce, roll",
+c.style.animationDuration = "5s";
+is(cs.animationName, "bounce, roll",
    "computed style match with shorter property");
-is(cs.MozAnimationDuration, "5s",
+is(cs.animationDuration, "5s",
    "shorter property not extended");
-c.style.MozAnimationDuration = "5s, 4s, 3s, 2000ms";
-is(cs.MozAnimationName, "bounce, roll",
+c.style.animationDuration = "5s, 4s, 3s, 2000ms";
+is(cs.animationName, "bounce, roll",
    "computed style match with longer property");
-is(cs.MozAnimationDuration, "5s, 4s, 3s, 2s",
+is(cs.animationDuration, "5s, 4s, 3s, 2s",
    "longer property computed correctly");
-p.style.MozAnimationName = "";
-c.style.MozAnimationName = "";
-c.style.MozAnimationDuration = "";
+p.style.animationName = "";
+c.style.animationName = "";
+c.style.animationDuration = "";
 
 // and repeat the above set of tests with name and duration swapped
-p.style.MozAnimationDuration = "5s, 4s";
-c.style.MozAnimationDuration = "inherit";
-is(cs.MozAnimationDuration, "5s, 4s",
+p.style.animationDuration = "5s, 4s";
+c.style.animationDuration = "inherit";
+is(cs.animationDuration, "5s, 4s",
    "computed style match with no other properties");
-c.style.MozAnimationName = "bounce";
-is(cs.MozAnimationDuration, "5s, 4s",
+c.style.animationName = "bounce";
+is(cs.animationDuration, "5s, 4s",
    "computed style match with shorter property");
-is(cs.MozAnimationName, "bounce",
+is(cs.animationName, "bounce",
    "shorter property not extended");
-c.style.MozAnimationName =
+c.style.animationName =
   "bounce, roll, wiggle, spin";
-is(cs.MozAnimationDuration, "5s, 4s",
+is(cs.animationDuration, "5s, 4s",
    "computed style match with longer property");
-is(cs.MozAnimationName,
+is(cs.animationName,
    "bounce, roll, wiggle, spin",
    "longer property computed correctly");
-p.style.MozAnimationDuration = "";
-c.style.MozAnimationDuration = "";
-c.style.MozAnimationName = "";
+p.style.animationDuration = "";
+c.style.animationDuration = "";
+c.style.animationName = "";
 
 </script>
 </pre>
 </body>
 </html>
--- a/layout/style/test/test_transitions_dynamic_changes.html
+++ b/layout/style/test/test_transitions_dynamic_changes.html
@@ -14,44 +14,44 @@ https://bugzilla.mozilla.org/show_bug.cg
 <pre id="test">
 <script type="application/javascript">
 
 /** Test for Bug 525530 **/
 
 var p = document.getElementById("display");
 var cs = getComputedStyle(p, "");
 
-p.style.MozTransitionProperty = "all";
-p.style.MozTransitionDuration = "4s";
-p.style.MozTransitionDelay = "-2s";
-p.style.MozTransitionTimingFunction = "linear";
+p.style.transitionProperty = "all";
+p.style.transitionDuration = "4s";
+p.style.transitionDelay = "-2s";
+p.style.transitionTimingFunction = "linear";
 
 is(cs.textIndent, "100px", "initial value");
 
 p.style.textIndent = "0";
 is(cs.textIndent, "50px", "transition is halfway");
-p.style.MozTransitionDuration = "0s";
+p.style.transitionDuration = "0s";
 is(cs.textIndent, "50px", "changing duration doesn't change transitioning");
-p.style.MozTransitionDelay = "0s";
+p.style.transitionDelay = "0s";
 is(cs.textIndent, "50px", "changing delay doesn't change transitioning");
-p.style.MozTransitionProperty = "text-indent";
+p.style.transitionProperty = "text-indent";
 is(cs.textIndent, "50px",
    "irrelevant change to transition property doesn't change transitioning");
-p.style.MozTransitionProperty = "font";
+p.style.transitionProperty = "font";
 is(cs.textIndent, "0px",
    "relevant change to transition property does change transitioning");
 
 /** Test for Bug 522643 */
-p.style.MozTransitionDuration = "4s";
-p.style.MozTransitionDelay = "-2s";
-p.style.MozTransitionProperty = "text-indent";
+p.style.transitionDuration = "4s";
+p.style.transitionDelay = "-2s";
+p.style.transitionProperty = "text-indent";
 p.style.textIndent = "100px";
 is(cs.textIndent, "50px", "transition is halfway");
-p.style.MozTransitionDuration = "0s";
-p.style.MozTransitionDelay = "0s";
+p.style.transitionDuration = "0s";
+p.style.transitionDelay = "0s";
 is(cs.textIndent, "50px",
    "changing duration and delay doesn't change transitioning");
 p.style.textIndent = "0px";
 is(cs.textIndent, "0px",
    "changing property after changing duration and delay stops transition");
 
 </script>
 </pre>
--- a/layout/style/test/test_transitions_events.html
+++ b/layout/style/test/test_transitions_events.html
@@ -7,38 +7,38 @@ https://bugzilla.mozilla.org/show_bug.cg
   <title>Test for Bug 531585 (transitionend event)</title>
   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
 </head>
 <style type="text/css">
 
 .bar { margin: 10px; }
 
-#one { -moz-transition-duration: 500ms; -moz-transition-property: all; }
-#two { -moz-transition: margin-left 1s; }
-#three { -moz-transition: margin 0.5s 0.25s; }
+#one { transition-duration: 500ms; transition-property: all; }
+#two { transition: margin-left 1s; }
+#three { transition: margin 0.5s 0.25s; }
 
 #four, #five, #six, #seven::before, #seven::after {
-  -moz-transition: 500ms color;
+  transition: 500ms color;
   border-color: black; /* don't derive from color */
   -moz-column-rule-color: black; /* don't derive from color */
   -moz-text-decoration-color: black; /* don't derive from color */
 }
 
 #four {
   /* give the reversing transition a long duration; the reversing will
      still be quick */
-  -moz-transition-duration: 30s;
-  -moz-transition-timing-function: cubic-bezier(0, 1, 1, 0);
+  transition-duration: 30s;
+  transition-timing-function: cubic-bezier(0, 1, 1, 0);
 }
 
 /* make sure we don't get events for the pseudo-elements */
 #seven::before, #seven::after {
   content: "x";
-  -moz-transition-duration: 50ms;
+  transition-duration: 50ms;
 }
 #seven[foo]::before, #seven[foo]::after { color: lime; }
 
 </style>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=531585">Mozilla Bug 531585</a>
 <p id="display">
 
@@ -267,19 +267,19 @@ started_test();
 $("seven").setAttribute("foo", "bar");
 
 setTimeout(function() {
              if (cs("five") != "rgb(0, 255, 0)" &&
                  cs("six") != "rgb(0, 255, 0)") {
                // The transition hasn't finished already.
                did_stops = true;
              }
-             $("five").style.MozTransitionProperty = "margin-left";
-             $("six").style.MozTransitionDuration = "0s";
-             $("six").style.MozTransitionDelay = "0s";
+             $("five").style.transitionProperty = "margin-left";
+             $("six").style.transitionDuration = "0s";
+             $("six").style.transitionDelay = "0s";
              $("six").style.color = "blue";
            }, 100);
 function poll_start_reversal() {
   if (cs("four").color != "rgb(0, 0, 255)") {
     // The forward transition has started.
     $("four").style.color = "blue";
   } else {
     // The forward transition has not started yet.
--- a/layout/style/test/test_transitions_per_property.html
+++ b/layout/style/test/test_transitions_per_property.html
@@ -263,17 +263,17 @@ for (prop in supported_properties) {
 
 // Test that transitions don't do anything (i.e., aren't supported) on
 // the properties not in our test list above (and not transition
 // properties themselves).
 for (prop in gCSSProperties) {
   var info = gCSSProperties[prop];
   if (!(prop in supported_properties) &&
       info.type != CSS_TYPE_TRUE_SHORTHAND &&
-      !prop.match(/^-moz-transition-/) &&
+      !prop.match(/^transition-/) &&
       // FIXME (Bug 119078): THIS SHOULD REALLY NOT BE NEEDED!
       prop != "-moz-binding") {
 
     if ("prerequisites" in info) {
       var prereqs = info.prerequisites;
       for (var prereq in prereqs) {
         div.style.setProperty(prereq, prereqs[prereq], "");
       }
@@ -283,48 +283,48 @@ for (prop in gCSSProperties) {
     var all_computed = [];
     for (var idx in all_values) {
       var val = all_values[idx];
       div.style.setProperty(prop, val, "");
       all_computed.push(cs.getPropertyValue(prop));
     }
     div.style.removeProperty(prop);
 
-    div.style.setProperty("-moz-transition", prop + " 20s linear", "");
+    div.style.setProperty("transition", prop + " 20s linear", "");
     for (var i = 0; i < all_values.length; ++i) {
       for (var j = i + 1; j < all_values.length; ++j) {
         div.style.setProperty(prop, all_values[i], "");
         is(cs.getPropertyValue(prop), all_computed[i],
            "transitions not supported for property " + prop +
            " value " + all_values[i]);
         div.style.setProperty(prop, all_values[j], "");
         is(cs.getPropertyValue(prop), all_computed[j],
            "transitions not supported for property " + prop +
            " value " + all_values[j]);
       }
     }
 
-    div.style.removeProperty("-moz-transition");
+    div.style.removeProperty("transition");
     div.style.removeProperty(prop);
     if ("prerequisites" in info) {
       var prereqs = info.prerequisites;
       for (var prereq in prereqs) {
         div.style.removeProperty(prereq);
       }
     }
   }
 }
 
 // Do 4-second linear transitions with -1 second transition delay and
 // linear timing function so that we can expect the transition to be
 // one quarter of the way through the value space right after changing
 // the property.
-div.style.setProperty("-moz-transition-duration", "4s", "");
-div.style.setProperty("-moz-transition-delay", "-1s", "");
-div.style.setProperty("-moz-transition-timing-function", "linear", "");
+div.style.setProperty("transition-duration", "4s", "");
+div.style.setProperty("transition-delay", "-1s", "");
+div.style.setProperty("transition-timing-function", "linear", "");
 for (prop in supported_properties) {
   var tinfo = supported_properties[prop];
   var info = gCSSProperties[prop];
 
   isnot(info.type, CSS_TYPE_TRUE_SHORTHAND,
         prop + " must not be a shorthand");
   if ("prerequisites" in info) {
     var prereqs = info.prerequisites;
@@ -337,28 +337,28 @@ for (prop in supported_properties) {
     }
   }
 
   for (var idx in tinfo) {
     tinfo[idx](prop);
   }
 
   // Make sure to unset the property and stop transitions on it.
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.removeProperty(prop);
   cs.getPropertyValue(prop);
 
   if ("prerequisites" in info) {
     var prereqs = info.prerequisites;
     for (var prereq in prereqs) {
       div.style.removeProperty(prereq);
     }
   }
 }
-div.style.removeProperty("-moz-transition");
+div.style.removeProperty("transition");
 
 function get_distance(prop, v1, v2)
 {
   return SpecialPowers.DOMWindowUtils
            .computeAnimationDistance(div, prop, v1, v2);
 }
 
 function transform3D_enabled()
@@ -372,118 +372,118 @@ function check_distance(prop, start, qua
   var se = get_distance(prop, start, end);
   var qe = get_distance(prop, quarter, end);
 
   ok(Math.abs((sq * 4 - se) / se) < 0.0001, "property '" + prop + "': distance " + sq + " from start '" + start + "' to quarter '" + quarter + "' should be quarter distance " + se + " from start '" + start + "' to end '" + end + "'");
   ok(Math.abs((qe * 4 - se * 3) / se) < 0.0001, "property '" + prop + "': distance " + qe + " from quarter '" + quarter + "' to end '" + end + "' should be three quarters distance " + se + " from start '" + start + "' to end '" + end + "'");
 }
 
 function test_length_transition(prop) {
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "4px", "");
   is(cs.getPropertyValue(prop), "4px",
      "length-valued property " + prop + ": computed value before transition");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "12px", "");
   is(cs.getPropertyValue(prop), "6px",
      "length-valued property " + prop + ": interpolation of lengths");
   check_distance(prop, "4px", "6px", "12px");
 }
 
 function test_length_clamped(prop) {
   test_length_clamped_or_unclamped(prop, true);
 }
 
 function test_length_unclamped(prop) {
   test_length_clamped_or_unclamped(prop, false);
 }
 
 function test_length_clamped_or_unclamped(prop, is_clamped) {
-  div.style.setProperty("-moz-transition-timing-function", FUNC_NEGATIVE, "");
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-timing-function", FUNC_NEGATIVE, "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "0px", "");
   is(cs.getPropertyValue(prop), "0px",
      "length-valued property " + prop + ": flush before clamping test");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "100px", "");
   (is_clamped ? is : isnot)(cs.getPropertyValue(prop), "0px",
      "length-valued property " + prop + ": clamping of negatives");
-  div.style.setProperty("-moz-transition-timing-function", "linear", "");
+  div.style.setProperty("transition-timing-function", "linear", "");
 }
 
 // Test using float values in the range [0, 1] (e.g. opacity)
 function test_float_zeroToOne_transition(prop) {
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "0.3", "");
   is(cs.getPropertyValue(prop), "0.3",
      "float-valued property " + prop + ": computed value before transition");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "0.8", "");
   is(cs.getPropertyValue(prop), "0.425",
      "float-valued property " + prop + ": interpolation of floats");
   check_distance(prop, "0.3", "0.425", "0.8");
 }
 
 function test_float_zeroToOne_clamped(prop) {
   test_float_zeroToOne_clamped_or_unclamped(prop, true);
 }
 function test_float_zeroToOne_unclamped(prop) {
   test_float_zeroToOne_clamped_or_unclamped(prop, false);
 }
 
 function test_float_zeroToOne_clamped_or_unclamped(prop, is_clamped) {
-  div.style.setProperty("-moz-transition-timing-function", FUNC_NEGATIVE, "");
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-timing-function", FUNC_NEGATIVE, "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "0", "");
   is(cs.getPropertyValue(prop), "0",
      "float-valued property " + prop + ": flush before clamping test");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "1", "");
   (is_clamped ? is : isnot)(cs.getPropertyValue(prop), "0",
      "float-valued property " + prop + ": clamping of negatives");
-  div.style.setProperty("-moz-transition-timing-function", "linear", "");
+  div.style.setProperty("transition-timing-function", "linear", "");
 }
 
 // Test using float values in the range [1, infinity) (e.g. stroke-miterlimit)
 function test_float_aboveOne_transition(prop) {
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "1", "");
   is(cs.getPropertyValue(prop), "1",
      "float-valued property " + prop + ": computed value before transition");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "2.1", "");
   is(cs.getPropertyValue(prop), "1.275",
      "float-valued property " + prop + ": interpolation of floats");
   check_distance(prop, "1", "1.275", "2.1");
 }
 
 function test_float_aboveOne_clamped(prop) {
-  div.style.setProperty("-moz-transition-timing-function", FUNC_NEGATIVE, "");
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-timing-function", FUNC_NEGATIVE, "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "1", "");
   is(cs.getPropertyValue(prop), "1",
      "float-valued property " + prop + ": flush before clamping test");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "5", "");
   is(cs.getPropertyValue(prop), "1",
      "float-valued property " + prop + ": clamping of negatives");
-  div.style.setProperty("-moz-transition-timing-function", "linear", "");
+  div.style.setProperty("transition-timing-function", "linear", "");
 }
 
 function test_percent_transition(prop) {
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "25%", "");
   var av = cs.getPropertyValue(prop);
   var a = any_unit_to_num(av);
   div.style.setProperty(prop, "75%", "");
   var bv = cs.getPropertyValue(prop);
   var b = any_unit_to_num(bv);
   isnot(b, a, "different percentages (" + av + " and " + bv +
               ") should be different for " + prop);
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "25%", "");
   var res = cs.getPropertyValue(prop);
   is(any_unit_to_num(res) * 4, 3 * b + a,
      "percent-valued property " + prop + ": interpolation of percents: " +
      res + " should be a quarter of the way between " + bv + " and " + av);
   ok(has_num(res),
      "percent-valued property " + prop + ": percent computes to number");
   check_distance(prop, "25%", "37.5%", "75%");
@@ -493,29 +493,29 @@ function test_percent_clamped(prop) {
   test_percent_clamped_or_unclamped(prop, true);
 }
 
 function test_percent_unclamped(prop) {
   test_percent_clamped_or_unclamped(prop, false);
 }
 
 function test_percent_clamped_or_unclamped(prop, is_clamped) {
-  div.style.setProperty("-moz-transition-timing-function", FUNC_NEGATIVE, "");
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-timing-function", FUNC_NEGATIVE, "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "0%", "");
   var zero_val = cs.getPropertyValue(prop); // flushes too
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "150%", "");
   (is_clamped ? is : isnot)(cs.getPropertyValue(prop), zero_val,
      "percent-valued property " + prop + ": clamping of negatives");
-  div.style.setProperty("-moz-transition-timing-function", "linear", "");
+  div.style.setProperty("transition-timing-function", "linear", "");
 }
 
 function test_length_percent_calc_transition(prop) {
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "0%", "");
   var av = cs.getPropertyValue(prop);
   var a = any_unit_to_num(av);
   div.style.setProperty(prop, "100%", "");
   var bv = cs.getPropertyValue(prop);
   var b = any_unit_to_num(bv);
   div.style.setProperty(prop, "100px", "");
   var cv = cs.getPropertyValue(prop);
@@ -524,143 +524,143 @@ function test_length_percent_calc_transi
               ") should be different for " + prop);
 
   div.style.setProperty(prop, "50%", "");
   var v1v = cs.getPropertyValue(prop);
   is(any_unit_to_num(v1v) * 2, a + b,
      "computed value before transition for " + prop + ": '" +
      v1v + "' should be halfway " +
      "between '" + av + "' + and '" + bv + "'.");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "200px", "");
   var v2v = cs.getPropertyValue(prop);
   is(any_unit_to_num(v2v) * 8, 5*a + 3*b + 4*c,
      "interpolation between length and percent for " + prop + ": '"
      + v2v + "'");
 
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "-moz-calc(25% + 100px)", "");
   v1v = cs.getPropertyValue(prop);
   is(any_unit_to_num(v1v) * 4, b + 4*c,
      "computed value before transition for " + prop + ": '" + v1v + "'");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "75%", "");
   v2v = cs.getPropertyValue(prop);
   is(any_unit_to_num(v2v) * 8, 5*a + 3*b + 6*c,
      "interpolation between calc() and percent for " + prop + ": '" +
      v2v + "'");
 
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "150px", "");
   v1v = cs.getPropertyValue(prop);
   is(any_unit_to_num(v1v) * 2, c * 3,
      "computed value before transition for " + prop + ": '" + v1v + "'");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "-moz-calc(50% + 50px)", "");
   v2v = cs.getPropertyValue(prop);
   is(any_unit_to_num(v2v) * 8, 7 * a + b + 10*c,
      "interpolation between length and calc() for " + prop + ": '" +
      v2v + "'");
 
   check_distance(prop, "50%", "-moz-calc(37.5% + 50px)", "200px");
   check_distance(prop, "-moz-calc(25% + 100px)", "-moz-calc(37.5% + 75px)",
                        "75%");
   check_distance(prop, "150px", "-moz-calc(125px + 12.5%)",
                        "-moz-calc(50% + 50px)");
 }
 
 function test_color_transition(prop) {
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "rgb(255, 28, 0)", "");
   is(cs.getPropertyValue(prop), "rgb(255, 28, 0)",
      "color-valued property " + prop + ": computed value before transition");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "rgb(75, 84, 128)", "");
   is(cs.getPropertyValue(prop), "rgb(210, 42, 32)",
      "color-valued property " + prop + ": interpolation of colors");
 
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "rgb(128, 64, 0)", "");
   (prop == "color" ? div.parentNode : div).style.
     setProperty("color", "rgb(0, 0, 128)", "");
   is(cs.getPropertyValue(prop), "rgb(128, 64, 0)",
      "color-valued property " + prop + ": computed value before transition");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "currentColor", "");
   is(cs.getPropertyValue(prop), "rgb(96, 48, 32)",
      "color-valued property " + prop + ": interpolation of currentColor");
 
   check_distance(prop, "rgb(255, 28, 0)", "rgb(210, 42, 32)",
                        "rgb(75, 84, 128)");
   check_distance(prop, "rgb(128, 64, 0)", "rgb(96, 48, 32)", "currentColor");
 
   (prop == "color" ? div.parentNode : div).style.removeProperty("color");
 
-  div.style.setProperty("-moz-transition-timing-function", FUNC_NEGATIVE, "");
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-timing-function", FUNC_NEGATIVE, "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "rgb(0, 255, 0)", "");
   var vals = cs.getPropertyValue(prop).match(/rgb\(([^, ]*), ([^, ]*), ([^, ]*)\)/);
   is(vals.length, 4,
      "color-valued property " + prop + ": flush before clamping test (length)");
   is(vals[1], "0",
      "color-valued property " + prop + ": flush before clamping test (red)");
   is(vals[2], "255",
      "color-valued property " + prop + ": flush before clamping test (green)");
   is(vals[3], "0",
      "color-valued property " + prop + ": flush before clamping test (blue)");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "rgb(255, 0, 128)", "");
   // FIXME: Once we support non-sRGB colors, these tests will need fixing.
   vals = cs.getPropertyValue(prop).match(/rgb\(([^, ]*), ([^, ]*), ([^, ]*)\)/);
   is(vals.length, 4,
      "color-valued property " + prop + ": clamping of negatives (length)");
   is(vals[1], "0",
      "color-valued property " + prop + ": clamping of negatives (red)");
   is(vals[2], "255",
      "color-valued property " + prop + ": clamping of above-range (green)");
   is(vals[3], "0",
      "color-valued property " + prop + ": clamping of negatives (blue)");
-  div.style.setProperty("-moz-transition-timing-function", "linear", "");
+  div.style.setProperty("transition-timing-function", "linear", "");
 }
 
 function test_border_color_transition(prop) {
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "rgb(128, 64, 0)", "");
   div.style.setProperty("color", "rgb(0, 0, 128)", "");
   is(cs.getPropertyValue(prop), "rgb(128, 64, 0)",
      "color-valued property " + prop + ": computed value before transition");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.removeProperty(prop);
   is(cs.getPropertyValue(prop), "rgb(96, 48, 32)",
      "color-valued property " + prop + ": interpolation of initial value");
 
   check_distance(prop, "rgb(128, 64, 0)", "rgb(96, 48, 32)", "-moz-initial");
 
   div.style.removeProperty("color");
 }
 
 function test_shadow_transition(prop) {
   var spreadStr = (prop == "box-shadow") ? " 0px" : "";
 
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "none", "");
   is(cs.getPropertyValue(prop), "none",
      "shadow-valued property " + prop + ": computed value before transition");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "4px 8px 3px red", "");
   is(cs.getPropertyValue(prop), "rgba(255, 0, 0, 0.25) 1px 2px 0.75px" + spreadStr,
      "shadow-valued property " + prop + ": interpolation of shadows");
   check_distance(prop, "none", "rgba(255, 0, 0, 0.25) 1px 2px 0.75px",
                        "4px 8px 3px red");
 
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "#038000 4px 4px, 2px 2px blue", "");
   is(cs.getPropertyValue(prop), "rgb(3, 128, 0) 4px 4px 0px" + spreadStr + ", rgb(0, 0, 255) 2px 2px 0px" + spreadStr,
      "shadow-valued property " + prop + ": computed value before transition");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "8px 8px 8px red", "");
   is(cs.getPropertyValue(prop), "rgb(66, 96, 0) 5px 5px 2px" + spreadStr + ", rgba(0, 0, 255, 0.75) 1.5px 1.5px 0px" + spreadStr,
      "shadow-valued property " + prop + ": interpolation of shadows");
   check_distance(prop, "#038000 4px 4px, 2px 2px blue",
                        "rgb(66, 96, 0) 5px 5px 2px, rgba(0, 0, 255, 0.75) 1.5px 1.5px 0px",
                        "8px 8px 8px red");
 
   if (prop == "box-shadow") {
@@ -683,63 +683,63 @@ function test_shadow_transition(prop) {
   div.style.setProperty(prop, "2px 2px 2px", "");
   is(cs.getPropertyValue(prop), defaultColor + "2px 2px 2px" + spreadStr,
      "shadow-valued property " + prop + ": non-interpolable cases");
   div.style.setProperty(prop, "6px 14px 10px", "");
   is(cs.getPropertyValue(prop), defaultColor + "3px 5px 4px" + spreadStr,
      "shadow-valued property " + prop + ": interpolation without color");
   check_distance(prop, "2px 2px 2px", "3px 5px 4px", "6px 14px 10px");
 
-  div.style.setProperty("-moz-transition-timing-function", FUNC_NEGATIVE, "");
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-timing-function", FUNC_NEGATIVE, "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "0px 0px 0px black", "");
   is(cs.getPropertyValue(prop), "rgb(0, 0, 0) 0px 0px 0px" + spreadStr,
      "shadow-valued property " + prop + ": flush before clamping test");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "10px 10px 10px black", "");
   var vals = cs.getPropertyValue(prop).split(" ");
   is(vals.length, 6 + (prop == "box-shadow"), "unexpected number of values");
   is(vals.slice(0, 3).join(" "), "rgb(0, 0, 0)",
      "shadow-valued property " + prop + " (color): clamping of negatives");
   isnot(vals[3], "0px",
         "shadow-valued property " + prop + " (x): clamping of negatives");
   isnot(vals[4], "0px",
         "shadow-valued property " + prop + " (y): clamping of negatives");
   is(vals[5], "0px",
      "shadow-valued property " + prop + " (radius): clamping of negatives");
   if (prop == "box-shadow") {
-    div.style.setProperty("-moz-transition-property", "none", "");
+    div.style.setProperty("transition-property", "none", "");
     div.style.setProperty(prop, "0px 0px 0px 0px black", "");
     is(cs.getPropertyValue(prop), "rgb(0, 0, 0) 0px 0px 0px 0px",
        "shadow-valued property " + prop + ": flush before clamping test");
-    div.style.setProperty("-moz-transition-property", prop, "");
+    div.style.setProperty("transition-property", prop, "");
     div.style.setProperty(prop, "10px 10px 10px 10px black", "");
     var vals = cs.getPropertyValue(prop).split(" ");
     is(vals.length, 7, "unexpected number of values");
     is(vals.slice(0, 3).join(" "), "rgb(0, 0, 0)",
        "shadow-valued property " + prop + " (color): clamping of negatives");
     isnot(vals[3], "0px",
           "shadow-valued property " + prop + " (x): clamping of negatives");
     isnot(vals[4], "0px",
           "shadow-valued property " + prop + " (y): clamping of negatives");
     is(vals[5], "0px",
        "shadow-valued property " + prop + " (radius): clamping of negatives");
     isnot(vals[6], "0px",
           "shadow-valued property " + prop + " (spread): clamping of negatives");
   }
-  div.style.setProperty("-moz-transition-timing-function", "linear", "");
+  div.style.setProperty("transition-timing-function", "linear", "");
 }
 
 function test_dasharray_transition(prop) {
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "3", "");
   is(cs.getPropertyValue(prop), "3",
      "dasharray-valued property " + prop +
      ": computed value before transition");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "15px", "");
   is(cs.getPropertyValue(prop), "6",
      "dasharray-valued property " + prop + ": interpolation of dasharray");
   check_distance(prop, "3", "6", "15px");
   div.style.setProperty(prop, "none", "");
   is(cs.getPropertyValue(prop), "none",
      "dasharray-valued property " + prop + ": non-interpolability of none");
   div.style.setProperty(prop, "6,8px,4,4", "");
@@ -765,231 +765,231 @@ function test_dasharray_transition(prop)
   div.style.setProperty(prop, "2,50%,6,10", "");
   is(cs.getPropertyValue(prop), "2, 50%, 6, 10",
      "dasharray-valued property " + prop + ": non-interpolability of mixed units");
   div.style.setProperty(prop, "6,30%,2,2", "");
   is(cs.getPropertyValue(prop), "3, 45%, 5, 8",
      "dasharray-valued property " + prop + ": interpolation of dasharray");
   check_distance(prop, "2,50%,6,10", "3, 45%, 5, 8", "6,30%,2,2");
 
-  div.style.setProperty("-moz-transition-timing-function", FUNC_NEGATIVE, "");
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-timing-function", FUNC_NEGATIVE, "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "0,0%", "");
   is(cs.getPropertyValue(prop), "0, 0%",
      "dasharray-valued property " + prop + ": flush before clamping test");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "5, 25%", "");
   is(cs.getPropertyValue(prop), "0, 0%",
      "dasharray-valued property " + prop + ": clamping of negatives");
-  div.style.setProperty("-moz-transition-timing-function", "linear", "");
+  div.style.setProperty("transition-timing-function", "linear", "");
 }
 
 function test_radius_transition(prop) {
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-property", "none", "");
 
   // FIXME: Test a square for now, since we haven't updated to the spec
   // for vertical components being relative to the height.
   // Note: We use powers of two here so the floating-point math comes out
   // nicely.
   div.style.setProperty("width", "256px", "");
   div.style.setProperty("height", "256px", "");
   div.style.setProperty("border", "none", "");
   div.style.setProperty("padding", "0", "");
 
   div.style.setProperty(prop, "3px", "");
   is(cs.getPropertyValue(prop), "3px",
      "radius-valued property " + prop +
      ": computed value before transition");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "15px", "");
   is(cs.getPropertyValue(prop), "6px",
      "radius-valued property " + prop + ": interpolation of radius");
   check_distance(prop, "3px", "6px", "15px");
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "12.5%", "");
   is(cs.getPropertyValue(prop), "32px",
      "radius-valued property " + prop + ": computed value before transition");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "25%", "");
   is(cs.getPropertyValue(prop), "40px",
      "radius-valued property " + prop + ": interpolation of radius");
   check_distance(prop, "12.5%", "15.625%", "25%");
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "3px 8px", "");
   is(cs.getPropertyValue(prop), "3px 8px",
      "radius-valued property " + prop + ": computed value before transition");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "15px 12px", "");
   is(cs.getPropertyValue(prop), "6px 9px",
      "radius-valued property " + prop + ": interpolation of radius");
   check_distance(prop, "3px 8px", "6px 9px", "15px 12px");
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "12.5% 6.25%", "");
   is(cs.getPropertyValue(prop), "32px 16px",
      "radius-valued property " + prop + ": computed value before transition");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "25%", "");
   is(cs.getPropertyValue(prop), "40px 28px",
      "radius-valued property " + prop + ": interpolation of radius");
   check_distance(prop, "12.5% 6.25%", "15.625% 10.9375%", "25%");
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "6.25% 12.5%", "");
   is(cs.getPropertyValue(prop), "16px 32px",
      "radius-valued property " + prop + ": computed value before transition");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "64px 16px", "");
   is(cs.getPropertyValue(prop), "28px",
      "radius-valued property " + prop + ": interpolation of radius with mixed units");
   check_distance(prop, "6.25% 12.5%",
                  "-moz-calc(4.6875% + 16px) -moz-calc(9.375% + 4px)",
                  "64px 16px");
 
-  div.style.setProperty("-moz-transition-timing-function", FUNC_NEGATIVE, "");
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-timing-function", FUNC_NEGATIVE, "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "0px 0px", "");
   is(cs.getPropertyValue(prop), "0px",
      "radius-valued property " + prop + ": flush before clamping test");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "10px 20px", "");
   is(cs.getPropertyValue(prop), "0px",
      "radius-valued property " + prop + ": clamping of negatives");
-  div.style.setProperty("-moz-transition-timing-function", "linear", "");
+  div.style.setProperty("transition-timing-function", "linear", "");
 
   test_length_percent_calc_transition(prop);
 
   div.style.removeProperty("width");
   div.style.removeProperty("height");
   div.style.removeProperty("border");
   div.style.removeProperty("padding");
 }
 
 function test_integer_transition(prop) {
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "4", "");
   is(cs.getPropertyValue(prop), "4",
      "integer-valued property " + prop + ": computed value before transition");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "-14", "");
   is(cs.getPropertyValue(prop), "-1",
      "integer-valued property " + prop + ": interpolation of integers");
   check_distance(prop, "6", "1", "-14");
 
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "-4", "");
   is(cs.getPropertyValue(prop), "-4",
      "integer-valued property " + prop + ": computed value before transition");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "8", "");
   is(cs.getPropertyValue(prop), "-1",
      "integer-valued property " + prop + ": interpolation of integers");
   check_distance(prop, "-4", "-1", "8");
 
-  div.style.setProperty("-moz-transition-timing-function", FUNC_NEGATIVE, "");
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-timing-function", FUNC_NEGATIVE, "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "0", "");
   is(cs.getPropertyValue(prop), "0",
      "integer-valued property " + prop + ": flush before clamping test");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "100", "");
   isnot(cs.getPropertyValue(prop), "0",
         "integer-valued property " + prop + ": clamping of negatives");
-  div.style.setProperty("-moz-transition-timing-function", "linear", "");
+  div.style.setProperty("transition-timing-function", "linear", "");
 }
 
 function test_font_stretch(prop) {
   is(prop, "font-stretch", "only designed for one property");
 
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "normal", "");
   is(cs.getPropertyValue(prop), "normal",
      "font-stretch property " + prop + ": computed value before transition");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "ultra-expanded", "");
   is(cs.getPropertyValue(prop), "semi-expanded",
      "font-stretch property " + prop + ": interpolation of font-stretches");
   check_distance(prop, "normal", "semi-expanded", "ultra-expanded");
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "expanded", "");
   is(cs.getPropertyValue(prop), "expanded",
      "font-stretch property " + prop + ": computed value before transition");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "extra-condensed", "");
   is(cs.getPropertyValue(prop), "normal",
      "font-stretch property " + prop + ": interpolation of font-stretches");
   check_distance(prop, "expanded", "semi-expanded", "condensed");
 
-  div.style.setProperty("-moz-transition-timing-function", FUNC_NEGATIVE, "");
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-timing-function", FUNC_NEGATIVE, "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "ultra-condensed", "");
   is(cs.getPropertyValue(prop), "ultra-condensed",
      "font-stretch property " + prop + ": flush before clamping test");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "ultra-expanded", "");
   is(cs.getPropertyValue(prop), "ultra-condensed",
      "font-stretch property " + prop + ": clamping of values");
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "ultra-expanded", "");
   is(cs.getPropertyValue(prop), "ultra-expanded",
      "font-stretch property " + prop + ": flush before clamping test");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "ultra-condensed", "");
   is(cs.getPropertyValue(prop), "ultra-expanded",
      "font-stretch property " + prop + ": clamping of values");
-  div.style.setProperty("-moz-transition-timing-function", "linear", "");
+  div.style.setProperty("transition-timing-function", "linear", "");
 }
 
 function test_font_weight(prop) {
   is(prop, "font-weight", "only designed for one property");
 
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "normal", "");
   is(cs.getPropertyValue(prop), "400",
      "font-weight property " + prop + ": computed value before transition");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "900", "");
   is(cs.getPropertyValue(prop), "500",
      "font-weight property " + prop + ": interpolation of font-weights");
   check_distance(prop, "400", "500", "800");
 
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "900", "");
   is(cs.getPropertyValue(prop), "900",
      "font-weight property " + prop + ": computed value before transition");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "100", "");
   is(cs.getPropertyValue(prop), "700",
      "font-weight property " + prop + ": interpolation of font-weights");
   check_distance(prop, "900", "700", "100");
 
-  div.style.setProperty("-moz-transition-timing-function", FUNC_NEGATIVE, "");
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-timing-function", FUNC_NEGATIVE, "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "100", "");
   is(cs.getPropertyValue(prop), "100",
      "font-weight property " + prop + ": flush before clamping test");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "900", "");
   is(cs.getPropertyValue(prop), "100",
      "font-weight property " + prop + ": clamping of values");
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "900", "");
   is(cs.getPropertyValue(prop), "900",
      "font-weight property " + prop + ": flush before clamping test");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "100", "");
   is(cs.getPropertyValue(prop), "900",
      "font-weight property " + prop + ": clamping of values");
-  div.style.setProperty("-moz-transition-timing-function", "linear", "");
+  div.style.setProperty("transition-timing-function", "linear", "");
 }
 
 function test_pos_integer_or_auto_transition(prop) {
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "4", "");
   is(cs.getPropertyValue(prop), "4",
      "integer-valued property " + prop + ": computed value before transition");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "11", "");
   is(cs.getPropertyValue(prop), "5",
      "integer-valued property " + prop + ": interpolation of integers");
   check_distance(prop, "4", "6", "12");
   div.style.setProperty(prop, "auto", "");
   is(cs.getPropertyValue(prop), "auto",
      "integer-valued property " + prop + ": auto not interpolable");
   div.style.setProperty(prop, "8", "");
@@ -997,229 +997,229 @@ function test_pos_integer_or_auto_transi
      "integer-valued property " + prop + ": computed value before transition");
   div.style.setProperty(prop, "4", "");
   is(cs.getPropertyValue(prop), "7",
      "integer-valued property " + prop + ": interpolation of integers");
   check_distance(prop, "8", "7", "4");
 }
 
 function test_integer_at_least_one_clamping(prop) {
-  div.style.setProperty("-moz-transition-timing-function", FUNC_NEGATIVE, "");
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-timing-function", FUNC_NEGATIVE, "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "1", "");
   is(cs.getPropertyValue(prop), "1",
      "integer-valued property " + prop + ": flush before clamping test");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "5", "");
   is(cs.getPropertyValue(prop), "1",
      "integer-valued property " + prop + ": clamping of negatives");
-  div.style.setProperty("-moz-transition-timing-function", "linear", "");
+  div.style.setProperty("transition-timing-function", "linear", "");
 }
 
 function test_length_pair_transition(prop) {
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "4px 6px", "");
   is(cs.getPropertyValue(prop), "4px 6px",
      "length-valued property " + prop + ": computed value before transition");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "12px 10px", "");
   is(cs.getPropertyValue(prop), "6px 7px",
      "length-valued property " + prop + ": interpolation of lengths");
   check_distance(prop, "4px 6px", "6px 7px", "12px 10px");
 }
 
 function test_length_pair_transition_clamped(prop) {
-  div.style.setProperty("-moz-transition-timing-function", FUNC_NEGATIVE, "");
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-timing-function", FUNC_NEGATIVE, "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "0px 0px", "");
   is(cs.getPropertyValue(prop), "0px 0px",
      "length-valued property " + prop + ": flush before clamping test");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "30px 50px", "");
   is(cs.getPropertyValue(prop), "0px 0px",
      "length-valued property " + prop + ": clamping of negatives");
-  div.style.setProperty("-moz-transition-timing-function", "linear", "");
+  div.style.setProperty("transition-timing-function", "linear", "");
 }
 
 function test_length_percent_pair_transition(prop) {
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "4px 50%", "");
   is(cs.getPropertyValue(prop), "4px 5px",
      "length-valued property " + prop + ": computed value before transition");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "12px 70%", "");
   is(cs.getPropertyValue(prop), "6px 5.5px",
      "length-valued property " + prop + ": interpolation of lengths");
   check_distance(prop, "4px 50%", "6px 55%", "12px 70%");
 }
 
 function test_length_percent_pair_clamped(prop) {
   test_length_percent_pair_clamped_or_unclamped(prop, true);
 }
 
 function test_length_percent_pair_unclamped(prop) {
   test_length_percent_pair_clamped_or_unclamped(prop, false);
 }
 
 function test_length_percent_pair_clamped_or_unclamped(prop, is_clamped) {
-  div.style.setProperty("-moz-transition-timing-function", FUNC_NEGATIVE, "");
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-timing-function", FUNC_NEGATIVE, "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "0px 0%", "");
   is(cs.getPropertyValue(prop), "0px 0px",
      "length+percent-valued property " + prop + ": flush before clamping test");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "30px 25%", "");
   (is_clamped ? is : isnot)(cs.getPropertyValue(prop), "0px 0px",
      "length+percent-valued property " + prop + ": clamping of negatives");
-  div.style.setProperty("-moz-transition-timing-function", "linear", "");
+  div.style.setProperty("transition-timing-function", "linear", "");
 }
 
 function test_rect_transition(prop) {
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "rect(4px, 16px, 12px, 6px)", "");
   is(cs.getPropertyValue(prop), "rect(4px, 16px, 12px, 6px)",
      "rect-valued property " + prop + ": computed value before transition");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "rect(0px, 4px, 4px, 2px)", "");
   is(cs.getPropertyValue(prop), "rect(3px, 13px, 10px, 5px)",
      "rect-valued property " + prop + ": interpolation of rects");
   check_distance(prop, "rect(4px, 16px, 12px, 6px)",
                        "rect(3px, 13px, 10px, 5px)",
                        "rect(0px, 4px, 4px, 2px)");
   if (prop == "clip") {
     div.style.setProperty(prop, "rect(0px, 6px, 4px, auto)", "");
     is(cs.getPropertyValue(prop), "rect(0px, 6px, 4px, auto)",
        "rect-valued property " + prop + ": can't interpolate auto components");
     div.style.setProperty(prop, "rect(0px, 6px, 4px, 2px)", "");
   }
   div.style.setProperty(prop, "auto", "");
   is(cs.getPropertyValue(prop), "auto",
      "rect-valued property " + prop + ": can't interpolate auto components");
 
-  div.style.setProperty("-moz-transition-timing-function", FUNC_NEGATIVE, "");
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-timing-function", FUNC_NEGATIVE, "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "rect(-10px, 30px, 0px, 0px)", "");
   var vals = cs.getPropertyValue(prop).match(/rect\(([^, ]*), ([^, ]*), ([^, ]*), ([^, ]*)\)/);
   is(vals.length, 5,
      "rect-valued property " + prop + ": flush before clamping test (length)");
   is(vals[1], "-10px",
      "rect-valued property " + prop + ": flush before clamping test (top)");
   is(vals[2], "30px",
      "rect-valued property " + prop + ": flush before clamping test (right)");
   is(vals[3], "0px",
      "rect-valued property " + prop + ": flush before clamping test (bottom)");
   is(vals[4], "0px",
      "rect-valued property " + prop + ": flush before clamping test (left)");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "rect(0px, 40px, 10px, 10px)", "");
   vals = cs.getPropertyValue(prop).match(/rect\(([^, ]*), ([^, ]*), ([^, ]*), ([^, ]*)\)/);
   is(vals.length, 5,
      "rect-valued property " + prop + ": clamping of negatives (length)");
   isnot(vals[1], "-10px",
      "rect-valued property " + prop + ": clamping of negatives (top)");
   isnot(vals[2], "30px",
      "rect-valued property " + prop + ": clamping of negatives (right)");
   isnot(vals[3], "0px",
      "rect-valued property " + prop + ": clamping of negatives (bottom)");
   isnot(vals[4], "0px",
      "rect-valued property " + prop + ": clamping of negatives (left)");
-  div.style.setProperty("-moz-transition-timing-function", "linear", "");
+  div.style.setProperty("transition-timing-function", "linear", "");
 }
 
 function test_visibility_transition(prop) {
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "visible", "");
   is(cs.getPropertyValue(prop), "visible",
      "visibility property " + prop + ": computed value before transition");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "hidden", "");
   is(cs.getPropertyValue(prop), "visible",
      "visibility property " + prop + ": interpolation of visibility");
   isnot(get_distance(prop, "visible", "hidden"), 0,
         "distance between visible and hidden should not be zero");
   is(get_distance(prop, "visible", "visible"), 0,
      "distance between visible and visible should not be zero");
   is(get_distance(prop, "hidden", "hidden"), 0,
      "distance between hidden and hidden should not be zero");
 
-  div.style.setProperty("-moz-transition-timing-function", FUNC_NEGATIVE, "");
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-timing-function", FUNC_NEGATIVE, "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "visible", "");
   is(cs.getPropertyValue(prop), "visible",
      "visibility property " + prop + ": flush before clamping test");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "hidden", "");
   is(cs.getPropertyValue(prop), "visible",
      "visibility property " + prop + ": clamping of negatives");
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "hidden", "");
   is(cs.getPropertyValue(prop), "hidden",
      "visibility property " + prop + ": flush before clamping test");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "visible", "");
   is(cs.getPropertyValue(prop), "hidden",
      "visibility property " + prop + ": clamping of negatives");
-  div.style.setProperty("-moz-transition-timing-function", "linear", "");
+  div.style.setProperty("transition-timing-function", "linear", "");
 }
 
 function test_background_size_transition(prop) {
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "50% 80%", "");
   is(cs.getPropertyValue(prop), "50% 80%",
      "property " + prop + ": computed value before transition");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "100% 100%", "");
   is(cs.getPropertyValue(prop), "62.5% 85%",
      "property " + prop + ": interpolation of percents");
   check_distance(prop, "50% 80%", "62.5% 85%", "100% 100%");
   div.style.setProperty(prop, "contain", "");
   is(cs.getPropertyValue(prop), "contain",
      "property " + prop + ": can't interpolate 'contain'");
   test_background_position_size_common(prop);
 }
 
 function test_background_position_transition(prop) {
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "center 80%", "");
   is(cs.getPropertyValue(prop), "50% 80%",
      "property " + prop + ": computed value before transition");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "bottom right", "");
   is(cs.getPropertyValue(prop), "62.5% 85%",
      "property " + prop + ": interpolation of percents");
   check_distance(prop, "center 80%", "62.5% 85%", "bottom right");
   test_background_position_size_common(prop);
 }
 
 function test_background_position_size_common(prop) {
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "40% 0%", "");
   is(cs.getPropertyValue(prop), "40% 0%",
      "property " + prop + ": computed value before transition");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "0% 0%", "");
   is(cs.getPropertyValue(prop), "30% 0%",
      "property " + prop + ": interpolation of percentages");
   check_distance(prop, "40% 0%", "30% 0%", "0% 0%");
 
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "0% 40%", "");
   is(cs.getPropertyValue(prop), "0% 40%",
      "property " + prop + ": computed value before transition");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "0% 0%", "");
   is(cs.getPropertyValue(prop), "0% 30%",
      "property " + prop + ": interpolation of percentages");
   check_distance(prop, "0% 40%", "0% 30%", "0% 0%");
 
-  div.style.setProperty("-moz-transition-property", "none", "");
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "10px 40px", "");
   is(cs.getPropertyValue(prop), "10px 40px",
      "property " + prop + ": computed value before transition");
-  div.style.setProperty("-moz-transition-property", prop, "");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "50px 0", "");
   is(cs.getPropertyValue(prop), "20px 30px",
      "property " + prop + ": interpolation of lengths");
   check_distance(prop, "10px 40px", "20px 30px", "50px 0");
   div.style.setProperty(prop, "10px 40px, 50px 50px, 30px 20px", "");
   is(cs.getPropertyValue(prop), "10px 40px, 50px 50px, 30px 20px",
      "property " + prop + ": computed value before transition");
   div.style.setProperty(prop, "50px 20px, 70px 50px, 30px 40px", "");
@@ -1584,20 +1584,20 @@ function test_transform_transition(prop)
     }
   }
 
   for (var i in tests) {
     var test = tests[i];
     if (test.requires_3d && !transform3D_enabled()) {
       continue;
     }
-    div.style.setProperty("-moz-transition-property", "none", "");
+    div.style.setProperty("transition-property", "none", "");
     div.style.setProperty(prop, test.start, "");
     cs.getPropertyValue(prop);
-    div.style.setProperty("-moz-transition-property", prop, "");
+    div.style.setProperty("transition-property", prop, "");
     div.style.setProperty(prop, test.end, "");
     var actual = cs.getPropertyValue(prop);
     if (!test.round_error_ok || actual == test.expected) {
       // In most cases, we'll get an exact match, but in some cases
       // there can be a small amount of rounding error.
       is(actual, test.expected,
          "interpolation of transitions: " + test.start + " to " + test.end);
     } else {
--- a/layout/style/test/test_transitions_step_functions.html
+++ b/layout/style/test/test_transitions_step_functions.html
@@ -6,17 +6,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 <head>
   <title>Test for Bug 435441</title>
   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <script type="application/javascript" src="animation_utils.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
   <style type="text/css">
 
   p.transition {
-    -moz-transition: margin-top 100s linear;
+    transition: margin-top 100s linear;
   }
 
   </style>
 </head>
 <body>
 <div id="display">
 
 </div>
@@ -28,18 +28,18 @@ https://bugzilla.mozilla.org/show_bug.cg
 var display = document.getElementById("display");
 
 function run_test(tf, percent, value)
 {
   var p = document.createElement("p");
   p.className = "transition";
   p.style.marginTop = "0px";
   // be this percent of the way through a 100s transition
-  p.style.MozTransitionDelay = (percent * -100) + "s";
-  p.style.MozTransitionTimingFunction = tf;
+  p.style.transitionDelay = (percent * -100) + "s";
+  p.style.transitionTimingFunction = tf;
   display.appendChild(p);
   var cs = getComputedStyle(p, "");
   var flush1 = cs.marginTop;
 
   p.style.marginTop = "1000px";
   var result = px_to_num(cs.marginTop) / 1000
 
   is(result, value, 100 * percent + "% of the way through " + tf);
--- a/layout/style/test/test_unclosed_parentheses.html
+++ b/layout/style/test/test_unclosed_parentheses.html
@@ -206,26 +206,26 @@ var declarations = [
   "content: attr(html|",
   "content: attr(html| ",
   "content: attr(html|href",
   "content: attr(html|href ",
   "content: attr(|",
   "content: attr(| ",
   "content: attr(|href",
   "content: attr(|href ",
-  "-moz-transition-timing-function: cubic-bezier(",
-  "-moz-transition-timing-function: cubic-bezier( ",
-  "-moz-transition-timing-function: cubic-bezier(0, 0, 1",
-  "-moz-transition-timing-function: cubic-bezier(0, 0, 1 ",
-  "-moz-transition-timing-function: cubic-bezier(0, 0, 1,",
-  "-moz-transition-timing-function: cubic-bezier(0, 0, 1, ",
-  "-moz-transition-timing-function: cubic-bezier(0, 0, 1, 1",
-  "-moz-transition-timing-function: cubic-bezier(0, 0, 1, 1 ",
-  "-moz-transition-timing-function: cubic-bezier(0, 0, 1, 1,",
-  "-moz-transition-timing-function: cubic-bezier(0, 0, 1, 1, ",
+  "transition-timing-function: cubic-bezier(",
+  "transition-timing-function: cubic-bezier( ",
+  "transition-timing-function: cubic-bezier(0, 0, 1",
+  "transition-timing-function: cubic-bezier(0, 0, 1 ",
+  "transition-timing-function: cubic-bezier(0, 0, 1,",
+  "transition-timing-function: cubic-bezier(0, 0, 1, ",
+  "transition-timing-function: cubic-bezier(0, 0, 1, 1",
+  "transition-timing-function: cubic-bezier(0, 0, 1, 1 ",
+  "transition-timing-function: cubic-bezier(0, 0, 1, 1,",
+  "transition-timing-function: cubic-bezier(0, 0, 1, 1, ",
   "border-top-width: -moz-calc(",
   "border-top-width: -moz-calc( ",
   "border-top-width: -moz-calc(2em",
   "border-top-width: -moz-calc(2em ",
   "border-top-width: -moz-calc(2em +",
   "border-top-width: -moz-calc(2em + ",
   "border-top-width: -moz-calc(2em *",
   "border-top-width: -moz-calc(2em * ",
--- a/layout/style/test/test_units_time.html
+++ b/layout/style/test/test_units_time.html
@@ -24,24 +24,24 @@
 var tests = {
   "3s": "3000ms",
   "500ms": "0.5s"
 };
 
 var p = document.getElementById("display");
 
 for (var test in tests) {
-  p.setAttribute("style", "-moz-transition-duration: " + test);
-  is(p.style.getPropertyValue("-moz-transition-duration"), test,
+  p.setAttribute("style", "transition-duration: " + test);
+  is(p.style.getPropertyValue("transition-duration"), test,
      test + " serializes to exactly itself");
   var equiv = tests[test];
   if (equiv) {
-    var cm1 = getComputedStyle(p, "").MozTransitionDuration;
-    p.style.MozTransitionDuration = equiv;
-    var cm2 = getComputedStyle(p, "").MozTransitionDuration;
+    var cm1 = getComputedStyle(p, "").transitionDuration;
+    p.style.transitionDuration = equiv;
+    var cm2 = getComputedStyle(p, "").transitionDuration;
     is(cm1, cm2, test + " should compute to the same as " + equiv);
   }
 }
 
 </script>
 </pre>
 </body>
 </html>
--- a/layout/svg/base/src/nsSVGOuterSVGFrame.cpp
+++ b/layout/svg/base/src/nsSVGOuterSVGFrame.cpp
@@ -386,39 +386,42 @@ nsSVGOuterSVGFrame::Reflow(nsPresContext
     changeBits |= FULL_ZOOM_CHANGED;
     mFullZoom = PresContext()->GetFullZoom();
   }
   mViewportInitialized = true;
   if (changeBits) {
     NotifyViewportOrTransformChanged(changeBits);
   }
 
-  // Now that we've marked the necessary children as dirty, call
-  // UpdateBounds() on them:
+  nsSVGOuterSVGAnonChildFrame *anonKid =
+    static_cast<nsSVGOuterSVGAnonChildFrame*>(GetFirstPrincipalChild());
 
-  mCallingUpdateBounds = true;
+  if (!(GetStateBits() & NS_STATE_SVG_NONDISPLAY_CHILD)) {
+    // Now that we've marked the necessary children as dirty, call
+    // UpdateBounds() on them:
+
+    mCallingUpdateBounds = true;
 
-  if (!(mState & NS_STATE_SVG_NONDISPLAY_CHILD)) {
-    nsIFrame* kid = mFrames.FirstChild();
-    while (kid) {
-      nsISVGChildFrame* SVGFrame = do_QueryFrame(kid);
-      if (SVGFrame && !(kid->GetStateBits() & NS_STATE_SVG_NONDISPLAY_CHILD)) {
-        SVGFrame->UpdateBounds(); 
-      }
-      kid = kid->GetNextSibling();
-    }
+    // Update the mRects and visual overflow rects of all our descendants,
+    // including our anonymous wrapper kid:
+    anonKid->UpdateBounds();
+    NS_ABORT_IF_FALSE(!anonKid->GetNextSibling(),
+      "We should have one anonymous child frame wrapping our real children");
+
+    mCallingUpdateBounds = false;
   }
 
-  mCallingUpdateBounds = false;
-
   // Make sure we scroll if we're too big:
   // XXX Use the bounding box of our descendants? (See bug 353460 comment 14.)
   aDesiredSize.SetOverflowAreasToDesiredBounds();
   FinishAndStoreOverflow(&aDesiredSize);
 
+  // Set our anonymous kid's offset from our border box:
+  anonKid->SetPosition(GetContentRectRelativeToSelf().TopLeft());
+
   NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS,
                   ("exit nsSVGOuterSVGFrame::Reflow: size=%d,%d",
                   aDesiredSize.width, aDesiredSize.height));
   NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
   return NS_OK;
 }
 
 NS_IMETHODIMP
@@ -466,19 +469,22 @@ nsDisplayOuterSVG::HitTest(nsDisplayList
   nsRect rectAtOrigin = aRect - ToReferenceFrame();
   nsRect thisRect(nsPoint(0,0), outerSVGFrame->GetSize());
   if (!thisRect.Intersects(rectAtOrigin))
     return;
 
   nsPoint rectCenter(rectAtOrigin.x + rectAtOrigin.width / 2,
                      rectAtOrigin.y + rectAtOrigin.height / 2);
 
+  nsSVGOuterSVGAnonChildFrame *anonKid =
+    static_cast<nsSVGOuterSVGAnonChildFrame*>(
+      outerSVGFrame->GetFirstPrincipalChild());
   nsIFrame* frame = nsSVGUtils::HitTestChildren(
-    outerSVGFrame, rectCenter + outerSVGFrame->GetPosition() -
-                   outerSVGFrame->GetContentRect().TopLeft());
+    anonKid, rectCenter + outerSVGFrame->GetPosition() -
+               outerSVGFrame->GetContentRect().TopLeft());
   if (frame) {
     aOutFrames->AppendElement(frame);
   }
 }
 
 void
 nsDisplayOuterSVG::Paint(nsDisplayListBuilder* aBuilder,
                          nsRenderingContext* aContext)
@@ -541,18 +547,18 @@ nsSVGOuterSVGFrame::AttributeChanged(PRI
       !(GetStateBits() & NS_FRAME_FIRST_REFLOW)) {
     if (aAttribute == nsGkAtoms::viewBox ||
         aAttribute == nsGkAtoms::preserveAspectRatio ||
         aAttribute == nsGkAtoms::transform) {
 
       // make sure our cached transform matrix gets (lazily) updated
       mCanvasTM = nsnull;
 
-      nsSVGUtils::NotifyChildrenOfSVGChange(
-          this, aAttribute == nsGkAtoms::viewBox ?
+      nsSVGUtils::NotifyChildrenOfSVGChange(GetFirstPrincipalChild(),
+                aAttribute == nsGkAtoms::viewBox ?
                   TRANSFORM_CHANGED | COORD_CONTEXT_CHANGED : TRANSFORM_CHANGED);
 
       static_cast<nsSVGSVGElement*>(mContent)->ChildrenOnlyTransformChanged();
 
     } else if (aAttribute == nsGkAtoms::width ||
                aAttribute == nsGkAtoms::height) {
 
       // Don't call ChildrenOnlyTransformChanged() here, since we call it
@@ -595,25 +601,23 @@ nsSVGOuterSVGFrame::BuildDisplayList(nsD
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsDisplayList childItems;
 
   rv = childItems.AppendNewToTop(
          new (aBuilder) nsDisplayOuterSVG(aBuilder, this));
   NS_ENSURE_SUCCESS(rv, rv);
 
-  if (GetStyleDisplay()->IsScrollableOverflow()) {
-    // Clip to our _content_ box:
-    nsRect clipRect =
-      GetContentRectRelativeToSelf() + aBuilder->ToReferenceFrame(this);
-    nsDisplayClip* item =
-      new (aBuilder) nsDisplayClip(aBuilder, this, &childItems, clipRect);
-    rv = childItems.AppendNewToTop(item);
-    NS_ENSURE_SUCCESS(rv, rv);
-  }
+  // Clip to our _content_ box:
+  nsRect clipRect =
+    GetContentRectRelativeToSelf() + aBuilder->ToReferenceFrame(this);
+  nsDisplayClip* item =
+    new (aBuilder) nsDisplayClip(aBuilder, this, &childItems, clipRect);
+  rv = childItems.AppendNewToTop(item);
+  NS_ENSURE_SUCCESS(rv, rv);
 
   WrapReplacedContentForBorderRadius(aBuilder, &childItems, aLists);
 
   return NS_OK;
 }
 
 nsSplittableType
 nsSVGOuterSVGFrame::GetSplittableType() const
@@ -673,17 +677,48 @@ nsSVGOuterSVGFrame::NotifyViewportOrTran
     mCanvasTM = nsnull;
 
     if (haveNonFulLZoomTransformChange &&
         !(mState & NS_STATE_SVG_NONDISPLAY_CHILD)) {
       content->ChildrenOnlyTransformChanged();
     }
   }
 
-  nsSVGUtils::NotifyChildrenOfSVGChange(this, aFlags);
+  nsSVGUtils::NotifyChildrenOfSVGChange(GetFirstPrincipalChild(), aFlags);
+}
+
+//----------------------------------------------------------------------
+// nsISVGChildFrame methods:
+
+NS_IMETHODIMP
+nsSVGOuterSVGFrame::PaintSVG(nsRenderingContext* aContext,
+                             const nsIntRect *aDirtyRect)
+{
+  NS_ASSERTION(GetFirstPrincipalChild()->GetType() ==
+                 nsGkAtoms::svgOuterSVGAnonChildFrame &&
+               !GetFirstPrincipalChild()->GetNextSibling(),
+               "We should have a single, anonymous, child");
+  nsSVGOuterSVGAnonChildFrame *anonKid =
+    static_cast<nsSVGOuterSVGAnonChildFrame*>(GetFirstPrincipalChild());
+  return anonKid->PaintSVG(aContext, aDirtyRect);
+}
+
+SVGBBox
+nsSVGOuterSVGFrame::GetBBoxContribution(const gfxMatrix &aToBBoxUserspace,
+                                        PRUint32 aFlags)
+{
+  NS_ASSERTION(GetFirstPrincipalChild()->GetType() ==
+                 nsGkAtoms::svgOuterSVGAnonChildFrame &&
+               !GetFirstPrincipalChild()->GetNextSibling(),
+               "We should have a single, anonymous, child");
+  // We must defer to our child so that we don't include our
+  // content->PrependLocalTransformsTo() transforms.
+  nsSVGOuterSVGAnonChildFrame *anonKid =
+    static_cast<nsSVGOuterSVGAnonChildFrame*>(GetFirstPrincipalChild());
+  return anonKid->GetBBoxContribution(aToBBoxUserspace, aFlags);
 }
 
 //----------------------------------------------------------------------
 // nsSVGContainerFrame methods:
 
 gfxMatrix
 nsSVGOuterSVGFrame::GetCanvasTM(PRUint32 aFor)
 {
@@ -702,34 +737,16 @@ nsSVGOuterSVGFrame::GetCanvasTM(PRUint32
 
     gfxMatrix tm = content->PrependLocalTransformsTo(
                      gfxMatrix().Scale(devPxPerCSSPx, devPxPerCSSPx));
     mCanvasTM = new gfxMatrix(tm);
   }
   return *mCanvasTM;
 }
 
-bool
-nsSVGOuterSVGFrame::HasChildrenOnlyTransform(gfxMatrix *aTransform) const
-{
-  nsSVGSVGElement *content = static_cast<nsSVGSVGElement*>(mContent);
-
-  bool hasTransform = content->HasChildrenOnlyTransform();
-
-  if (hasTransform && aTransform) {
-    // Outer-<svg> doesn't use x/y, so we can pass eChildToUserSpace here.
-    gfxMatrix identity;
-    *aTransform =
-      content->PrependLocalTransformsTo(identity,
-                                        nsSVGElement::eChildToUserSpace);
-  }
-
-  return hasTransform;
-}
-
 //----------------------------------------------------------------------
 // Implementation helpers
 
 bool
 nsSVGOuterSVGFrame::IsRootOfReplacedElementSubDoc(nsIFrame **aEmbeddingFrame)
 {
   if (!mContent->GetParent()) {
     // Our content is the document element
@@ -774,8 +791,60 @@ nsSVGOuterSVGFrame::IsRootOfImage()
 
 bool
 nsSVGOuterSVGFrame::VerticalScrollbarNotNeeded() const
 {
   nsSVGLength2 &height = static_cast<nsSVGSVGElement*>(mContent)->
                            mLengthAttributes[nsSVGSVGElement::HEIGHT];
   return height.IsPercentage() && height.GetBaseValInSpecifiedUnits() <= 100;
 }
+
+
+//----------------------------------------------------------------------
+// Implementation of nsSVGOuterSVGAnonChildFrame
+
+nsIFrame*
+NS_NewSVGOuterSVGAnonChildFrame(nsIPresShell* aPresShell,
+                                nsStyleContext* aContext)
+{
+  return new (aPresShell) nsSVGOuterSVGAnonChildFrame(aContext);
+}
+
+NS_IMPL_FRAMEARENA_HELPERS(nsSVGOuterSVGAnonChildFrame)
+
+#ifdef DEBUG
+NS_IMETHODIMP
+nsSVGOuterSVGAnonChildFrame::Init(nsIContent* aContent,
+                                  nsIFrame* aParent,
+                                  nsIFrame* aPrevInFlow)
+{
+  NS_ABORT_IF_FALSE(aParent->GetType() == nsGkAtoms::svgOuterSVGFrame,
+                    "Unexpected parent");
+  return nsSVGOuterSVGAnonChildFrameBase::Init(aContent, aParent, aPrevInFlow);
+}
+#endif
+
+nsIAtom *
+nsSVGOuterSVGAnonChildFrame::GetType() const
+{
+  return nsGkAtoms::svgOuterSVGAnonChildFrame;
+}
+
+bool
+nsSVGOuterSVGAnonChildFrame::HasChildrenOnlyTransform(gfxMatrix *aTransform) const
+{
+  // We must claim our nsSVGOuterSVGFrame's children-only transforms as our own
+  // so that the children we are used to wrap are transformed properly.
+
+  nsSVGSVGElement *content = static_cast<nsSVGSVGElement*>(mContent);
+
+  bool hasTransform = content->HasChildrenOnlyTransform();
+
+  if (hasTransform && aTransform) {
+    // Outer-<svg> doesn't use x/y, so we can pass eChildToUserSpace here.
+    gfxMatrix identity;
+    *aTransform =
+      content->PrependLocalTransformsTo(identity,
+                                        nsSVGElement::eChildToUserSpace);
+  }
+
+  return hasTransform;
+}
--- a/layout/svg/base/src/nsSVGOuterSVGFrame.h
+++ b/layout/svg/base/src/nsSVGOuterSVGFrame.h
@@ -71,30 +71,52 @@ public:
     return MakeFrameName(NS_LITERAL_STRING("SVGOuterSVG"), aResult);
   }
 #endif
 
   NS_IMETHOD  AttributeChanged(PRInt32         aNameSpaceID,
                                nsIAtom*        aAttribute,
                                PRInt32         aModType);
 
+  virtual nsIFrame* GetContentInsertionFrame() {
+    // Any children must be added to our single anonymous inner frame kid.
+    NS_ABORT_IF_FALSE(GetFirstPrincipalChild() &&
+                      GetFirstPrincipalChild()->GetType() ==
+                        nsGkAtoms::svgOuterSVGAnonChildFrame,
+                      "Where is our anonymous child?");
+    return GetFirstPrincipalChild()->GetContentInsertionFrame();
+  }
+
   virtual bool IsSVGTransformed(gfxMatrix *aOwnTransform,
                                 gfxMatrix *aFromParentTransform) const {
     // Outer-<svg> can transform its children with viewBox, currentScale and
     // currentTranslate, but it itself is not transformed by SVG transforms.
     return false;
   }
 
   // nsISVGSVGFrame interface:
   virtual void NotifyViewportOrTransformChanged(PRUint32 aFlags);
 
+  // nsISVGChildFrame methods:
+  NS_IMETHOD PaintSVG(nsRenderingContext* aContext,
+                      const nsIntRect *aDirtyRect);
+
+  virtual SVGBBox GetBBoxContribution(const gfxMatrix &aToBBoxUserspace,
+                                      PRUint32 aFlags);
+
   // nsSVGContainerFrame methods:
   virtual gfxMatrix GetCanvasTM(PRUint32 aFor);
 
-  virtual bool HasChildrenOnlyTransform(gfxMatrix *aTransform) const;
+  virtual bool HasChildrenOnlyTransform(gfxMatrix *aTransform) const {
+    // Our anonymous wrapper child must claim our children-only transforms as
+    // its own so that our real children (the frames it wraps) are transformed
+    // by them, and we must pretend we don't have any children-only transforms
+    // so that our anonymous child is _not_ transformed by them.
+    return false;
+  }
 
   /**
    * Return true only if the height is unspecified (defaulting to 100%) or else
    * the height is explicitly set to a percentage value no greater than 100%.
    */
   bool VerticalScrollbarNotNeeded() const;
 
   bool IsCallingUpdateBounds() const {
@@ -119,9 +141,86 @@ protected:
   nsAutoPtr<gfxMatrix> mCanvasTM;
 
   float mFullZoom;
 
   bool mViewportInitialized;
   bool mIsRootContent;
 };
 
+////////////////////////////////////////////////////////////////////////
+// nsSVGOuterSVGAnonChildFrame class
+
+typedef nsSVGDisplayContainerFrame nsSVGOuterSVGAnonChildFrameBase;
+
+/**
+ * nsSVGOuterSVGFrames have a single direct child that is an instance of this
+ * class, and which is used to wrap their real child frames. Such anonymous
+ * wrapper frames created from this class exist because SVG frames need their
+ * GetPosition() offset to be their offset relative to "user space" (in app
+ * units) so that they can play nicely with nsDisplayTransform. This is fine
+ * for all SVG frames except for direct children of an nsSVGOuterSVGFrame,
+ * since an nsSVGOuterSVGFrame can have CSS border and padding (unlike other
+ * SVG frames). The direct children can't include the offsets due to any such
+ * border/padding in their mRects since that would break nsDisplayTransform,
+ * but not including these offsets would break other parts of the Mozilla code
+ * that assume a frame's mRect contains its border-box-to-parent-border-box
+ * offset, in particular nsIFrame::GetOffsetTo and the functions that depend on
+ * it. Wrapping an nsSVGOuterSVGFrame's children in an instance of this class
+ * with its GetPosition() set to its nsSVGOuterSVGFrame's border/padding offset
+ * keeps both nsDisplayTransform and nsIFrame::GetOffsetTo happy.
+ *
+ * The reason that this class inherit from nsSVGDisplayContainerFrame rather
+ * than simply from nsContainerFrame is so that we can avoid having special
+ * handling for these inner wrappers in multiple parts of the SVG code. For
+ * example, the implementations of IsSVGTransformed and GetCanvasTM assume
+ * nsSVGContainerFrame instances all the way up to the nsSVGOuterSVGFrame.
+ */
+class nsSVGOuterSVGAnonChildFrame
+  : public nsSVGOuterSVGAnonChildFrameBase
+{
+  friend nsIFrame*
+  NS_NewSVGOuterSVGAnonChildFrame(nsIPresShell* aPresShell,
+                                  nsStyleContext* aContext);
+
+  nsSVGOuterSVGAnonChildFrame(nsStyleContext* aContext)
+    : nsSVGOuterSVGAnonChildFrameBase(aContext)
+  {}
+
+public:
+  NS_DECL_FRAMEARENA_HELPERS
+
+#ifdef DEBUG
+  NS_IMETHOD Init(nsIContent* aContent,
+                  nsIFrame* aParent,
+                  nsIFrame* aPrevInFlow);
+
+  NS_IMETHOD GetFrameName(nsAString& aResult) const {
+    return MakeFrameName(NS_LITERAL_STRING("SVGOuterSVGAnonChild"), aResult);
+  }
 #endif
+
+  /**
+   * Get the "type" of the frame
+   *
+   * @see nsGkAtoms::svgOuterSVGAnonChildFrame
+   */
+  virtual nsIAtom* GetType() const;
+
+  virtual bool IsSVGTransformed(gfxMatrix *aOwnTransform,
+                                gfxMatrix *aFromParentTransform) const {
+    // Outer-<svg> can transform its children with viewBox, currentScale and
+    // currentTranslate, but it itself is not transformed by _SVG_ transforms.
+    return false;
+  }
+
+  // nsSVGContainerFrame methods:
+  virtual gfxMatrix GetCanvasTM(PRUint32 aFor) {
+    // GetCanvasTM returns the transform from an SVG frame to the frame's
+    // nsSVGOuterSVGFrame's content box, so we do not include any x/y offset
+    // set on us for any CSS border or padding on our nsSVGOuterSVGFrame.
+    return static_cast<nsSVGOuterSVGFrame*>(mParent)->GetCanvasTM(aFor);
+  }
+
+  virtual bool HasChildrenOnlyTransform(gfxMatrix *aTransform) const;
+};
+
+#endif
--- a/layout/svg/base/src/nsSVGTextPathFrame.cpp
+++ b/layout/svg/base/src/nsSVGTextPathFrame.cpp
@@ -41,17 +41,16 @@ nsSVGTextPathFrame::Init(nsIContent* aCo
 
   NS_ASSERTION(ancestorFrame->GetType() == nsGkAtoms::svgTextFrame,
                "trying to construct an SVGTextPathFrame for an invalid "
                "container");
   
   nsCOMPtr<nsIDOMSVGTextPathElement> textPath = do_QueryInterface(aContent);
   NS_ASSERTION(textPath, "Content is not an SVG textPath");
 
-
   return nsSVGTextPathFrameBase::Init(aContent, aParent, aPrevInFlow);
 }
 #endif /* DEBUG */
 
 nsIAtom *
 nsSVGTextPathFrame::GetType() const
 {
   return nsGkAtoms::svgTextPathFrame;
--- a/layout/svg/base/src/nsSVGUtils.cpp
+++ b/layout/svg/base/src/nsSVGUtils.cpp
@@ -698,17 +698,16 @@ nsSVGUtils::InvalidateBounds(nsIFrame *a
   if (!aFrame) {
     // We seem to be able to get here, even though SVG frames are never created
     // without an ancestor nsSVGOuterSVGFrame. See bug 767996.
     return;
   }
 
   NS_ASSERTION(aFrame->GetStateBits() & NS_STATE_IS_OUTER_SVG,
                "SVG frames must always have an nsSVGOuterSVGFrame ancestor!");
-  invalidArea.MoveBy(aFrame->GetContentRect().TopLeft() - aFrame->GetPosition());
 
   static_cast<nsSVGOuterSVGFrame*>(aFrame)->InvalidateWithFlags(invalidArea,
                                                                 aFlags);
 }
 
 void
 nsSVGUtils::ScheduleBoundsUpdate(nsIFrame *aFrame)
 {
--- a/layout/svg/base/src/svg.css
+++ b/layout/svg/base/src/svg.css
@@ -9,17 +9,17 @@
 style, script, symbol {
  display: none;
 }
 
 switch {
  -moz-binding: none !important;
 }
 
-svg, symbol, image, marker, pattern, foreignObject {
+svg:not(:root), symbol, image, marker, pattern, foreignObject {
  overflow: hidden;
 }
 
 foreignObject {
   margin: 0 ! important;
   padding: 0 ! important;
   border-width: 0 ! important;
 }
--- a/toolkit/components/maintenanceservice/workmonitor.cpp
+++ b/toolkit/components/maintenanceservice/workmonitor.cpp
@@ -499,19 +499,24 @@ ExecuteServiceCommand(int argc, LPWSTR *
 
   BOOL result = FALSE;
   if (!lstrcmpi(argv[2], L"software-update")) {
     result = ProcessSoftwareUpdateCommand(argc - 3, argv + 3);
     // We might not reach here if the service install succeeded
     // because the service self updates itself and the service
     // installer will stop the service.
     LOG(("Service command %ls complete.\n", argv[2]));
-  } else if (!lstrcmpi(argv[2], L"clear-prefetch")) {
+  }
+  // See Bug 770883
+#if 0
+  else if (!lstrcmpi(argv[2], L"clear-prefetch")) {
     result = ClearKnownPrefetch();
-  } else {
+  } 
+#endif
+  else {
     LOG(("Service command not recognized: %ls.\n", argv[2]));
     // result is already set to FALSE
   }
 
   LOG(("service command %ls complete with result: %ls.\n", 
        argv[1], (result ? L"Success" : L"Failure")));
   return TRUE;
 }