From 8f53350b468ca05318db048d8b2ec587997a2fed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A3o=20Gottwald?= Date: Tue, 10 Aug 2010 15:09:01 +0200 Subject: [PATCH] Backed out changeset 783151ff2018 --- content/base/src/nsNodeUtils.cpp | 3 ++- content/base/src/nsNodeUtils.h | 4 ++-- layout/generic/nsFrameSetFrame.cpp | 9 +++++---- parser/html/nsHtml5TreeOperation.cpp | 5 +---- parser/html/nsHtml5TreeOperation.h | 2 +- 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/content/base/src/nsNodeUtils.cpp b/content/base/src/nsNodeUtils.cpp index a445076e107..7c4f92d6835 100644 --- a/content/base/src/nsNodeUtils.cpp +++ b/content/base/src/nsNodeUtils.cpp @@ -117,11 +117,12 @@ nsNodeUtils::AttributeWillChange(nsIContent* aContent, } void -nsNodeUtils::AttributeChanged(Element* aElement, +nsNodeUtils::AttributeChanged(nsIContent* aContent, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType) { + Element* aElement = aContent->AsElement(); nsIDocument* doc = aElement->GetOwnerDoc(); IMPL_MUTATION_NOTIFICATION(AttributeChanged, aElement, (doc, aElement, aNameSpaceID, aAttribute, diff --git a/content/base/src/nsNodeUtils.h b/content/base/src/nsNodeUtils.h index d4849a453d4..8931674ae09 100644 --- a/content/base/src/nsNodeUtils.h +++ b/content/base/src/nsNodeUtils.h @@ -85,13 +85,13 @@ public: /** * Send AttributeChanged notifications to nsIMutationObservers. - * @param aElement Element whose data changed + * @param aContent Node whose data changed * @param aNameSpaceID Namespace of changed attribute * @param aAttribute Local-name of changed attribute * @param aModType Type of change (add/change/removal) * @see nsIMutationObserver::AttributeChanged */ - static void AttributeChanged(mozilla::dom::Element* aElement, + static void AttributeChanged(nsIContent* aContent, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType); diff --git a/layout/generic/nsFrameSetFrame.cpp b/layout/generic/nsFrameSetFrame.cpp index 5df6bb68d5a..b9566e71a5b 100644 --- a/layout/generic/nsFrameSetFrame.cpp +++ b/layout/generic/nsFrameSetFrame.cpp @@ -1,5 +1,6 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** +/* -*- 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 @@ -69,7 +70,7 @@ #include "nsCSSAnonBoxes.h" #include "nsAutoPtr.h" #include "nsStyleSet.h" -#include "mozilla/dom/Element.h" +#include "nsIContent.h" #include "nsDisplayList.h" #include "nsNodeUtils.h" #include "mozAutoDocUpdate.h" @@ -269,7 +270,7 @@ nsHTMLFramesetFrame::FrameResizePrefCallback(const char* aPref, void* aClosure) frame->RecalculateBorderResize(); if (doc) { - nsNodeUtils::AttributeChanged(frame->GetContent()->AsElement(), + nsNodeUtils::AttributeChanged(frame->GetContent(), kNameSpaceID_None, nsGkAtoms::frameborder, nsIDOMMutationEvent::MODIFICATION); diff --git a/parser/html/nsHtml5TreeOperation.cpp b/parser/html/nsHtml5TreeOperation.cpp index e424494abea..b9284f8609e 100644 --- a/parser/html/nsHtml5TreeOperation.cpp +++ b/parser/html/nsHtml5TreeOperation.cpp @@ -61,14 +61,11 @@ #include "nsIFormProcessor.h" #include "nsIServiceManager.h" #include "nsEscape.h" -#include "mozilla/dom/Element.h" #ifdef MOZ_SVG #include "nsHtml5SVGLoadDispatcher.h" #endif -namespace dom = mozilla::dom; - static NS_DEFINE_CID(kFormProcessorCID, NS_FORMPROCESSOR_CID); /** @@ -316,7 +313,7 @@ nsHtml5TreeOperation::Perform(nsHtml5TreeOpExecutor* aBuilder, return AppendToDocument(node, aBuilder); } case eTreeOpAddAttributes: { - dom::Element* node = (*(mOne.node))->AsElement(); + nsIContent* node = *(mOne.node); nsHtml5HtmlAttributes* attributes = mTwo.attributes; nsHtml5OtherDocUpdate update(node->GetOwnerDoc(), diff --git a/parser/html/nsHtml5TreeOperation.h b/parser/html/nsHtml5TreeOperation.h index 37b66aa9745..699298de48c 100644 --- a/parser/html/nsHtml5TreeOperation.h +++ b/parser/html/nsHtml5TreeOperation.h @@ -38,11 +38,11 @@ #ifndef nsHtml5TreeOperation_h__ #define nsHtml5TreeOperation_h__ +#include "nsIContent.h" #include "nsHtml5DocumentMode.h" #include "nsHtml5HtmlAttributes.h" #include "nsXPCOMStrings.h" -class nsIContent; class nsHtml5TreeOpExecutor; class nsHtml5StateSnapshot;