diff --git a/content/base/src/nsNodeUtils.cpp b/content/base/src/nsNodeUtils.cpp index 7c4f92d68356..a445076e107f 100644 --- a/content/base/src/nsNodeUtils.cpp +++ b/content/base/src/nsNodeUtils.cpp @@ -117,12 +117,11 @@ nsNodeUtils::AttributeWillChange(nsIContent* aContent, } void -nsNodeUtils::AttributeChanged(nsIContent* aContent, +nsNodeUtils::AttributeChanged(Element* aElement, 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 8931674ae09d..d4849a453d4b 100644 --- a/content/base/src/nsNodeUtils.h +++ b/content/base/src/nsNodeUtils.h @@ -85,13 +85,13 @@ public: /** * Send AttributeChanged notifications to nsIMutationObservers. - * @param aContent Node whose data changed + * @param aElement Element 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(nsIContent* aContent, + static void AttributeChanged(mozilla::dom::Element* aElement, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType); diff --git a/layout/generic/nsFrameSetFrame.cpp b/layout/generic/nsFrameSetFrame.cpp index b9566e71a5bc..5df6bb68d5a4 100644 --- a/layout/generic/nsFrameSetFrame.cpp +++ b/layout/generic/nsFrameSetFrame.cpp @@ -1,6 +1,5 @@ -/* -*- 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 @@ -70,7 +69,7 @@ #include "nsCSSAnonBoxes.h" #include "nsAutoPtr.h" #include "nsStyleSet.h" -#include "nsIContent.h" +#include "mozilla/dom/Element.h" #include "nsDisplayList.h" #include "nsNodeUtils.h" #include "mozAutoDocUpdate.h" @@ -270,7 +269,7 @@ nsHTMLFramesetFrame::FrameResizePrefCallback(const char* aPref, void* aClosure) frame->RecalculateBorderResize(); if (doc) { - nsNodeUtils::AttributeChanged(frame->GetContent(), + nsNodeUtils::AttributeChanged(frame->GetContent()->AsElement(), kNameSpaceID_None, nsGkAtoms::frameborder, nsIDOMMutationEvent::MODIFICATION); diff --git a/parser/html/nsHtml5TreeOperation.cpp b/parser/html/nsHtml5TreeOperation.cpp index b9284f8609ef..e424494abea1 100644 --- a/parser/html/nsHtml5TreeOperation.cpp +++ b/parser/html/nsHtml5TreeOperation.cpp @@ -61,11 +61,14 @@ #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); /** @@ -313,7 +316,7 @@ nsHtml5TreeOperation::Perform(nsHtml5TreeOpExecutor* aBuilder, return AppendToDocument(node, aBuilder); } case eTreeOpAddAttributes: { - nsIContent* node = *(mOne.node); + dom::Element* node = (*(mOne.node))->AsElement(); nsHtml5HtmlAttributes* attributes = mTwo.attributes; nsHtml5OtherDocUpdate update(node->GetOwnerDoc(), diff --git a/parser/html/nsHtml5TreeOperation.h b/parser/html/nsHtml5TreeOperation.h index 699298de48c2..37b66aa97454 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;