Bug 1016680, part 3 - DeCOMify nsGenConNode::mText. r=dholbert
authorJonathan Watt <jwatt@jwatt.org>
Wed, 11 Jun 2014 23:11:15 +0100
changeset 188223 76d75daedc2a27f7354329606b6a97ecb3a770ba
parent 188222 7b0f2fa3a541b38cecc40fecbbbed3b40c4c8d7a
child 188224 a03d78cf4635f7411de50f1952c109de98ba3e85
push id44778
push userjwatt@jwatt.org
push dateWed, 11 Jun 2014 22:11:41 +0000
treeherdermozilla-inbound@76d75daedc2a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1016680
milestone33.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
Bug 1016680, part 3 - DeCOMify nsGenConNode::mText. r=dholbert
layout/base/nsCSSFrameConstructor.cpp
layout/base/nsCSSFrameConstructor.h
layout/base/nsGenConList.h
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -1568,17 +1568,17 @@ struct nsGenConInitializer {
   nsGenConInitializer(nsGenConNode* aNode, nsGenConList* aList,
                       void (nsCSSFrameConstructor::*aDirtyAll)())
     : mNode(aNode), mList(aList), mDirtyAll(aDirtyAll) {}
 };
 
 already_AddRefed<nsIContent>
 nsCSSFrameConstructor::CreateGenConTextNode(nsFrameConstructorState& aState,
                                             const nsString& aString,
-                                            nsCOMPtr<nsIDOMCharacterData>* aText,
+                                            nsRefPtr<nsTextNode>* aText,
                                             nsGenConInitializer* aInitializer)
 {
   nsRefPtr<nsTextNode> content = new nsTextNode(mDocument->NodeInfoManager());
   content->SetText(aString, false);
   if (aText) {
     *aText = content;
   }
   if (aInitializer) {
--- a/layout/base/nsCSSFrameConstructor.h
+++ b/layout/base/nsCSSFrameConstructor.h
@@ -332,17 +332,17 @@ private:
                                   nsIFrame** aNewFrame);
 
   /**
    * Create a text node containing the given string. If aText is non-null
    * then we also set aText to the returned node.
    */
   already_AddRefed<nsIContent> CreateGenConTextNode(nsFrameConstructorState& aState,
                                                     const nsString& aString,
-                                                    nsCOMPtr<nsIDOMCharacterData>* aText,
+                                                    nsRefPtr<nsTextNode>* aText,
                                                     nsGenConInitializer* aInitializer);
 
   /**
    * Create a content node for the given generated content style.
    * The caller takes care of making it SetIsNativeAnonymousRoot, binding it
    * to the document, and creating frames for it.
    * @param aParentContent is the node that has the before/after style
    * @param aStyleContext is the 'before' or 'after' pseudo-element
--- a/layout/base/nsGenConList.h
+++ b/layout/base/nsGenConList.h
@@ -6,18 +6,18 @@
 /* base class for nsCounterList and nsQuoteList */
 
 #ifndef nsGenConList_h___
 #define nsGenConList_h___
 
 #include "nsIFrame.h"
 #include "nsStyleStruct.h"
 #include "prclist.h"
-#include "nsIDOMCharacterData.h"
 #include "nsCSSPseudoElements.h"
+#include "nsTextNode.h"
 
 class nsGenConList;
 
 struct nsGenConNode : public PRCList {
   // The wrapper frame for all of the pseudo-element's content.  This
   // frame generally has useful style data and has the
   // NS_FRAME_GENERATED_CONTENT bit set (so we use it to track removal),
   // but does not necessarily for |nsCounterChangeNode|s.
@@ -25,17 +25,17 @@ struct nsGenConNode : public PRCList {
 
   // Index within the list of things specified by the 'content' property,
   // which is needed to do 'content: open-quote open-quote' correctly,
   // and needed for similar cases for counters.
   const int32_t mContentIndex;
 
   // null for 'content:no-open-quote', 'content:no-close-quote' and for
   // counter nodes for increments and resets (rather than uses)
-  nsCOMPtr<nsIDOMCharacterData> mText;
+  nsRefPtr<nsTextNode> mText;
 
   nsGenConNode(int32_t aContentIndex)
     : mPseudoFrame(nullptr)
     , mContentIndex(aContentIndex)
   {
   }
 
   /**