Remove nsIStyledContent. Bug 313968, r=sicking, r=dbaron on nsCSSStyleSheet

changes, sr=jst
This commit is contained in:
bzbarsky%mit.edu 2005-11-02 00:41:51 +00:00
Родитель 84802b45c2
Коммит d44ad313ae
85 изменённых файлов: 300 добавлений и 339 удалений

Просмотреть файл

@ -45,7 +45,6 @@
#include "nsIDocShell.h" #include "nsIDocShell.h"
#include "nsIDocShellTreeItem.h" #include "nsIDocShellTreeItem.h"
#include "nsIDocument.h" #include "nsIDocument.h"
#include "nsIStyledContent.h"
#include "nsIDOMAttr.h" #include "nsIDOMAttr.h"
#include "nsIDOMCharacterData.h" #include "nsIDOMCharacterData.h"
#include "nsIDOMDocument.h" #include "nsIDOMDocument.h"
@ -734,8 +733,7 @@ NS_IMPL_NSIDOCUMENTOBSERVER_REFLOW_STUB(nsDocAccessible)
NS_IMPL_NSIDOCUMENTOBSERVER_STYLE_STUB(nsDocAccessible) NS_IMPL_NSIDOCUMENTOBSERVER_STYLE_STUB(nsDocAccessible)
void void
nsDocAccessible::AttributeChanged(nsIDocument *aDocument, nsDocAccessible::AttributeChanged(nsIDocument *aDocument, nsIContent* aContent,
nsIStyledContent* aContent,
PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aNameSpaceID, nsIAtom* aAttribute,
PRInt32 aModType) PRInt32 aModType)
{ {

Просмотреть файл

@ -66,6 +66,7 @@ REQUIRES = xpcom \
docshell \ docshell \
windowwatcher \ windowwatcher \
content \ content \
layout \
$(NULL) $(NULL)
CPPSRCS = \ CPPSRCS = \

Просмотреть файл

@ -60,7 +60,6 @@ nsINameSpaceManager.h \
nsINodeInfo.h \ nsINodeInfo.h \
nsIRangeUtils.h \ nsIRangeUtils.h \
nsIScriptElement.h \ nsIScriptElement.h \
nsIStyledContent.h \
nsIStyleSheetLinkingElement.h \ nsIStyleSheetLinkingElement.h \
nsITextContent.h \ nsITextContent.h \
nsIPrivateDOMImplementation.h \ nsIPrivateDOMImplementation.h \

Просмотреть файл

@ -46,6 +46,7 @@
#include "nsPropertyTable.h" #include "nsPropertyTable.h"
#include "nsCaseTreatment.h" #include "nsCaseTreatment.h"
#include "nsINodeInfo.h" #include "nsINodeInfo.h"
#include "nsChangeHint.h"
// Forward declarations // Forward declarations
class nsIAtom; class nsIAtom;
@ -58,11 +59,14 @@ class nsISupportsArray;
class nsIDOMRange; class nsIDOMRange;
class nsIEventListenerManager; class nsIEventListenerManager;
class nsIURI; class nsIURI;
class nsICSSStyleRule;
class nsRuleWalker;
class nsAttrValue;
// IID for the nsIContent interface // IID for the nsIContent interface
#define NS_ICONTENT_IID \ #define NS_ICONTENT_IID \
{ 0xe5417db2, 0xfc59, 0x4b43, \ { 0x08b87f67, 0x2f64, 0x437b, \
{ 0x8c, 0x9a, 0xed, 0xc3, 0x17, 0x3a, 0x85, 0x40 } } { 0x93, 0x35, 0x02, 0x60, 0x17, 0x5c, 0x0e, 0xc2 } }
/** /**
* A node of content in a document's content model. This interface * A node of content in a document's content model. This interface
@ -762,6 +766,64 @@ public:
virtual nsresult CloneContent(nsNodeInfoManager *aNodeInfoManager, virtual nsresult CloneContent(nsNodeInfoManager *aNodeInfoManager,
PRBool aDeep, nsIContent **aResult) const = 0; PRBool aDeep, nsIContent **aResult) const = 0;
/**
* Get the ID of this content node (the atom corresponding to the
* value of the null-namespace attribute whose name is given by
* GetIDAttributeName(). This may be null if there is no ID.
*/
virtual nsIAtom* GetID() const = 0;
/**
* Get the class list of this content node (this corresponds to the
* value of the null-namespace attribute whose name is given by
* GetClassAttributeName(). This may be null if there are no
* classes, but that's not guaranteed.
*/
virtual const nsAttrValue* GetClasses() const = 0;
/**
* Walk aRuleWalker over the content style rules (presentational
* hint rules) for this content node.
*/
NS_IMETHOD WalkContentStyleRules(nsRuleWalker* aRuleWalker) = 0;
/**
* Get the inline style rule, if any, for this content node
*/
virtual nsICSSStyleRule* GetInlineStyleRule() = 0;
/**
* Set the inline style rule for this node. This will send an
* appropriate AttributeChanged notification if aNotify is true.
*/
NS_IMETHOD SetInlineStyleRule(nsICSSStyleRule* aStyleRule, PRBool aNotify) = 0;
/**
* Is the attribute named stored in the mapped attributes?
*
* // XXXbz we use this method in HasAttributeDependentStyle, so svg
* returns true here even though it stores nothing in the mapped
* attributes.
*/
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const = 0;
/**
* Get a hint that tells the style system what to do when
* an attribute on this node changes, if something needs to happen
* in response to the change *other* than the result of what is
* mapped into style data via any type of style rule.
*/
virtual nsChangeHint GetAttributeChangeHint(const nsIAtom* aAttribute,
PRInt32 aModType) const = 0;
/**
* Returns an atom holding the name of the "class" attribute on this
* content node (if applicable). Returns null if there is no
* "class" attribute for this type of content node.
*/
virtual nsIAtom *GetClassAttributeName() const = 0;
#ifdef DEBUG #ifdef DEBUG
/** /**
* List the content (and anything it contains) out to the given * List the content (and anything it contains) out to the given

Просмотреть файл

@ -57,7 +57,6 @@
#include "nsIAtom.h" #include "nsIAtom.h"
class nsIContent; class nsIContent;
class nsIStyledContent;
class nsPresContext; class nsPresContext;
class nsIPresShell; class nsIPresShell;
@ -511,7 +510,7 @@ public:
virtual void AttributeWillChange(nsIContent* aChild, virtual void AttributeWillChange(nsIContent* aChild,
PRInt32 aNameSpaceID, PRInt32 aNameSpaceID,
nsIAtom* aAttribute) = 0; nsIAtom* aAttribute) = 0;
virtual void AttributeChanged(nsIStyledContent* aChild, virtual void AttributeChanged(nsIContent* aChild,
PRInt32 aNameSpaceID, PRInt32 aNameSpaceID,
nsIAtom* aAttribute, nsIAtom* aAttribute,
PRInt32 aModType) = 0; PRInt32 aModType) = 0;

Просмотреть файл

@ -41,7 +41,6 @@
class nsIAtom; class nsIAtom;
class nsIContent; class nsIContent;
class nsIStyledContent;
class nsIPresShell; class nsIPresShell;
class nsIStyleSheet; class nsIStyleSheet;
class nsIStyleRule; class nsIStyleRule;
@ -161,11 +160,11 @@ public:
* @param aModType Whether or not the attribute was added, changed, or removed. * @param aModType Whether or not the attribute was added, changed, or removed.
* The constants are defined in nsIDOMMutationEvent.h. * The constants are defined in nsIDOMMutationEvent.h.
*/ */
virtual void AttributeChanged(nsIDocument* aDocument, virtual void AttributeChanged(nsIDocument* aDocument,
nsIStyledContent* aContent, nsIContent* aContent,
PRInt32 aNameSpaceID, PRInt32 aNameSpaceID,
nsIAtom* aAttribute, nsIAtom* aAttribute,
PRInt32 aModType) = 0; PRInt32 aModType) = 0;
/** /**
* Notifcation that the content model has had data appended to the * Notifcation that the content model has had data appended to the
@ -350,7 +349,7 @@ public:
nsIContent* aContent2, \ nsIContent* aContent2, \
PRInt32 aStateMask); \ PRInt32 aStateMask); \
virtual void AttributeChanged(nsIDocument* aDocument, \ virtual void AttributeChanged(nsIDocument* aDocument, \
nsIStyledContent* aContent, \ nsIContent* aContent, \
PRInt32 aNameSpaceID, \ PRInt32 aNameSpaceID, \
nsIAtom* aAttribute, \ nsIAtom* aAttribute, \
PRInt32 aModType); \ PRInt32 aModType); \
@ -441,7 +440,7 @@ _class::CharacterDataChanged(nsIDocument* aDocument, \
} \ } \
void \ void \
_class::AttributeChanged(nsIDocument* aDocument, \ _class::AttributeChanged(nsIDocument* aDocument, \
nsIStyledContent* aContent, \ nsIContent* aContent, \
PRInt32 aNameSpaceID, \ PRInt32 aNameSpaceID, \
nsIAtom* aAttribute, \ nsIAtom* aAttribute, \
PRInt32 aModType) \ PRInt32 aModType) \

Просмотреть файл

@ -1,105 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsIStyledContent_h___
#define nsIStyledContent_h___
#include "nsIContent.h"
#include "nsChangeHint.h"
class nsString;
class nsICSSStyleRule;
class nsISupportsArray;
class nsRuleWalker;
class nsAttrValue;
// IID for the nsIStyledContent class
// b3edce42-2a58-4b05-a679-eae3ddbd1edd
#define NS_ISTYLEDCONTENT_IID \
{ 0xb3edc342, 0x2a58, 0x4b05, \
{ 0xa6, 0x79, 0xea, 0xe3, 0xdd, 0xbd, 0x1e, 0xdd } }
// Abstract interface for all styled content (that supports ID, CLASS, STYLE, and
// the ability to specify style hints on an attribute change).
class nsIStyledContent : public nsIContent {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISTYLEDCONTENT_IID)
nsIStyledContent(nsINodeInfo *aNodeInfo)
: nsIContent(aNodeInfo)
{
}
// XXX Currently callers (e.g., CSSStyleSheetImpl) assume that the ID
// corresponds to the attribute nsHTMLAtoms::id and that the Class
// corresponds to the attribute nsHTMLAtoms::kClass. If this becomes
// incorrect, then new methods need to be added here.
virtual nsIAtom* GetID() const = 0;
virtual const nsAttrValue* GetClasses() const = 0;
NS_IMETHOD WalkContentStyleRules(nsRuleWalker* aRuleWalker) = 0;
virtual nsICSSStyleRule* GetInlineStyleRule() = 0;
NS_IMETHOD SetInlineStyleRule(nsICSSStyleRule* aStyleRule, PRBool aNotify) = 0;
/**
* Is the attribute named stored in the mapped attributes?
*
* This really belongs on nsIHTMLContent instead.
*/
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const = 0;
/**
* Get a hint that tells the style system what to do when
* an attribute on this node changes, if something needs to happen
* in response to the change *other* than the result of what is
* mapped into style data via any type of style rule.
*/
virtual nsChangeHint GetAttributeChangeHint(const nsIAtom* aAttribute,
PRInt32 aModType) const = 0;
/**
* Returns an atom holding the name of the "class" attribute on this
* content node (if applicable). Returns null for non-element
* content nodes.
*/
virtual nsIAtom *GetClassAttributeName() const = 0;
};
#endif /* nsIStyledContent_h___ */

Просмотреть файл

@ -37,7 +37,6 @@
#include "nsContentList.h" #include "nsContentList.h"
#include "nsIContent.h" #include "nsIContent.h"
#include "nsIStyledContent.h"
#include "nsIDOMNode.h" #include "nsIDOMNode.h"
#include "nsIDOM3Node.h" #include "nsIDOM3Node.h"
#include "nsIDocument.h" #include "nsIDocument.h"
@ -526,8 +525,7 @@ nsContentList::NamedItem(const nsAString& aName, nsIDOMNode** aReturn)
} }
void void
nsContentList::AttributeChanged(nsIDocument *aDocument, nsContentList::AttributeChanged(nsIDocument *aDocument, nsIContent* aContent,
nsIStyledContent* aContent,
PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aNameSpaceID, nsIAtom* aAttribute,
PRInt32 aModType) PRInt32 aModType)
{ {

Просмотреть файл

@ -196,8 +196,7 @@ public:
// nsIDocumentObserver // nsIDocumentObserver
virtual void AttributeChanged(nsIDocument *aDocument, virtual void AttributeChanged(nsIDocument *aDocument, nsIContent* aContent,
nsIStyledContent* aContent,
PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aNameSpaceID, nsIAtom* aAttribute,
PRInt32 aModType); PRInt32 aModType);
virtual void ContentAppended(nsIDocument *aDocument, nsIContent* aContainer, virtual void ContentAppended(nsIDocument *aDocument, nsIContent* aContainer,

Просмотреть файл

@ -138,7 +138,6 @@ static NS_DEFINE_CID(kDOMEventGroupCID, NS_DOMEVENTGROUP_CID);
#include "nsDateTimeFormatCID.h" #include "nsDateTimeFormatCID.h"
#include "nsIDateTimeFormat.h" #include "nsIDateTimeFormat.h"
#include "nsIComponentRegistrar.h" #include "nsIComponentRegistrar.h"
#include "nsIStyledContent.h"
static NS_DEFINE_CID(kCharsetAliasCID, NS_CHARSETALIAS_CID); static NS_DEFINE_CID(kCharsetAliasCID, NS_CHARSETALIAS_CID);
static NS_DEFINE_CID(kDateTimeFormatCID, NS_DATETIMEFORMAT_CID); static NS_DEFINE_CID(kDateTimeFormatCID, NS_DATETIMEFORMAT_CID);
@ -2357,15 +2356,10 @@ nsDocument::AttributeWillChange(nsIContent* aChild, PRInt32 aNameSpaceID,
} }
void void
nsDocument::AttributeChanged(nsIStyledContent* aChild, PRInt32 aNameSpaceID, nsDocument::AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID,
nsIAtom* aAttribute, PRInt32 aModType) nsIAtom* aAttribute, PRInt32 aModType)
{ {
NS_ABORT_IF_FALSE(aChild, "Null child!"); NS_ABORT_IF_FALSE(aChild, "Null child!");
#ifdef DEBUG
nsCOMPtr<nsIContent> debugContent(do_QueryInterface(aChild));
NS_ASSERTION(debugContent == aChild, "nsIContent pointer mismatch?");
#endif
PRInt32 i; PRInt32 i;
for (i = mObservers.Count() - 1; i >= 0; --i) { for (i = mObservers.Count() - 1; i >= 0; --i) {

Просмотреть файл

@ -488,7 +488,7 @@ public:
virtual void AttributeWillChange(nsIContent* aChild, virtual void AttributeWillChange(nsIContent* aChild,
PRInt32 aNameSpaceID, PRInt32 aNameSpaceID,
nsIAtom* aAttribute); nsIAtom* aAttribute);
virtual void AttributeChanged(nsIStyledContent* aChild, virtual void AttributeChanged(nsIContent* aChild,
PRInt32 aNameSpaceID, PRInt32 aNameSpaceID,
nsIAtom* aAttribute, nsIAtom* aAttribute,
PRInt32 aModType); PRInt32 aModType);

Просмотреть файл

@ -55,6 +55,7 @@
#include "nsDOMString.h" #include "nsDOMString.h"
#include "nsLayoutAtoms.h" #include "nsLayoutAtoms.h"
#include "nsIDOMUserDataHandler.h" #include "nsIDOMUserDataHandler.h"
#include "nsChangeHint.h"
#include "pldhash.h" #include "pldhash.h"
#include "prprf.h" #include "prprf.h"
@ -1402,3 +1403,55 @@ nsGenericDOMDataNode::CloneContent(nsNodeInfoManager *aNodeInfoManager,
return NS_OK; return NS_OK;
} }
nsIAtom*
nsGenericDOMDataNode::GetID() const
{
return nsnull;
}
const nsAttrValue*
nsGenericDOMDataNode::GetClasses() const
{
return nsnull;
}
NS_IMETHODIMP
nsGenericDOMDataNode::WalkContentStyleRules(nsRuleWalker* aRuleWalker)
{
return NS_OK;
}
nsICSSStyleRule*
nsGenericDOMDataNode::GetInlineStyleRule()
{
return nsnull;
}
NS_IMETHODIMP
nsGenericDOMDataNode::SetInlineStyleRule(nsICSSStyleRule* aStyleRule,
PRBool aNotify)
{
NS_NOTREACHED("How come we're setting inline style on a non-element?");
return NS_ERROR_UNEXPECTED;
}
NS_IMETHODIMP_(PRBool)
nsGenericDOMDataNode::IsAttributeMapped(const nsIAtom* aAttribute) const
{
return PR_FALSE;
}
nsChangeHint
nsGenericDOMDataNode::GetAttributeChangeHint(const nsIAtom* aAttribute,
PRInt32 aModType) const
{
NS_NOTREACHED("Shouldn't be calling this!");
return nsChangeHint(0);
}
nsIAtom*
nsGenericDOMDataNode::GetClassAttributeName() const
{
return nsnull;
}

Просмотреть файл

@ -237,8 +237,19 @@ public:
* This calls Clone to do the actual cloning so that we end up with the * This calls Clone to do the actual cloning so that we end up with the
* right class for the clone. * right class for the clone.
*/ */
nsresult CloneContent(nsNodeInfoManager *aNodeInfoManager, PRBool aDeep, virtual nsresult CloneContent(nsNodeInfoManager *aNodeInfoManager,
nsIContent **aResult) const; PRBool aDeep, nsIContent **aResult) const;
virtual nsIAtom* GetID() const;
virtual const nsAttrValue* GetClasses() const;
NS_IMETHOD WalkContentStyleRules(nsRuleWalker* aRuleWalker);
virtual nsICSSStyleRule* GetInlineStyleRule();
NS_IMETHOD SetInlineStyleRule(nsICSSStyleRule* aStyleRule, PRBool aNotify);
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
virtual nsChangeHint GetAttributeChangeHint(const nsIAtom* aAttribute,
PRInt32 aModType) const;
virtual nsIAtom *GetClassAttributeName() const;
// nsITextContent // nsITextContent
virtual const nsTextFragment *Text(); virtual const nsTextFragment *Text();

Просмотреть файл

@ -3709,7 +3709,6 @@ nsGenericElement::RemoveChild(nsIDOMNode *aOldChild, nsIDOMNode **aReturn)
NS_INTERFACE_MAP_BEGIN(nsGenericElement) NS_INTERFACE_MAP_BEGIN(nsGenericElement)
NS_INTERFACE_MAP_ENTRY(nsIContent) NS_INTERFACE_MAP_ENTRY(nsIContent)
NS_INTERFACE_MAP_ENTRY(nsIStyledContent)
NS_INTERFACE_MAP_ENTRY_TEAROFF(nsIDOM3Node, new nsNode3Tearoff(this)) NS_INTERFACE_MAP_ENTRY_TEAROFF(nsIDOM3Node, new nsNode3Tearoff(this))
NS_INTERFACE_MAP_ENTRY_TEAROFF(nsIDOMEventReceiver, NS_INTERFACE_MAP_ENTRY_TEAROFF(nsIDOMEventReceiver,
nsDOMEventRTTearoff::Create(this)) nsDOMEventRTTearoff::Create(this))

Просмотреть файл

@ -447,7 +447,6 @@ public:
virtual void DumpContent(FILE* out, PRInt32 aIndent,PRBool aDumpAll) const; virtual void DumpContent(FILE* out, PRInt32 aIndent,PRBool aDumpAll) const;
#endif #endif
// nsIStyledContent interface methods
virtual nsIAtom* GetID() const; virtual nsIAtom* GetID() const;
virtual const nsAttrValue* GetClasses() const; virtual const nsAttrValue* GetClasses() const;
NS_IMETHOD WalkContentStyleRules(nsRuleWalker* aRuleWalker); NS_IMETHOD WalkContentStyleRules(nsRuleWalker* aRuleWalker);

Просмотреть файл

@ -42,13 +42,11 @@
#include "nsIDOMElement.h" #include "nsIDOMElement.h"
#include "nsIDOMDocument.h" #include "nsIDOMDocument.h"
#include "nsIDOMEventReceiver.h" #include "nsIDOMEventReceiver.h"
#include "nsIStyledContent.h"
#include "nsNetUtil.h" #include "nsNetUtil.h"
#include "nsIURL.h" #include "nsIURL.h"
#include "nsIDOMEventListener.h" #include "nsIDOMEventListener.h"
#include "nsINameSpaceManager.h" #include "nsINameSpaceManager.h"
#include "nsINodeInfo.h" #include "nsINodeInfo.h"
#include "nsIStyledContent.h"
#include "nsLayoutAtoms.h" #include "nsLayoutAtoms.h"
PRBool nsXMLEventsListener::InitXMLEventsListener(nsIDocument * aDocument, PRBool nsXMLEventsListener::InitXMLEventsListener(nsIDocument * aDocument,
@ -231,7 +229,7 @@ nsXMLEventsListener::HandleEvent(nsIDOMEvent* aEvent)
targetMatched = PR_FALSE; targetMatched = PR_FALSE;
nsCOMPtr<nsIDOMEventTarget> target; nsCOMPtr<nsIDOMEventTarget> target;
aEvent->GetTarget(getter_AddRefs(target)); aEvent->GetTarget(getter_AddRefs(target));
nsCOMPtr<nsIStyledContent> targetEl(do_QueryInterface(target)); nsCOMPtr<nsIContent> targetEl(do_QueryInterface(target));
if (targetEl && targetEl->GetID() == mTarget) if (targetEl && targetEl->GetID() == mTarget)
targetMatched = PR_TRUE; targetMatched = PR_TRUE;
} }
@ -357,7 +355,7 @@ nsXMLEventsManager::CharacterDataChanged(nsIDocument* aDocument,
PRBool aAppend) {} PRBool aAppend) {}
void void
nsXMLEventsManager::AttributeChanged(nsIDocument* aDocument, nsXMLEventsManager::AttributeChanged(nsIDocument* aDocument,
nsIStyledContent* aContent, nsIContent* aContent,
PRInt32 aNameSpaceID, PRInt32 aNameSpaceID,
nsIAtom* aAttribute, nsIAtom* aAttribute,
PRInt32 aModType) PRInt32 aModType)

Просмотреть файл

@ -237,7 +237,6 @@ public:
} }
virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const; virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const;
// Implementation for nsIStyledContent
virtual const nsAttrValue* GetClasses() const; virtual const nsAttrValue* GetClasses() const;
virtual nsIAtom *GetIDAttributeName() const; virtual nsIAtom *GetIDAttributeName() const;
virtual nsIAtom *GetClassAttributeName() const; virtual nsIAtom *GetClassAttributeName() const;

Просмотреть файл

@ -201,9 +201,9 @@ nsHTMLTableCellElement::WalkContentStyleRules(nsRuleWalker* aRuleWalker)
// contract. However, things are OK (except for the incorrect // contract. However, things are OK (except for the incorrect
// dependence on display type rather than tag) since tables and cells // dependence on display type rather than tag) since tables and cells
// match different, less specific, rules. // match different, less specific, rules.
nsCOMPtr<nsIStyledContent> styledTable = do_QueryInterface(GetTable()); nsIContent* table = GetTable();
if (styledTable) { if (table) {
rv = styledTable->WalkContentStyleRules(aRuleWalker); rv = table->WalkContentStyleRules(aRuleWalker);
} }
return rv; return rv;

Просмотреть файл

@ -129,7 +129,6 @@
#include "nsIEditingSession.h" #include "nsIEditingSession.h"
#include "nsNodeInfoManager.h" #include "nsNodeInfoManager.h"
#include "nsIStyledContent.h"
#define DETECTOR_CONTRACTID_MAX 127 #define DETECTOR_CONTRACTID_MAX 127
static char g_detector_contractid[DETECTOR_CONTRACTID_MAX + 1]; static char g_detector_contractid[DETECTOR_CONTRACTID_MAX + 1];
@ -1163,8 +1162,7 @@ nsHTMLDocument::AttributeWillChange(nsIContent* aContent, PRInt32 aNameSpaceID,
} }
void void
nsHTMLDocument::AttributeChanged(nsIStyledContent* aContent, nsHTMLDocument::AttributeChanged(nsIContent* aContent, PRInt32 aNameSpaceID,
PRInt32 aNameSpaceID,
nsIAtom* aAttribute, PRInt32 aModType) nsIAtom* aAttribute, PRInt32 aModType)
{ {
NS_ABORT_IF_FALSE(aContent, "Null content!"); NS_ABORT_IF_FALSE(aContent, "Null content!");

Просмотреть файл

@ -126,7 +126,7 @@ public:
virtual void ContentRemoved(nsIContent* aContainer, virtual void ContentRemoved(nsIContent* aContainer,
nsIContent* aChild, nsIContent* aChild,
PRInt32 aIndexInContainer); PRInt32 aIndexInContainer);
virtual void AttributeChanged(nsIStyledContent* aChild, virtual void AttributeChanged(nsIContent* aChild,
PRInt32 aNameSpaceID, PRInt32 aNameSpaceID,
nsIAtom* aAttribute, nsIAtom* aAttribute,
PRInt32 aModType); PRInt32 aModType);

Просмотреть файл

@ -62,7 +62,7 @@ public:
NS_FORWARD_NSIDOMELEMENT(nsSVGDefsElementBase::) NS_FORWARD_NSIDOMELEMENT(nsSVGDefsElementBase::)
NS_FORWARD_NSIDOMSVGELEMENT(nsSVGDefsElementBase::) NS_FORWARD_NSIDOMSVGELEMENT(nsSVGDefsElementBase::)
// nsIStyledContent // nsIContent
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const; NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
protected: protected:
}; };
@ -109,7 +109,7 @@ NS_IMPL_DOM_CLONENODE_WITH_INIT(nsSVGDefsElement)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// nsIStyledContent methods // nsIContent methods
NS_IMETHODIMP_(PRBool) NS_IMETHODIMP_(PRBool)
nsSVGDefsElement::IsAttributeMapped(const nsIAtom* name) const nsSVGDefsElement::IsAttributeMapped(const nsIAtom* name) const

Просмотреть файл

@ -93,7 +93,6 @@ NS_INTERFACE_MAP_BEGIN(nsSVGElement)
NS_INTERFACE_MAP_ENTRY(nsISVGValueObserver) NS_INTERFACE_MAP_ENTRY(nsISVGValueObserver)
NS_INTERFACE_MAP_ENTRY(nsISVGContent) NS_INTERFACE_MAP_ENTRY(nsISVGContent)
// provided by nsGenericElement: // provided by nsGenericElement:
// NS_INTERFACE_MAP_ENTRY(nsIStyledContent)
// NS_INTERFACE_MAP_ENTRY(nsIContent) // NS_INTERFACE_MAP_ENTRY(nsIContent)
NS_INTERFACE_MAP_END_INHERITING(nsGenericElement) NS_INTERFACE_MAP_END_INHERITING(nsGenericElement)
@ -239,9 +238,6 @@ nsSVGElement::IsContentOfType(PRUint32 aFlags) const
return !(aFlags & ~(eELEMENT | eSVG)); return !(aFlags & ~(eELEMENT | eSVG));
} }
//----------------------------------------------------------------------
// nsIStyledContent methods
NS_IMETHODIMP NS_IMETHODIMP
nsSVGElement::WalkContentStyleRules(nsRuleWalker* aRuleWalker) nsSVGElement::WalkContentStyleRules(nsRuleWalker* aRuleWalker)
{ {

Просмотреть файл

@ -54,7 +54,7 @@
#include "nsISVGContent.h" #include "nsISVGContent.h"
#include "nsICSSStyleRule.h" #include "nsICSSStyleRule.h"
class nsSVGElement : public nsGenericElement, // :nsIXMLContent:nsIStyledContent:nsIContent class nsSVGElement : public nsGenericElement, // :nsIXMLContent:nsIContent
public nsISVGValueObserver, public nsISVGValueObserver,
public nsSupportsWeakReference, // :nsISupportsWeakReference public nsSupportsWeakReference, // :nsISupportsWeakReference
public nsISVGContent public nsISVGContent

Просмотреть файл

@ -62,7 +62,7 @@ public:
NS_FORWARD_NSIDOMELEMENT(nsSVGGElementBase::) NS_FORWARD_NSIDOMELEMENT(nsSVGGElementBase::)
NS_FORWARD_NSIDOMSVGELEMENT(nsSVGGElementBase::) NS_FORWARD_NSIDOMSVGELEMENT(nsSVGGElementBase::)
// nsIStyledContent // nsIContent
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const; NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
protected: protected:
}; };
@ -110,7 +110,7 @@ NS_IMPL_DOM_CLONENODE_WITH_INIT(nsSVGGElement)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// nsIStyledContent methods // nsIContent methods
NS_IMETHODIMP_(PRBool) NS_IMETHODIMP_(PRBool)
nsSVGGElement::IsAttributeMapped(const nsIAtom* name) const nsSVGGElement::IsAttributeMapped(const nsIAtom* name) const

Просмотреть файл

@ -76,7 +76,7 @@ public:
// nsISVGContent specializations: // nsISVGContent specializations:
virtual void ParentChainChanged(); virtual void ParentChainChanged();
// nsIStyledContent // nsIContent
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const; NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
protected: protected:
@ -238,7 +238,7 @@ void nsSVGGradientElement::ParentChainChanged()
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// nsIStyledContent methods // nsIContent methods
NS_IMETHODIMP_(PRBool) NS_IMETHODIMP_(PRBool)
nsSVGGradientElement::IsAttributeMapped(const nsIAtom* name) const nsSVGGradientElement::IsAttributeMapped(const nsIAtom* name) const

Просмотреть файл

@ -123,14 +123,13 @@ NS_IMETHODIMP nsSVGGraphicElement::GetBBox(nsIDOMSVGRect **_retval)
NS_ASSERTION(presShell, "no presShell"); NS_ASSERTION(presShell, "no presShell");
if (!presShell) return NS_ERROR_FAILURE; if (!presShell) return NS_ERROR_FAILURE;
nsIFrame* frame = nsIFrame* frame = presShell->GetPrimaryFrameFor(this);
presShell->GetPrimaryFrameFor(NS_STATIC_CAST(nsIStyledContent*, this));
NS_ASSERTION(frame, "can't get bounding box for element without frame"); NS_ASSERTION(frame, "can't get bounding box for element without frame");
if (frame) { if (frame) {
nsISVGChildFrame* svgframe; nsISVGChildFrame* svgframe;
frame->QueryInterface(NS_GET_IID(nsISVGChildFrame),(void**)&svgframe); CallQueryInterface(frame, &svgframe);
NS_ASSERTION(svgframe, "wrong frame type"); NS_ASSERTION(svgframe, "wrong frame type");
if (svgframe) { if (svgframe) {
svgframe->SetMatrixPropagation(PR_FALSE); svgframe->SetMatrixPropagation(PR_FALSE);
@ -277,7 +276,7 @@ NS_IMETHODIMP nsSVGGraphicElement::GetTransform(nsIDOMSVGAnimatedTransformList *
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// nsIStyledContent methods // nsIContent methods
NS_IMETHODIMP_(PRBool) NS_IMETHODIMP_(PRBool)
nsSVGGraphicElement::IsAttributeMapped(const nsIAtom* name) const nsSVGGraphicElement::IsAttributeMapped(const nsIAtom* name) const

Просмотреть файл

@ -59,7 +59,7 @@ public:
NS_DECL_NSIDOMSVGLOCATABLE NS_DECL_NSIDOMSVGLOCATABLE
NS_DECL_NSIDOMSVGTRANSFORMABLE NS_DECL_NSIDOMSVGTRANSFORMABLE
// nsIStyledContent interface // nsIContent interface
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const; NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
protected: protected:

Просмотреть файл

@ -72,7 +72,7 @@ public:
// nsISVGContent specializations: // nsISVGContent specializations:
virtual void ParentChainChanged(); virtual void ParentChainChanged();
// nsIStyledContent interface // nsIContent interface
NS_IMETHODIMP_(PRBool) IsAttributeMapped(const nsIAtom* name) const; NS_IMETHODIMP_(PRBool) IsAttributeMapped(const nsIAtom* name) const;
protected: protected:
@ -275,7 +275,7 @@ void nsSVGLineElement::ParentChainChanged()
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// nsIStyledContent methods // nsIContent methods
NS_IMETHODIMP_(PRBool) NS_IMETHODIMP_(PRBool)
nsSVGLineElement::IsAttributeMapped(const nsIAtom* name) const nsSVGLineElement::IsAttributeMapped(const nsIAtom* name) const

Просмотреть файл

@ -73,7 +73,7 @@ public:
NS_FORWARD_NSIDOMELEMENT(nsSVGPathElementBase::) NS_FORWARD_NSIDOMELEMENT(nsSVGPathElementBase::)
NS_FORWARD_NSIDOMSVGELEMENT(nsSVGPathElementBase::) NS_FORWARD_NSIDOMSVGELEMENT(nsSVGPathElementBase::)
// nsIStyledContent interface // nsIContent interface
NS_IMETHODIMP_(PRBool) IsAttributeMapped(const nsIAtom* name) const; NS_IMETHODIMP_(PRBool) IsAttributeMapped(const nsIAtom* name) const;
protected: protected:
@ -348,7 +348,7 @@ NS_IMETHODIMP nsSVGPathElement::GetAnimatedNormalizedPathSegList(nsIDOMSVGPathSe
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// nsIStyledContent methods // nsIContent methods
NS_IMETHODIMP_(PRBool) NS_IMETHODIMP_(PRBool)
nsSVGPathElement::IsAttributeMapped(const nsIAtom* name) const nsSVGPathElement::IsAttributeMapped(const nsIAtom* name) const
@ -379,9 +379,7 @@ nsSVGPathElement::GetPathFlatten()
return nsnull; return nsnull;
} }
nsIFrame* frame; nsIFrame* frame = presShell->GetPrimaryFrameFor(this);
frame = presShell->GetPrimaryFrameFor(NS_STATIC_CAST(nsIStyledContent*,
this));
if (!frame) { if (!frame) {
NS_ERROR("no frame"); NS_ERROR("no frame");
@ -389,7 +387,7 @@ nsSVGPathElement::GetPathFlatten()
} }
nsISVGPathFlatten* flattener; nsISVGPathFlatten* flattener;
frame->QueryInterface(NS_GET_IID(nsISVGPathFlatten),(void**)&flattener); CallQueryInterface(frame, &flattener);
NS_ASSERTION(flattener, "wrong frame type"); NS_ASSERTION(flattener, "wrong frame type");
return flattener; return flattener;
} }

Просмотреть файл

@ -68,7 +68,7 @@ public:
NS_FORWARD_NSIDOMELEMENT(nsSVGPolygonElementBase::) NS_FORWARD_NSIDOMELEMENT(nsSVGPolygonElementBase::)
NS_FORWARD_NSIDOMSVGELEMENT(nsSVGPolygonElementBase::) NS_FORWARD_NSIDOMSVGELEMENT(nsSVGPolygonElementBase::)
// nsIStyledContent interface // nsIContent interface
NS_IMETHODIMP_(PRBool) IsAttributeMapped(const nsIAtom* name) const; NS_IMETHODIMP_(PRBool) IsAttributeMapped(const nsIAtom* name) const;
protected: protected:
@ -152,7 +152,7 @@ NS_IMETHODIMP nsSVGPolygonElement::GetAnimatedPoints(nsIDOMSVGPointList * *aAnim
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// nsIStyledContent methods // nsIContent methods
NS_IMETHODIMP_(PRBool) NS_IMETHODIMP_(PRBool)
nsSVGPolygonElement::IsAttributeMapped(const nsIAtom* name) const nsSVGPolygonElement::IsAttributeMapped(const nsIAtom* name) const

Просмотреть файл

@ -68,7 +68,7 @@ public:
NS_FORWARD_NSIDOMELEMENT(nsSVGPolylineElementBase::) NS_FORWARD_NSIDOMELEMENT(nsSVGPolylineElementBase::)
NS_FORWARD_NSIDOMSVGELEMENT(nsSVGPolylineElementBase::) NS_FORWARD_NSIDOMSVGELEMENT(nsSVGPolylineElementBase::)
// nsIStyledContent interface // nsIContent interface
NS_IMETHODIMP_(PRBool) IsAttributeMapped(const nsIAtom* name) const; NS_IMETHODIMP_(PRBool) IsAttributeMapped(const nsIAtom* name) const;
protected: protected:
@ -152,7 +152,7 @@ NS_IMETHODIMP nsSVGPolylineElement::GetAnimatedPoints(nsIDOMSVGPointList * *aAni
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// nsIStyledContent methods // nsIContent methods
NS_IMETHODIMP_(PRBool) NS_IMETHODIMP_(PRBool)
nsSVGPolylineElement::IsAttributeMapped(const nsIAtom* name) const nsSVGPolylineElement::IsAttributeMapped(const nsIAtom* name) const

Просмотреть файл

@ -112,7 +112,7 @@ public:
NS_IMETHOD_(float) GetPreviousTranslate_y(); NS_IMETHOD_(float) GetPreviousTranslate_y();
NS_IMETHOD_(float) GetPreviousScale(); NS_IMETHOD_(float) GetPreviousScale();
// nsIStyledContent interface // nsIContent interface
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const; NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
// nsISVGValueObserver // nsISVGValueObserver
@ -538,8 +538,7 @@ nsSVGSVGElement::SuspendRedraw(PRUint32 max_wait_milliseconds, PRUint32 *_retval
NS_ASSERTION(presShell, "need presShell to suspend redraw"); NS_ASSERTION(presShell, "need presShell to suspend redraw");
if (!presShell) return NS_ERROR_FAILURE; if (!presShell) return NS_ERROR_FAILURE;
nsIFrame* frame = nsIFrame* frame = presShell->GetPrimaryFrameFor(this);
presShell->GetPrimaryFrameFor(NS_STATIC_CAST(nsIStyledContent*, this));
#ifdef DEBUG #ifdef DEBUG
// XXX We sometimes hit this assertion when the svg:svg element is // XXX We sometimes hit this assertion when the svg:svg element is
// in a binding and svg children are inserted underneath it using // in a binding and svg children are inserted underneath it using
@ -590,8 +589,7 @@ nsSVGSVGElement::UnsuspendRedrawAll()
NS_ASSERTION(presShell, "need presShell to unsuspend redraw"); NS_ASSERTION(presShell, "need presShell to unsuspend redraw");
if (!presShell) return NS_ERROR_FAILURE; if (!presShell) return NS_ERROR_FAILURE;
nsIFrame* frame = nsIFrame* frame = presShell->GetPrimaryFrameFor(this);
presShell->GetPrimaryFrameFor(NS_STATIC_CAST(nsIStyledContent*, this));
#ifdef DEBUG #ifdef DEBUG
NS_ASSERTION(frame, "unsuspending redraw w/o frame"); NS_ASSERTION(frame, "unsuspending redraw w/o frame");
#endif #endif
@ -984,8 +982,7 @@ nsSVGSVGElement::GetBBox(nsIDOMSVGRect **_retval)
NS_ASSERTION(presShell, "no presShell"); NS_ASSERTION(presShell, "no presShell");
if (!presShell) return NS_ERROR_FAILURE; if (!presShell) return NS_ERROR_FAILURE;
nsIFrame* frame = nsIFrame* frame = presShell->GetPrimaryFrameFor(this);
presShell->GetPrimaryFrameFor(NS_STATIC_CAST(nsIStyledContent*, this));
NS_ASSERTION(frame, "can't get bounding box for element without frame"); NS_ASSERTION(frame, "can't get bounding box for element without frame");
@ -1428,7 +1425,7 @@ nsSVGSVGElement::GetPreviousScale()
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// nsIStyledContent methods // nsIContent methods
NS_IMETHODIMP_(PRBool) NS_IMETHODIMP_(PRBool)
nsSVGSVGElement::IsAttributeMapped(const nsIAtom* name) const nsSVGSVGElement::IsAttributeMapped(const nsIAtom* name) const
@ -1519,8 +1516,7 @@ nsSVGSVGElement::DidModifySVGObservable (nsISVGValue* observable,
// invalidate viewbox -> viewport xform & inform frames // invalidate viewbox -> viewport xform & inform frames
mViewBoxToViewportTransform = nsnull; mViewBoxToViewportTransform = nsnull;
nsIFrame* frame = nsIFrame* frame = presShell->GetPrimaryFrameFor(this);
presShell->GetPrimaryFrameFor(NS_STATIC_CAST(nsIStyledContent*, this));
if (frame) { if (frame) {
nsISVGSVGFrame* svgframe; nsISVGSVGFrame* svgframe;
CallQueryInterface(frame, &svgframe); CallQueryInterface(frame, &svgframe);

Просмотреть файл

@ -69,7 +69,7 @@ public:
NS_FORWARD_NSIDOMELEMENT(nsSVGStopElementBase::) NS_FORWARD_NSIDOMELEMENT(nsSVGStopElementBase::)
NS_FORWARD_NSIDOMSVGELEMENT(nsSVGStopElementBase::) NS_FORWARD_NSIDOMSVGELEMENT(nsSVGStopElementBase::)
// nsIStyledContent interface // nsIContent interface
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const; NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
protected: protected:
@ -144,7 +144,7 @@ NS_IMETHODIMP nsSVGStopElement::GetOffset(nsIDOMSVGAnimatedNumber * *aOffset)
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// nsIStyledContent methods // nsIContent methods
NS_IMETHODIMP_(PRBool) NS_IMETHODIMP_(PRBool)
nsSVGStopElement::IsAttributeMapped(const nsIAtom* name) const nsSVGStopElement::IsAttributeMapped(const nsIAtom* name) const

Просмотреть файл

@ -84,7 +84,7 @@ nsSVGStylableElement::Init()
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// nsIStyledContent methods // nsIContent methods
const nsAttrValue* const nsAttrValue*
nsSVGStylableElement::GetClasses() const nsSVGStylableElement::GetClasses() const

Просмотреть файл

@ -59,7 +59,7 @@ public:
NS_DECL_ISUPPORTS_INHERITED NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIDOMSVGSTYLABLE NS_DECL_NSIDOMSVGSTYLABLE
// nsIStyledContent // nsIContent
virtual const nsAttrValue* GetClasses() const; virtual const nsAttrValue* GetClasses() const;
protected: protected:

Просмотреть файл

@ -72,7 +72,7 @@ public:
NS_FORWARD_NSIDOMELEMENT(nsSVGTSpanElementBase::) NS_FORWARD_NSIDOMELEMENT(nsSVGTSpanElementBase::)
NS_FORWARD_NSIDOMSVGELEMENT(nsSVGTSpanElementBase::) NS_FORWARD_NSIDOMSVGELEMENT(nsSVGTSpanElementBase::)
// nsIStyledContent interface // nsIContent interface
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const; NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
// nsISVGContent specializations: // nsISVGContent specializations:
@ -328,7 +328,7 @@ NS_IMETHODIMP nsSVGTSpanElement::SelectSubString(PRUint32 charnum, PRUint32 ncha
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// nsIStyledContent methods // nsIContent methods
NS_IMETHODIMP_(PRBool) NS_IMETHODIMP_(PRBool)
nsSVGTSpanElement::IsAttributeMapped(const nsIAtom* name) const nsSVGTSpanElement::IsAttributeMapped(const nsIAtom* name) const

Просмотреть файл

@ -76,7 +76,7 @@ public:
NS_FORWARD_NSIDOMELEMENT(nsSVGTextElementBase::) NS_FORWARD_NSIDOMELEMENT(nsSVGTextElementBase::)
NS_FORWARD_NSIDOMSVGELEMENT(nsSVGTextElementBase::) NS_FORWARD_NSIDOMSVGELEMENT(nsSVGTextElementBase::)
// nsIStyledContent interface // nsIContent interface
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const; NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
// nsISVGContent specializations: // nsISVGContent specializations:
@ -337,7 +337,7 @@ NS_IMETHODIMP nsSVGTextElement::SelectSubString(PRUint32 charnum, PRUint32 nchar
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// nsIStyledContent methods // nsIContent methods
NS_IMETHODIMP_(PRBool) NS_IMETHODIMP_(PRBool)
nsSVGTextElement::IsAttributeMapped(const nsIAtom* name) const nsSVGTextElement::IsAttributeMapped(const nsIAtom* name) const
@ -427,8 +427,7 @@ nsSVGTextElement::GetTextContentMetrics()
return nsnull; return nsnull;
} }
nsIFrame* frame = nsIFrame* frame = presShell->GetPrimaryFrameFor(this);
presShell->GetPrimaryFrameFor(NS_STATIC_CAST(nsIStyledContent*, this));
if (!frame) { if (!frame) {
NS_ERROR("no frame"); NS_ERROR("no frame");
@ -436,7 +435,7 @@ nsSVGTextElement::GetTextContentMetrics()
} }
nsISVGTextContentMetrics* metrics; nsISVGTextContentMetrics* metrics;
frame->QueryInterface(NS_GET_IID(nsISVGTextContentMetrics),(void**)&metrics); CallQueryInterface(frame, &metrics);
NS_ASSERTION(metrics, "wrong frame type"); NS_ASSERTION(metrics, "wrong frame type");
return metrics; return metrics;
} }

Просмотреть файл

@ -72,7 +72,7 @@ public:
NS_FORWARD_NSIDOMELEMENT(nsSVGTextPathElementBase::) NS_FORWARD_NSIDOMELEMENT(nsSVGTextPathElementBase::)
NS_FORWARD_NSIDOMSVGELEMENT(nsSVGTextPathElementBase::) NS_FORWARD_NSIDOMSVGELEMENT(nsSVGTextPathElementBase::)
// nsIStyledContent interface // nsIContent interface
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const; NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
protected: protected:
@ -315,7 +315,7 @@ NS_IMETHODIMP nsSVGTextPathElement::SelectSubString(PRUint32 charnum, PRUint32 n
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// nsIStyledContent methods // nsIContent methods
NS_IMETHODIMP_(PRBool) NS_IMETHODIMP_(PRBool)
nsSVGTextPathElement::IsAttributeMapped(const nsIAtom* name) const nsSVGTextPathElement::IsAttributeMapped(const nsIAtom* name) const

Просмотреть файл

@ -40,24 +40,25 @@
#define nsIXMLContent_h___ #define nsIXMLContent_h___
#include "nsISupports.h" #include "nsISupports.h"
#include "nsIStyledContent.h" #include "nsIContent.h"
class nsIDocShell; class nsIDocShell;
// 37eff125-80a9-49ce-a0f7-1617a21ce745 // 226f10b8-2954-405a-b5e7-446a4fce4bf8
#define NS_IXMLCONTENT_IID \ #define NS_IXMLCONTENT_IID \
{ 0x37eff125, 0x80a9, 0x49ce, \ { 0x226f10b8, 0x2954, 0x405a, \
{ 0xa0, 0xf7, 0x16, 0x17, 0xa2, 0x1c, 0xe7, 0x45 } } { 0xb5, 0xe7, 0x44, 0x6a, 0x4f, 0xce, 0x4b, 0xf8 } }
/** /**
* XML content extensions to nsIContent * XML content extensions to nsIContent
* // XXXbz this interface should die, really.
*/ */
class nsIXMLContent : public nsIStyledContent { class nsIXMLContent : public nsIContent {
public: public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IXMLCONTENT_IID) NS_DEFINE_STATIC_IID_ACCESSOR(NS_IXMLCONTENT_IID)
nsIXMLContent(nsINodeInfo *aNodeInfo) nsIXMLContent(nsINodeInfo *aNodeInfo)
: nsIStyledContent(aNodeInfo) : nsIContent(aNodeInfo)
{ {
} }

Просмотреть файл

@ -44,7 +44,6 @@
#include "nsIDOMEventReceiver.h" #include "nsIDOMEventReceiver.h"
#include "nsIXMLContent.h" #include "nsIXMLContent.h"
#include "nsGenericElement.h" #include "nsGenericElement.h"
#include "nsIStyledContent.h"
class nsIEventListenerManager; class nsIEventListenerManager;
class nsIURI; class nsIURI;

Просмотреть файл

@ -54,7 +54,6 @@
#include "nsIServiceManager.h" #include "nsIServiceManager.h"
#include "nsNetUtil.h" #include "nsNetUtil.h"
#include "nsIContent.h" #include "nsIContent.h"
#include "nsIStyledContent.h"
#include "nsIDOMDocumentFragment.h" #include "nsIDOMDocumentFragment.h"
NS_IMPL_ISUPPORTS1(nsXMLPrettyPrinter, NS_IMPL_ISUPPORTS1(nsXMLPrettyPrinter,
@ -240,7 +239,7 @@ nsXMLPrettyPrinter::EndUpdate(nsIDocument* aDocument, nsUpdateType aUpdateType)
void void
nsXMLPrettyPrinter::AttributeChanged(nsIDocument* aDocument, nsXMLPrettyPrinter::AttributeChanged(nsIDocument* aDocument,
nsIStyledContent* aContent, nsIContent* aContent,
PRInt32 aNameSpaceID, PRInt32 aNameSpaceID,
nsIAtom* aAttribute, nsIAtom* aAttribute,
PRInt32 aModType) PRInt32 aModType)

Просмотреть файл

@ -54,8 +54,7 @@ public:
// nsIDocumentObserver // nsIDocumentObserver
virtual void BeginUpdate(nsIDocument* aDocument, nsUpdateType aUpdateType); virtual void BeginUpdate(nsIDocument* aDocument, nsUpdateType aUpdateType);
virtual void EndUpdate(nsIDocument* aDocument, nsUpdateType aUpdateType); virtual void EndUpdate(nsIDocument* aDocument, nsUpdateType aUpdateType);
virtual void AttributeChanged(nsIDocument* aDocument, virtual void AttributeChanged(nsIDocument* aDocument, nsIContent* aContent,
nsIStyledContent* aContent,
PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aNameSpaceID, nsIAtom* aAttribute,
PRInt32 aModType); PRInt32 aModType);
virtual void ContentAppended(nsIDocument* aDocument, virtual void ContentAppended(nsIDocument* aDocument,

Просмотреть файл

@ -156,7 +156,7 @@ class nsXTFStyledElementWrapper : public nsXTFElementWrapper
public: public:
nsXTFStyledElementWrapper(nsINodeInfo* aNodeInfo); nsXTFStyledElementWrapper(nsINodeInfo* aNodeInfo);
// for nsIStyledContent // for nsIContent
virtual nsIAtom *GetClassAttributeName() const; virtual nsIAtom *GetClassAttributeName() const;
virtual const nsAttrValue* GetClasses() const; virtual const nsAttrValue* GetClasses() const;

Просмотреть файл

@ -114,7 +114,6 @@
#include "nsIServiceManager.h" #include "nsIServiceManager.h"
#include "nsICSSStyleRule.h" #include "nsICSSStyleRule.h"
#include "nsIStyleSheet.h" #include "nsIStyleSheet.h"
#include "nsIStyledContent.h"
#include "nsIURL.h" #include "nsIURL.h"
#include "nsIViewManager.h" #include "nsIViewManager.h"
#include "nsIWidget.h" #include "nsIWidget.h"
@ -1055,7 +1054,7 @@ nsXULElement::RemoveChildAt(PRUint32 aIndex, PRBool aNotify)
if (HasMutationListeners(this, NS_EVENT_BITS_MUTATION_NODEREMOVED)) { if (HasMutationListeners(this, NS_EVENT_BITS_MUTATION_NODEREMOVED)) {
nsMutationEvent mutation(PR_TRUE, NS_MUTATION_NODEREMOVED, oldKid); nsMutationEvent mutation(PR_TRUE, NS_MUTATION_NODEREMOVED, oldKid);
mutation.mRelatedNode = mutation.mRelatedNode =
do_QueryInterface(NS_STATIC_CAST(nsIStyledContent*, this)); do_QueryInterface(NS_STATIC_CAST(nsIContent*, this));
nsEventStatus status = nsEventStatus_eIgnore; nsEventStatus status = nsEventStatus_eIgnore;
oldKid->HandleDOMEvent(nsnull, &mutation, nsnull, NS_EVENT_FLAG_INIT, &status); oldKid->HandleDOMEvent(nsnull, &mutation, nsnull, NS_EVENT_FLAG_INIT, &status);
@ -2133,8 +2132,7 @@ nsXULElement::WillAddOrRemoveChild(nsIContent* aKid,
return aRemove ? NS_OK : EnsureContentsGenerated(); return aRemove ? NS_OK : EnsureContentsGenerated();
} }
// nsIStyledContent Implementation /// XXX GetID must be defined here because we have proto attrs.
/// XXX GetID must be defined here because nsXUL element does not inherit from nsGenericElement.
nsIAtom* nsIAtom*
nsXULElement::GetID() const nsXULElement::GetID() const
{ {

Просмотреть файл

@ -65,7 +65,6 @@
#include "nsIRDFCompositeDataSource.h" #include "nsIRDFCompositeDataSource.h"
#include "nsIRDFResource.h" #include "nsIRDFResource.h"
#include "nsIScriptObjectOwner.h" #include "nsIScriptObjectOwner.h"
#include "nsIStyledContent.h"
#include "nsIBindingManager.h" #include "nsIBindingManager.h"
#include "nsIURI.h" #include "nsIURI.h"
#include "nsIXMLContent.h" #include "nsIXMLContent.h"
@ -517,14 +516,12 @@ public:
virtual PRBool IsContentOfType(PRUint32 aFlags) const; virtual PRBool IsContentOfType(PRUint32 aFlags) const;
virtual nsresult GetListenerManager(nsIEventListenerManager** aResult); virtual nsresult GetListenerManager(nsIEventListenerManager** aResult);
virtual PRBool IsFocusable(PRInt32 *aTabIndex = nsnull); virtual PRBool IsFocusable(PRInt32 *aTabIndex = nsnull);
virtual nsIAtom* GetID() const;
virtual const nsAttrValue* GetClasses() const;
// nsIXMLContent // nsIXMLContent
NS_IMETHOD MaybeTriggerAutoLink(nsIDocShell *aShell); NS_IMETHOD MaybeTriggerAutoLink(nsIDocShell *aShell);
// nsIStyledContent
virtual nsIAtom* GetID() const;
virtual const nsAttrValue* GetClasses() const;
NS_IMETHOD WalkContentStyleRules(nsRuleWalker* aRuleWalker); NS_IMETHOD WalkContentStyleRules(nsRuleWalker* aRuleWalker);
virtual nsICSSStyleRule* GetInlineStyleRule(); virtual nsICSSStyleRule* GetInlineStyleRule();
NS_IMETHOD SetInlineStyleRule(nsICSSStyleRule* aStyleRule, PRBool aNotify); NS_IMETHOD SetInlineStyleRule(nsICSSStyleRule* aStyleRule, PRBool aNotify);

Просмотреть файл

@ -117,7 +117,6 @@
#include "nsIParser.h" #include "nsIParser.h"
#include "nsICSSStyleSheet.h" #include "nsICSSStyleSheet.h"
#include "nsIScriptError.h" #include "nsIScriptError.h"
#include "nsIStyledContent.h"
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// //
@ -1071,15 +1070,9 @@ nsXULDocument::ExecuteOnBroadcastHandlerFor(nsIContent* aBroadcaster,
} }
void void
nsXULDocument::AttributeChanged(nsIStyledContent* aElement, nsXULDocument::AttributeChanged(nsIContent* aElement, PRInt32 aNameSpaceID,
PRInt32 aNameSpaceID,
nsIAtom* aAttribute, PRInt32 aModType) nsIAtom* aAttribute, PRInt32 aModType)
{ {
#ifdef DEBUG
nsCOMPtr<nsIContent> debugContent(do_QueryInterface(aElement));
NS_ASSERTION(debugContent == aElement, "nsIContent pointer mismatch?");
#endif
nsresult rv; nsresult rv;
// XXXbz check aNameSpaceID, dammit! // XXXbz check aNameSpaceID, dammit!

Просмотреть файл

@ -124,8 +124,7 @@ public:
nsIContent* aChild, nsIContent* aChild,
PRInt32 aIndexInContainer); PRInt32 aIndexInContainer);
virtual void AttributeChanged(nsIStyledContent* aElement, virtual void AttributeChanged(nsIContent* aElement, PRInt32 aNameSpaceID,
PRInt32 aNameSpaceID,
nsIAtom* aAttribute, PRInt32 aModType); nsIAtom* aAttribute, PRInt32 aModType);
// nsIXULDocument interface // nsIXULDocument interface

Просмотреть файл

@ -41,7 +41,6 @@
#include "nsContentCID.h" #include "nsContentCID.h"
#include "nsIDocument.h" #include "nsIDocument.h"
#include "nsIStyledContent.h"
#include "nsIDOMNodeList.h" #include "nsIDOMNodeList.h"
#include "nsIDOMXULDocument.h" #include "nsIDOMXULDocument.h"
#include "nsINodeInfo.h" #include "nsINodeInfo.h"
@ -127,11 +126,11 @@ public:
NS_IMETHOD CreateContents(nsIContent* aElement); NS_IMETHOD CreateContents(nsIContent* aElement);
// nsIDocumentObserver interface // nsIDocumentObserver interface
virtual void AttributeChanged(nsIDocument* aDocument, virtual void AttributeChanged(nsIDocument* aDocument,
nsIStyledContent* aContent, nsIContent* aContent,
PRInt32 aNameSpaceID, PRInt32 aNameSpaceID,
nsIAtom* aAttribute, nsIAtom* aAttribute,
PRInt32 aModType); PRInt32 aModType);
void DocumentWillBeDestroyed(nsIDocument* aDocument); void DocumentWillBeDestroyed(nsIDocument* aDocument);
@ -1533,11 +1532,11 @@ nsXULContentBuilder::CreateContents(nsIContent* aElement)
// //
void void
nsXULContentBuilder::AttributeChanged(nsIDocument* aDocument, nsXULContentBuilder::AttributeChanged(nsIDocument* aDocument,
nsIStyledContent* aContent, nsIContent* aContent,
PRInt32 aNameSpaceID, PRInt32 aNameSpaceID,
nsIAtom* aAttribute, nsIAtom* aAttribute,
PRInt32 aModType) PRInt32 aModType)
{ {
// Handle "open" and "close" cases. We do this handling before // Handle "open" and "close" cases. We do this handling before
// we've notified the observer, so that content is already created // we've notified the observer, so that content is already created

Просмотреть файл

@ -67,7 +67,6 @@
#include "nsCRT.h" #include "nsCRT.h"
#include "nsFixedSizeAllocator.h" #include "nsFixedSizeAllocator.h"
#include "nsIContent.h" #include "nsIContent.h"
#include "nsIStyledContent.h"
#include "nsIDOMElement.h" #include "nsIDOMElement.h"
#include "nsIDOMNode.h" #include "nsIDOMNode.h"
#include "nsIDOMDocument.h" #include "nsIDOMDocument.h"
@ -330,11 +329,11 @@ nsXULTemplateBuilder::RemoveListener(nsIXULBuilderListener* aListener)
// //
void void
nsXULTemplateBuilder::AttributeChanged(nsIDocument* aDocument, nsXULTemplateBuilder::AttributeChanged(nsIDocument* aDocument,
nsIStyledContent* aContent, nsIContent* aContent,
PRInt32 aNameSpaceID, PRInt32 aNameSpaceID,
nsIAtom* aAttribute, nsIAtom* aAttribute,
PRInt32 aModType) PRInt32 aModType)
{ {
if (aContent == mRoot) { if (aContent == mRoot) {
// Check for a change to the 'ref' attribute on an atom, in which // Check for a change to the 'ref' attribute on an atom, in which

Просмотреть файл

@ -91,8 +91,7 @@ public:
NS_DECL_NSIXULTEMPLATEBUILDER NS_DECL_NSIXULTEMPLATEBUILDER
// nsIDocumentObserver // nsIDocumentObserver
virtual void AttributeChanged(nsIDocument *aDocument, virtual void AttributeChanged(nsIDocument *aDocument, nsIContent* aContent,
nsIStyledContent* aContent,
PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aNameSpaceID, nsIAtom* aAttribute,
PRInt32 aModType); PRInt32 aModType);
virtual void DocumentWillBeDestroyed(nsIDocument *aDocument); virtual void DocumentWillBeDestroyed(nsIDocument *aDocument);

Просмотреть файл

@ -652,7 +652,7 @@ nsSHEntry::CharacterDataChanged(nsIDocument* aDocument,
void void
nsSHEntry::AttributeChanged(nsIDocument* aDocument, nsSHEntry::AttributeChanged(nsIDocument* aDocument,
nsIStyledContent* aContent, nsIContent* aContent,
PRInt32 aNameSpaceID, PRInt32 aNameSpaceID,
nsIAtom* aAttribute, nsIAtom* aAttribute,
PRInt32 aModType) PRInt32 aModType)

Просмотреть файл

@ -56,7 +56,6 @@
#include "nsIDocument.h" #include "nsIDocument.h"
#include "nsIServiceManager.h" #include "nsIServiceManager.h"
#include "nsITreeColumns.h" #include "nsITreeColumns.h"
#include "nsIStyledContent.h"
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
// inDOMViewNode // inDOMViewNode
@ -647,9 +646,9 @@ NS_IMPL_NSIDOCUMENTOBSERVER_STATE_STUB(inDOMView)
NS_IMPL_NSIDOCUMENTOBSERVER_STYLE_STUB(inDOMView) NS_IMPL_NSIDOCUMENTOBSERVER_STYLE_STUB(inDOMView)
void void
inDOMView::AttributeChanged(nsIDocument *aDocument, inDOMView::AttributeChanged(nsIDocument *aDocument, nsIContent* aContent,
nsIStyledContent* aContent, PRInt32 aNameSpaceID, PRInt32 aNameSpaceID, nsIAtom* aAttribute,
nsIAtom* aAttribute, PRInt32 aModType) PRInt32 aModType)
{ {
if (!mTree) { if (!mTree) {
return; return;

Просмотреть файл

@ -57,6 +57,7 @@ REQUIRES = xpcom \
dom \ dom \
widget \ widget \
content \ content \
layout \
pref \ pref \
docshell \ docshell \
$(NULL) $(NULL)

Просмотреть файл

@ -57,6 +57,7 @@ REQUIRES = xpcom \
string \ string \
editor \ editor \
content \ content \
layout \
dom \ dom \
necko \ necko \
widget \ widget \
@ -73,13 +74,13 @@ CPPSRCS = \
mozEnglishWordUtils.cpp \ mozEnglishWordUtils.cpp \
mozGenericWordUtils.cpp \ mozGenericWordUtils.cpp \
mozSpellI18NManager.cpp \ mozSpellI18NManager.cpp \
mozInlineSpellChecker.cpp \ mozInlineSpellChecker.cpp \
$(NULL) $(NULL)
EXTRA_DSO_LDOPTS = \ EXTRA_DSO_LDOPTS = \
$(LIBS_DIR) \ $(LIBS_DIR) \
$(MOZ_COMPONENT_LIBS) \ $(MOZ_COMPONENT_LIBS) \
$(MOZ_UNICHARUTIL_LIBS) \ $(MOZ_UNICHARUTIL_LIBS) \
$(NULL) $(NULL)
include $(topsrcdir)/config/rules.mk include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -58,6 +58,7 @@ REQUIRES = xpcom \
string \ string \
dom \ dom \
content \ content \
layout \
widget \ widget \
necko \ necko \
js \ js \

Просмотреть файл

@ -54,6 +54,7 @@ ifndef TX_EXE
REQUIRES += unicharutil \ REQUIRES += unicharutil \
dom \ dom \
content \ content \
layout \
widget \ widget \
necko \ necko \
caps \ caps \

Просмотреть файл

@ -53,6 +53,7 @@ REQUIRES = string \
ifndef TX_EXE ifndef TX_EXE
REQUIRES += dom \ REQUIRES += dom \
content \ content \
layout \
widget \ widget \
unicharutil \ unicharutil \
necko \ necko \

Просмотреть файл

@ -54,6 +54,7 @@ ifndef TX_EXE
REQUIRES += necko \ REQUIRES += necko \
dom \ dom \
content \ content \
layout \
widget \ widget \
js \ js \
xpconnect \ xpconnect \

Просмотреть файл

@ -212,7 +212,7 @@ nsXPathResult::CharacterDataChanged(nsIDocument* aDocument,
void void
nsXPathResult::AttributeChanged(nsIDocument* aDocument, nsXPathResult::AttributeChanged(nsIDocument* aDocument,
nsIStyledContent* aContent, nsIContent* aContent,
PRInt32 aNameSpaceID, PRInt32 aNameSpaceID,
nsIAtom* aAttribute, nsIAtom* aAttribute,
PRInt32 aModType) PRInt32 aModType)

Просмотреть файл

@ -53,6 +53,7 @@ REQUIRES = string \
ifndef TX_EXE ifndef TX_EXE
REQUIRES += dom \ REQUIRES += dom \
content \ content \
layout \
widget \ widget \
unicharutil \ unicharutil \
necko \ necko \

Просмотреть файл

@ -1014,7 +1014,7 @@ txMozillaXSLTProcessor::CharacterDataChanged(nsIDocument* aDocument,
void void
txMozillaXSLTProcessor::AttributeChanged(nsIDocument* aDocument, txMozillaXSLTProcessor::AttributeChanged(nsIDocument* aDocument,
nsIStyledContent* aContent, nsIContent* aContent,
PRInt32 aNameSpaceID, PRInt32 aNameSpaceID,
nsIAtom* aAttribute, nsIAtom* aAttribute,
PRInt32 aModType) PRInt32 aModType)

Просмотреть файл

@ -53,6 +53,7 @@ REQUIRES = string \
ifndef TX_EXE ifndef TX_EXE
REQUIRES += dom \ REQUIRES += dom \
content \ content \
layout \
widget \ widget \
locale \ locale \
unicharutil \ unicharutil \

Просмотреть файл

@ -56,6 +56,7 @@ REQUIRES = xpcom \
dom \ dom \
js \ js \
content \ content \
layout \
widget \ widget \
caps \ caps \
necko \ necko \

Просмотреть файл

@ -53,6 +53,7 @@ REQUIRES = xpcom \
caps \ caps \
widget \ widget \
content \ content \
layout \
js \ js \
htmlparser \ htmlparser \
necko \ necko \

Просмотреть файл

@ -53,6 +53,7 @@ REQUIRES = xpcom \
caps \ caps \
widget \ widget \
content \ content \
layout \
js \ js \
necko \ necko \
pref \ pref \

Просмотреть файл

@ -43,7 +43,6 @@
#include "nsIURL.h" #include "nsIURL.h"
#include "nsISupportsArray.h" #include "nsISupportsArray.h"
#include "nsHashtable.h" #include "nsHashtable.h"
#include "nsIStyledContent.h"
#include "nsIHTMLDocument.h" #include "nsIHTMLDocument.h"
#include "nsIStyleRule.h" #include "nsIStyleRule.h"
#include "nsIFrame.h" #include "nsIFrame.h"
@ -10643,7 +10642,7 @@ nsCSSFrameConstructor::DoContentStateChanged(nsIContent* aContent,
} }
nsresult nsresult
nsCSSFrameConstructor::AttributeChanged(nsIStyledContent* aContent, nsCSSFrameConstructor::AttributeChanged(nsIContent* aContent,
PRInt32 aNameSpaceID, PRInt32 aNameSpaceID,
nsIAtom* aAttribute, nsIAtom* aAttribute,
PRInt32 aModType) PRInt32 aModType)

Просмотреть файл

@ -49,7 +49,6 @@
#include "nsIEventQueue.h" #include "nsIEventQueue.h"
class nsIDocument; class nsIDocument;
class nsIStyledContent;
struct nsFrameItems; struct nsFrameItems;
struct nsAbsoluteItems; struct nsAbsoluteItems;
struct nsTableCreator; struct nsTableCreator;
@ -125,10 +124,10 @@ public:
// WillDestroyFrameTree hasn't been called yet. // WillDestroyFrameTree hasn't been called yet.
void NotifyDestroyingFrame(nsIFrame* aFrame); void NotifyDestroyingFrame(nsIFrame* aFrame);
nsresult AttributeChanged(nsIStyledContent* aContent, nsresult AttributeChanged(nsIContent* aContent,
PRInt32 aNameSpaceID, PRInt32 aNameSpaceID,
nsIAtom* aAttribute, nsIAtom* aAttribute,
PRInt32 aModType); PRInt32 aModType);
void BeginUpdate() { ++mUpdateCount; } void BeginUpdate() { ++mUpdateCount; }
void EndUpdate(); void EndUpdate();

Просмотреть файл

@ -57,7 +57,6 @@
#include "nsIPresShell.h" #include "nsIPresShell.h"
#include "nsPresContext.h" #include "nsPresContext.h"
#include "nsIContent.h" #include "nsIContent.h"
#include "nsIStyledContent.h"
#include "nsIDocument.h" #include "nsIDocument.h"
#include "nsIDOMXULDocument.h" #include "nsIDOMXULDocument.h"
#include "nsStubDocumentObserver.h" #include "nsStubDocumentObserver.h"
@ -1216,8 +1215,7 @@ public:
nsIContent* aContent1, nsIContent* aContent1,
nsIContent* aContent2, nsIContent* aContent2,
PRInt32 aStateMask); PRInt32 aStateMask);
virtual void AttributeChanged(nsIDocument* aDocument, virtual void AttributeChanged(nsIDocument* aDocument, nsIContent* aContent,
nsIStyledContent* aContent,
PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aNameSpaceID, nsIAtom* aAttribute,
PRInt32 aModType); PRInt32 aModType);
virtual void ContentAppended(nsIDocument* aDocument, nsIContent* aContainer, virtual void ContentAppended(nsIDocument* aDocument, nsIContent* aContainer,
@ -5090,11 +5088,11 @@ PresShell::ContentStatesChanged(nsIDocument* aDocument,
void void
PresShell::AttributeChanged(nsIDocument* aDocument, PresShell::AttributeChanged(nsIDocument* aDocument,
nsIStyledContent* aContent, nsIContent* aContent,
PRInt32 aNameSpaceID, PRInt32 aNameSpaceID,
nsIAtom* aAttribute, nsIAtom* aAttribute,
PRInt32 aModType) PRInt32 aModType)
{ {
NS_PRECONDITION(!mIsDocumentGone, "Unexpected AttributeChanged"); NS_PRECONDITION(!mIsDocumentGone, "Unexpected AttributeChanged");
NS_PRECONDITION(aDocument == mDocument, "Unexpected aDocument"); NS_PRECONDITION(aDocument == mDocument, "Unexpected aDocument");

Просмотреть файл

@ -289,9 +289,7 @@ nsHTMLFramesetFrame::FrameResizePrefCallback(const char* aPref, void* aClosure)
frame->RecalculateBorderResize(); frame->RecalculateBorderResize();
if (doc) { if (doc) {
nsCOMPtr<nsIStyledContent> content(do_QueryInterface(frame->GetContent())); doc->AttributeChanged(frame->GetContent(),
NS_ASSERTION(content, "Expected an element here!");
doc->AttributeChanged(content,
kNameSpaceID_None, kNameSpaceID_None,
nsHTMLAtoms::frameborder, nsHTMLAtoms::frameborder,
nsIDOMMutationEvent::MODIFICATION); nsIDOMMutationEvent::MODIFICATION);

Просмотреть файл

@ -47,7 +47,6 @@
#include "nsNetUtil.h" #include "nsNetUtil.h"
#include "nsTextFragment.h" #include "nsTextFragment.h"
#include "nsIContent.h" #include "nsIContent.h"
#include "nsIStyledContent.h"
#include "nsIDOMHTMLElement.h" #include "nsIDOMHTMLElement.h"
#include "nsIDOMHTMLMapElement.h" #include "nsIDOMHTMLMapElement.h"
#include "nsIDOMHTMLAreaElement.h" #include "nsIDOMHTMLAreaElement.h"
@ -970,11 +969,11 @@ nsImageMap::MaybeUpdateAreas(nsIContent *aContent)
} }
void void
nsImageMap::AttributeChanged(nsIDocument* aDocument, nsImageMap::AttributeChanged(nsIDocument* aDocument,
nsIStyledContent* aContent, nsIContent* aContent,
PRInt32 aNameSpaceID, PRInt32 aNameSpaceID,
nsIAtom* aAttribute, nsIAtom* aAttribute,
PRInt32 aModType) PRInt32 aModType)
{ {
// If the parent of the changing content node is our map then update // If the parent of the changing content node is our map then update
// the map. But only do this if the node is an HTML <area> or <a> // the map. But only do this if the node is an HTML <area> or <a>

Просмотреть файл

@ -88,8 +88,7 @@ public:
NS_DECL_ISUPPORTS NS_DECL_ISUPPORTS
// nsIDocumentObserver // nsIDocumentObserver
virtual void AttributeChanged(nsIDocument* aDocument, virtual void AttributeChanged(nsIDocument* aDocument, nsIContent* aContent,
nsIStyledContent* aContent,
PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aNameSpaceID, nsIAtom* aAttribute,
PRInt32 aModType); PRInt32 aModType);
virtual void ContentAppended(nsIDocument* aDocument, nsIContent* aContainer, virtual void ContentAppended(nsIDocument* aDocument, nsIContent* aContainer,

Просмотреть файл

@ -51,7 +51,7 @@ nsCSSOMFactory::~nsCSSOMFactory()
NS_IMPL_ISUPPORTS1(nsCSSOMFactory, nsICSSOMFactory) NS_IMPL_ISUPPORTS1(nsCSSOMFactory, nsICSSOMFactory)
NS_IMETHODIMP NS_IMETHODIMP
nsCSSOMFactory::CreateDOMCSSAttributeDeclaration(nsIStyledContent *aContent, nsCSSOMFactory::CreateDOMCSSAttributeDeclaration(nsIContent *aContent,
nsDOMCSSDeclaration **aResult) nsDOMCSSDeclaration **aResult)
{ {
nsDOMCSSDeclaration *result = new nsDOMCSSAttributeDeclaration(aContent); nsDOMCSSDeclaration *result = new nsDOMCSSAttributeDeclaration(aContent);

Просмотреть файл

@ -51,7 +51,7 @@ public:
NS_DECL_ISUPPORTS NS_DECL_ISUPPORTS
NS_IMETHOD CreateDOMCSSAttributeDeclaration(nsIStyledContent *aContent, NS_IMETHOD CreateDOMCSSAttributeDeclaration(nsIContent *aContent,
nsDOMCSSDeclaration **aResult); nsDOMCSSDeclaration **aResult);
}; };

Просмотреть файл

@ -56,7 +56,6 @@
#include "nsICSSGroupRule.h" #include "nsICSSGroupRule.h"
#include "nsICSSImportRule.h" #include "nsICSSImportRule.h"
#include "nsIMediaList.h" #include "nsIMediaList.h"
#include "nsIStyledContent.h"
#include "nsIDocument.h" #include "nsIDocument.h"
#include "nsPresContext.h" #include "nsPresContext.h"
#include "nsIEventStateManager.h" #include "nsIEventStateManager.h"
@ -2601,7 +2600,7 @@ RuleProcessorData::RuleProcessorData(nsPresContext* aPresContext,
mContentTag = nsnull; mContentTag = nsnull;
mContentID = nsnull; mContentID = nsnull;
mStyledContent = nsnull; mHasAttributes = PR_FALSE;
mIsHTMLContent = PR_FALSE; mIsHTMLContent = PR_FALSE;
mIsHTMLLink = PR_FALSE; mIsHTMLLink = PR_FALSE;
mIsSimpleXLink = PR_FALSE; mIsSimpleXLink = PR_FALSE;
@ -2632,15 +2631,9 @@ RuleProcessorData::RuleProcessorData(nsPresContext* aPresContext,
// get the event state // get the event state
mPresContext->EventStateManager()->GetContentState(aContent, mEventState); mPresContext->EventStateManager()->GetContentState(aContent, mEventState);
// get the styledcontent interface and the ID // get the ID and classes for the content
if (aContent->IsContentOfType(nsIContent::eELEMENT)) { mContentID = aContent->GetID();
mStyledContent = NS_STATIC_CAST(nsIStyledContent*, aContent); mClasses = aContent->GetClasses();
mContentID = mStyledContent->GetID();
mClasses = mStyledContent->GetClasses();
}
NS_ASSERTION(nsCOMPtr<nsIStyledContent>(do_QueryInterface(aContent)) == mStyledContent,
"nsIStyledContent must agree with IsContentOfType(eELEMENT)");
// see if there are attributes for the content // see if there are attributes for the content
mHasAttributes = aContent->GetAttrCount() > 0; mHasAttributes = aContent->GetAttrCount() > 0;
@ -3000,7 +2993,7 @@ static PRBool SelectorMatches(RuleProcessorData &data,
nsDependentString(pseudoClass->mString), nsDependentString(pseudoClass->mString),
nsCaseInsensitiveStringComparator()); nsCaseInsensitiveStringComparator());
} }
else { else if (data.mContent) {
nsIDocument* doc = data.mContent->GetDocument(); nsIDocument* doc = data.mContent->GetDocument();
if (doc) { if (doc) {
// Try to get the language from the HTTP header or if this // Try to get the language from the HTTP header or if this
@ -3149,6 +3142,9 @@ static PRBool SelectorMatches(RuleProcessorData &data,
// if no attributes on the content, no match // if no attributes on the content, no match
result = localFalse; result = localFalse;
} else { } else {
NS_ASSERTION(data.mContent,
"Must have content if either data.mHasAttributes or "
"aAttribute is set!");
result = localTrue; result = localTrue;
nsAttrSelector* attr = aSelector->mAttrList; nsAttrSelector* attr = aSelector->mAttrList;
do { do {
@ -3234,7 +3230,8 @@ static PRBool SelectorMatches(RuleProcessorData &data,
if (result && (aSelector->mIDList || aSelector->mClassList)) { if (result && (aSelector->mIDList || aSelector->mClassList)) {
// test for ID & class match // test for ID & class match
result = localFalse; result = localFalse;
if (data.mStyledContent) { // No attributes means no match on class or id
if (data.mHasAttributes) {
// case sensitivity: bug 93371 // case sensitivity: bug 93371
PRBool isCaseSensitive = data.mCompatMode != eCompatibility_NavQuirks; PRBool isCaseSensitive = data.mCompatMode != eCompatibility_NavQuirks;
nsAtomList* IDList = aSelector->mIDList; nsAtomList* IDList = aSelector->mIDList;
@ -3270,7 +3267,7 @@ static PRBool SelectorMatches(RuleProcessorData &data,
} }
if (result && if (result &&
(!aAttribute || aAttribute != data.mStyledContent->GetClassAttributeName())) { (!aAttribute || aAttribute != data.mContent->GetClassAttributeName())) {
nsAtomList* classList = aSelector->mClassList; nsAtomList* classList = aSelector->mClassList;
const nsAttrValue *elementClasses = data.mClasses; const nsAttrValue *elementClasses = data.mClasses;
while (nsnull != classList) { while (nsnull != classList) {
@ -3574,8 +3571,6 @@ nsCSSRuleProcessor::HasAttributeDependentStyle(AttributeRuleProcessorData* aData
{ {
NS_PRECONDITION(aData->mContent->IsContentOfType(nsIContent::eELEMENT), NS_PRECONDITION(aData->mContent->IsContentOfType(nsIContent::eELEMENT),
"content must be element"); "content must be element");
NS_ASSERTION(aData->mStyledContent,
"elements must implement nsIStyledContent");
AttributeEnumData data(aData); AttributeEnumData data(aData);
@ -3602,7 +3597,7 @@ nsCSSRuleProcessor::HasAttributeDependentStyle(AttributeRuleProcessorData* aData
cascade->mIDSelectors.EnumerateForwards(AttributeEnumFunc, &data); cascade->mIDSelectors.EnumerateForwards(AttributeEnumFunc, &data);
} }
if (aData->mAttribute == aData->mStyledContent->GetClassAttributeName()) { if (aData->mAttribute == aData->mContent->GetClassAttributeName()) {
cascade->mClassSelectors.EnumerateForwards(AttributeEnumFunc, &data); cascade->mClassSelectors.EnumerateForwards(AttributeEnumFunc, &data);
} }

Просмотреть файл

@ -39,7 +39,6 @@
#include "nsCSSDeclaration.h" #include "nsCSSDeclaration.h"
#include "nsIDocument.h" #include "nsIDocument.h"
#include "nsHTMLAtoms.h" #include "nsHTMLAtoms.h"
#include "nsIStyledContent.h"
#include "nsIDOMMutationEvent.h" #include "nsIDOMMutationEvent.h"
#include "nsICSSStyleRule.h" #include "nsICSSStyleRule.h"
#include "nsICSSLoader.h" #include "nsICSSLoader.h"
@ -48,15 +47,18 @@
#include "nsINameSpaceManager.h" #include "nsINameSpaceManager.h"
#include "nsStyleConsts.h" #include "nsStyleConsts.h"
#include "nsContentUtils.h" #include "nsContentUtils.h"
#include "nsIContent.h"
MOZ_DECL_CTOR_COUNTER(nsDOMCSSAttributeDeclaration) MOZ_DECL_CTOR_COUNTER(nsDOMCSSAttributeDeclaration)
nsDOMCSSAttributeDeclaration::nsDOMCSSAttributeDeclaration(nsIStyledContent *aContent) nsDOMCSSAttributeDeclaration::nsDOMCSSAttributeDeclaration(nsIContent *aContent)
{ {
MOZ_COUNT_CTOR(nsDOMCSSAttributeDeclaration); MOZ_COUNT_CTOR(nsDOMCSSAttributeDeclaration);
// This reference is not reference-counted. The content // This reference is not reference-counted. The content
// object tells us when its about to go away. // object tells us when its about to go away.
NS_ASSERTION(aContent && aContent->IsContentOfType(nsIContent::eELEMENT),
"Inline style for non-element content?");
mContent = aContent; mContent = aContent;
} }

Просмотреть файл

@ -44,14 +44,13 @@
#include "nsString.h" #include "nsString.h"
class nsIContent; class nsIContent;
class nsIStyledContent;
class nsICSSLoader; class nsICSSLoader;
class nsICSSParser; class nsICSSParser;
class nsDOMCSSAttributeDeclaration : public nsDOMCSSDeclaration class nsDOMCSSAttributeDeclaration : public nsDOMCSSDeclaration
{ {
public: public:
nsDOMCSSAttributeDeclaration(nsIStyledContent *aContent); nsDOMCSSAttributeDeclaration(nsIContent *aContent);
~nsDOMCSSAttributeDeclaration(); ~nsDOMCSSAttributeDeclaration();
// impl AddRef/Release; QI is implemented by our parent class // impl AddRef/Release; QI is implemented by our parent class
@ -75,7 +74,7 @@ protected:
nsAutoRefCnt mRefCnt; nsAutoRefCnt mRefCnt;
NS_DECL_OWNINGTHREAD NS_DECL_OWNINGTHREAD
nsIStyledContent *mContent; nsIContent *mContent;
}; };
#endif /* nsDOMCSSAttributeDeclaration_h___ */ #endif /* nsDOMCSSAttributeDeclaration_h___ */

Просмотреть файл

@ -41,7 +41,6 @@
#include "nsIAtom.h" #include "nsIAtom.h"
#include "nsIURL.h" #include "nsIURL.h"
#include "nsCSSPseudoElements.h" #include "nsCSSPseudoElements.h"
#include "nsIStyledContent.h"
#include "nsIStyleRule.h" #include "nsIStyleRule.h"
#include "nsIFrame.h" #include "nsIFrame.h"
#include "nsICSSStyleRule.h" #include "nsICSSStyleRule.h"
@ -414,11 +413,11 @@ NS_IMPL_ISUPPORTS3(HTMLCSSStyleSheetImpl,
NS_IMETHODIMP NS_IMETHODIMP
HTMLCSSStyleSheetImpl::RulesMatching(ElementRuleProcessorData* aData) HTMLCSSStyleSheetImpl::RulesMatching(ElementRuleProcessorData* aData)
{ {
nsIStyledContent* styledContent = aData->mStyledContent; nsIContent* content = aData->mContent;
if (styledContent) { if (content) {
// just get the one and only style rule from the content's STYLE attribute // just get the one and only style rule from the content's STYLE attribute
nsICSSStyleRule* rule = styledContent->GetInlineStyleRule(); nsICSSStyleRule* rule = content->GetInlineStyleRule();
if (rule) if (rule)
aData->mRuleWalker->Forward(rule); aData->mRuleWalker->Forward(rule);
} }

Просмотреть файл

@ -399,9 +399,9 @@ static nsresult GetBodyColor(nsPresContext* aPresContext, nscolor* aColor)
NS_IMETHODIMP NS_IMETHODIMP
nsHTMLStyleSheet::RulesMatching(ElementRuleProcessorData* aData) nsHTMLStyleSheet::RulesMatching(ElementRuleProcessorData* aData)
{ {
nsIStyledContent *styledContent = aData->mStyledContent; nsIContent *content = aData->mContent;
if (styledContent) { if (content) {
nsRuleWalker *ruleWalker = aData->mRuleWalker; nsRuleWalker *ruleWalker = aData->mRuleWalker;
if (aData->mIsHTMLContent) { if (aData->mIsHTMLContent) {
nsIAtom* tag = aData->mContentTag; nsIAtom* tag = aData->mContentTag;
@ -467,7 +467,7 @@ nsHTMLStyleSheet::RulesMatching(ElementRuleProcessorData* aData)
} // end html element } // end html element
// just get the style rules from the content // just get the style rules from the content
styledContent->WalkContentStyleRules(ruleWalker); content->WalkContentStyleRules(ruleWalker);
} }
return NS_OK; return NS_OK;
@ -478,7 +478,7 @@ NS_IMETHODIMP
nsHTMLStyleSheet::HasStateDependentStyle(StateRuleProcessorData* aData, nsHTMLStyleSheet::HasStateDependentStyle(StateRuleProcessorData* aData,
nsReStyleHint* aResult) nsReStyleHint* aResult)
{ {
if (aData->mStyledContent && if (aData->mContent &&
aData->mIsHTMLContent && aData->mIsHTMLContent &&
aData->mIsHTMLLink && aData->mIsHTMLLink &&
aData->mContentTag == nsHTMLAtoms::a && aData->mContentTag == nsHTMLAtoms::a &&
@ -498,11 +498,11 @@ nsHTMLStyleSheet::HasAttributeDependentStyle(AttributeRuleProcessorData* aData,
nsReStyleHint* aResult) nsReStyleHint* aResult)
{ {
// Result is true for |href| changes on HTML links if we have link rules. // Result is true for |href| changes on HTML links if we have link rules.
nsIStyledContent *styledContent = aData->mStyledContent; nsIContent *content = aData->mContent;
if (aData->mAttribute == nsHTMLAtoms::href && if (aData->mAttribute == nsHTMLAtoms::href &&
(mLinkRule || mVisitedRule || mActiveRule) && (mLinkRule || mVisitedRule || mActiveRule) &&
styledContent && content &&
styledContent->IsContentOfType(nsIContent::eHTML) && content->IsContentOfType(nsIContent::eHTML) &&
aData->mContentTag == nsHTMLAtoms::a) { aData->mContentTag == nsHTMLAtoms::a) {
*aResult = eReStyle_Self; *aResult = eReStyle_Self;
return NS_OK; return NS_OK;
@ -512,7 +512,7 @@ nsHTMLStyleSheet::HasAttributeDependentStyle(AttributeRuleProcessorData* aData,
// to descendants of body, when we're already reresolving. // to descendants of body, when we're already reresolving.
// Handle the content style rules. // Handle the content style rules.
if (styledContent && styledContent->IsAttributeMapped(aData->mAttribute)) { if (content && content->IsAttributeMapped(aData->mAttribute)) {
*aResult = eReStyle_Self; *aResult = eReStyle_Self;
return NS_OK; return NS_OK;
} }

Просмотреть файл

@ -42,12 +42,12 @@
#include "nsISupports.h" #include "nsISupports.h"
class nsDOMCSSDeclaration; class nsDOMCSSDeclaration;
class nsIStyledContent; class nsIContent;
// bfdd87bd-79c8-4041-ae14-91fa8536ce61 // f2fb43bf-81a1-4b0d-907a-893fe6727dbb
#define NS_ICSSOMFACTORY_IID \ #define NS_ICSSOMFACTORY_IID \
{ 0xbfdd87bd, 0x79c8, 0x4041, \ { 0xf2fb43bf, 0x81a1, 0x4b0d, \
{0xae, 0x14, 0x91, 0xfa, 0x85, 0x36, 0xce, 0x61 } } { 0x90, 0x7a, 0x89, 0x3f, 0xe6, 0x72, 0x7d, 0xbb } }
// 5fcaa2c1-7ca4-4f73-a357-93e79d709376 // 5fcaa2c1-7ca4-4f73-a357-93e79d709376
#define NS_CSSOMFACTORY_CID \ #define NS_CSSOMFACTORY_CID \
@ -58,7 +58,7 @@ class nsICSSOMFactory : public nsISupports {
public: public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICSSOMFACTORY_IID) NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICSSOMFACTORY_IID)
NS_IMETHOD CreateDOMCSSAttributeDeclaration(nsIStyledContent *aContent, NS_IMETHOD CreateDOMCSSAttributeDeclaration(nsIContent *aContent,
nsDOMCSSDeclaration **aResult) = 0; nsDOMCSSDeclaration **aResult) = 0;
}; };

Просмотреть файл

@ -48,7 +48,6 @@
class nsIStyleSheet; class nsIStyleSheet;
class nsPresContext; class nsPresContext;
class nsIContent; class nsIContent;
class nsIStyledContent;
class nsIAtom; class nsIAtom;
class nsICSSPseudoComparator; class nsICSSPseudoComparator;
class nsRuleWalker; class nsRuleWalker;
@ -84,7 +83,6 @@ struct RuleProcessorData {
nsIAtom* mContentTag; // if content, then content->GetTag() nsIAtom* mContentTag; // if content, then content->GetTag()
nsIAtom* mContentID; // if styled content, then weak reference to styledcontent->GetID() nsIAtom* mContentID; // if styled content, then weak reference to styledcontent->GetID()
nsIStyledContent* mStyledContent; // if content, content->QI(nsIStyledContent)
PRPackedBool mIsHTMLContent; // if content, then does QI on HTMLContent, true or false PRPackedBool mIsHTMLContent; // if content, then does QI on HTMLContent, true or false
PRPackedBool mIsHTMLLink; // if content, calls nsStyleUtil::IsHTMLLink PRPackedBool mIsHTMLLink; // if content, calls nsStyleUtil::IsHTMLLink
PRPackedBool mIsSimpleXLink; // if content, calls nsStyleUtil::IsSimpleXLink PRPackedBool mIsSimpleXLink; // if content, calls nsStyleUtil::IsSimpleXLink

Просмотреть файл

@ -47,7 +47,6 @@
#include "nsIDOMClassInfo.h" #include "nsIDOMClassInfo.h"
#include "nsIEventStateManager.h" #include "nsIEventStateManager.h"
#include "nsINodeInfo.h" #include "nsINodeInfo.h"
#include "nsIStyledContent.h"
// A content model view implementation for the tree. // A content model view implementation for the tree.
@ -733,7 +732,7 @@ nsTreeContentView::ContentStatesChanged(nsIDocument* aDocument,
void void
nsTreeContentView::AttributeChanged(nsIDocument *aDocument, nsTreeContentView::AttributeChanged(nsIDocument *aDocument,
nsIStyledContent* aContent, nsIContent* aContent,
PRInt32 aNameSpaceID, PRInt32 aNameSpaceID,
nsIAtom* aAttribute, nsIAtom* aAttribute,
PRInt32 aModType) PRInt32 aModType)

Просмотреть файл

@ -72,8 +72,7 @@ class nsTreeContentView : public nsITreeView,
nsIContent* aContent1, nsIContent* aContent1,
nsIContent* aContent2, nsIContent* aContent2,
PRInt32 aStateMask); PRInt32 aStateMask);
virtual void AttributeChanged(nsIDocument *aDocument, virtual void AttributeChanged(nsIDocument *aDocument, nsIContent* aContent,
nsIStyledContent* aContent,
PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aNameSpaceID, nsIAtom* aAttribute,
PRInt32 aModType); PRInt32 aModType);
virtual void ContentAppended(nsIDocument *aDocument, virtual void ContentAppended(nsIDocument *aDocument,

Просмотреть файл

@ -58,6 +58,7 @@ REQUIRES = \
intl \ intl \
dom \ dom \
content \ content \
layout \
widget \ widget \
autocomplete \ autocomplete \
pipnss \ pipnss \

Просмотреть файл

@ -43,7 +43,6 @@
#include "nsIMenu.h" #include "nsIMenu.h"
#include "nsIMenuItem.h" #include "nsIMenuItem.h"
#include "nsIContent.h" #include "nsIContent.h"
#include "nsIStyledContent.h"
#include "nsMenuBarX.h" #include "nsMenuBarX.h"
#include "nsMenuX.h" #include "nsMenuX.h"
@ -696,8 +695,7 @@ nsMenuBarX::DocumentWillBeDestroyed(nsIDocument * aDocument)
void void
nsMenuBarX::AttributeChanged(nsIDocument * aDocument, nsMenuBarX::AttributeChanged(nsIDocument * aDocument, nsIContent * aContent,
nsIStyledContent * aContent,
PRInt32 aNameSpaceID, nsIAtom * aAttribute, PRInt32 aNameSpaceID, nsIAtom * aAttribute,
PRInt32 aModType) PRInt32 aModType)
{ {

Просмотреть файл

@ -42,7 +42,6 @@
#include "nsIMenu.h" #include "nsIMenu.h"
#include "nsIMenuItem.h" #include "nsIMenuItem.h"
#include "nsIContent.h" #include "nsIContent.h"
#include "nsIStyledContent.h"
#include "nsMenuBarX.h" #include "nsMenuBarX.h"
#include "nsMenuX.h" #include "nsMenuX.h"
@ -716,8 +715,7 @@ nsMenuBarX::DocumentWillBeDestroyed( nsIDocument * aDocument )
void void
nsMenuBarX::AttributeChanged( nsIDocument * aDocument, nsMenuBarX::AttributeChanged( nsIDocument * aDocument, nsIContent * aContent,
nsIStyledContent * aContent,
PRInt32 aNameSpaceID, nsIAtom * aAttribute, PRInt32 aNameSpaceID, nsIAtom * aAttribute,
PRInt32 aModType ) PRInt32 aModType )
{ {