зеркало из https://github.com/mozilla/gecko-dev.git
Remove nsIStyledContent. Bug 313968, r=sicking, r=dbaron on nsCSSStyleSheet
changes, sr=jst
This commit is contained in:
Родитель
84802b45c2
Коммит
d44ad313ae
|
@ -45,7 +45,6 @@
|
|||
#include "nsIDocShell.h"
|
||||
#include "nsIDocShellTreeItem.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIStyledContent.h"
|
||||
#include "nsIDOMAttr.h"
|
||||
#include "nsIDOMCharacterData.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
|
@ -734,8 +733,7 @@ NS_IMPL_NSIDOCUMENTOBSERVER_REFLOW_STUB(nsDocAccessible)
|
|||
NS_IMPL_NSIDOCUMENTOBSERVER_STYLE_STUB(nsDocAccessible)
|
||||
|
||||
void
|
||||
nsDocAccessible::AttributeChanged(nsIDocument *aDocument,
|
||||
nsIStyledContent* aContent,
|
||||
nsDocAccessible::AttributeChanged(nsIDocument *aDocument, nsIContent* aContent,
|
||||
PRInt32 aNameSpaceID, nsIAtom* aAttribute,
|
||||
PRInt32 aModType)
|
||||
{
|
||||
|
|
|
@ -66,6 +66,7 @@ REQUIRES = xpcom \
|
|||
docshell \
|
||||
windowwatcher \
|
||||
content \
|
||||
layout \
|
||||
$(NULL)
|
||||
|
||||
CPPSRCS = \
|
||||
|
|
|
@ -60,7 +60,6 @@ nsINameSpaceManager.h \
|
|||
nsINodeInfo.h \
|
||||
nsIRangeUtils.h \
|
||||
nsIScriptElement.h \
|
||||
nsIStyledContent.h \
|
||||
nsIStyleSheetLinkingElement.h \
|
||||
nsITextContent.h \
|
||||
nsIPrivateDOMImplementation.h \
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
#include "nsPropertyTable.h"
|
||||
#include "nsCaseTreatment.h"
|
||||
#include "nsINodeInfo.h"
|
||||
#include "nsChangeHint.h"
|
||||
|
||||
// Forward declarations
|
||||
class nsIAtom;
|
||||
|
@ -58,11 +59,14 @@ class nsISupportsArray;
|
|||
class nsIDOMRange;
|
||||
class nsIEventListenerManager;
|
||||
class nsIURI;
|
||||
class nsICSSStyleRule;
|
||||
class nsRuleWalker;
|
||||
class nsAttrValue;
|
||||
|
||||
// IID for the nsIContent interface
|
||||
#define NS_ICONTENT_IID \
|
||||
{ 0xe5417db2, 0xfc59, 0x4b43, \
|
||||
{ 0x8c, 0x9a, 0xed, 0xc3, 0x17, 0x3a, 0x85, 0x40 } }
|
||||
{ 0x08b87f67, 0x2f64, 0x437b, \
|
||||
{ 0x93, 0x35, 0x02, 0x60, 0x17, 0x5c, 0x0e, 0xc2 } }
|
||||
|
||||
/**
|
||||
* A node of content in a document's content model. This interface
|
||||
|
@ -762,6 +766,64 @@ public:
|
|||
virtual nsresult CloneContent(nsNodeInfoManager *aNodeInfoManager,
|
||||
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
|
||||
/**
|
||||
* List the content (and anything it contains) out to the given
|
||||
|
|
|
@ -57,7 +57,6 @@
|
|||
#include "nsIAtom.h"
|
||||
|
||||
class nsIContent;
|
||||
class nsIStyledContent;
|
||||
class nsPresContext;
|
||||
class nsIPresShell;
|
||||
|
||||
|
@ -511,7 +510,7 @@ public:
|
|||
virtual void AttributeWillChange(nsIContent* aChild,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute) = 0;
|
||||
virtual void AttributeChanged(nsIStyledContent* aChild,
|
||||
virtual void AttributeChanged(nsIContent* aChild,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType) = 0;
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
|
||||
class nsIAtom;
|
||||
class nsIContent;
|
||||
class nsIStyledContent;
|
||||
class nsIPresShell;
|
||||
class nsIStyleSheet;
|
||||
class nsIStyleRule;
|
||||
|
@ -161,11 +160,11 @@ public:
|
|||
* @param aModType Whether or not the attribute was added, changed, or removed.
|
||||
* The constants are defined in nsIDOMMutationEvent.h.
|
||||
*/
|
||||
virtual void AttributeChanged(nsIDocument* aDocument,
|
||||
nsIStyledContent* aContent,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType) = 0;
|
||||
virtual void AttributeChanged(nsIDocument* aDocument,
|
||||
nsIContent* aContent,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType) = 0;
|
||||
|
||||
/**
|
||||
* Notifcation that the content model has had data appended to the
|
||||
|
@ -350,7 +349,7 @@ public:
|
|||
nsIContent* aContent2, \
|
||||
PRInt32 aStateMask); \
|
||||
virtual void AttributeChanged(nsIDocument* aDocument, \
|
||||
nsIStyledContent* aContent, \
|
||||
nsIContent* aContent, \
|
||||
PRInt32 aNameSpaceID, \
|
||||
nsIAtom* aAttribute, \
|
||||
PRInt32 aModType); \
|
||||
|
@ -441,7 +440,7 @@ _class::CharacterDataChanged(nsIDocument* aDocument, \
|
|||
} \
|
||||
void \
|
||||
_class::AttributeChanged(nsIDocument* aDocument, \
|
||||
nsIStyledContent* aContent, \
|
||||
nsIContent* aContent, \
|
||||
PRInt32 aNameSpaceID, \
|
||||
nsIAtom* aAttribute, \
|
||||
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 "nsIContent.h"
|
||||
#include "nsIStyledContent.h"
|
||||
#include "nsIDOMNode.h"
|
||||
#include "nsIDOM3Node.h"
|
||||
#include "nsIDocument.h"
|
||||
|
@ -526,8 +525,7 @@ nsContentList::NamedItem(const nsAString& aName, nsIDOMNode** aReturn)
|
|||
}
|
||||
|
||||
void
|
||||
nsContentList::AttributeChanged(nsIDocument *aDocument,
|
||||
nsIStyledContent* aContent,
|
||||
nsContentList::AttributeChanged(nsIDocument *aDocument, nsIContent* aContent,
|
||||
PRInt32 aNameSpaceID, nsIAtom* aAttribute,
|
||||
PRInt32 aModType)
|
||||
{
|
||||
|
|
|
@ -196,8 +196,7 @@ public:
|
|||
|
||||
|
||||
// nsIDocumentObserver
|
||||
virtual void AttributeChanged(nsIDocument *aDocument,
|
||||
nsIStyledContent* aContent,
|
||||
virtual void AttributeChanged(nsIDocument *aDocument, nsIContent* aContent,
|
||||
PRInt32 aNameSpaceID, nsIAtom* aAttribute,
|
||||
PRInt32 aModType);
|
||||
virtual void ContentAppended(nsIDocument *aDocument, nsIContent* aContainer,
|
||||
|
|
|
@ -138,7 +138,6 @@ static NS_DEFINE_CID(kDOMEventGroupCID, NS_DOMEVENTGROUP_CID);
|
|||
#include "nsDateTimeFormatCID.h"
|
||||
#include "nsIDateTimeFormat.h"
|
||||
#include "nsIComponentRegistrar.h"
|
||||
#include "nsIStyledContent.h"
|
||||
|
||||
static NS_DEFINE_CID(kCharsetAliasCID, NS_CHARSETALIAS_CID);
|
||||
static NS_DEFINE_CID(kDateTimeFormatCID, NS_DATETIMEFORMAT_CID);
|
||||
|
@ -2357,15 +2356,10 @@ nsDocument::AttributeWillChange(nsIContent* aChild, PRInt32 aNameSpaceID,
|
|||
}
|
||||
|
||||
void
|
||||
nsDocument::AttributeChanged(nsIStyledContent* aChild, PRInt32 aNameSpaceID,
|
||||
nsDocument::AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute, PRInt32 aModType)
|
||||
{
|
||||
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;
|
||||
for (i = mObservers.Count() - 1; i >= 0; --i) {
|
||||
|
|
|
@ -488,7 +488,7 @@ public:
|
|||
virtual void AttributeWillChange(nsIContent* aChild,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute);
|
||||
virtual void AttributeChanged(nsIStyledContent* aChild,
|
||||
virtual void AttributeChanged(nsIContent* aChild,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType);
|
||||
|
|
|
@ -55,6 +55,7 @@
|
|||
#include "nsDOMString.h"
|
||||
#include "nsLayoutAtoms.h"
|
||||
#include "nsIDOMUserDataHandler.h"
|
||||
#include "nsChangeHint.h"
|
||||
|
||||
#include "pldhash.h"
|
||||
#include "prprf.h"
|
||||
|
@ -1402,3 +1403,55 @@ nsGenericDOMDataNode::CloneContent(nsNodeInfoManager *aNodeInfoManager,
|
|||
|
||||
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
|
||||
* right class for the clone.
|
||||
*/
|
||||
nsresult CloneContent(nsNodeInfoManager *aNodeInfoManager, PRBool aDeep,
|
||||
nsIContent **aResult) const;
|
||||
virtual nsresult CloneContent(nsNodeInfoManager *aNodeInfoManager,
|
||||
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
|
||||
virtual const nsTextFragment *Text();
|
||||
|
|
|
@ -3709,7 +3709,6 @@ nsGenericElement::RemoveChild(nsIDOMNode *aOldChild, nsIDOMNode **aReturn)
|
|||
|
||||
NS_INTERFACE_MAP_BEGIN(nsGenericElement)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIContent)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIStyledContent)
|
||||
NS_INTERFACE_MAP_ENTRY_TEAROFF(nsIDOM3Node, new nsNode3Tearoff(this))
|
||||
NS_INTERFACE_MAP_ENTRY_TEAROFF(nsIDOMEventReceiver,
|
||||
nsDOMEventRTTearoff::Create(this))
|
||||
|
|
|
@ -447,7 +447,6 @@ public:
|
|||
virtual void DumpContent(FILE* out, PRInt32 aIndent,PRBool aDumpAll) const;
|
||||
#endif
|
||||
|
||||
// nsIStyledContent interface methods
|
||||
virtual nsIAtom* GetID() const;
|
||||
virtual const nsAttrValue* GetClasses() const;
|
||||
NS_IMETHOD WalkContentStyleRules(nsRuleWalker* aRuleWalker);
|
||||
|
|
|
@ -42,13 +42,11 @@
|
|||
#include "nsIDOMElement.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIDOMEventReceiver.h"
|
||||
#include "nsIStyledContent.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsIURL.h"
|
||||
#include "nsIDOMEventListener.h"
|
||||
#include "nsINameSpaceManager.h"
|
||||
#include "nsINodeInfo.h"
|
||||
#include "nsIStyledContent.h"
|
||||
#include "nsLayoutAtoms.h"
|
||||
|
||||
PRBool nsXMLEventsListener::InitXMLEventsListener(nsIDocument * aDocument,
|
||||
|
@ -231,7 +229,7 @@ nsXMLEventsListener::HandleEvent(nsIDOMEvent* aEvent)
|
|||
targetMatched = PR_FALSE;
|
||||
nsCOMPtr<nsIDOMEventTarget> target;
|
||||
aEvent->GetTarget(getter_AddRefs(target));
|
||||
nsCOMPtr<nsIStyledContent> targetEl(do_QueryInterface(target));
|
||||
nsCOMPtr<nsIContent> targetEl(do_QueryInterface(target));
|
||||
if (targetEl && targetEl->GetID() == mTarget)
|
||||
targetMatched = PR_TRUE;
|
||||
}
|
||||
|
@ -357,7 +355,7 @@ nsXMLEventsManager::CharacterDataChanged(nsIDocument* aDocument,
|
|||
PRBool aAppend) {}
|
||||
void
|
||||
nsXMLEventsManager::AttributeChanged(nsIDocument* aDocument,
|
||||
nsIStyledContent* aContent,
|
||||
nsIContent* aContent,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType)
|
||||
|
|
|
@ -237,7 +237,6 @@ public:
|
|||
}
|
||||
virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const;
|
||||
|
||||
// Implementation for nsIStyledContent
|
||||
virtual const nsAttrValue* GetClasses() const;
|
||||
virtual nsIAtom *GetIDAttributeName() const;
|
||||
virtual nsIAtom *GetClassAttributeName() const;
|
||||
|
|
|
@ -201,9 +201,9 @@ nsHTMLTableCellElement::WalkContentStyleRules(nsRuleWalker* aRuleWalker)
|
|||
// contract. However, things are OK (except for the incorrect
|
||||
// dependence on display type rather than tag) since tables and cells
|
||||
// match different, less specific, rules.
|
||||
nsCOMPtr<nsIStyledContent> styledTable = do_QueryInterface(GetTable());
|
||||
if (styledTable) {
|
||||
rv = styledTable->WalkContentStyleRules(aRuleWalker);
|
||||
nsIContent* table = GetTable();
|
||||
if (table) {
|
||||
rv = table->WalkContentStyleRules(aRuleWalker);
|
||||
}
|
||||
|
||||
return rv;
|
||||
|
|
|
@ -129,7 +129,6 @@
|
|||
|
||||
#include "nsIEditingSession.h"
|
||||
#include "nsNodeInfoManager.h"
|
||||
#include "nsIStyledContent.h"
|
||||
|
||||
#define DETECTOR_CONTRACTID_MAX 127
|
||||
static char g_detector_contractid[DETECTOR_CONTRACTID_MAX + 1];
|
||||
|
@ -1163,8 +1162,7 @@ nsHTMLDocument::AttributeWillChange(nsIContent* aContent, PRInt32 aNameSpaceID,
|
|||
}
|
||||
|
||||
void
|
||||
nsHTMLDocument::AttributeChanged(nsIStyledContent* aContent,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsHTMLDocument::AttributeChanged(nsIContent* aContent, PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute, PRInt32 aModType)
|
||||
{
|
||||
NS_ABORT_IF_FALSE(aContent, "Null content!");
|
||||
|
|
|
@ -126,7 +126,7 @@ public:
|
|||
virtual void ContentRemoved(nsIContent* aContainer,
|
||||
nsIContent* aChild,
|
||||
PRInt32 aIndexInContainer);
|
||||
virtual void AttributeChanged(nsIStyledContent* aChild,
|
||||
virtual void AttributeChanged(nsIContent* aChild,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType);
|
||||
|
|
|
@ -62,7 +62,7 @@ public:
|
|||
NS_FORWARD_NSIDOMELEMENT(nsSVGDefsElementBase::)
|
||||
NS_FORWARD_NSIDOMSVGELEMENT(nsSVGDefsElementBase::)
|
||||
|
||||
// nsIStyledContent
|
||||
// nsIContent
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
protected:
|
||||
};
|
||||
|
@ -109,7 +109,7 @@ NS_IMPL_DOM_CLONENODE_WITH_INIT(nsSVGDefsElement)
|
|||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsIStyledContent methods
|
||||
// nsIContent methods
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsSVGDefsElement::IsAttributeMapped(const nsIAtom* name) const
|
||||
|
|
|
@ -93,7 +93,6 @@ NS_INTERFACE_MAP_BEGIN(nsSVGElement)
|
|||
NS_INTERFACE_MAP_ENTRY(nsISVGValueObserver)
|
||||
NS_INTERFACE_MAP_ENTRY(nsISVGContent)
|
||||
// provided by nsGenericElement:
|
||||
// NS_INTERFACE_MAP_ENTRY(nsIStyledContent)
|
||||
// NS_INTERFACE_MAP_ENTRY(nsIContent)
|
||||
NS_INTERFACE_MAP_END_INHERITING(nsGenericElement)
|
||||
|
||||
|
@ -239,9 +238,6 @@ nsSVGElement::IsContentOfType(PRUint32 aFlags) const
|
|||
return !(aFlags & ~(eELEMENT | eSVG));
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsIStyledContent methods
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSVGElement::WalkContentStyleRules(nsRuleWalker* aRuleWalker)
|
||||
{
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
#include "nsISVGContent.h"
|
||||
#include "nsICSSStyleRule.h"
|
||||
|
||||
class nsSVGElement : public nsGenericElement, // :nsIXMLContent:nsIStyledContent:nsIContent
|
||||
class nsSVGElement : public nsGenericElement, // :nsIXMLContent:nsIContent
|
||||
public nsISVGValueObserver,
|
||||
public nsSupportsWeakReference, // :nsISupportsWeakReference
|
||||
public nsISVGContent
|
||||
|
|
|
@ -62,7 +62,7 @@ public:
|
|||
NS_FORWARD_NSIDOMELEMENT(nsSVGGElementBase::)
|
||||
NS_FORWARD_NSIDOMSVGELEMENT(nsSVGGElementBase::)
|
||||
|
||||
// nsIStyledContent
|
||||
// nsIContent
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
protected:
|
||||
};
|
||||
|
@ -110,7 +110,7 @@ NS_IMPL_DOM_CLONENODE_WITH_INIT(nsSVGGElement)
|
|||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsIStyledContent methods
|
||||
// nsIContent methods
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsSVGGElement::IsAttributeMapped(const nsIAtom* name) const
|
||||
|
|
|
@ -76,7 +76,7 @@ public:
|
|||
// nsISVGContent specializations:
|
||||
virtual void ParentChainChanged();
|
||||
|
||||
// nsIStyledContent
|
||||
// nsIContent
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
|
||||
protected:
|
||||
|
@ -238,7 +238,7 @@ void nsSVGGradientElement::ParentChainChanged()
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsIStyledContent methods
|
||||
// nsIContent methods
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsSVGGradientElement::IsAttributeMapped(const nsIAtom* name) const
|
||||
|
|
|
@ -123,14 +123,13 @@ NS_IMETHODIMP nsSVGGraphicElement::GetBBox(nsIDOMSVGRect **_retval)
|
|||
NS_ASSERTION(presShell, "no presShell");
|
||||
if (!presShell) return NS_ERROR_FAILURE;
|
||||
|
||||
nsIFrame* frame =
|
||||
presShell->GetPrimaryFrameFor(NS_STATIC_CAST(nsIStyledContent*, this));
|
||||
nsIFrame* frame = presShell->GetPrimaryFrameFor(this);
|
||||
|
||||
NS_ASSERTION(frame, "can't get bounding box for element without frame");
|
||||
|
||||
if (frame) {
|
||||
nsISVGChildFrame* svgframe;
|
||||
frame->QueryInterface(NS_GET_IID(nsISVGChildFrame),(void**)&svgframe);
|
||||
CallQueryInterface(frame, &svgframe);
|
||||
NS_ASSERTION(svgframe, "wrong frame type");
|
||||
if (svgframe) {
|
||||
svgframe->SetMatrixPropagation(PR_FALSE);
|
||||
|
@ -277,7 +276,7 @@ NS_IMETHODIMP nsSVGGraphicElement::GetTransform(nsIDOMSVGAnimatedTransformList *
|
|||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsIStyledContent methods
|
||||
// nsIContent methods
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsSVGGraphicElement::IsAttributeMapped(const nsIAtom* name) const
|
||||
|
|
|
@ -59,7 +59,7 @@ public:
|
|||
NS_DECL_NSIDOMSVGLOCATABLE
|
||||
NS_DECL_NSIDOMSVGTRANSFORMABLE
|
||||
|
||||
// nsIStyledContent interface
|
||||
// nsIContent interface
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
|
||||
protected:
|
||||
|
|
|
@ -72,7 +72,7 @@ public:
|
|||
// nsISVGContent specializations:
|
||||
virtual void ParentChainChanged();
|
||||
|
||||
// nsIStyledContent interface
|
||||
// nsIContent interface
|
||||
NS_IMETHODIMP_(PRBool) IsAttributeMapped(const nsIAtom* name) const;
|
||||
|
||||
protected:
|
||||
|
@ -275,7 +275,7 @@ void nsSVGLineElement::ParentChainChanged()
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsIStyledContent methods
|
||||
// nsIContent methods
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsSVGLineElement::IsAttributeMapped(const nsIAtom* name) const
|
||||
|
|
|
@ -73,7 +73,7 @@ public:
|
|||
NS_FORWARD_NSIDOMELEMENT(nsSVGPathElementBase::)
|
||||
NS_FORWARD_NSIDOMSVGELEMENT(nsSVGPathElementBase::)
|
||||
|
||||
// nsIStyledContent interface
|
||||
// nsIContent interface
|
||||
NS_IMETHODIMP_(PRBool) IsAttributeMapped(const nsIAtom* name) const;
|
||||
|
||||
protected:
|
||||
|
@ -348,7 +348,7 @@ NS_IMETHODIMP nsSVGPathElement::GetAnimatedNormalizedPathSegList(nsIDOMSVGPathSe
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsIStyledContent methods
|
||||
// nsIContent methods
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsSVGPathElement::IsAttributeMapped(const nsIAtom* name) const
|
||||
|
@ -379,9 +379,7 @@ nsSVGPathElement::GetPathFlatten()
|
|||
return nsnull;
|
||||
}
|
||||
|
||||
nsIFrame* frame;
|
||||
frame = presShell->GetPrimaryFrameFor(NS_STATIC_CAST(nsIStyledContent*,
|
||||
this));
|
||||
nsIFrame* frame = presShell->GetPrimaryFrameFor(this);
|
||||
|
||||
if (!frame) {
|
||||
NS_ERROR("no frame");
|
||||
|
@ -389,7 +387,7 @@ nsSVGPathElement::GetPathFlatten()
|
|||
}
|
||||
|
||||
nsISVGPathFlatten* flattener;
|
||||
frame->QueryInterface(NS_GET_IID(nsISVGPathFlatten),(void**)&flattener);
|
||||
CallQueryInterface(frame, &flattener);
|
||||
NS_ASSERTION(flattener, "wrong frame type");
|
||||
return flattener;
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ public:
|
|||
NS_FORWARD_NSIDOMELEMENT(nsSVGPolygonElementBase::)
|
||||
NS_FORWARD_NSIDOMSVGELEMENT(nsSVGPolygonElementBase::)
|
||||
|
||||
// nsIStyledContent interface
|
||||
// nsIContent interface
|
||||
NS_IMETHODIMP_(PRBool) IsAttributeMapped(const nsIAtom* name) const;
|
||||
|
||||
protected:
|
||||
|
@ -152,7 +152,7 @@ NS_IMETHODIMP nsSVGPolygonElement::GetAnimatedPoints(nsIDOMSVGPointList * *aAnim
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsIStyledContent methods
|
||||
// nsIContent methods
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsSVGPolygonElement::IsAttributeMapped(const nsIAtom* name) const
|
||||
|
|
|
@ -68,7 +68,7 @@ public:
|
|||
NS_FORWARD_NSIDOMELEMENT(nsSVGPolylineElementBase::)
|
||||
NS_FORWARD_NSIDOMSVGELEMENT(nsSVGPolylineElementBase::)
|
||||
|
||||
// nsIStyledContent interface
|
||||
// nsIContent interface
|
||||
NS_IMETHODIMP_(PRBool) IsAttributeMapped(const nsIAtom* name) const;
|
||||
|
||||
protected:
|
||||
|
@ -152,7 +152,7 @@ NS_IMETHODIMP nsSVGPolylineElement::GetAnimatedPoints(nsIDOMSVGPointList * *aAni
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsIStyledContent methods
|
||||
// nsIContent methods
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsSVGPolylineElement::IsAttributeMapped(const nsIAtom* name) const
|
||||
|
|
|
@ -112,7 +112,7 @@ public:
|
|||
NS_IMETHOD_(float) GetPreviousTranslate_y();
|
||||
NS_IMETHOD_(float) GetPreviousScale();
|
||||
|
||||
// nsIStyledContent interface
|
||||
// nsIContent interface
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
|
||||
// nsISVGValueObserver
|
||||
|
@ -538,8 +538,7 @@ nsSVGSVGElement::SuspendRedraw(PRUint32 max_wait_milliseconds, PRUint32 *_retval
|
|||
NS_ASSERTION(presShell, "need presShell to suspend redraw");
|
||||
if (!presShell) return NS_ERROR_FAILURE;
|
||||
|
||||
nsIFrame* frame =
|
||||
presShell->GetPrimaryFrameFor(NS_STATIC_CAST(nsIStyledContent*, this));
|
||||
nsIFrame* frame = presShell->GetPrimaryFrameFor(this);
|
||||
#ifdef DEBUG
|
||||
// XXX We sometimes hit this assertion when the svg:svg element is
|
||||
// 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");
|
||||
if (!presShell) return NS_ERROR_FAILURE;
|
||||
|
||||
nsIFrame* frame =
|
||||
presShell->GetPrimaryFrameFor(NS_STATIC_CAST(nsIStyledContent*, this));
|
||||
nsIFrame* frame = presShell->GetPrimaryFrameFor(this);
|
||||
#ifdef DEBUG
|
||||
NS_ASSERTION(frame, "unsuspending redraw w/o frame");
|
||||
#endif
|
||||
|
@ -984,8 +982,7 @@ nsSVGSVGElement::GetBBox(nsIDOMSVGRect **_retval)
|
|||
NS_ASSERTION(presShell, "no presShell");
|
||||
if (!presShell) return NS_ERROR_FAILURE;
|
||||
|
||||
nsIFrame* frame =
|
||||
presShell->GetPrimaryFrameFor(NS_STATIC_CAST(nsIStyledContent*, this));
|
||||
nsIFrame* frame = presShell->GetPrimaryFrameFor(this);
|
||||
|
||||
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)
|
||||
nsSVGSVGElement::IsAttributeMapped(const nsIAtom* name) const
|
||||
|
@ -1519,8 +1516,7 @@ nsSVGSVGElement::DidModifySVGObservable (nsISVGValue* observable,
|
|||
// invalidate viewbox -> viewport xform & inform frames
|
||||
mViewBoxToViewportTransform = nsnull;
|
||||
|
||||
nsIFrame* frame =
|
||||
presShell->GetPrimaryFrameFor(NS_STATIC_CAST(nsIStyledContent*, this));
|
||||
nsIFrame* frame = presShell->GetPrimaryFrameFor(this);
|
||||
if (frame) {
|
||||
nsISVGSVGFrame* svgframe;
|
||||
CallQueryInterface(frame, &svgframe);
|
||||
|
|
|
@ -69,7 +69,7 @@ public:
|
|||
NS_FORWARD_NSIDOMELEMENT(nsSVGStopElementBase::)
|
||||
NS_FORWARD_NSIDOMSVGELEMENT(nsSVGStopElementBase::)
|
||||
|
||||
// nsIStyledContent interface
|
||||
// nsIContent interface
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
|
||||
protected:
|
||||
|
@ -144,7 +144,7 @@ NS_IMETHODIMP nsSVGStopElement::GetOffset(nsIDOMSVGAnimatedNumber * *aOffset)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsIStyledContent methods
|
||||
// nsIContent methods
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsSVGStopElement::IsAttributeMapped(const nsIAtom* name) const
|
||||
|
|
|
@ -84,7 +84,7 @@ nsSVGStylableElement::Init()
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsIStyledContent methods
|
||||
// nsIContent methods
|
||||
|
||||
const nsAttrValue*
|
||||
nsSVGStylableElement::GetClasses() const
|
||||
|
|
|
@ -59,7 +59,7 @@ public:
|
|||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_NSIDOMSVGSTYLABLE
|
||||
|
||||
// nsIStyledContent
|
||||
// nsIContent
|
||||
virtual const nsAttrValue* GetClasses() const;
|
||||
|
||||
protected:
|
||||
|
|
|
@ -72,7 +72,7 @@ public:
|
|||
NS_FORWARD_NSIDOMELEMENT(nsSVGTSpanElementBase::)
|
||||
NS_FORWARD_NSIDOMSVGELEMENT(nsSVGTSpanElementBase::)
|
||||
|
||||
// nsIStyledContent interface
|
||||
// nsIContent interface
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
|
||||
// nsISVGContent specializations:
|
||||
|
@ -328,7 +328,7 @@ NS_IMETHODIMP nsSVGTSpanElement::SelectSubString(PRUint32 charnum, PRUint32 ncha
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsIStyledContent methods
|
||||
// nsIContent methods
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsSVGTSpanElement::IsAttributeMapped(const nsIAtom* name) const
|
||||
|
|
|
@ -76,7 +76,7 @@ public:
|
|||
NS_FORWARD_NSIDOMELEMENT(nsSVGTextElementBase::)
|
||||
NS_FORWARD_NSIDOMSVGELEMENT(nsSVGTextElementBase::)
|
||||
|
||||
// nsIStyledContent interface
|
||||
// nsIContent interface
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
|
||||
// nsISVGContent specializations:
|
||||
|
@ -337,7 +337,7 @@ NS_IMETHODIMP nsSVGTextElement::SelectSubString(PRUint32 charnum, PRUint32 nchar
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsIStyledContent methods
|
||||
// nsIContent methods
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsSVGTextElement::IsAttributeMapped(const nsIAtom* name) const
|
||||
|
@ -427,8 +427,7 @@ nsSVGTextElement::GetTextContentMetrics()
|
|||
return nsnull;
|
||||
}
|
||||
|
||||
nsIFrame* frame =
|
||||
presShell->GetPrimaryFrameFor(NS_STATIC_CAST(nsIStyledContent*, this));
|
||||
nsIFrame* frame = presShell->GetPrimaryFrameFor(this);
|
||||
|
||||
if (!frame) {
|
||||
NS_ERROR("no frame");
|
||||
|
@ -436,7 +435,7 @@ nsSVGTextElement::GetTextContentMetrics()
|
|||
}
|
||||
|
||||
nsISVGTextContentMetrics* metrics;
|
||||
frame->QueryInterface(NS_GET_IID(nsISVGTextContentMetrics),(void**)&metrics);
|
||||
CallQueryInterface(frame, &metrics);
|
||||
NS_ASSERTION(metrics, "wrong frame type");
|
||||
return metrics;
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ public:
|
|||
NS_FORWARD_NSIDOMELEMENT(nsSVGTextPathElementBase::)
|
||||
NS_FORWARD_NSIDOMSVGELEMENT(nsSVGTextPathElementBase::)
|
||||
|
||||
// nsIStyledContent interface
|
||||
// nsIContent interface
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
|
||||
protected:
|
||||
|
@ -315,7 +315,7 @@ NS_IMETHODIMP nsSVGTextPathElement::SelectSubString(PRUint32 charnum, PRUint32 n
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsIStyledContent methods
|
||||
// nsIContent methods
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsSVGTextPathElement::IsAttributeMapped(const nsIAtom* name) const
|
||||
|
|
|
@ -40,24 +40,25 @@
|
|||
#define nsIXMLContent_h___
|
||||
|
||||
#include "nsISupports.h"
|
||||
#include "nsIStyledContent.h"
|
||||
#include "nsIContent.h"
|
||||
|
||||
class nsIDocShell;
|
||||
|
||||
// 37eff125-80a9-49ce-a0f7-1617a21ce745
|
||||
// 226f10b8-2954-405a-b5e7-446a4fce4bf8
|
||||
#define NS_IXMLCONTENT_IID \
|
||||
{ 0x37eff125, 0x80a9, 0x49ce, \
|
||||
{ 0xa0, 0xf7, 0x16, 0x17, 0xa2, 0x1c, 0xe7, 0x45 } }
|
||||
{ 0x226f10b8, 0x2954, 0x405a, \
|
||||
{ 0xb5, 0xe7, 0x44, 0x6a, 0x4f, 0xce, 0x4b, 0xf8 } }
|
||||
|
||||
/**
|
||||
* XML content extensions to nsIContent
|
||||
* // XXXbz this interface should die, really.
|
||||
*/
|
||||
class nsIXMLContent : public nsIStyledContent {
|
||||
class nsIXMLContent : public nsIContent {
|
||||
public:
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IXMLCONTENT_IID)
|
||||
|
||||
nsIXMLContent(nsINodeInfo *aNodeInfo)
|
||||
: nsIStyledContent(aNodeInfo)
|
||||
: nsIContent(aNodeInfo)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,6 @@
|
|||
#include "nsIDOMEventReceiver.h"
|
||||
#include "nsIXMLContent.h"
|
||||
#include "nsGenericElement.h"
|
||||
#include "nsIStyledContent.h"
|
||||
|
||||
class nsIEventListenerManager;
|
||||
class nsIURI;
|
||||
|
|
|
@ -54,7 +54,6 @@
|
|||
#include "nsIServiceManager.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIStyledContent.h"
|
||||
#include "nsIDOMDocumentFragment.h"
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsXMLPrettyPrinter,
|
||||
|
@ -240,7 +239,7 @@ nsXMLPrettyPrinter::EndUpdate(nsIDocument* aDocument, nsUpdateType aUpdateType)
|
|||
|
||||
void
|
||||
nsXMLPrettyPrinter::AttributeChanged(nsIDocument* aDocument,
|
||||
nsIStyledContent* aContent,
|
||||
nsIContent* aContent,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType)
|
||||
|
|
|
@ -54,8 +54,7 @@ public:
|
|||
// nsIDocumentObserver
|
||||
virtual void BeginUpdate(nsIDocument* aDocument, nsUpdateType aUpdateType);
|
||||
virtual void EndUpdate(nsIDocument* aDocument, nsUpdateType aUpdateType);
|
||||
virtual void AttributeChanged(nsIDocument* aDocument,
|
||||
nsIStyledContent* aContent,
|
||||
virtual void AttributeChanged(nsIDocument* aDocument, nsIContent* aContent,
|
||||
PRInt32 aNameSpaceID, nsIAtom* aAttribute,
|
||||
PRInt32 aModType);
|
||||
virtual void ContentAppended(nsIDocument* aDocument,
|
||||
|
|
|
@ -156,7 +156,7 @@ class nsXTFStyledElementWrapper : public nsXTFElementWrapper
|
|||
public:
|
||||
nsXTFStyledElementWrapper(nsINodeInfo* aNodeInfo);
|
||||
|
||||
// for nsIStyledContent
|
||||
// for nsIContent
|
||||
virtual nsIAtom *GetClassAttributeName() const;
|
||||
virtual const nsAttrValue* GetClasses() const;
|
||||
|
||||
|
|
|
@ -114,7 +114,6 @@
|
|||
#include "nsIServiceManager.h"
|
||||
#include "nsICSSStyleRule.h"
|
||||
#include "nsIStyleSheet.h"
|
||||
#include "nsIStyledContent.h"
|
||||
#include "nsIURL.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsIWidget.h"
|
||||
|
@ -1055,7 +1054,7 @@ nsXULElement::RemoveChildAt(PRUint32 aIndex, PRBool aNotify)
|
|||
if (HasMutationListeners(this, NS_EVENT_BITS_MUTATION_NODEREMOVED)) {
|
||||
nsMutationEvent mutation(PR_TRUE, NS_MUTATION_NODEREMOVED, oldKid);
|
||||
mutation.mRelatedNode =
|
||||
do_QueryInterface(NS_STATIC_CAST(nsIStyledContent*, this));
|
||||
do_QueryInterface(NS_STATIC_CAST(nsIContent*, this));
|
||||
|
||||
nsEventStatus status = nsEventStatus_eIgnore;
|
||||
oldKid->HandleDOMEvent(nsnull, &mutation, nsnull, NS_EVENT_FLAG_INIT, &status);
|
||||
|
@ -2133,8 +2132,7 @@ nsXULElement::WillAddOrRemoveChild(nsIContent* aKid,
|
|||
return aRemove ? NS_OK : EnsureContentsGenerated();
|
||||
}
|
||||
|
||||
// nsIStyledContent Implementation
|
||||
/// XXX GetID must be defined here because nsXUL element does not inherit from nsGenericElement.
|
||||
/// XXX GetID must be defined here because we have proto attrs.
|
||||
nsIAtom*
|
||||
nsXULElement::GetID() const
|
||||
{
|
||||
|
|
|
@ -65,7 +65,6 @@
|
|||
#include "nsIRDFCompositeDataSource.h"
|
||||
#include "nsIRDFResource.h"
|
||||
#include "nsIScriptObjectOwner.h"
|
||||
#include "nsIStyledContent.h"
|
||||
#include "nsIBindingManager.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsIXMLContent.h"
|
||||
|
@ -517,14 +516,12 @@ public:
|
|||
virtual PRBool IsContentOfType(PRUint32 aFlags) const;
|
||||
virtual nsresult GetListenerManager(nsIEventListenerManager** aResult);
|
||||
virtual PRBool IsFocusable(PRInt32 *aTabIndex = nsnull);
|
||||
virtual nsIAtom* GetID() const;
|
||||
virtual const nsAttrValue* GetClasses() const;
|
||||
|
||||
// nsIXMLContent
|
||||
NS_IMETHOD MaybeTriggerAutoLink(nsIDocShell *aShell);
|
||||
|
||||
// nsIStyledContent
|
||||
virtual nsIAtom* GetID() const;
|
||||
virtual const nsAttrValue* GetClasses() const;
|
||||
|
||||
NS_IMETHOD WalkContentStyleRules(nsRuleWalker* aRuleWalker);
|
||||
virtual nsICSSStyleRule* GetInlineStyleRule();
|
||||
NS_IMETHOD SetInlineStyleRule(nsICSSStyleRule* aStyleRule, PRBool aNotify);
|
||||
|
|
|
@ -117,7 +117,6 @@
|
|||
#include "nsIParser.h"
|
||||
#include "nsICSSStyleSheet.h"
|
||||
#include "nsIScriptError.h"
|
||||
#include "nsIStyledContent.h"
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
//
|
||||
|
@ -1071,15 +1070,9 @@ nsXULDocument::ExecuteOnBroadcastHandlerFor(nsIContent* aBroadcaster,
|
|||
}
|
||||
|
||||
void
|
||||
nsXULDocument::AttributeChanged(nsIStyledContent* aElement,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsXULDocument::AttributeChanged(nsIContent* aElement, PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute, PRInt32 aModType)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
nsCOMPtr<nsIContent> debugContent(do_QueryInterface(aElement));
|
||||
NS_ASSERTION(debugContent == aElement, "nsIContent pointer mismatch?");
|
||||
#endif
|
||||
|
||||
nsresult rv;
|
||||
|
||||
// XXXbz check aNameSpaceID, dammit!
|
||||
|
|
|
@ -124,8 +124,7 @@ public:
|
|||
nsIContent* aChild,
|
||||
PRInt32 aIndexInContainer);
|
||||
|
||||
virtual void AttributeChanged(nsIStyledContent* aElement,
|
||||
PRInt32 aNameSpaceID,
|
||||
virtual void AttributeChanged(nsIContent* aElement, PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute, PRInt32 aModType);
|
||||
|
||||
// nsIXULDocument interface
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
|
||||
#include "nsContentCID.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIStyledContent.h"
|
||||
#include "nsIDOMNodeList.h"
|
||||
#include "nsIDOMXULDocument.h"
|
||||
#include "nsINodeInfo.h"
|
||||
|
@ -127,11 +126,11 @@ public:
|
|||
NS_IMETHOD CreateContents(nsIContent* aElement);
|
||||
|
||||
// nsIDocumentObserver interface
|
||||
virtual void AttributeChanged(nsIDocument* aDocument,
|
||||
nsIStyledContent* aContent,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType);
|
||||
virtual void AttributeChanged(nsIDocument* aDocument,
|
||||
nsIContent* aContent,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType);
|
||||
|
||||
void DocumentWillBeDestroyed(nsIDocument* aDocument);
|
||||
|
||||
|
@ -1533,11 +1532,11 @@ nsXULContentBuilder::CreateContents(nsIContent* aElement)
|
|||
//
|
||||
|
||||
void
|
||||
nsXULContentBuilder::AttributeChanged(nsIDocument* aDocument,
|
||||
nsIStyledContent* aContent,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType)
|
||||
nsXULContentBuilder::AttributeChanged(nsIDocument* aDocument,
|
||||
nsIContent* aContent,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType)
|
||||
{
|
||||
// Handle "open" and "close" cases. We do this handling before
|
||||
// we've notified the observer, so that content is already created
|
||||
|
|
|
@ -67,7 +67,6 @@
|
|||
#include "nsCRT.h"
|
||||
#include "nsFixedSizeAllocator.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIStyledContent.h"
|
||||
#include "nsIDOMElement.h"
|
||||
#include "nsIDOMNode.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
|
@ -330,11 +329,11 @@ nsXULTemplateBuilder::RemoveListener(nsIXULBuilderListener* aListener)
|
|||
//
|
||||
|
||||
void
|
||||
nsXULTemplateBuilder::AttributeChanged(nsIDocument* aDocument,
|
||||
nsIStyledContent* aContent,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType)
|
||||
nsXULTemplateBuilder::AttributeChanged(nsIDocument* aDocument,
|
||||
nsIContent* aContent,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType)
|
||||
{
|
||||
if (aContent == mRoot) {
|
||||
// Check for a change to the 'ref' attribute on an atom, in which
|
||||
|
|
|
@ -91,8 +91,7 @@ public:
|
|||
NS_DECL_NSIXULTEMPLATEBUILDER
|
||||
|
||||
// nsIDocumentObserver
|
||||
virtual void AttributeChanged(nsIDocument *aDocument,
|
||||
nsIStyledContent* aContent,
|
||||
virtual void AttributeChanged(nsIDocument *aDocument, nsIContent* aContent,
|
||||
PRInt32 aNameSpaceID, nsIAtom* aAttribute,
|
||||
PRInt32 aModType);
|
||||
virtual void DocumentWillBeDestroyed(nsIDocument *aDocument);
|
||||
|
|
|
@ -652,7 +652,7 @@ nsSHEntry::CharacterDataChanged(nsIDocument* aDocument,
|
|||
|
||||
void
|
||||
nsSHEntry::AttributeChanged(nsIDocument* aDocument,
|
||||
nsIStyledContent* aContent,
|
||||
nsIContent* aContent,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType)
|
||||
|
|
|
@ -56,7 +56,6 @@
|
|||
#include "nsIDocument.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsITreeColumns.h"
|
||||
#include "nsIStyledContent.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// inDOMViewNode
|
||||
|
@ -647,9 +646,9 @@ NS_IMPL_NSIDOCUMENTOBSERVER_STATE_STUB(inDOMView)
|
|||
NS_IMPL_NSIDOCUMENTOBSERVER_STYLE_STUB(inDOMView)
|
||||
|
||||
void
|
||||
inDOMView::AttributeChanged(nsIDocument *aDocument,
|
||||
nsIStyledContent* aContent, PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute, PRInt32 aModType)
|
||||
inDOMView::AttributeChanged(nsIDocument *aDocument, nsIContent* aContent,
|
||||
PRInt32 aNameSpaceID, nsIAtom* aAttribute,
|
||||
PRInt32 aModType)
|
||||
{
|
||||
if (!mTree) {
|
||||
return;
|
||||
|
|
|
@ -57,6 +57,7 @@ REQUIRES = xpcom \
|
|||
dom \
|
||||
widget \
|
||||
content \
|
||||
layout \
|
||||
pref \
|
||||
docshell \
|
||||
$(NULL)
|
||||
|
|
|
@ -57,6 +57,7 @@ REQUIRES = xpcom \
|
|||
string \
|
||||
editor \
|
||||
content \
|
||||
layout \
|
||||
dom \
|
||||
necko \
|
||||
widget \
|
||||
|
@ -73,13 +74,13 @@ CPPSRCS = \
|
|||
mozEnglishWordUtils.cpp \
|
||||
mozGenericWordUtils.cpp \
|
||||
mozSpellI18NManager.cpp \
|
||||
mozInlineSpellChecker.cpp \
|
||||
mozInlineSpellChecker.cpp \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_DSO_LDOPTS = \
|
||||
$(LIBS_DIR) \
|
||||
$(MOZ_COMPONENT_LIBS) \
|
||||
$(MOZ_UNICHARUTIL_LIBS) \
|
||||
$(MOZ_UNICHARUTIL_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
|
|
@ -58,6 +58,7 @@ REQUIRES = xpcom \
|
|||
string \
|
||||
dom \
|
||||
content \
|
||||
layout \
|
||||
widget \
|
||||
necko \
|
||||
js \
|
||||
|
|
|
@ -54,6 +54,7 @@ ifndef TX_EXE
|
|||
REQUIRES += unicharutil \
|
||||
dom \
|
||||
content \
|
||||
layout \
|
||||
widget \
|
||||
necko \
|
||||
caps \
|
||||
|
|
|
@ -53,6 +53,7 @@ REQUIRES = string \
|
|||
ifndef TX_EXE
|
||||
REQUIRES += dom \
|
||||
content \
|
||||
layout \
|
||||
widget \
|
||||
unicharutil \
|
||||
necko \
|
||||
|
|
|
@ -54,6 +54,7 @@ ifndef TX_EXE
|
|||
REQUIRES += necko \
|
||||
dom \
|
||||
content \
|
||||
layout \
|
||||
widget \
|
||||
js \
|
||||
xpconnect \
|
||||
|
|
|
@ -212,7 +212,7 @@ nsXPathResult::CharacterDataChanged(nsIDocument* aDocument,
|
|||
|
||||
void
|
||||
nsXPathResult::AttributeChanged(nsIDocument* aDocument,
|
||||
nsIStyledContent* aContent,
|
||||
nsIContent* aContent,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType)
|
||||
|
|
|
@ -53,6 +53,7 @@ REQUIRES = string \
|
|||
ifndef TX_EXE
|
||||
REQUIRES += dom \
|
||||
content \
|
||||
layout \
|
||||
widget \
|
||||
unicharutil \
|
||||
necko \
|
||||
|
|
|
@ -1014,7 +1014,7 @@ txMozillaXSLTProcessor::CharacterDataChanged(nsIDocument* aDocument,
|
|||
|
||||
void
|
||||
txMozillaXSLTProcessor::AttributeChanged(nsIDocument* aDocument,
|
||||
nsIStyledContent* aContent,
|
||||
nsIContent* aContent,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType)
|
||||
|
|
|
@ -53,6 +53,7 @@ REQUIRES = string \
|
|||
ifndef TX_EXE
|
||||
REQUIRES += dom \
|
||||
content \
|
||||
layout \
|
||||
widget \
|
||||
locale \
|
||||
unicharutil \
|
||||
|
|
|
@ -56,6 +56,7 @@ REQUIRES = xpcom \
|
|||
dom \
|
||||
js \
|
||||
content \
|
||||
layout \
|
||||
widget \
|
||||
caps \
|
||||
necko \
|
||||
|
|
|
@ -53,6 +53,7 @@ REQUIRES = xpcom \
|
|||
caps \
|
||||
widget \
|
||||
content \
|
||||
layout \
|
||||
js \
|
||||
htmlparser \
|
||||
necko \
|
||||
|
|
|
@ -53,6 +53,7 @@ REQUIRES = xpcom \
|
|||
caps \
|
||||
widget \
|
||||
content \
|
||||
layout \
|
||||
js \
|
||||
necko \
|
||||
pref \
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
#include "nsIURL.h"
|
||||
#include "nsISupportsArray.h"
|
||||
#include "nsHashtable.h"
|
||||
#include "nsIStyledContent.h"
|
||||
#include "nsIHTMLDocument.h"
|
||||
#include "nsIStyleRule.h"
|
||||
#include "nsIFrame.h"
|
||||
|
@ -10643,7 +10642,7 @@ nsCSSFrameConstructor::DoContentStateChanged(nsIContent* aContent,
|
|||
}
|
||||
|
||||
nsresult
|
||||
nsCSSFrameConstructor::AttributeChanged(nsIStyledContent* aContent,
|
||||
nsCSSFrameConstructor::AttributeChanged(nsIContent* aContent,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType)
|
||||
|
|
|
@ -49,7 +49,6 @@
|
|||
#include "nsIEventQueue.h"
|
||||
|
||||
class nsIDocument;
|
||||
class nsIStyledContent;
|
||||
struct nsFrameItems;
|
||||
struct nsAbsoluteItems;
|
||||
struct nsTableCreator;
|
||||
|
@ -125,10 +124,10 @@ public:
|
|||
// WillDestroyFrameTree hasn't been called yet.
|
||||
void NotifyDestroyingFrame(nsIFrame* aFrame);
|
||||
|
||||
nsresult AttributeChanged(nsIStyledContent* aContent,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType);
|
||||
nsresult AttributeChanged(nsIContent* aContent,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType);
|
||||
|
||||
void BeginUpdate() { ++mUpdateCount; }
|
||||
void EndUpdate();
|
||||
|
|
|
@ -57,7 +57,6 @@
|
|||
#include "nsIPresShell.h"
|
||||
#include "nsPresContext.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIStyledContent.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMXULDocument.h"
|
||||
#include "nsStubDocumentObserver.h"
|
||||
|
@ -1216,8 +1215,7 @@ public:
|
|||
nsIContent* aContent1,
|
||||
nsIContent* aContent2,
|
||||
PRInt32 aStateMask);
|
||||
virtual void AttributeChanged(nsIDocument* aDocument,
|
||||
nsIStyledContent* aContent,
|
||||
virtual void AttributeChanged(nsIDocument* aDocument, nsIContent* aContent,
|
||||
PRInt32 aNameSpaceID, nsIAtom* aAttribute,
|
||||
PRInt32 aModType);
|
||||
virtual void ContentAppended(nsIDocument* aDocument, nsIContent* aContainer,
|
||||
|
@ -5090,11 +5088,11 @@ PresShell::ContentStatesChanged(nsIDocument* aDocument,
|
|||
|
||||
|
||||
void
|
||||
PresShell::AttributeChanged(nsIDocument* aDocument,
|
||||
nsIStyledContent* aContent,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType)
|
||||
PresShell::AttributeChanged(nsIDocument* aDocument,
|
||||
nsIContent* aContent,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType)
|
||||
{
|
||||
NS_PRECONDITION(!mIsDocumentGone, "Unexpected AttributeChanged");
|
||||
NS_PRECONDITION(aDocument == mDocument, "Unexpected aDocument");
|
||||
|
|
|
@ -289,9 +289,7 @@ nsHTMLFramesetFrame::FrameResizePrefCallback(const char* aPref, void* aClosure)
|
|||
|
||||
frame->RecalculateBorderResize();
|
||||
if (doc) {
|
||||
nsCOMPtr<nsIStyledContent> content(do_QueryInterface(frame->GetContent()));
|
||||
NS_ASSERTION(content, "Expected an element here!");
|
||||
doc->AttributeChanged(content,
|
||||
doc->AttributeChanged(frame->GetContent(),
|
||||
kNameSpaceID_None,
|
||||
nsHTMLAtoms::frameborder,
|
||||
nsIDOMMutationEvent::MODIFICATION);
|
||||
|
|
|
@ -47,7 +47,6 @@
|
|||
#include "nsNetUtil.h"
|
||||
#include "nsTextFragment.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIStyledContent.h"
|
||||
#include "nsIDOMHTMLElement.h"
|
||||
#include "nsIDOMHTMLMapElement.h"
|
||||
#include "nsIDOMHTMLAreaElement.h"
|
||||
|
@ -970,11 +969,11 @@ nsImageMap::MaybeUpdateAreas(nsIContent *aContent)
|
|||
}
|
||||
|
||||
void
|
||||
nsImageMap::AttributeChanged(nsIDocument* aDocument,
|
||||
nsIStyledContent* aContent,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType)
|
||||
nsImageMap::AttributeChanged(nsIDocument* aDocument,
|
||||
nsIContent* aContent,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType)
|
||||
{
|
||||
// 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>
|
||||
|
|
|
@ -88,8 +88,7 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
|
||||
// nsIDocumentObserver
|
||||
virtual void AttributeChanged(nsIDocument* aDocument,
|
||||
nsIStyledContent* aContent,
|
||||
virtual void AttributeChanged(nsIDocument* aDocument, nsIContent* aContent,
|
||||
PRInt32 aNameSpaceID, nsIAtom* aAttribute,
|
||||
PRInt32 aModType);
|
||||
virtual void ContentAppended(nsIDocument* aDocument, nsIContent* aContainer,
|
||||
|
|
|
@ -51,7 +51,7 @@ nsCSSOMFactory::~nsCSSOMFactory()
|
|||
NS_IMPL_ISUPPORTS1(nsCSSOMFactory, nsICSSOMFactory)
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsCSSOMFactory::CreateDOMCSSAttributeDeclaration(nsIStyledContent *aContent,
|
||||
nsCSSOMFactory::CreateDOMCSSAttributeDeclaration(nsIContent *aContent,
|
||||
nsDOMCSSDeclaration **aResult)
|
||||
{
|
||||
nsDOMCSSDeclaration *result = new nsDOMCSSAttributeDeclaration(aContent);
|
||||
|
|
|
@ -51,7 +51,7 @@ public:
|
|||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD CreateDOMCSSAttributeDeclaration(nsIStyledContent *aContent,
|
||||
NS_IMETHOD CreateDOMCSSAttributeDeclaration(nsIContent *aContent,
|
||||
nsDOMCSSDeclaration **aResult);
|
||||
|
||||
};
|
||||
|
|
|
@ -56,7 +56,6 @@
|
|||
#include "nsICSSGroupRule.h"
|
||||
#include "nsICSSImportRule.h"
|
||||
#include "nsIMediaList.h"
|
||||
#include "nsIStyledContent.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsPresContext.h"
|
||||
#include "nsIEventStateManager.h"
|
||||
|
@ -2601,7 +2600,7 @@ RuleProcessorData::RuleProcessorData(nsPresContext* aPresContext,
|
|||
|
||||
mContentTag = nsnull;
|
||||
mContentID = nsnull;
|
||||
mStyledContent = nsnull;
|
||||
mHasAttributes = PR_FALSE;
|
||||
mIsHTMLContent = PR_FALSE;
|
||||
mIsHTMLLink = PR_FALSE;
|
||||
mIsSimpleXLink = PR_FALSE;
|
||||
|
@ -2632,15 +2631,9 @@ RuleProcessorData::RuleProcessorData(nsPresContext* aPresContext,
|
|||
// get the event state
|
||||
mPresContext->EventStateManager()->GetContentState(aContent, mEventState);
|
||||
|
||||
// get the styledcontent interface and the ID
|
||||
if (aContent->IsContentOfType(nsIContent::eELEMENT)) {
|
||||
mStyledContent = NS_STATIC_CAST(nsIStyledContent*, aContent);
|
||||
mContentID = mStyledContent->GetID();
|
||||
mClasses = mStyledContent->GetClasses();
|
||||
}
|
||||
|
||||
NS_ASSERTION(nsCOMPtr<nsIStyledContent>(do_QueryInterface(aContent)) == mStyledContent,
|
||||
"nsIStyledContent must agree with IsContentOfType(eELEMENT)");
|
||||
// get the ID and classes for the content
|
||||
mContentID = aContent->GetID();
|
||||
mClasses = aContent->GetClasses();
|
||||
|
||||
// see if there are attributes for the content
|
||||
mHasAttributes = aContent->GetAttrCount() > 0;
|
||||
|
@ -3000,7 +2993,7 @@ static PRBool SelectorMatches(RuleProcessorData &data,
|
|||
nsDependentString(pseudoClass->mString),
|
||||
nsCaseInsensitiveStringComparator());
|
||||
}
|
||||
else {
|
||||
else if (data.mContent) {
|
||||
nsIDocument* doc = data.mContent->GetDocument();
|
||||
if (doc) {
|
||||
// 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
|
||||
result = localFalse;
|
||||
} else {
|
||||
NS_ASSERTION(data.mContent,
|
||||
"Must have content if either data.mHasAttributes or "
|
||||
"aAttribute is set!");
|
||||
result = localTrue;
|
||||
nsAttrSelector* attr = aSelector->mAttrList;
|
||||
do {
|
||||
|
@ -3234,7 +3230,8 @@ static PRBool SelectorMatches(RuleProcessorData &data,
|
|||
if (result && (aSelector->mIDList || aSelector->mClassList)) {
|
||||
// test for ID & class match
|
||||
result = localFalse;
|
||||
if (data.mStyledContent) {
|
||||
// No attributes means no match on class or id
|
||||
if (data.mHasAttributes) {
|
||||
// case sensitivity: bug 93371
|
||||
PRBool isCaseSensitive = data.mCompatMode != eCompatibility_NavQuirks;
|
||||
nsAtomList* IDList = aSelector->mIDList;
|
||||
|
@ -3270,7 +3267,7 @@ static PRBool SelectorMatches(RuleProcessorData &data,
|
|||
}
|
||||
|
||||
if (result &&
|
||||
(!aAttribute || aAttribute != data.mStyledContent->GetClassAttributeName())) {
|
||||
(!aAttribute || aAttribute != data.mContent->GetClassAttributeName())) {
|
||||
nsAtomList* classList = aSelector->mClassList;
|
||||
const nsAttrValue *elementClasses = data.mClasses;
|
||||
while (nsnull != classList) {
|
||||
|
@ -3574,8 +3571,6 @@ nsCSSRuleProcessor::HasAttributeDependentStyle(AttributeRuleProcessorData* aData
|
|||
{
|
||||
NS_PRECONDITION(aData->mContent->IsContentOfType(nsIContent::eELEMENT),
|
||||
"content must be element");
|
||||
NS_ASSERTION(aData->mStyledContent,
|
||||
"elements must implement nsIStyledContent");
|
||||
|
||||
AttributeEnumData data(aData);
|
||||
|
||||
|
@ -3602,7 +3597,7 @@ nsCSSRuleProcessor::HasAttributeDependentStyle(AttributeRuleProcessorData* aData
|
|||
cascade->mIDSelectors.EnumerateForwards(AttributeEnumFunc, &data);
|
||||
}
|
||||
|
||||
if (aData->mAttribute == aData->mStyledContent->GetClassAttributeName()) {
|
||||
if (aData->mAttribute == aData->mContent->GetClassAttributeName()) {
|
||||
cascade->mClassSelectors.EnumerateForwards(AttributeEnumFunc, &data);
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
#include "nsCSSDeclaration.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsHTMLAtoms.h"
|
||||
#include "nsIStyledContent.h"
|
||||
#include "nsIDOMMutationEvent.h"
|
||||
#include "nsICSSStyleRule.h"
|
||||
#include "nsICSSLoader.h"
|
||||
|
@ -48,15 +47,18 @@
|
|||
#include "nsINameSpaceManager.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsIContent.h"
|
||||
|
||||
MOZ_DECL_CTOR_COUNTER(nsDOMCSSAttributeDeclaration)
|
||||
|
||||
nsDOMCSSAttributeDeclaration::nsDOMCSSAttributeDeclaration(nsIStyledContent *aContent)
|
||||
nsDOMCSSAttributeDeclaration::nsDOMCSSAttributeDeclaration(nsIContent *aContent)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsDOMCSSAttributeDeclaration);
|
||||
|
||||
// This reference is not reference-counted. The content
|
||||
// object tells us when its about to go away.
|
||||
NS_ASSERTION(aContent && aContent->IsContentOfType(nsIContent::eELEMENT),
|
||||
"Inline style for non-element content?");
|
||||
mContent = aContent;
|
||||
}
|
||||
|
||||
|
|
|
@ -44,14 +44,13 @@
|
|||
#include "nsString.h"
|
||||
|
||||
class nsIContent;
|
||||
class nsIStyledContent;
|
||||
class nsICSSLoader;
|
||||
class nsICSSParser;
|
||||
|
||||
class nsDOMCSSAttributeDeclaration : public nsDOMCSSDeclaration
|
||||
{
|
||||
public:
|
||||
nsDOMCSSAttributeDeclaration(nsIStyledContent *aContent);
|
||||
nsDOMCSSAttributeDeclaration(nsIContent *aContent);
|
||||
~nsDOMCSSAttributeDeclaration();
|
||||
|
||||
// impl AddRef/Release; QI is implemented by our parent class
|
||||
|
@ -75,7 +74,7 @@ protected:
|
|||
nsAutoRefCnt mRefCnt;
|
||||
NS_DECL_OWNINGTHREAD
|
||||
|
||||
nsIStyledContent *mContent;
|
||||
nsIContent *mContent;
|
||||
};
|
||||
|
||||
#endif /* nsDOMCSSAttributeDeclaration_h___ */
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
#include "nsIAtom.h"
|
||||
#include "nsIURL.h"
|
||||
#include "nsCSSPseudoElements.h"
|
||||
#include "nsIStyledContent.h"
|
||||
#include "nsIStyleRule.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsICSSStyleRule.h"
|
||||
|
@ -414,11 +413,11 @@ NS_IMPL_ISUPPORTS3(HTMLCSSStyleSheetImpl,
|
|||
NS_IMETHODIMP
|
||||
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
|
||||
nsICSSStyleRule* rule = styledContent->GetInlineStyleRule();
|
||||
nsICSSStyleRule* rule = content->GetInlineStyleRule();
|
||||
if (rule)
|
||||
aData->mRuleWalker->Forward(rule);
|
||||
}
|
||||
|
|
|
@ -399,9 +399,9 @@ static nsresult GetBodyColor(nsPresContext* aPresContext, nscolor* aColor)
|
|||
NS_IMETHODIMP
|
||||
nsHTMLStyleSheet::RulesMatching(ElementRuleProcessorData* aData)
|
||||
{
|
||||
nsIStyledContent *styledContent = aData->mStyledContent;
|
||||
nsIContent *content = aData->mContent;
|
||||
|
||||
if (styledContent) {
|
||||
if (content) {
|
||||
nsRuleWalker *ruleWalker = aData->mRuleWalker;
|
||||
if (aData->mIsHTMLContent) {
|
||||
nsIAtom* tag = aData->mContentTag;
|
||||
|
@ -467,7 +467,7 @@ nsHTMLStyleSheet::RulesMatching(ElementRuleProcessorData* aData)
|
|||
} // end html element
|
||||
|
||||
// just get the style rules from the content
|
||||
styledContent->WalkContentStyleRules(ruleWalker);
|
||||
content->WalkContentStyleRules(ruleWalker);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
@ -478,7 +478,7 @@ NS_IMETHODIMP
|
|||
nsHTMLStyleSheet::HasStateDependentStyle(StateRuleProcessorData* aData,
|
||||
nsReStyleHint* aResult)
|
||||
{
|
||||
if (aData->mStyledContent &&
|
||||
if (aData->mContent &&
|
||||
aData->mIsHTMLContent &&
|
||||
aData->mIsHTMLLink &&
|
||||
aData->mContentTag == nsHTMLAtoms::a &&
|
||||
|
@ -498,11 +498,11 @@ nsHTMLStyleSheet::HasAttributeDependentStyle(AttributeRuleProcessorData* aData,
|
|||
nsReStyleHint* aResult)
|
||||
{
|
||||
// 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 &&
|
||||
(mLinkRule || mVisitedRule || mActiveRule) &&
|
||||
styledContent &&
|
||||
styledContent->IsContentOfType(nsIContent::eHTML) &&
|
||||
content &&
|
||||
content->IsContentOfType(nsIContent::eHTML) &&
|
||||
aData->mContentTag == nsHTMLAtoms::a) {
|
||||
*aResult = eReStyle_Self;
|
||||
return NS_OK;
|
||||
|
@ -512,7 +512,7 @@ nsHTMLStyleSheet::HasAttributeDependentStyle(AttributeRuleProcessorData* aData,
|
|||
// to descendants of body, when we're already reresolving.
|
||||
|
||||
// Handle the content style rules.
|
||||
if (styledContent && styledContent->IsAttributeMapped(aData->mAttribute)) {
|
||||
if (content && content->IsAttributeMapped(aData->mAttribute)) {
|
||||
*aResult = eReStyle_Self;
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -42,12 +42,12 @@
|
|||
|
||||
#include "nsISupports.h"
|
||||
class nsDOMCSSDeclaration;
|
||||
class nsIStyledContent;
|
||||
class nsIContent;
|
||||
|
||||
// bfdd87bd-79c8-4041-ae14-91fa8536ce61
|
||||
// f2fb43bf-81a1-4b0d-907a-893fe6727dbb
|
||||
#define NS_ICSSOMFACTORY_IID \
|
||||
{ 0xbfdd87bd, 0x79c8, 0x4041, \
|
||||
{0xae, 0x14, 0x91, 0xfa, 0x85, 0x36, 0xce, 0x61 } }
|
||||
{ 0xf2fb43bf, 0x81a1, 0x4b0d, \
|
||||
{ 0x90, 0x7a, 0x89, 0x3f, 0xe6, 0x72, 0x7d, 0xbb } }
|
||||
|
||||
// 5fcaa2c1-7ca4-4f73-a357-93e79d709376
|
||||
#define NS_CSSOMFACTORY_CID \
|
||||
|
@ -58,7 +58,7 @@ class nsICSSOMFactory : public nsISupports {
|
|||
public:
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICSSOMFACTORY_IID)
|
||||
|
||||
NS_IMETHOD CreateDOMCSSAttributeDeclaration(nsIStyledContent *aContent,
|
||||
NS_IMETHOD CreateDOMCSSAttributeDeclaration(nsIContent *aContent,
|
||||
nsDOMCSSDeclaration **aResult) = 0;
|
||||
};
|
||||
|
||||
|
|
|
@ -48,7 +48,6 @@
|
|||
class nsIStyleSheet;
|
||||
class nsPresContext;
|
||||
class nsIContent;
|
||||
class nsIStyledContent;
|
||||
class nsIAtom;
|
||||
class nsICSSPseudoComparator;
|
||||
class nsRuleWalker;
|
||||
|
@ -84,7 +83,6 @@ struct RuleProcessorData {
|
|||
|
||||
nsIAtom* mContentTag; // if content, then content->GetTag()
|
||||
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 mIsHTMLLink; // if content, calls nsStyleUtil::IsHTMLLink
|
||||
PRPackedBool mIsSimpleXLink; // if content, calls nsStyleUtil::IsSimpleXLink
|
||||
|
|
|
@ -47,7 +47,6 @@
|
|||
#include "nsIDOMClassInfo.h"
|
||||
#include "nsIEventStateManager.h"
|
||||
#include "nsINodeInfo.h"
|
||||
#include "nsIStyledContent.h"
|
||||
|
||||
// A content model view implementation for the tree.
|
||||
|
||||
|
@ -733,7 +732,7 @@ nsTreeContentView::ContentStatesChanged(nsIDocument* aDocument,
|
|||
|
||||
void
|
||||
nsTreeContentView::AttributeChanged(nsIDocument *aDocument,
|
||||
nsIStyledContent* aContent,
|
||||
nsIContent* aContent,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType)
|
||||
|
|
|
@ -72,8 +72,7 @@ class nsTreeContentView : public nsITreeView,
|
|||
nsIContent* aContent1,
|
||||
nsIContent* aContent2,
|
||||
PRInt32 aStateMask);
|
||||
virtual void AttributeChanged(nsIDocument *aDocument,
|
||||
nsIStyledContent* aContent,
|
||||
virtual void AttributeChanged(nsIDocument *aDocument, nsIContent* aContent,
|
||||
PRInt32 aNameSpaceID, nsIAtom* aAttribute,
|
||||
PRInt32 aModType);
|
||||
virtual void ContentAppended(nsIDocument *aDocument,
|
||||
|
|
|
@ -58,6 +58,7 @@ REQUIRES = \
|
|||
intl \
|
||||
dom \
|
||||
content \
|
||||
layout \
|
||||
widget \
|
||||
autocomplete \
|
||||
pipnss \
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
#include "nsIMenu.h"
|
||||
#include "nsIMenuItem.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIStyledContent.h"
|
||||
|
||||
#include "nsMenuBarX.h"
|
||||
#include "nsMenuX.h"
|
||||
|
@ -696,8 +695,7 @@ nsMenuBarX::DocumentWillBeDestroyed(nsIDocument * aDocument)
|
|||
|
||||
|
||||
void
|
||||
nsMenuBarX::AttributeChanged(nsIDocument * aDocument,
|
||||
nsIStyledContent * aContent,
|
||||
nsMenuBarX::AttributeChanged(nsIDocument * aDocument, nsIContent * aContent,
|
||||
PRInt32 aNameSpaceID, nsIAtom * aAttribute,
|
||||
PRInt32 aModType)
|
||||
{
|
||||
|
|
|
@ -42,7 +42,6 @@
|
|||
#include "nsIMenu.h"
|
||||
#include "nsIMenuItem.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIStyledContent.h"
|
||||
|
||||
#include "nsMenuBarX.h"
|
||||
#include "nsMenuX.h"
|
||||
|
@ -716,8 +715,7 @@ nsMenuBarX::DocumentWillBeDestroyed( nsIDocument * aDocument )
|
|||
|
||||
|
||||
void
|
||||
nsMenuBarX::AttributeChanged( nsIDocument * aDocument,
|
||||
nsIStyledContent * aContent,
|
||||
nsMenuBarX::AttributeChanged( nsIDocument * aDocument, nsIContent * aContent,
|
||||
PRInt32 aNameSpaceID, nsIAtom * aAttribute,
|
||||
PRInt32 aModType )
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче