зеркало из https://github.com/mozilla/gecko-dev.git
backing out fix for 88681 due to merge conflicts
This commit is contained in:
Родитель
3dcbc14c63
Коммит
9355372000
|
@ -17,8 +17,7 @@
|
|||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Daniel Glazman <glazman@netscape.com>
|
||||
* Contributor(s):
|
||||
*/
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIStyleSet.h"
|
||||
|
@ -41,9 +40,6 @@
|
|||
#include "nsIStyleRuleSupplier.h"
|
||||
#include "nsRuleNode.h"
|
||||
#include "nsIRuleWalker.h"
|
||||
#include "nsIBodySuper.h"
|
||||
#include "nsIHTMLDocument.h"
|
||||
#include "nsIDOMHTMLBodyElement.h"
|
||||
|
||||
#ifdef MOZ_PERF_METRICS
|
||||
#include "nsITimeRecorder.h"
|
||||
|
@ -121,8 +117,6 @@ public:
|
|||
virtual nsresult GetRuleTree(nsIRuleNode** aResult);
|
||||
virtual nsresult ClearStyleData(nsIPresContext* aPresContext, nsIStyleRule* aRule, nsIStyleContext* aContext);
|
||||
|
||||
virtual nsresult RemoveBodyFixupRule(nsIDocument *aDocument);
|
||||
|
||||
NS_IMETHOD ReParentStyleContext(nsIPresContext* aPresContext,
|
||||
nsIStyleContext* aStyleContext,
|
||||
nsIStyleContext* aNewParentContext,
|
||||
|
@ -1039,24 +1033,6 @@ StyleSetImpl::ClearStyleData(nsIPresContext* aPresContext, nsIStyleRule* aRule,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
StyleSetImpl::RemoveBodyFixupRule(nsIDocument *aDocument)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
nsCOMPtr<nsIHTMLDocument> htmlDoc = do_QueryInterface(aDocument);
|
||||
if (htmlDoc) {
|
||||
nsCOMPtr<nsIDOMHTMLBodyElement> node;
|
||||
htmlDoc->GetBodyElement(getter_AddRefs(node));
|
||||
if (node) {
|
||||
nsCOMPtr<nsIBodySuper> bodyElement = do_QueryInterface(node);
|
||||
bodyElement->RemoveBodyFixupRule();
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
StyleSetImpl::ReParentStyleContext(nsIPresContext* aPresContext,
|
||||
nsIStyleContext* aStyleContext,
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#
|
||||
# This is a list of local files which get copied to the mozilla:dist:content directory
|
||||
#
|
||||
nsIBodySuper.h
|
||||
nsIForm.h
|
||||
nsIFormControl.h
|
||||
nsILink.h
|
||||
|
|
|
@ -32,7 +32,6 @@ EXPORTS = \
|
|||
nsIFormControl.h \
|
||||
nsIForm.h \
|
||||
nsILink.h \
|
||||
nsIBodySuper.h \
|
||||
nsISelectElement.h \
|
||||
nsIScriptElement.h \
|
||||
$(NULL)
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
DEPTH=..\..\..\..
|
||||
|
||||
EXPORTS=nsIFormControl.h nsIForm.h nsILink.h \
|
||||
nsISelectElement.h nsIScriptElement.h nsIBodySuper.h
|
||||
nsISelectElement.h nsIScriptElement.h
|
||||
|
||||
MODULE=raptor
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Daniel Glazman <glazman@netscape.com>
|
||||
*/
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIDOMHTMLBodyElement.h"
|
||||
|
@ -52,7 +51,6 @@
|
|||
#include "nsIView.h"
|
||||
#include "nsLayoutAtoms.h"
|
||||
#include "nsIRuleWalker.h"
|
||||
#include "nsIBodySuper.h"
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
|
@ -112,24 +110,19 @@ public:
|
|||
//----------------------------------------------------------------------
|
||||
|
||||
// special subclass of inner class to override set document
|
||||
class nsBodySuper: public nsGenericHTMLContainerElement,
|
||||
public nsIBodySuper
|
||||
class nsBodySuper: public nsGenericHTMLContainerElement
|
||||
{
|
||||
public:
|
||||
nsBodySuper();
|
||||
virtual ~nsBodySuper();
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
NS_IMETHOD SetDocument(nsIDocument* aDocument, PRBool aDeep,
|
||||
PRBool aCompileEventHandlers);
|
||||
NS_IMETHOD RemoveBodyFixupRule();
|
||||
|
||||
BodyRule* mContentStyleRule;
|
||||
BodyFixupRule* mInlineStyleRule;
|
||||
};
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED(nsBodySuper, nsGenericHTMLContainerElement, nsIBodySuper)
|
||||
|
||||
nsBodySuper::nsBodySuper() : nsGenericHTMLContainerElement(),
|
||||
mContentStyleRule(nsnull),
|
||||
|
@ -173,17 +166,6 @@ nsBodySuper::SetDocument(nsIDocument* aDocument, PRBool aDeep,
|
|||
aCompileEventHandlers);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsBodySuper::RemoveBodyFixupRule(void)
|
||||
{
|
||||
if (mInlineStyleRule) {
|
||||
mInlineStyleRule->mPart = nsnull;
|
||||
mInlineStyleRule->mSheet = nsnull;
|
||||
NS_RELEASE(mInlineStyleRule);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
class nsHTMLBodyElement : public nsBodySuper,
|
||||
|
@ -729,7 +711,7 @@ nsHTMLBodyElement::~nsHTMLBodyElement()
|
|||
|
||||
// QueryInterface implementation for nsHTMLBodyElement
|
||||
NS_HTML_CONTENT_INTERFACE_MAP_BEGIN(nsHTMLBodyElement,
|
||||
nsBodySuper)
|
||||
nsGenericHTMLContainerElement)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMHTMLBodyElement)
|
||||
NS_INTERFACE_MAP_ENTRY_CONTENT_CLASSINFO(HTMLBodyElement)
|
||||
NS_HTML_CONTENT_INTERFACE_MAP_END
|
||||
|
|
|
@ -3530,7 +3530,7 @@ nsHTMLDocument::GetBodyContent()
|
|||
return PR_FALSE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsresult
|
||||
nsHTMLDocument::GetBodyElement(nsIDOMHTMLBodyElement** aBody)
|
||||
{
|
||||
if (mBodyContent == nsnull && PR_FALSE == GetBodyContent()) {
|
||||
|
|
|
@ -187,7 +187,7 @@ protected:
|
|||
nsresult GetSourceDocumentURL(JSContext* cx, nsIURI** sourceURL);
|
||||
|
||||
PRBool GetBodyContent();
|
||||
NS_IMETHOD GetBodyElement(nsIDOMHTMLBodyElement** aBody);
|
||||
nsresult GetBodyElement(nsIDOMHTMLBodyElement** aBody);
|
||||
|
||||
NS_IMETHOD GetDomainURI(nsIURI **uri);
|
||||
|
||||
|
|
|
@ -35,7 +35,6 @@ class nsIHTMLStyleSheet;
|
|||
class nsIStyleSheet;
|
||||
class nsICSSLoader;
|
||||
class nsIContent;
|
||||
class nsIDOMHTMLBodyElement;
|
||||
|
||||
/* b2a848b0-d0a9-11d1-89b1-006008911b81 */
|
||||
#define NS_IHTMLDOCUMENT_IID \
|
||||
|
@ -76,8 +75,6 @@ public:
|
|||
|
||||
NS_IMETHOD GetFormControlElements(nsIDOMNodeList** aReturn) = 0;
|
||||
|
||||
NS_IMETHOD GetBodyElement(nsIDOMHTMLBodyElement** aBody) = 0;
|
||||
|
||||
};
|
||||
|
||||
#endif /* nsIHTMLDocument_h___ */
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
* Original Author: David W. Hyatt (hyatt@netscape.com)
|
||||
*
|
||||
* Contributor(s):
|
||||
* Daniel Glazman <glazman@netscape.com>
|
||||
*/
|
||||
|
||||
#include "nsRuleNode.h"
|
||||
|
@ -900,8 +899,6 @@ nsRuleNode::WalkRuleTree(const nsStyleStructID& aSID, nsIStyleContext* aContext,
|
|||
// branch that they never need to examine their rules for this particular struct type
|
||||
// ever again.
|
||||
PropagateInheritBit(bit, ruleNode);
|
||||
if (eStyleStruct_Background == aSID && aRuleData->mPostResolveCallback)
|
||||
(*aRuleData->mPostResolveCallback) ((nsStyleStruct *)startStruct, aRuleData);
|
||||
return startStruct;
|
||||
}
|
||||
else if (!startStruct && ((!isReset && (detail == eRuleNone || detail == eRulePartialInherited))
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
* Steve Clark <buster@netscape.com>
|
||||
* Håkan Waara <hwaara@chello.se>
|
||||
* Dan Rosen <dr@netscape.com>
|
||||
* Daniel Glazman <glazman@netscape.com>
|
||||
*
|
||||
* IBM Corporation
|
||||
*
|
||||
|
@ -5084,12 +5083,6 @@ PresShell::StyleSheetDisabledStateChanged(nsIDocument *aDocument,
|
|||
}
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
if (aDisabled) {
|
||||
// If the stylesheet is disabled, remove existing BodyFixupRule for
|
||||
// bug 88681
|
||||
rv = mStyleSet->RemoveBodyFixupRule(aDocument);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
}
|
||||
// rebuild the frame-world
|
||||
return ReconstructFrames();
|
||||
}
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Daniel Glazman <glazman@netscape.com>
|
||||
*/
|
||||
#ifndef nsStyleSet_h___
|
||||
#define nsStyleSet_h___
|
||||
|
@ -83,8 +82,6 @@ public:
|
|||
|
||||
virtual nsresult GetRuleTree(nsIRuleNode** aResult) = 0;
|
||||
|
||||
virtual nsresult RemoveBodyFixupRule(nsIDocument *aDocument) = 0;
|
||||
|
||||
// ClearCachedStyleData is used to invalidate portions of both the style context tree
|
||||
// and rule tree without destroying the actual nodes in the two trees. |aRule| provides
|
||||
// a hint as to which rule has changed, and all subtree data pruning will occur rooted
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
* Steve Clark <buster@netscape.com>
|
||||
* Håkan Waara <hwaara@chello.se>
|
||||
* Dan Rosen <dr@netscape.com>
|
||||
* Daniel Glazman <glazman@netscape.com>
|
||||
*
|
||||
* IBM Corporation
|
||||
*
|
||||
|
@ -5084,12 +5083,6 @@ PresShell::StyleSheetDisabledStateChanged(nsIDocument *aDocument,
|
|||
}
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
if (aDisabled) {
|
||||
// If the stylesheet is disabled, remove existing BodyFixupRule for
|
||||
// bug 88681
|
||||
rv = mStyleSet->RemoveBodyFixupRule(aDocument);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
}
|
||||
// rebuild the frame-world
|
||||
return ReconstructFrames();
|
||||
}
|
||||
|
|
|
@ -17,8 +17,7 @@
|
|||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Daniel Glazman <glazman@netscape.com>
|
||||
* Contributor(s):
|
||||
*/
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIStyleSet.h"
|
||||
|
@ -41,9 +40,6 @@
|
|||
#include "nsIStyleRuleSupplier.h"
|
||||
#include "nsRuleNode.h"
|
||||
#include "nsIRuleWalker.h"
|
||||
#include "nsIBodySuper.h"
|
||||
#include "nsIHTMLDocument.h"
|
||||
#include "nsIDOMHTMLBodyElement.h"
|
||||
|
||||
#ifdef MOZ_PERF_METRICS
|
||||
#include "nsITimeRecorder.h"
|
||||
|
@ -121,8 +117,6 @@ public:
|
|||
virtual nsresult GetRuleTree(nsIRuleNode** aResult);
|
||||
virtual nsresult ClearStyleData(nsIPresContext* aPresContext, nsIStyleRule* aRule, nsIStyleContext* aContext);
|
||||
|
||||
virtual nsresult RemoveBodyFixupRule(nsIDocument *aDocument);
|
||||
|
||||
NS_IMETHOD ReParentStyleContext(nsIPresContext* aPresContext,
|
||||
nsIStyleContext* aStyleContext,
|
||||
nsIStyleContext* aNewParentContext,
|
||||
|
@ -1039,24 +1033,6 @@ StyleSetImpl::ClearStyleData(nsIPresContext* aPresContext, nsIStyleRule* aRule,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
StyleSetImpl::RemoveBodyFixupRule(nsIDocument *aDocument)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
nsCOMPtr<nsIHTMLDocument> htmlDoc = do_QueryInterface(aDocument);
|
||||
if (htmlDoc) {
|
||||
nsCOMPtr<nsIDOMHTMLBodyElement> node;
|
||||
htmlDoc->GetBodyElement(getter_AddRefs(node));
|
||||
if (node) {
|
||||
nsCOMPtr<nsIBodySuper> bodyElement = do_QueryInterface(node);
|
||||
bodyElement->RemoveBodyFixupRule();
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
StyleSetImpl::ReParentStyleContext(nsIPresContext* aPresContext,
|
||||
nsIStyleContext* aStyleContext,
|
||||
|
|
Загрузка…
Ссылка в новой задаче