diff --git a/mozilla/content/html/base/src/nsHTMLIIDs.h b/mozilla/content/html/base/src/nsHTMLIIDs.h deleted file mode 100644 index 2d7a71c1b36..00000000000 --- a/mozilla/content/html/base/src/nsHTMLIIDs.h +++ /dev/null @@ -1,51 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: NPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Netscape 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/NPL/ - * - * 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 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 NPL, 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 NPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ -#ifndef nsHTMLIIDs_h___ -#define nsHTMLIIDs_h___ - -#include "nsISupports.h" - -// Alphabetically ordered list of externally defined IID's -extern const nsIID kIAreaFrameIID; -extern const nsIID kIHTMLContentIID; -extern const nsIID kIHTMLReflowIID; -extern const nsIID kIPageSequenceFrameIID; -extern const nsIID kIStyledContentIID; -extern const nsIID kITextContentIID; - -#endif /* nsHTMLIIDs_h___ */ diff --git a/mozilla/content/html/content/src/nsHTMLAnchorElement.cpp b/mozilla/content/html/content/src/nsHTMLAnchorElement.cpp index f4186622cf0..69dc6ff62c9 100644 --- a/mozilla/content/html/content/src/nsHTMLAnchorElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLAnchorElement.cpp @@ -49,7 +49,6 @@ #include "nsGenericHTMLElement.h" #include "nsILink.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" #include "nsIEventStateManager.h" diff --git a/mozilla/content/html/content/src/nsHTMLAppletElement.cpp b/mozilla/content/html/content/src/nsHTMLAppletElement.cpp index 7bc335fc897..9a88fd97b9a 100644 --- a/mozilla/content/html/content/src/nsHTMLAppletElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLAppletElement.cpp @@ -41,7 +41,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLAreaElement.cpp b/mozilla/content/html/content/src/nsHTMLAreaElement.cpp index d6fa4fdcad9..c35c38a478e 100644 --- a/mozilla/content/html/content/src/nsHTMLAreaElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLAreaElement.cpp @@ -43,7 +43,6 @@ #include "nsGenericHTMLElement.h" #include "nsILink.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLBRElement.cpp b/mozilla/content/html/content/src/nsHTMLBRElement.cpp index a3e75174094..4bb3bfdb689 100644 --- a/mozilla/content/html/content/src/nsHTMLBRElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLBRElement.cpp @@ -40,7 +40,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLBaseFontElement.cpp b/mozilla/content/html/content/src/nsHTMLBaseFontElement.cpp index 3102ab856df..18e5b4f265d 100644 --- a/mozilla/content/html/content/src/nsHTMLBaseFontElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLBaseFontElement.cpp @@ -40,7 +40,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLBodyElement.cpp b/mozilla/content/html/content/src/nsHTMLBodyElement.cpp index 4b175cee324..d3a927022be 100644 --- a/mozilla/content/html/content/src/nsHTMLBodyElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLBodyElement.cpp @@ -43,7 +43,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLButtonElement.cpp b/mozilla/content/html/content/src/nsHTMLButtonElement.cpp index 2a767b33daf..78ff9563e10 100644 --- a/mozilla/content/html/content/src/nsHTMLButtonElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLButtonElement.cpp @@ -42,7 +42,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLDListElement.cpp b/mozilla/content/html/content/src/nsHTMLDListElement.cpp index c50aa439b04..9d68f066d4c 100644 --- a/mozilla/content/html/content/src/nsHTMLDListElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLDListElement.cpp @@ -40,7 +40,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLDelElement.cpp b/mozilla/content/html/content/src/nsHTMLDelElement.cpp index d86baca18e8..02c00e6eab6 100644 --- a/mozilla/content/html/content/src/nsHTMLDelElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLDelElement.cpp @@ -40,7 +40,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLDirectoryElement.cpp b/mozilla/content/html/content/src/nsHTMLDirectoryElement.cpp index 06534ba8ddb..94ef209797d 100644 --- a/mozilla/content/html/content/src/nsHTMLDirectoryElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLDirectoryElement.cpp @@ -40,7 +40,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLDivElement.cpp b/mozilla/content/html/content/src/nsHTMLDivElement.cpp index ea707cdf9f0..1d6d1b072cd 100644 --- a/mozilla/content/html/content/src/nsHTMLDivElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLDivElement.cpp @@ -40,7 +40,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLFieldSetElement.cpp b/mozilla/content/html/content/src/nsHTMLFieldSetElement.cpp index 212fbb490a7..454e6ff7ac3 100644 --- a/mozilla/content/html/content/src/nsHTMLFieldSetElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLFieldSetElement.cpp @@ -41,7 +41,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLFontElement.cpp b/mozilla/content/html/content/src/nsHTMLFontElement.cpp index 290bf732a8f..dba0fd16f32 100644 --- a/mozilla/content/html/content/src/nsHTMLFontElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLFontElement.cpp @@ -41,7 +41,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIDeviceContext.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" diff --git a/mozilla/content/html/content/src/nsHTMLFormElement.cpp b/mozilla/content/html/content/src/nsHTMLFormElement.cpp index d372bc4b377..5e6efa4f85a 100644 --- a/mozilla/content/html/content/src/nsHTMLFormElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLFormElement.cpp @@ -48,7 +48,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLFrameSetElement.cpp b/mozilla/content/html/content/src/nsHTMLFrameSetElement.cpp index 5731b326049..6b46692bc7e 100644 --- a/mozilla/content/html/content/src/nsHTMLFrameSetElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLFrameSetElement.cpp @@ -40,7 +40,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLHRElement.cpp b/mozilla/content/html/content/src/nsHTMLHRElement.cpp index 1ff3f7649f7..b3a03250f0c 100644 --- a/mozilla/content/html/content/src/nsHTMLHRElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLHRElement.cpp @@ -40,7 +40,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLHeadElement.cpp b/mozilla/content/html/content/src/nsHTMLHeadElement.cpp index d3bc34326be..b26f0a20d9d 100644 --- a/mozilla/content/html/content/src/nsHTMLHeadElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLHeadElement.cpp @@ -40,7 +40,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLHeadingElement.cpp b/mozilla/content/html/content/src/nsHTMLHeadingElement.cpp index f7b1f746ab4..42a31c422d7 100644 --- a/mozilla/content/html/content/src/nsHTMLHeadingElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLHeadingElement.cpp @@ -40,7 +40,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLHtmlElement.cpp b/mozilla/content/html/content/src/nsHTMLHtmlElement.cpp index 0d751b214be..a915bc55289 100644 --- a/mozilla/content/html/content/src/nsHTMLHtmlElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLHtmlElement.cpp @@ -40,7 +40,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLImageElement.cpp b/mozilla/content/html/content/src/nsHTMLImageElement.cpp index 8d87e9b4b65..ef007058bd2 100644 --- a/mozilla/content/html/content/src/nsHTMLImageElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLImageElement.cpp @@ -41,7 +41,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLInputElement.cpp b/mozilla/content/html/content/src/nsHTMLInputElement.cpp index e4f557ac865..4cc5989368d 100644 --- a/mozilla/content/html/content/src/nsHTMLInputElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLInputElement.cpp @@ -54,7 +54,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" @@ -1142,8 +1141,10 @@ nsHTMLInputElement::Click() for (PRInt32 i=0; i shell; doc->GetShellAt(i, getter_AddRefs(shell)); + if (shell) { - rv = shell->GetPresContext(getter_AddRefs(context)); + shell->GetPresContext(getter_AddRefs(context)); + if (context) { nsEventStatus status = nsEventStatus_eIgnore; nsMouseEvent event; diff --git a/mozilla/content/html/content/src/nsHTMLInsElement.cpp b/mozilla/content/html/content/src/nsHTMLInsElement.cpp index ef289014968..803a443613e 100644 --- a/mozilla/content/html/content/src/nsHTMLInsElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLInsElement.cpp @@ -40,7 +40,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLLIElement.cpp b/mozilla/content/html/content/src/nsHTMLLIElement.cpp index aad13793c0d..ef161a4a498 100644 --- a/mozilla/content/html/content/src/nsHTMLLIElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLLIElement.cpp @@ -40,7 +40,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLLabelElement.cpp b/mozilla/content/html/content/src/nsHTMLLabelElement.cpp index 7345dee1aab..fa797bde1be 100644 --- a/mozilla/content/html/content/src/nsHTMLLabelElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLLabelElement.cpp @@ -42,7 +42,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLLegendElement.cpp b/mozilla/content/html/content/src/nsHTMLLegendElement.cpp index cb2bd180fd9..3b9512b7ffc 100644 --- a/mozilla/content/html/content/src/nsHTMLLegendElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLLegendElement.cpp @@ -41,7 +41,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLLinkElement.cpp b/mozilla/content/html/content/src/nsHTMLLinkElement.cpp index ee9c07ce563..b947955f2ee 100644 --- a/mozilla/content/html/content/src/nsHTMLLinkElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLLinkElement.cpp @@ -42,7 +42,6 @@ #include "nsGenericHTMLElement.h" #include "nsILink.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLMapElement.cpp b/mozilla/content/html/content/src/nsHTMLMapElement.cpp index be55f6a256c..77e44486538 100644 --- a/mozilla/content/html/content/src/nsHTMLMapElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLMapElement.cpp @@ -40,7 +40,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLMenuElement.cpp b/mozilla/content/html/content/src/nsHTMLMenuElement.cpp index 7d227f810e7..03d16566690 100644 --- a/mozilla/content/html/content/src/nsHTMLMenuElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLMenuElement.cpp @@ -40,7 +40,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLMetaElement.cpp b/mozilla/content/html/content/src/nsHTMLMetaElement.cpp index e02f06e39e1..8821a78ce8d 100644 --- a/mozilla/content/html/content/src/nsHTMLMetaElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLMetaElement.cpp @@ -40,7 +40,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLModElement.cpp b/mozilla/content/html/content/src/nsHTMLModElement.cpp index c0625d40a3a..7dd04528b65 100644 --- a/mozilla/content/html/content/src/nsHTMLModElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLModElement.cpp @@ -40,7 +40,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLOListElement.cpp b/mozilla/content/html/content/src/nsHTMLOListElement.cpp index 412017239a6..a330837baa4 100644 --- a/mozilla/content/html/content/src/nsHTMLOListElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLOListElement.cpp @@ -40,7 +40,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLOptGroupElement.cpp b/mozilla/content/html/content/src/nsHTMLOptGroupElement.cpp index 6ca47a6e39e..e3abe66f1be 100644 --- a/mozilla/content/html/content/src/nsHTMLOptGroupElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLOptGroupElement.cpp @@ -40,7 +40,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLOptionElement.cpp b/mozilla/content/html/content/src/nsHTMLOptionElement.cpp index 9c34060b012..29b745ca9e3 100644 --- a/mozilla/content/html/content/src/nsHTMLOptionElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLOptionElement.cpp @@ -44,7 +44,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLParagraphElement.cpp b/mozilla/content/html/content/src/nsHTMLParagraphElement.cpp index 07daf66ce86..5e44fc1339c 100644 --- a/mozilla/content/html/content/src/nsHTMLParagraphElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLParagraphElement.cpp @@ -40,7 +40,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLPreElement.cpp b/mozilla/content/html/content/src/nsHTMLPreElement.cpp index 692996da2f6..93bcb4499da 100644 --- a/mozilla/content/html/content/src/nsHTMLPreElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLPreElement.cpp @@ -40,7 +40,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLQuoteElement.cpp b/mozilla/content/html/content/src/nsHTMLQuoteElement.cpp index f35a6e732f7..704dc4d47d5 100644 --- a/mozilla/content/html/content/src/nsHTMLQuoteElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLQuoteElement.cpp @@ -40,7 +40,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLScriptElement.cpp b/mozilla/content/html/content/src/nsHTMLScriptElement.cpp index 993354d71cc..2c772585f7a 100644 --- a/mozilla/content/html/content/src/nsHTMLScriptElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLScriptElement.cpp @@ -40,7 +40,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLSelectElement.cpp b/mozilla/content/html/content/src/nsHTMLSelectElement.cpp index 223ddb899b5..e617b14a2a1 100644 --- a/mozilla/content/html/content/src/nsHTMLSelectElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLSelectElement.cpp @@ -46,7 +46,6 @@ #include "nsITextContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLSharedElement.cpp b/mozilla/content/html/content/src/nsHTMLSharedElement.cpp index 5e141734ad8..19c11b2283d 100644 --- a/mozilla/content/html/content/src/nsHTMLSharedElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLSharedElement.cpp @@ -43,7 +43,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLSharedLeafElement.cpp b/mozilla/content/html/content/src/nsHTMLSharedLeafElement.cpp index 5e141734ad8..19c11b2283d 100644 --- a/mozilla/content/html/content/src/nsHTMLSharedLeafElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLSharedLeafElement.cpp @@ -43,7 +43,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLSpanElement.cpp b/mozilla/content/html/content/src/nsHTMLSpanElement.cpp index 1e3ec36be19..36318b949a3 100644 --- a/mozilla/content/html/content/src/nsHTMLSpanElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLSpanElement.cpp @@ -40,7 +40,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLStyleElement.cpp b/mozilla/content/html/content/src/nsHTMLStyleElement.cpp index 532e38f7df8..6fc1b5b3376 100644 --- a/mozilla/content/html/content/src/nsHTMLStyleElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLStyleElement.cpp @@ -42,7 +42,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLTableCaptionElement.cpp b/mozilla/content/html/content/src/nsHTMLTableCaptionElement.cpp index 60143c4f0a5..d6cbe8c027c 100644 --- a/mozilla/content/html/content/src/nsHTMLTableCaptionElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLTableCaptionElement.cpp @@ -40,7 +40,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLTableCellElement.cpp b/mozilla/content/html/content/src/nsHTMLTableCellElement.cpp index 57f03609734..7797b88ab36 100644 --- a/mozilla/content/html/content/src/nsHTMLTableCellElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLTableCellElement.cpp @@ -44,7 +44,6 @@ #include "nsHTMLAttributes.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLTableColElement.cpp b/mozilla/content/html/content/src/nsHTMLTableColElement.cpp index d7544add78b..8c0bb980f9c 100644 --- a/mozilla/content/html/content/src/nsHTMLTableColElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLTableColElement.cpp @@ -42,7 +42,6 @@ #include "nsHTMLAttributes.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLTableElement.cpp b/mozilla/content/html/content/src/nsHTMLTableElement.cpp index 19289cf4e45..b0086a76c58 100644 --- a/mozilla/content/html/content/src/nsHTMLTableElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLTableElement.cpp @@ -46,7 +46,6 @@ #include "nsHTMLAttributes.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLTableRowElement.cpp b/mozilla/content/html/content/src/nsHTMLTableRowElement.cpp index 7cf676c3739..9d964d3fb73 100644 --- a/mozilla/content/html/content/src/nsHTMLTableRowElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLTableRowElement.cpp @@ -46,7 +46,6 @@ #include "nsGenericHTMLElement.h" #include "GenericElementCollection.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLTableSectionElement.cpp b/mozilla/content/html/content/src/nsHTMLTableSectionElement.cpp index 35c732843ad..66be268d7a4 100644 --- a/mozilla/content/html/content/src/nsHTMLTableSectionElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLTableSectionElement.cpp @@ -41,7 +41,6 @@ #include "nsHTMLAttributes.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsHTMLParts.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" diff --git a/mozilla/content/html/content/src/nsHTMLTextAreaElement.cpp b/mozilla/content/html/content/src/nsHTMLTextAreaElement.cpp index dc439a3cd93..56aa0b85ba6 100644 --- a/mozilla/content/html/content/src/nsHTMLTextAreaElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLTextAreaElement.cpp @@ -52,7 +52,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLTitleElement.cpp b/mozilla/content/html/content/src/nsHTMLTitleElement.cpp index 7879f4d0701..db72128ef80 100644 --- a/mozilla/content/html/content/src/nsHTMLTitleElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLTitleElement.cpp @@ -40,7 +40,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLUListElement.cpp b/mozilla/content/html/content/src/nsHTMLUListElement.cpp index 211581edf8c..3c98597082a 100644 --- a/mozilla/content/html/content/src/nsHTMLUListElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLUListElement.cpp @@ -40,7 +40,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/content/src/nsHTMLUnknownElement.cpp b/mozilla/content/html/content/src/nsHTMLUnknownElement.cpp index f4cb3df05ea..84c6d343aca 100644 --- a/mozilla/content/html/content/src/nsHTMLUnknownElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLUnknownElement.cpp @@ -39,7 +39,6 @@ #include "nsIHTMLContent.h" #include "nsGenericHTMLElement.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" diff --git a/mozilla/content/html/document/src/nsHTMLContentSink.cpp b/mozilla/content/html/document/src/nsHTMLContentSink.cpp index 23c433ecfa6..85398b3832b 100644 --- a/mozilla/content/html/document/src/nsHTMLContentSink.cpp +++ b/mozilla/content/html/document/src/nsHTMLContentSink.cpp @@ -116,7 +116,6 @@ #include "nsVoidArray.h" #include "nsIScriptSecurityManager.h" #include "nsIPrincipal.h" -#include "nsHTMLIIDs.h" #include "nsTextFragment.h" #include "nsIScriptGlobalObject.h" #include "nsIScriptGlobalObjectOwner.h" diff --git a/mozilla/content/html/style/src/nsCSSStyleSheet.cpp b/mozilla/content/html/style/src/nsCSSStyleSheet.cpp index ea5a284f9fb..d7d098def7b 100644 --- a/mozilla/content/html/style/src/nsCSSStyleSheet.cpp +++ b/mozilla/content/html/style/src/nsCSSStyleSheet.cpp @@ -71,7 +71,6 @@ #include "nsUnicharUtils.h" #include "nsVoidArray.h" #include "nsIUnicharInputStream.h" -#include "nsHTMLIIDs.h" #include "nsIDOMHTMLAnchorElement.h" #include "nsIDOMHTMLLinkElement.h" #include "nsIDOMHTMLAreaElement.h" diff --git a/mozilla/content/html/style/src/nsHTMLCSSStyleSheet.cpp b/mozilla/content/html/style/src/nsHTMLCSSStyleSheet.cpp index c2af8ba3e39..79f4fd1d5c3 100644 --- a/mozilla/content/html/style/src/nsHTMLCSSStyleSheet.cpp +++ b/mozilla/content/html/style/src/nsHTMLCSSStyleSheet.cpp @@ -47,7 +47,6 @@ #include "nsIHTMLContent.h" #include "nsIStyleRule.h" #include "nsIFrame.h" -#include "nsHTMLIIDs.h" #include "nsICSSStyleRule.h" #include "nsIStyleRuleProcessor.h" #include "nsIStyleContext.h" diff --git a/mozilla/content/html/style/src/nsHTMLStyleSheet.cpp b/mozilla/content/html/style/src/nsHTMLStyleSheet.cpp index 864f0b9bb9f..63dc49afbb3 100644 --- a/mozilla/content/html/style/src/nsHTMLStyleSheet.cpp +++ b/mozilla/content/html/style/src/nsHTMLStyleSheet.cpp @@ -48,7 +48,6 @@ #include "nsIPresContext.h" #include "nsIEventStateManager.h" #include "nsIDocument.h" -#include "nsHTMLIIDs.h" #include "nsICSSFrameConstructor.h" #include "nsIStyleFrameConstruction.h" #include "nsHTMLParts.h" diff --git a/mozilla/layout/base/nsCSSFrameConstructor.cpp b/mozilla/layout/base/nsCSSFrameConstructor.cpp index 7464b35f1e9..48e5d83105a 100644 --- a/mozilla/layout/base/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/base/nsCSSFrameConstructor.cpp @@ -56,7 +56,6 @@ #include "nsTableColFrame.h" #include "nsIDOMHTMLTableColElement.h" #include "nsTableCellFrame.h" // to get IS_CELL_FRAME -#include "nsHTMLIIDs.h" #include "nsIStyleFrameConstruction.h" #include "nsHTMLParts.h" #include "nsIPresShell.h" diff --git a/mozilla/layout/base/nsPresShell.cpp b/mozilla/layout/base/nsPresShell.cpp index f51917be999..1f41cee5618 100644 --- a/mozilla/layout/base/nsPresShell.cpp +++ b/mozilla/layout/base/nsPresShell.cpp @@ -60,7 +60,6 @@ #include "nsIPref.h" #include "nsIViewObserver.h" #include "nsContainerFrame.h" -#include "nsHTMLIIDs.h" #include "nsIDeviceContext.h" #include "nsIEventStateManager.h" #include "nsIDOMEvent.h" diff --git a/mozilla/layout/forms/nsComboboxControlFrame.cpp b/mozilla/layout/forms/nsComboboxControlFrame.cpp index baf7d67eac7..ff506fab997 100644 --- a/mozilla/layout/forms/nsComboboxControlFrame.cpp +++ b/mozilla/layout/forms/nsComboboxControlFrame.cpp @@ -43,7 +43,6 @@ #include "nsFormFrame.h" #include "nsFormControlFrame.h" #include "nsIHTMLContent.h" -#include "nsHTMLIIDs.h" #include "nsHTMLAtoms.h" #include "nsHTMLParts.h" #include "nsIFormControl.h" @@ -1748,18 +1747,16 @@ NS_IMETHODIMP nsComboboxControlFrame::GetName(nsAString* aResult) { nsresult result = NS_FORM_NOTOK; - if (mContent) { - nsIHTMLContent* formControl = nsnull; - result = mContent->QueryInterface(kIHTMLContentIID, (void**)&formControl); - if ((NS_OK == result) && formControl) { - nsHTMLValue value; - result = formControl->GetHTMLAttribute(nsHTMLAtoms::name, value); - if (NS_CONTENT_ATTR_HAS_VALUE == result) { - if (eHTMLUnit_String == value.GetUnit()) { - value.GetStringValue(*aResult); - } + + nsCOMPtr formControl(do_QueryInterface(mContent)); + + if (formControl) { + nsHTMLValue value; + result = formControl->GetHTMLAttribute(nsHTMLAtoms::name, value); + if (NS_CONTENT_ATTR_HAS_VALUE == result) { + if (eHTMLUnit_String == value.GetUnit()) { + value.GetStringValue(*aResult); } - NS_RELEASE(formControl); } } return result; diff --git a/mozilla/layout/forms/nsFieldSetFrame.cpp b/mozilla/layout/forms/nsFieldSetFrame.cpp index a53fa37a181..8f1762723b7 100644 --- a/mozilla/layout/forms/nsFieldSetFrame.cpp +++ b/mozilla/layout/forms/nsFieldSetFrame.cpp @@ -51,7 +51,6 @@ #include "nsIAtom.h" #include "nsIPresContext.h" #include "nsIHTMLContent.h" -#include "nsHTMLIIDs.h" #include "nsHTMLParts.h" #include "nsHTMLAtoms.h" #include "nsIStyleContext.h" diff --git a/mozilla/layout/forms/nsFileControlFrame.cpp b/mozilla/layout/forms/nsFileControlFrame.cpp index ebcbfd17078..6abf831c1e9 100644 --- a/mozilla/layout/forms/nsFileControlFrame.cpp +++ b/mozilla/layout/forms/nsFileControlFrame.cpp @@ -45,7 +45,6 @@ #include "nsIAtom.h" #include "nsIPresContext.h" #include "nsIHTMLContent.h" -#include "nsHTMLIIDs.h" #include "nsHTMLAtoms.h" #include "nsIPresState.h" #include "nsWidgetsCID.h" @@ -508,18 +507,16 @@ NS_IMETHODIMP nsFileControlFrame::GetName(nsAString* aResult) { nsresult result = NS_FORM_NOTOK; - if (mContent) { - nsIHTMLContent* formControl = nsnull; - result = mContent->QueryInterface(kIHTMLContentIID, (void**)&formControl); - if ((NS_OK == result) && formControl) { - nsHTMLValue value; - result = formControl->GetHTMLAttribute(nsHTMLAtoms::name, value); - if (NS_CONTENT_ATTR_HAS_VALUE == result) { - if (eHTMLUnit_String == value.GetUnit()) { - value.GetStringValue(*aResult); - } + + nsCOMPtr formControl(do_QueryInterface(mContent)); + + if (formControl) { + nsHTMLValue value; + result = formControl->GetHTMLAttribute(nsHTMLAtoms::name, value); + if (NS_CONTENT_ATTR_HAS_VALUE == result) { + if (eHTMLUnit_String == value.GetUnit()) { + value.GetStringValue(*aResult); } - NS_RELEASE(formControl); } } return result; diff --git a/mozilla/layout/forms/nsFormControlFrame.cpp b/mozilla/layout/forms/nsFormControlFrame.cpp index 9c7546f2e2a..f24c84bc704 100644 --- a/mozilla/layout/forms/nsFormControlFrame.cpp +++ b/mozilla/layout/forms/nsFormControlFrame.cpp @@ -44,7 +44,6 @@ #include "nsIStyleContext.h" #include "nsLeafFrame.h" #include "nsCSSRendering.h" -#include "nsHTMLIIDs.h" #include "nsIView.h" #include "nsIViewManager.h" #include "nsCoord.h" @@ -687,15 +686,15 @@ nsFormControlFrame::GetMaxLength(PRInt32* aSize) { *aSize = -1; nsresult result = NS_CONTENT_ATTR_NOT_THERE; - nsIHTMLContent* content = nsnull; - mContent->QueryInterface(kIHTMLContentIID, (void**) &content); - if (nsnull != content) { + + nsCOMPtr content(do_QueryInterface(mContent)); + + if (content) { nsHTMLValue value; result = content->GetHTMLAttribute(nsHTMLAtoms::maxlength, value); if (eHTMLUnit_Integer == value.GetUnit()) { *aSize = value.GetIntValue(); } - NS_RELEASE(content); } return result; } @@ -705,15 +704,15 @@ nsFormControlFrame::GetSizeFromContent(PRInt32* aSize) const { *aSize = -1; nsresult result = NS_CONTENT_ATTR_NOT_THERE; - nsIHTMLContent* content = nsnull; - mContent->QueryInterface(kIHTMLContentIID, (void**) &content); - if (nsnull != content) { + + nsCOMPtr content(do_QueryInterface(mContent)); + + if (content) { nsHTMLValue value; result = content->GetHTMLAttribute(nsHTMLAtoms::size, value); if (eHTMLUnit_Integer == value.GetUnit()) { *aSize = value.GetIntValue(); } - NS_RELEASE(content); } return result; } @@ -737,18 +736,16 @@ NS_IMETHODIMP nsFormControlFrame::GetName(nsAString* aResult) { nsresult result = NS_FORM_NOTOK; - if (mContent) { - nsIHTMLContent* formControl = nsnull; - result = mContent->QueryInterface(kIHTMLContentIID, (void**)&formControl); - if ((NS_OK == result) && formControl) { - nsHTMLValue value; - result = formControl->GetHTMLAttribute(nsHTMLAtoms::name, value); - if (NS_CONTENT_ATTR_HAS_VALUE == result) { - if (eHTMLUnit_String == value.GetUnit()) { - value.GetStringValue(*aResult); - } + + nsCOMPtr formControl(do_QueryInterface(mContent)); + + if (formControl) { + nsHTMLValue value; + result = formControl->GetHTMLAttribute(nsHTMLAtoms::name, value); + if (NS_CONTENT_ATTR_HAS_VALUE == result) { + if (eHTMLUnit_String == value.GetUnit()) { + value.GetStringValue(*aResult); } - NS_RELEASE(formControl); } } return result; @@ -759,18 +756,16 @@ NS_IMETHODIMP nsFormControlFrame::GetValue(nsAString* aResult) { nsresult result = NS_FORM_NOTOK; - if (mContent) { - nsIHTMLContent* formControl = nsnull; - result = mContent->QueryInterface(kIHTMLContentIID, (void**)&formControl); - if ((NS_OK == result) && formControl) { - nsHTMLValue value; - result = formControl->GetHTMLAttribute(nsHTMLAtoms::value, value); - if (NS_CONTENT_ATTR_HAS_VALUE == result) { - if (eHTMLUnit_String == value.GetUnit()) { - value.GetStringValue(*aResult); - } + + nsCOMPtr formControl(do_QueryInterface(mContent)); + + if (formControl) { + nsHTMLValue value; + result = formControl->GetHTMLAttribute(nsHTMLAtoms::value, value); + if (NS_CONTENT_ATTR_HAS_VALUE == result) { + if (eHTMLUnit_String == value.GetUnit()) { + value.GetStringValue(*aResult); } - NS_RELEASE(formControl); } } return result; diff --git a/mozilla/layout/forms/nsFormControlHelper.cpp b/mozilla/layout/forms/nsFormControlHelper.cpp index 597664212bd..6a6a6ce8e45 100644 --- a/mozilla/layout/forms/nsFormControlHelper.cpp +++ b/mozilla/layout/forms/nsFormControlHelper.cpp @@ -44,7 +44,6 @@ #include "nsIStyleContext.h" #include "nsLeafFrame.h" #include "nsCSSRendering.h" -#include "nsHTMLIIDs.h" #include "nsIView.h" #include "nsIViewManager.h" #include "nsCoord.h" @@ -174,15 +173,14 @@ nsFormControlHelper::GetWrapProperty(nsIContent * aContent, nsString &aOutValue) { aOutValue.SetLength(0); nsresult result = NS_CONTENT_ATTR_NOT_THERE; - nsIHTMLContent* content = nsnull; - aContent->QueryInterface(kIHTMLContentIID, (void**) &content); - if (nsnull != content) { + nsCOMPtr content(do_QueryInterface(aContent)); + + if (content) { nsHTMLValue value; result = content->GetHTMLAttribute(nsHTMLAtoms::wrap, value); if (eHTMLUnit_String == value.GetUnit()) { value.GetStringValue(aOutValue); } - NS_RELEASE(content); } return result; } @@ -404,17 +402,15 @@ nsFormControlHelper::CalculateSize (nsIPresContext* aPresContext, aDesiredSize.width = CSS_NOTSET; aDesiredSize.height = CSS_NOTSET; - nsIContent* iContent = nsnull; - aFrame->GetFormContent((nsIContent*&) iContent); - if (!iContent) { - return 0; - } - nsIHTMLContent* hContent = nsnull; - nsresult result = iContent->QueryInterface(kIHTMLContentIID, (void**)&hContent); - if ((NS_OK != result) || !hContent) { - NS_RELEASE(iContent); + nsCOMPtr iContent; + aFrame->GetFormContent(*getter_AddRefs(iContent)); + + nsCOMPtr hContent(do_QueryInterface(iContent)); + + if (!hContent) { return 0; } + nsAutoString valAttr; nsresult valStatus = NS_CONTENT_ATTR_NOT_THERE; if (nsnull != aSpec.mColValueAttr) { @@ -510,13 +506,10 @@ nsFormControlHelper::CalculateSize (nsIPresContext* aPresContext, } } - NS_RELEASE(hContent); if (ATTR_NOTSET == numRows) { numRows = (aRowHeight > 0) ? (aDesiredSize.height / aRowHeight) : 0; } - NS_RELEASE(iContent); - return numRows; } @@ -704,10 +697,10 @@ nsresult nsFormControlHelper::GetName(nsIContent* aContent, nsAString* aResult) { nsresult result = NS_FORM_NOTOK; - if (nsnull != aContent) { - nsIHTMLContent* formControl = nsnull; - result = aContent->QueryInterface(kIHTMLContentIID, (void**)&formControl); - if ((NS_OK == result) && formControl) { + if (aContent) { + nsCOMPtr formControl(do_QueryInterface(aContent)); + + if (formControl) { nsHTMLValue value; result = formControl->GetHTMLAttribute(nsHTMLAtoms::name, value); if (NS_CONTENT_ATTR_HAS_VALUE == result) { @@ -715,7 +708,6 @@ nsFormControlHelper::GetName(nsIContent* aContent, nsAString* aResult) value.GetStringValue(*aResult); } } - NS_RELEASE(formControl); } } return result; @@ -726,18 +718,16 @@ nsresult nsFormControlHelper::GetValue(nsIContent* aContent, nsAString* aResult) { nsresult result = NS_FORM_NOTOK; - if (nsnull != aContent) { - nsIHTMLContent* formControl = nsnull; - result = aContent->QueryInterface(kIHTMLContentIID, (void**)&formControl); - if ((NS_OK == result) && formControl) { - nsHTMLValue value; - result = formControl->GetHTMLAttribute(nsHTMLAtoms::value, value); - if (NS_CONTENT_ATTR_HAS_VALUE == result) { - if (eHTMLUnit_String == value.GetUnit()) { - value.GetStringValue(*aResult); - } + + nsCOMPtr formControl(do_QueryInterface(aContent)); + + if (formControl) { + nsHTMLValue value; + result = formControl->GetHTMLAttribute(nsHTMLAtoms::value, value); + if (NS_CONTENT_ATTR_HAS_VALUE == result) { + if (eHTMLUnit_String == value.GetUnit()) { + value.GetStringValue(*aResult); } - NS_RELEASE(formControl); } } return result; diff --git a/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp b/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp index 886b31fc5ed..fc92bf64212 100644 --- a/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp +++ b/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp @@ -51,7 +51,6 @@ #include "nsIStyleContext.h" #include "nsLeafFrame.h" #include "nsCSSRendering.h" -#include "nsHTMLIIDs.h" #include "nsISupports.h" #include "nsHTMLAtoms.h" #include "nsIImage.h" @@ -236,18 +235,16 @@ NS_IMETHODIMP nsHTMLButtonControlFrame::GetName(nsAString* aResult) { nsresult result = NS_FORM_NOTOK; - if (mContent) { - nsIHTMLContent* formControl = nsnull; - result = mContent->QueryInterface(kIHTMLContentIID, (void**)&formControl); - if ((NS_OK == result) && formControl) { - nsHTMLValue value; - result = formControl->GetHTMLAttribute(nsHTMLAtoms::name, value); - if (NS_CONTENT_ATTR_HAS_VALUE == result) { - if (eHTMLUnit_String == value.GetUnit()) { - value.GetStringValue(*aResult); - } + + nsCOMPtr formControl(do_QueryInterface(mContent)); + + if (formControl) { + nsHTMLValue value; + result = formControl->GetHTMLAttribute(nsHTMLAtoms::name, value); + if (NS_CONTENT_ATTR_HAS_VALUE == result) { + if (eHTMLUnit_String == value.GetUnit()) { + value.GetStringValue(*aResult); } - NS_RELEASE(formControl); } } return result; @@ -257,18 +254,16 @@ NS_IMETHODIMP nsHTMLButtonControlFrame::GetValue(nsAString* aResult) { nsresult result = NS_FORM_NOTOK; - if (mContent) { - nsIHTMLContent* formControl = nsnull; - result = mContent->QueryInterface(kIHTMLContentIID, (void**)&formControl); - if ((NS_OK == result) && formControl) { - nsHTMLValue value; - result = formControl->GetHTMLAttribute(nsHTMLAtoms::value, value); - if (NS_CONTENT_ATTR_HAS_VALUE == result) { - if (eHTMLUnit_String == value.GetUnit()) { - value.GetStringValue(*aResult); - } + + nsCOMPtr formControl(do_QueryInterface(mContent)); + + if (formControl) { + nsHTMLValue value; + result = formControl->GetHTMLAttribute(nsHTMLAtoms::value, value); + if (NS_CONTENT_ATTR_HAS_VALUE == result) { + if (eHTMLUnit_String == value.GetUnit()) { + value.GetStringValue(*aResult); } - NS_RELEASE(formControl); } } return result; diff --git a/mozilla/layout/forms/nsHTMLButtonControlFrame.h b/mozilla/layout/forms/nsHTMLButtonControlFrame.h index 3390a2ab199..9aa093d4536 100644 --- a/mozilla/layout/forms/nsHTMLButtonControlFrame.h +++ b/mozilla/layout/forms/nsHTMLButtonControlFrame.h @@ -52,7 +52,6 @@ #include "nsIStyleContext.h" #include "nsLeafFrame.h" #include "nsCSSRendering.h" -#include "nsHTMLIIDs.h" #include "nsISupports.h" #include "nsHTMLAtoms.h" #include "nsIImage.h" diff --git a/mozilla/layout/forms/nsImageControlFrame.cpp b/mozilla/layout/forms/nsImageControlFrame.cpp index 8a39c08f530..542caa44f1d 100644 --- a/mozilla/layout/forms/nsImageControlFrame.cpp +++ b/mozilla/layout/forms/nsImageControlFrame.cpp @@ -47,7 +47,6 @@ #include "nsIStyleContext.h" #include "nsLeafFrame.h" #include "nsCSSRendering.h" -#include "nsHTMLIIDs.h" #include "nsIViewManager.h" #include "nsISupports.h" #include "nsHTMLAtoms.h" diff --git a/mozilla/layout/forms/nsIsIndexFrame.cpp b/mozilla/layout/forms/nsIsIndexFrame.cpp index 5ec3b30a680..dfd1539f272 100644 --- a/mozilla/layout/forms/nsIsIndexFrame.cpp +++ b/mozilla/layout/forms/nsIsIndexFrame.cpp @@ -42,7 +42,6 @@ #include "nsIAtom.h" #include "nsIPresContext.h" #include "nsIHTMLContent.h" -#include "nsHTMLIIDs.h" #include "nsHTMLAtoms.h" #include "nsIPresState.h" #include "nsWidgetsCID.h" diff --git a/mozilla/layout/forms/nsLegendFrame.cpp b/mozilla/layout/forms/nsLegendFrame.cpp index 51f8aa1fbd0..759163d30be 100644 --- a/mozilla/layout/forms/nsLegendFrame.cpp +++ b/mozilla/layout/forms/nsLegendFrame.cpp @@ -46,7 +46,6 @@ #include "nsISupports.h" #include "nsIAtom.h" #include "nsIHTMLContent.h" -#include "nsHTMLIIDs.h" #include "nsHTMLParts.h" #include "nsHTMLAtoms.h" #include "nsIStyleContext.h" @@ -144,16 +143,16 @@ PRInt32 nsLegendFrame::GetAlign() intValue = NS_STYLE_TEXT_ALIGN_RIGHT; } #endif // IBMBIDI - nsIHTMLContent* content = nsnull; - mContent->QueryInterface(kIHTMLContentIID, (void**) &content); - if (nsnull != content) { + + nsCOMPtr content(do_QueryInterface(mContent)); + + if (content) { nsHTMLValue value; if (NS_CONTENT_ATTR_HAS_VALUE == (content->GetHTMLAttribute(nsHTMLAtoms::align, value))) { if (eHTMLUnit_Enumerated == value.GetUnit()) { intValue = value.GetIntValue(); } } - NS_RELEASE(content); } return intValue; } diff --git a/mozilla/layout/forms/nsListControlFrame.cpp b/mozilla/layout/forms/nsListControlFrame.cpp index d3edfeaed46..8a29b951e67 100644 --- a/mozilla/layout/forms/nsListControlFrame.cpp +++ b/mozilla/layout/forms/nsListControlFrame.cpp @@ -42,7 +42,6 @@ #include "nsListControlFrame.h" #include "nsFormControlFrame.h" // for COMPARE macro #include "nsFormControlHelper.h" -#include "nsHTMLIIDs.h" #include "nsHTMLAtoms.h" #include "nsIHTMLContent.h" #include "nsIFormControl.h" diff --git a/mozilla/layout/generic/nsAbsoluteContainingBlock.cpp b/mozilla/layout/generic/nsAbsoluteContainingBlock.cpp index 4e8988f0886..00073f156c0 100644 --- a/mozilla/layout/generic/nsAbsoluteContainingBlock.cpp +++ b/mozilla/layout/generic/nsAbsoluteContainingBlock.cpp @@ -37,7 +37,6 @@ #include "nsCOMPtr.h" #include "nsAbsoluteContainingBlock.h" #include "nsContainerFrame.h" -#include "nsHTMLIIDs.h" #include "nsReflowPath.h" #include "nsIStyleContext.h" #include "nsIViewManager.h" diff --git a/mozilla/layout/generic/nsAreaFrame.cpp b/mozilla/layout/generic/nsAreaFrame.cpp index c62080d9497..bab53c25640 100644 --- a/mozilla/layout/generic/nsAreaFrame.cpp +++ b/mozilla/layout/generic/nsAreaFrame.cpp @@ -42,7 +42,6 @@ #include "nsIViewManager.h" #include "nsHTMLAtoms.h" #include "nsIView.h" -#include "nsHTMLIIDs.h" #include "nsHTMLValue.h" #include "nsHTMLParts.h" #include "nsLayoutAtoms.h" diff --git a/mozilla/layout/generic/nsBRFrame.cpp b/mozilla/layout/generic/nsBRFrame.cpp index 1dc591c8217..f1cbc402a01 100644 --- a/mozilla/layout/generic/nsBRFrame.cpp +++ b/mozilla/layout/generic/nsBRFrame.cpp @@ -37,7 +37,6 @@ #include "nsCOMPtr.h" #include "nsFrame.h" #include "nsHTMLParts.h" -#include "nsHTMLIIDs.h" #include "nsIPresContext.h" #include "nsLineLayout.h" #include "nsStyleConsts.h" diff --git a/mozilla/layout/generic/nsBlockFrame.cpp b/mozilla/layout/generic/nsBlockFrame.cpp index 36177d53e80..983fcd50827 100644 --- a/mozilla/layout/generic/nsBlockFrame.cpp +++ b/mozilla/layout/generic/nsBlockFrame.cpp @@ -49,7 +49,6 @@ #include "nsLineLayout.h" #include "nsPlaceholderFrame.h" #include "nsStyleConsts.h" -#include "nsHTMLIIDs.h" #include "nsCSSRendering.h" #include "nsIFrameManager.h" #include "nsIPresContext.h" @@ -3016,27 +3015,31 @@ nsBlockFrame::GetTopBlockChild() // whitespace. PRInt32 n = mLines.front()->GetChildCount(); while (--n >= 0) { - nsIContent* content; - nsresult rv = firstChild->GetContent(&content); - if (NS_FAILED(rv) || !content) { + nsCOMPtr content; + firstChild->GetContent(getter_AddRefs(content)); + if (!content) { return nsnull; } + if (!content->IsContentOfType(nsIContent::eTEXT)) { - NS_RELEASE(content); return nsnull; } - nsITextContent* tc; - rv = content->QueryInterface(kITextContentIID, (void**) &tc); - NS_RELEASE(content); - if (NS_FAILED(rv) || (nsnull == tc)) { + + nsCOMPtr tc(do_QueryInterface(content)); + + NS_ASSERTION(tc, "Huh, eTEXT content not an nsITextContent!"); + + if (!tc) { return nsnull; } + PRBool isws = PR_FALSE; tc->IsOnlyWhitespace(&isws); - NS_RELEASE(tc); + if (!isws) { return nsnull; } + firstChild->GetNextSibling(&firstChild); } @@ -6136,8 +6139,10 @@ nsBlockFrame::RenumberLists(nsIPresContext* aPresContext) // Setup initial list ordinal value // XXX Map html's start property to counter-reset style PRInt32 ordinal = 1; - nsIHTMLContent* hc; - if (mContent && (NS_OK == mContent->QueryInterface(kIHTMLContentIID, (void**) &hc))) { + + nsCOMPtr hc(do_QueryInterface(mContent)); + + if (hc) { nsHTMLValue value; if (NS_CONTENT_ATTR_HAS_VALUE == hc->GetHTMLAttribute(nsHTMLAtoms::start, value)) { @@ -6148,7 +6153,6 @@ nsBlockFrame::RenumberLists(nsIPresContext* aPresContext) } } } - NS_RELEASE(hc); } // Get to first-in-flow diff --git a/mozilla/layout/generic/nsBlockReflowContext.cpp b/mozilla/layout/generic/nsBlockReflowContext.cpp index 8a92899dfe2..661bd1ea693 100644 --- a/mozilla/layout/generic/nsBlockReflowContext.cpp +++ b/mozilla/layout/generic/nsBlockReflowContext.cpp @@ -38,7 +38,6 @@ * ***** END LICENSE BLOCK ***** */ #include "nsBlockReflowContext.h" #include "nsLineLayout.h" -#include "nsHTMLIIDs.h" #include "nsSpaceManager.h" #include "nsIFontMetrics.h" #include "nsIPresContext.h" diff --git a/mozilla/layout/generic/nsBulletFrame.cpp b/mozilla/layout/generic/nsBulletFrame.cpp index 73b75460007..cc1b98a53be 100644 --- a/mozilla/layout/generic/nsBulletFrame.cpp +++ b/mozilla/layout/generic/nsBulletFrame.cpp @@ -37,7 +37,6 @@ #include "nsCOMPtr.h" #include "nsBulletFrame.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsHTMLParts.h" #include "nsHTMLValue.h" #include "nsHTMLContainerFrame.h" diff --git a/mozilla/layout/generic/nsContainerFrame.cpp b/mozilla/layout/generic/nsContainerFrame.cpp index f29595a303a..b5fc2d5d45a 100644 --- a/mozilla/layout/generic/nsContainerFrame.cpp +++ b/mozilla/layout/generic/nsContainerFrame.cpp @@ -49,7 +49,6 @@ #include "nsVoidArray.h" #include "nsISizeOfHandler.h" #include "nsHTMLReflowCommand.h" -#include "nsHTMLIIDs.h" #include "nsHTMLContainerFrame.h" #include "nsIFrameManager.h" #include "nsIPresShell.h" diff --git a/mozilla/layout/generic/nsFirstLetterFrame.cpp b/mozilla/layout/generic/nsFirstLetterFrame.cpp index d96be6b0b31..b7dea53b466 100644 --- a/mozilla/layout/generic/nsFirstLetterFrame.cpp +++ b/mozilla/layout/generic/nsFirstLetterFrame.cpp @@ -41,7 +41,6 @@ #include "nsIContent.h" #include "nsLineLayout.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsLayoutAtoms.h" #define nsFirstLetterFrameSuper nsHTMLContainerFrame diff --git a/mozilla/layout/generic/nsFrame.cpp b/mozilla/layout/generic/nsFrame.cpp index ea74e3985a9..1dd41f26a63 100644 --- a/mozilla/layout/generic/nsFrame.cpp +++ b/mozilla/layout/generic/nsFrame.cpp @@ -68,7 +68,6 @@ #include "nsIDOMHTMLAreaElement.h" #include "nsIDOMHTMLImageElement.h" #include "nsIDeviceContext.h" -#include "nsHTMLIIDs.h" #include "nsIEventStateManager.h" #include "nsISelection.h" #include "nsISelectionPrivate.h" diff --git a/mozilla/layout/generic/nsFrameFrame.cpp b/mozilla/layout/generic/nsFrameFrame.cpp index b98493b0921..7714a736760 100644 --- a/mozilla/layout/generic/nsFrameFrame.cpp +++ b/mozilla/layout/generic/nsFrameFrame.cpp @@ -52,7 +52,6 @@ #include "nsIMarkupDocumentViewer.h" #include "nsIPresContext.h" #include "nsIPresShell.h" -#include "nsHTMLIIDs.h" #include "nsIComponentManager.h" #include "nsIStreamListener.h" #include "nsIURL.h" diff --git a/mozilla/layout/generic/nsFrameSetFrame.cpp b/mozilla/layout/generic/nsFrameSetFrame.cpp index 6820963d6ee..04f88aa38ae 100644 --- a/mozilla/layout/generic/nsFrameSetFrame.cpp +++ b/mozilla/layout/generic/nsFrameSetFrame.cpp @@ -1,4 +1,3 @@ - /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * The contents of this file are subject to the Netscape Public @@ -27,7 +26,6 @@ #include "nsHTMLContainerFrame.h" #include "nsIPresContext.h" #include "nsIPresShell.h" -#include "nsHTMLIIDs.h" #include "nsIComponentManager.h" #include "nsIStreamListener.h" #include "nsIURL.h" @@ -408,13 +406,13 @@ nsHTMLFramesetFrame::Init(nsIPresContext* aPresContext, continue; nsCOMPtr tag; child->GetTag(*getter_AddRefs(tag)); - if ((nsHTMLAtoms::frameset == tag) || (nsHTMLAtoms::frame == tag)) { + if (tag == nsHTMLAtoms::frameset || tag == nsHTMLAtoms::frame) { nsCOMPtr kidSC; - nsresult result; + nsresult result; aPresContext->ResolveStyleContextFor(child, mStyleContext, getter_AddRefs(kidSC)); - if (nsHTMLAtoms::frameset == tag) { + if (tag == nsHTMLAtoms::frameset) { result = NS_NewHTMLFramesetFrame(shell, &frame); mChildTypes[mChildCount] = FRAMESET; @@ -645,9 +643,9 @@ PRInt32 nsHTMLFramesetFrame::GetBorderWidth(nsIPresContext* aPresContext, float p2t; aPresContext->GetScaledPixelsToTwips(&p2t); nsHTMLValue htmlVal; - nsIHTMLContent* content = nsnull; - mContent->QueryInterface(kIHTMLContentIID, (void**)&content); - if (nsnull != content) { + nsCOMPtr content(do_QueryInterface(mContent)); + + if (content) { if (NS_CONTENT_ATTR_HAS_VALUE == (content->GetHTMLAttribute(nsHTMLAtoms::border, htmlVal))) { nsHTMLUnit unit = htmlVal.GetUnit(); PRInt32 intVal = 0; @@ -659,13 +657,12 @@ PRInt32 nsHTMLFramesetFrame::GetBorderWidth(nsIPresContext* aPresContext, if (intVal < 0) { intVal = 0; } - NS_RELEASE(content); + if (forcing && intVal == 0) { intVal = DEFAULT_BORDER_WIDTH_PX; } return NSIntPixelsToTwips(intVal, p2t); } - NS_RELEASE(content); } if (mParentBorderWidth > 0 || @@ -709,26 +706,24 @@ nsHTMLFramesetFrame::GetDesiredSize(nsIPresContext* aPresContext, nsHTMLFramesetFrame* nsHTMLFramesetFrame::GetFramesetParent(nsIFrame* aChild) { nsHTMLFramesetFrame* parent = nsnull; - nsIContent* content = nsnull; - aChild->GetContent(&content); - if (nsnull != content) { - nsIContent* contentParent = nsnull; - content->GetParent(contentParent); - if (nsnull != contentParent) { - nsIHTMLContent* contentParent2 = nsnull; - contentParent->QueryInterface(kIHTMLContentIID, (void**)&contentParent2); - if (nsnull != contentParent2) { - nsIAtom* tag; - contentParent2->GetTag(tag); - if (nsHTMLAtoms::frameset == tag) { - aChild->GetParent((nsIFrame**)&parent); - } - NS_IF_RELEASE(tag); - NS_RELEASE(contentParent2); + nsCOMPtr content; + aChild->GetContent(getter_AddRefs(content)); + + if (content) { + nsCOMPtr contentParent; + content->GetParent(*getter_AddRefs(contentParent)); + + nsCOMPtr contentParent2 = + do_QueryInterface(contentParent); + + if (contentParent2) { + nsCOMPtr tag; + contentParent2->GetTag(*getter_AddRefs(tag)); + + if (tag == nsHTMLAtoms::frameset) { + aChild->GetParent((nsIFrame**)&parent); } - NS_RELEASE(contentParent); } - NS_RELEASE(content); } return parent; @@ -862,9 +857,10 @@ void nsHTMLFramesetFrame::ParseRowCol(nsIPresContext* aPresContext, nsIAtom* aAt { nsHTMLValue value; nsAutoString rowsCols; - nsIHTMLContent* content = nsnull; - mContent->QueryInterface(kIHTMLContentIID, (void**)&content); - if (nsnull != content) { + + nsCOMPtr content(do_QueryInterface(mContent)); + + if (content) { if (NS_CONTENT_ATTR_HAS_VALUE == content->GetHTMLAttribute(aAttrType, value)) { if (eHTMLUnit_String == value.GetUnit()) { value.GetStringValue(rowsCols); @@ -875,11 +871,9 @@ void nsHTMLFramesetFrame::ParseRowCol(nsIPresContext* aPresContext, nsIAtom* aAt (*aSpecs)[i] = specs[i]; } delete [] specs; - NS_RELEASE(content); return; } } - NS_RELEASE(content); } aNumSpecs = 1; *aSpecs = new nsFramesetSpec[1]; @@ -1054,11 +1048,10 @@ nsFrameborder GetFrameBorderHelper(nsIHTMLContent* aContent) nsFrameborder nsHTMLFramesetFrame::GetFrameBorder() { nsFrameborder result = eFrameborder_Notset; - nsIHTMLContent* content = nsnull; - mContent->QueryInterface(kIHTMLContentIID, (void**) &content); + nsCOMPtr content(do_QueryInterface(mContent)); + if (content) { result = GetFrameBorderHelper(content); - NS_RELEASE(content); } if (eFrameborder_Notset == result) { return mParentFrameborder; @@ -1069,11 +1062,11 @@ nsFrameborder nsHTMLFramesetFrame::GetFrameBorder() nsFrameborder nsHTMLFramesetFrame::GetFrameBorder(nsIContent* aContent) { nsFrameborder result = eFrameborder_Notset; - nsIHTMLContent* content = nsnull; - aContent->QueryInterface(kIHTMLContentIID, (void**) &content); - if (nsnull != content) { + + nsCOMPtr content(do_QueryInterface(mContent)); + + if (content) { result = GetFrameBorderHelper(content); - NS_RELEASE(content); } if (eFrameborder_Notset == result) { return GetFrameBorder(); @@ -1084,9 +1077,10 @@ nsFrameborder nsHTMLFramesetFrame::GetFrameBorder(nsIContent* aContent) nscolor nsHTMLFramesetFrame::GetBorderColor() { nscolor result = NO_COLOR; - nsIHTMLContent* content = nsnull; - mContent->QueryInterface(kIHTMLContentIID, (void**)&content); - if (nsnull != content) { + + nsCOMPtr content(do_QueryInterface(mContent)); + + if (content) { nsHTMLValue value; if (NS_CONTENT_ATTR_HAS_VALUE == (content->GetHTMLAttribute(nsHTMLAtoms::bordercolor, value))) { if ((eHTMLUnit_Color == value.GetUnit()) || @@ -1094,7 +1088,6 @@ nscolor nsHTMLFramesetFrame::GetBorderColor() result = value.GetColorValue(); } } - NS_RELEASE(content); } if (NO_COLOR == result) { return mParentBorderColor; @@ -1105,9 +1098,10 @@ nscolor nsHTMLFramesetFrame::GetBorderColor() nscolor nsHTMLFramesetFrame::GetBorderColor(nsIContent* aContent) { nscolor result = NO_COLOR; - nsIHTMLContent* content = nsnull; - aContent->QueryInterface(kIHTMLContentIID, (void**)&content); - if (nsnull != content) { + + nsCOMPtr content(do_QueryInterface(aContent)); + + if (content) { nsHTMLValue value; if (NS_CONTENT_ATTR_HAS_VALUE == (content->GetHTMLAttribute(nsHTMLAtoms::bordercolor, value))) { if ((eHTMLUnit_Color == value.GetUnit()) || @@ -1115,7 +1109,6 @@ nscolor nsHTMLFramesetFrame::GetBorderColor(nsIContent* aContent) result = value.GetColorValue(); } } - NS_RELEASE(content); } if (NO_COLOR == result) { return GetBorderColor(); @@ -1454,19 +1447,16 @@ PRBool nsHTMLFramesetFrame::GetNoResize(nsIFrame* aChildFrame) { PRBool result = PR_FALSE; - nsIContent* content = nsnull; - aChildFrame->GetContent(&content); - if (nsnull != content) { - nsIHTMLContent* htmlContent = nsnull; - content->QueryInterface(kIHTMLContentIID, (void**)&htmlContent); - if (nsnull != htmlContent) { - nsHTMLValue value; - if (NS_CONTENT_ATTR_HAS_VALUE == htmlContent->GetHTMLAttribute(nsHTMLAtoms::noresize, value)) { - result = PR_TRUE; - } - NS_RELEASE(htmlContent); + nsCOMPtr content; + aChildFrame->GetContent(getter_AddRefs(content)); + + nsCOMPtr htmlContent(do_QueryInterface(content)); + + if (htmlContent) { + nsHTMLValue value; + if (NS_CONTENT_ATTR_HAS_VALUE == htmlContent->GetHTMLAttribute(nsHTMLAtoms::noresize, value)) { + result = PR_TRUE; } - NS_RELEASE(content); } return result; } @@ -1507,9 +1497,9 @@ nsHTMLFramesetFrame::RecalculateBorderResize() if (child) { nsCOMPtr tag; child->GetTag(*getter_AddRefs(tag)); - if (nsHTMLAtoms::frameset == tag) { + if (tag == nsHTMLAtoms::frameset) { childTypes[frameOrFramesetChildIndex++] = FRAMESET; - } else if (nsHTMLAtoms::frame == tag) { + } else if (tag == nsHTMLAtoms::frame) { childTypes[frameOrFramesetChildIndex++] = FRAME; } // Don't overflow childTypes array diff --git a/mozilla/layout/generic/nsGfxScrollFrame.cpp b/mozilla/layout/generic/nsGfxScrollFrame.cpp index e86dd544231..11810b3dad6 100644 --- a/mozilla/layout/generic/nsGfxScrollFrame.cpp +++ b/mozilla/layout/generic/nsGfxScrollFrame.cpp @@ -45,7 +45,6 @@ #include "nsIView.h" #include "nsIViewManager.h" #include "nsHTMLContainerFrame.h" -#include "nsHTMLIIDs.h" #include "nsCSSRendering.h" #include "nsIScrollableView.h" #include "nsWidgetsCID.h" diff --git a/mozilla/layout/generic/nsHTMLContainerFrame.cpp b/mozilla/layout/generic/nsHTMLContainerFrame.cpp index 73a55d663cf..a8d9274a16b 100644 --- a/mozilla/layout/generic/nsHTMLContainerFrame.cpp +++ b/mozilla/layout/generic/nsHTMLContainerFrame.cpp @@ -55,7 +55,6 @@ #include "nsIView.h" #include "nsIViewManager.h" #include "nsViewsCID.h" -#include "nsHTMLIIDs.h" #include "nsIDOMEvent.h" #include "nsIScrollableView.h" #include "nsWidgetsCID.h" diff --git a/mozilla/layout/generic/nsHTMLFrame.cpp b/mozilla/layout/generic/nsHTMLFrame.cpp index 3b3bfbf46ff..b66181a93ad 100644 --- a/mozilla/layout/generic/nsHTMLFrame.cpp +++ b/mozilla/layout/generic/nsHTMLFrame.cpp @@ -46,7 +46,6 @@ #include "nsIView.h" #include "nsIViewManager.h" #include "nsIWidget.h" -#include "nsHTMLIIDs.h" #include "nsPageFrame.h" #include "nsIRenderingContext.h" #include "nsGUIEvent.h" diff --git a/mozilla/layout/generic/nsHTMLReflowCommand.cpp b/mozilla/layout/generic/nsHTMLReflowCommand.cpp index 80701750150..6ff371245c5 100644 --- a/mozilla/layout/generic/nsHTMLReflowCommand.cpp +++ b/mozilla/layout/generic/nsHTMLReflowCommand.cpp @@ -43,7 +43,6 @@ #include "nsIContent.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" -#include "nsHTMLIIDs.h" #include "nsFrame.h" #include "nsContainerFrame.h" #include "nsLayoutAtoms.h" diff --git a/mozilla/layout/generic/nsImageFrame.cpp b/mozilla/layout/generic/nsImageFrame.cpp index 732bb51dc88..dc3286e3001 100644 --- a/mozilla/layout/generic/nsImageFrame.cpp +++ b/mozilla/layout/generic/nsImageFrame.cpp @@ -41,7 +41,6 @@ #include "nsIPresContext.h" #include "nsIRenderingContext.h" #include "nsIPresShell.h" -#include "nsHTMLIIDs.h" #include "nsIImage.h" #include "nsIWidget.h" #include "nsHTMLAtoms.h" diff --git a/mozilla/layout/generic/nsImageMap.cpp b/mozilla/layout/generic/nsImageMap.cpp index 070b49dfd10..34348f36b9c 100644 --- a/mozilla/layout/generic/nsImageMap.cpp +++ b/mozilla/layout/generic/nsImageMap.cpp @@ -56,7 +56,6 @@ #include "nsINameSpaceManager.h" #include "nsHTMLAtoms.h" #include "nsIHTMLContent.h" -#include "nsHTMLIIDs.h" #include "nsIDOMEventReceiver.h" #include "nsIPresShell.h" #include "nsIFrame.h" @@ -964,45 +963,51 @@ nsImageMap::IsInside(nscoord aX, nscoord aY, if (area->IsInside(aX, aY)) { if (area->GetHasURL()) { // Set the image loader's source URL and base URL - nsIURI* baseUri = nsnull; + nsCOMPtr baseUri; + if (mMap) { - nsIHTMLContent* htmlContent; - if (NS_SUCCEEDED( mMap->QueryInterface(kIHTMLContentIID, (void**)&htmlContent) )) { - htmlContent->GetBaseURL(baseUri); - NS_RELEASE(htmlContent); + nsCOMPtr htmlContent(do_QueryInterface(mMap)); + if (htmlContent) { + htmlContent->GetBaseURL(*getter_AddRefs(baseUri)); } else { - nsIDocument* doc; - if (NS_SUCCEEDED( mMap->GetDocument(doc) ) && doc) { - doc->GetBaseURL(baseUri); // Could just use mDocument here... - NS_RELEASE(doc); + nsCOMPtr doc; + mMap->GetDocument(*getter_AddRefs(doc)); + + if (doc) { + // Could just use mDocument here... + doc->GetBaseURL(*getter_AddRefs(baseUri)); } } } - if (!baseUri) return PR_FALSE; - + + if (!baseUri) { + return PR_FALSE; + } + nsAutoString href; area->GetHREF(href); NS_MakeAbsoluteURI(aAbsURL, href, baseUri); - - NS_RELEASE(baseUri); } area->GetTarget(aTarget); if (mMap && (aTarget.Length() == 0)) { - nsIHTMLContent* content = nsnull; - nsresult result = mMap->QueryInterface(kIHTMLContentIID, (void**)&content); - if ((NS_OK == result) && content) { + nsCOMPtr content(do_QueryInterface(mMap)); + + if (content) { content->GetBaseTarget(aTarget); - NS_RELEASE(content); } } + area->GetAltText(aAltText); *aSuppress = area->mSuppressFeedback; + area->GetArea(aContent); + return PR_TRUE; } } + return PR_FALSE; } diff --git a/mozilla/layout/generic/nsInlineFrame.cpp b/mozilla/layout/generic/nsInlineFrame.cpp index 5ce33aeb5a2..a41efb2773a 100644 --- a/mozilla/layout/generic/nsInlineFrame.cpp +++ b/mozilla/layout/generic/nsInlineFrame.cpp @@ -36,7 +36,6 @@ * ***** END LICENSE BLOCK ***** */ #include "nsCOMPtr.h" #include "nsInlineFrame.h" -#include "nsHTMLIIDs.h" #include "nsHTMLAtoms.h" #include "nsHTMLParts.h" #include "nsIStyleContext.h" diff --git a/mozilla/layout/generic/nsLineLayout.cpp b/mozilla/layout/generic/nsLineLayout.cpp index 803d646f4d0..3581555989b 100644 --- a/mozilla/layout/generic/nsLineLayout.cpp +++ b/mozilla/layout/generic/nsLineLayout.cpp @@ -44,7 +44,6 @@ #include "nsInlineFrame.h" #include "nsStyleConsts.h" #include "nsHTMLContainerFrame.h" -#include "nsHTMLIIDs.h" #include "nsSpaceManager.h" #include "nsIStyleContext.h" #include "nsIPresContext.h" diff --git a/mozilla/layout/generic/nsPageContentFrame.cpp b/mozilla/layout/generic/nsPageContentFrame.cpp index 0abb4c14249..63befac9f39 100644 --- a/mozilla/layout/generic/nsPageContentFrame.cpp +++ b/mozilla/layout/generic/nsPageContentFrame.cpp @@ -41,7 +41,6 @@ #include "nsIStyleContext.h" #include "nsIRenderingContext.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsLayoutAtoms.h" #include "nsIStyleSet.h" #include "nsIPresShell.h" diff --git a/mozilla/layout/generic/nsPageFrame.cpp b/mozilla/layout/generic/nsPageFrame.cpp index 3974c6be3b8..f91e16b65ae 100644 --- a/mozilla/layout/generic/nsPageFrame.cpp +++ b/mozilla/layout/generic/nsPageFrame.cpp @@ -41,7 +41,6 @@ #include "nsIStyleContext.h" #include "nsIRenderingContext.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsLayoutAtoms.h" #include "nsIStyleSet.h" #include "nsIPresShell.h" diff --git a/mozilla/layout/generic/nsPlaceholderFrame.cpp b/mozilla/layout/generic/nsPlaceholderFrame.cpp index 9568687c85d..12c7f5658fc 100644 --- a/mozilla/layout/generic/nsPlaceholderFrame.cpp +++ b/mozilla/layout/generic/nsPlaceholderFrame.cpp @@ -36,7 +36,6 @@ * ***** END LICENSE BLOCK ***** */ #include "nsPlaceholderFrame.h" #include "nsLineLayout.h" -#include "nsHTMLIIDs.h" #include "nsIContent.h" #include "nsIPresContext.h" #include "nsIRenderingContext.h" diff --git a/mozilla/layout/generic/nsSimplePageSequence.cpp b/mozilla/layout/generic/nsSimplePageSequence.cpp index 93a2e84cca6..d56c7c7bc2a 100644 --- a/mozilla/layout/generic/nsSimplePageSequence.cpp +++ b/mozilla/layout/generic/nsSimplePageSequence.cpp @@ -41,7 +41,6 @@ #include "nsIRenderingContext.h" #include "nsIStyleContext.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIDeviceContext.h" #include "nsIViewManager.h" #include "nsIPresShell.h" @@ -203,7 +202,7 @@ nsSimplePageSequenceFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr if (NULL == aInstancePtr) { return NS_ERROR_NULL_POINTER; } - if (aIID.Equals(kIPageSequenceFrameIID)) { + if (aIID.Equals(NS_GET_IID(nsIPageSequenceFrame))) { *aInstancePtr = (void*)(nsIPageSequenceFrame*)this; return NS_OK; } diff --git a/mozilla/layout/generic/nsSpacerFrame.cpp b/mozilla/layout/generic/nsSpacerFrame.cpp index fe0f7d9b4d3..473f90b19fc 100644 --- a/mozilla/layout/generic/nsSpacerFrame.cpp +++ b/mozilla/layout/generic/nsSpacerFrame.cpp @@ -38,7 +38,6 @@ #include "nsIHTMLContent.h" #include "nsFrame.h" #include "nsLineLayout.h" -#include "nsHTMLIIDs.h" #include "nsIPresContext.h" #include "nsHTMLAtoms.h" #include "nsUnitConversion.h" diff --git a/mozilla/layout/generic/nsTextFrame.cpp b/mozilla/layout/generic/nsTextFrame.cpp index a1265fdc953..aceb8e874f1 100644 --- a/mozilla/layout/generic/nsTextFrame.cpp +++ b/mozilla/layout/generic/nsTextFrame.cpp @@ -52,7 +52,6 @@ #include "nsCoord.h" #include "nsIFontMetrics.h" #include "nsIRenderingContext.h" -#include "nsHTMLIIDs.h" #include "nsIPresShell.h" #include "nsIView.h" #include "nsIViewManager.h" @@ -5589,79 +5588,74 @@ nsTextFrame::ComputeTotalWordDimensions(nsIPresContext* aPresContext, PRUnichar *newWordBuf = aWordBuf; PRUint32 newWordBufSize = aWordBufSize; while (nsnull != aNextFrame) { - nsIContent* content = nsnull; - if ((NS_OK == aNextFrame->GetContent(&content)) && (nsnull != content)) { -#ifdef DEBUG_WORD_WRAPPING - printf(" next textRun="); - nsFrame::ListTag(stdout, aNextFrame); - printf("\n"); -#endif - nsITextContent* tc; - if (NS_OK == content->QueryInterface(kITextContentIID, (void**)&tc)) { - PRBool stop = PR_FALSE; - nsTextDimensions moreDimensions; - moreDimensions = ComputeWordFragmentDimensions(aPresContext, - aLineBreaker, - aLineLayout, - aReflowState, - aNextFrame, content, tc, - &stop, - newWordBuf, - aWordLen, - newWordBufSize, - aIsBreakable); - if (moreDimensions.width < 0) { - PRUint32 moreSize = -moreDimensions.width; - //Oh, wordBuf is too small, we have to grow it - newWordBufSize += moreSize; - if (newWordBuf != aWordBuf) { - newWordBuf = (PRUnichar*)nsMemory::Realloc(newWordBuf, sizeof(PRUnichar)*newWordBufSize); - NS_ASSERTION(newWordBuf, "not enough memory"); - } else { - newWordBuf = (PRUnichar*)nsMemory::Alloc(sizeof(PRUnichar)*newWordBufSize); - NS_ASSERTION(newWordBuf, "not enough memory"); - if(newWordBuf) { - memcpy((void*)newWordBuf, aWordBuf, sizeof(PRUnichar)*(newWordBufSize-moreSize)); - } - } + nsCOMPtr content; + aNextFrame->GetContent(getter_AddRefs(content)); +#ifdef DEBUG_WORD_WRAPPING + printf(" next textRun="); + nsFrame::ListTag(stdout, aNextFrame); + printf("\n"); +#endif + + nsCOMPtr tc(do_QueryInterface(content)); + if (tc) { + PRBool stop = PR_FALSE; + nsTextDimensions moreDimensions; + moreDimensions = ComputeWordFragmentDimensions(aPresContext, + aLineBreaker, + aLineLayout, + aReflowState, + aNextFrame, content, tc, + &stop, + newWordBuf, + aWordLen, + newWordBufSize, + aIsBreakable); + if (moreDimensions.width < 0) { + PRUint32 moreSize = -moreDimensions.width; + //Oh, wordBuf is too small, we have to grow it + newWordBufSize += moreSize; + if (newWordBuf != aWordBuf) { + newWordBuf = (PRUnichar*)nsMemory::Realloc(newWordBuf, sizeof(PRUnichar)*newWordBufSize); + NS_ASSERTION(newWordBuf, "not enough memory"); + } else { + newWordBuf = (PRUnichar*)nsMemory::Alloc(sizeof(PRUnichar)*newWordBufSize); + NS_ASSERTION(newWordBuf, "not enough memory"); if(newWordBuf) { - moreDimensions = ComputeWordFragmentDimensions(aPresContext, - aLineBreaker, - aLineLayout, - aReflowState, - aNextFrame, content, tc, - &stop, - newWordBuf, - aWordLen, - newWordBufSize, - aIsBreakable); - NS_ASSERTION((moreDimensions.width >= 0), "ComputeWordFragmentWidth is returning negative"); - } else { - stop = PR_TRUE; - moreDimensions.Clear(); - } + memcpy((void*)newWordBuf, aWordBuf, sizeof(PRUnichar)*(newWordBufSize-moreSize)); + } } - NS_RELEASE(tc); - NS_RELEASE(content); - addedDimensions.Combine(moreDimensions); -#ifdef DEBUG_WORD_WRAPPING - printf(" moreWidth=%d (addedWidth=%d) stop=%c\n", moreDimensions.width, - addedDimensions.width, stop?'T':'F'); -#endif - if (stop) { - goto done; - } + if(newWordBuf) { + moreDimensions = + ComputeWordFragmentDimensions(aPresContext, aLineBreaker, + aLineLayout, aReflowState, + aNextFrame, content, tc, &stop, + newWordBuf, aWordLen, newWordBufSize, + aIsBreakable); + NS_ASSERTION((moreDimensions.width >= 0), + "ComputeWordFragmentWidth is returning negative"); + } else { + stop = PR_TRUE; + moreDimensions.Clear(); + } } - else { - // It claimed it was text but it doesn't implement the - // nsITextContent API. Therefore I don't know what to do with it - // and can't look inside it. Oh well. - NS_RELEASE(content); + + addedDimensions.Combine(moreDimensions); +#ifdef DEBUG_WORD_WRAPPING + printf(" moreWidth=%d (addedWidth=%d) stop=%c\n", moreDimensions.width, + addedDimensions.width, stop?'T':'F'); +#endif + if (stop) { goto done; } } + else { + // It claimed it was text but it doesn't implement the + // nsITextContent API. Therefore I don't know what to do with it + // and can't look inside it. Oh well. + goto done; + } // Move on to the next frame in the text-run aNextFrame = aLineLayout.FindNextText(aPresContext, aNextFrame); @@ -5805,12 +5799,11 @@ nsTextFrame::ToCString(nsString& aBuf, PRInt32* aTotalContentLength) const const nsTextFragment* frag; // Get the frames text content - nsITextContent* tc; - if (NS_OK != mContent->QueryInterface(kITextContentIID, (void**) &tc)) { + nsCOMPtr tc(do_QueryInterface(mContent)); + if (!tc) { return; } tc->GetText(&frag); - NS_RELEASE(tc); // Compute the total length of the text content. *aTotalContentLength = frag->GetLength(); diff --git a/mozilla/layout/generic/nsTextTransformer.cpp b/mozilla/layout/generic/nsTextTransformer.cpp index 09412d876e3..2aa97fa52d1 100644 --- a/mozilla/layout/generic/nsTextTransformer.cpp +++ b/mozilla/layout/generic/nsTextTransformer.cpp @@ -44,7 +44,6 @@ #include "nsStyleConsts.h" #include "nsILineBreaker.h" #include "nsIWordBreaker.h" -#include "nsHTMLIIDs.h" #include "nsIServiceManager.h" #include "nsUnicharUtilCIID.h" #include "nsICaseConversion.h" diff --git a/mozilla/layout/generic/nsViewportFrame.cpp b/mozilla/layout/generic/nsViewportFrame.cpp index f1fdcf962b1..db706b84291 100644 --- a/mozilla/layout/generic/nsViewportFrame.cpp +++ b/mozilla/layout/generic/nsViewportFrame.cpp @@ -37,7 +37,6 @@ #include "nsCOMPtr.h" #include "nsContainerFrame.h" #include "nsHTMLParts.h" -#include "nsHTMLIIDs.h" #include "nsLayoutAtoms.h" #include "nsIViewManager.h" #include "nsIScrollableFrame.h" diff --git a/mozilla/layout/html/base/src/Makefile.in b/mozilla/layout/html/base/src/Makefile.in index 1f7a7cf3bab..057adab7a25 100644 --- a/mozilla/layout/html/base/src/Makefile.in +++ b/mozilla/layout/html/base/src/Makefile.in @@ -82,7 +82,6 @@ CPPSRCS = \ nsHRFrame.cpp \ nsHTMLContainerFrame.cpp \ nsHTMLFrame.cpp \ - nsHTMLIIDs.cpp \ nsHTMLReflowCommand.cpp \ nsHTMLReflowState.cpp \ nsImageFrame.cpp \ diff --git a/mozilla/layout/html/base/src/makefile.win b/mozilla/layout/html/base/src/makefile.win index de80aecf4b9..02eb056102b 100644 --- a/mozilla/layout/html/base/src/makefile.win +++ b/mozilla/layout/html/base/src/makefile.win @@ -86,7 +86,6 @@ CPP_OBJS= \ .\$(OBJDIR)\nsHRFrame.obj \ .\$(OBJDIR)\nsHTMLContainerFrame.obj \ .\$(OBJDIR)\nsHTMLFrame.obj \ - .\$(OBJDIR)\nsHTMLIIDs.obj \ .\$(OBJDIR)\nsHTMLReflowCommand.obj \ .\$(OBJDIR)\nsHTMLReflowState.obj \ .\$(OBJDIR)\nsImageFrame.obj \ diff --git a/mozilla/layout/html/base/src/nsAbsoluteContainingBlock.cpp b/mozilla/layout/html/base/src/nsAbsoluteContainingBlock.cpp index 4e8988f0886..00073f156c0 100644 --- a/mozilla/layout/html/base/src/nsAbsoluteContainingBlock.cpp +++ b/mozilla/layout/html/base/src/nsAbsoluteContainingBlock.cpp @@ -37,7 +37,6 @@ #include "nsCOMPtr.h" #include "nsAbsoluteContainingBlock.h" #include "nsContainerFrame.h" -#include "nsHTMLIIDs.h" #include "nsReflowPath.h" #include "nsIStyleContext.h" #include "nsIViewManager.h" diff --git a/mozilla/layout/html/base/src/nsAreaFrame.cpp b/mozilla/layout/html/base/src/nsAreaFrame.cpp index c62080d9497..bab53c25640 100644 --- a/mozilla/layout/html/base/src/nsAreaFrame.cpp +++ b/mozilla/layout/html/base/src/nsAreaFrame.cpp @@ -42,7 +42,6 @@ #include "nsIViewManager.h" #include "nsHTMLAtoms.h" #include "nsIView.h" -#include "nsHTMLIIDs.h" #include "nsHTMLValue.h" #include "nsHTMLParts.h" #include "nsLayoutAtoms.h" diff --git a/mozilla/layout/html/base/src/nsBRFrame.cpp b/mozilla/layout/html/base/src/nsBRFrame.cpp index 1dc591c8217..f1cbc402a01 100644 --- a/mozilla/layout/html/base/src/nsBRFrame.cpp +++ b/mozilla/layout/html/base/src/nsBRFrame.cpp @@ -37,7 +37,6 @@ #include "nsCOMPtr.h" #include "nsFrame.h" #include "nsHTMLParts.h" -#include "nsHTMLIIDs.h" #include "nsIPresContext.h" #include "nsLineLayout.h" #include "nsStyleConsts.h" diff --git a/mozilla/layout/html/base/src/nsBlockFrame.cpp b/mozilla/layout/html/base/src/nsBlockFrame.cpp index 36177d53e80..983fcd50827 100644 --- a/mozilla/layout/html/base/src/nsBlockFrame.cpp +++ b/mozilla/layout/html/base/src/nsBlockFrame.cpp @@ -49,7 +49,6 @@ #include "nsLineLayout.h" #include "nsPlaceholderFrame.h" #include "nsStyleConsts.h" -#include "nsHTMLIIDs.h" #include "nsCSSRendering.h" #include "nsIFrameManager.h" #include "nsIPresContext.h" @@ -3016,27 +3015,31 @@ nsBlockFrame::GetTopBlockChild() // whitespace. PRInt32 n = mLines.front()->GetChildCount(); while (--n >= 0) { - nsIContent* content; - nsresult rv = firstChild->GetContent(&content); - if (NS_FAILED(rv) || !content) { + nsCOMPtr content; + firstChild->GetContent(getter_AddRefs(content)); + if (!content) { return nsnull; } + if (!content->IsContentOfType(nsIContent::eTEXT)) { - NS_RELEASE(content); return nsnull; } - nsITextContent* tc; - rv = content->QueryInterface(kITextContentIID, (void**) &tc); - NS_RELEASE(content); - if (NS_FAILED(rv) || (nsnull == tc)) { + + nsCOMPtr tc(do_QueryInterface(content)); + + NS_ASSERTION(tc, "Huh, eTEXT content not an nsITextContent!"); + + if (!tc) { return nsnull; } + PRBool isws = PR_FALSE; tc->IsOnlyWhitespace(&isws); - NS_RELEASE(tc); + if (!isws) { return nsnull; } + firstChild->GetNextSibling(&firstChild); } @@ -6136,8 +6139,10 @@ nsBlockFrame::RenumberLists(nsIPresContext* aPresContext) // Setup initial list ordinal value // XXX Map html's start property to counter-reset style PRInt32 ordinal = 1; - nsIHTMLContent* hc; - if (mContent && (NS_OK == mContent->QueryInterface(kIHTMLContentIID, (void**) &hc))) { + + nsCOMPtr hc(do_QueryInterface(mContent)); + + if (hc) { nsHTMLValue value; if (NS_CONTENT_ATTR_HAS_VALUE == hc->GetHTMLAttribute(nsHTMLAtoms::start, value)) { @@ -6148,7 +6153,6 @@ nsBlockFrame::RenumberLists(nsIPresContext* aPresContext) } } } - NS_RELEASE(hc); } // Get to first-in-flow diff --git a/mozilla/layout/html/base/src/nsBlockReflowContext.cpp b/mozilla/layout/html/base/src/nsBlockReflowContext.cpp index 8a92899dfe2..661bd1ea693 100644 --- a/mozilla/layout/html/base/src/nsBlockReflowContext.cpp +++ b/mozilla/layout/html/base/src/nsBlockReflowContext.cpp @@ -38,7 +38,6 @@ * ***** END LICENSE BLOCK ***** */ #include "nsBlockReflowContext.h" #include "nsLineLayout.h" -#include "nsHTMLIIDs.h" #include "nsSpaceManager.h" #include "nsIFontMetrics.h" #include "nsIPresContext.h" diff --git a/mozilla/layout/html/base/src/nsBulletFrame.cpp b/mozilla/layout/html/base/src/nsBulletFrame.cpp index 73b75460007..cc1b98a53be 100644 --- a/mozilla/layout/html/base/src/nsBulletFrame.cpp +++ b/mozilla/layout/html/base/src/nsBulletFrame.cpp @@ -37,7 +37,6 @@ #include "nsCOMPtr.h" #include "nsBulletFrame.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsHTMLParts.h" #include "nsHTMLValue.h" #include "nsHTMLContainerFrame.h" diff --git a/mozilla/layout/html/base/src/nsContainerFrame.cpp b/mozilla/layout/html/base/src/nsContainerFrame.cpp index f29595a303a..b5fc2d5d45a 100644 --- a/mozilla/layout/html/base/src/nsContainerFrame.cpp +++ b/mozilla/layout/html/base/src/nsContainerFrame.cpp @@ -49,7 +49,6 @@ #include "nsVoidArray.h" #include "nsISizeOfHandler.h" #include "nsHTMLReflowCommand.h" -#include "nsHTMLIIDs.h" #include "nsHTMLContainerFrame.h" #include "nsIFrameManager.h" #include "nsIPresShell.h" diff --git a/mozilla/layout/html/base/src/nsFirstLetterFrame.cpp b/mozilla/layout/html/base/src/nsFirstLetterFrame.cpp index d96be6b0b31..b7dea53b466 100644 --- a/mozilla/layout/html/base/src/nsFirstLetterFrame.cpp +++ b/mozilla/layout/html/base/src/nsFirstLetterFrame.cpp @@ -41,7 +41,6 @@ #include "nsIContent.h" #include "nsLineLayout.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsLayoutAtoms.h" #define nsFirstLetterFrameSuper nsHTMLContainerFrame diff --git a/mozilla/layout/html/base/src/nsFrame.cpp b/mozilla/layout/html/base/src/nsFrame.cpp index ea74e3985a9..1dd41f26a63 100644 --- a/mozilla/layout/html/base/src/nsFrame.cpp +++ b/mozilla/layout/html/base/src/nsFrame.cpp @@ -68,7 +68,6 @@ #include "nsIDOMHTMLAreaElement.h" #include "nsIDOMHTMLImageElement.h" #include "nsIDeviceContext.h" -#include "nsHTMLIIDs.h" #include "nsIEventStateManager.h" #include "nsISelection.h" #include "nsISelectionPrivate.h" diff --git a/mozilla/layout/html/base/src/nsGfxScrollFrame.cpp b/mozilla/layout/html/base/src/nsGfxScrollFrame.cpp index e86dd544231..11810b3dad6 100644 --- a/mozilla/layout/html/base/src/nsGfxScrollFrame.cpp +++ b/mozilla/layout/html/base/src/nsGfxScrollFrame.cpp @@ -45,7 +45,6 @@ #include "nsIView.h" #include "nsIViewManager.h" #include "nsHTMLContainerFrame.h" -#include "nsHTMLIIDs.h" #include "nsCSSRendering.h" #include "nsIScrollableView.h" #include "nsWidgetsCID.h" diff --git a/mozilla/layout/html/base/src/nsHRFrame.cpp b/mozilla/layout/html/base/src/nsHRFrame.cpp index 98e64e15e88..a0cb40a6859 100644 --- a/mozilla/layout/html/base/src/nsHRFrame.cpp +++ b/mozilla/layout/html/base/src/nsHRFrame.cpp @@ -43,7 +43,6 @@ #include "nsColor.h" #include "nsIPresContext.h" #include "nsIStyleContext.h" -#include "nsHTMLIIDs.h" #include "nsHTMLAtoms.h" #include "nsIFontMetrics.h" #include "nsStyleConsts.h" diff --git a/mozilla/layout/html/base/src/nsHTMLContainerFrame.cpp b/mozilla/layout/html/base/src/nsHTMLContainerFrame.cpp index 73a55d663cf..a8d9274a16b 100644 --- a/mozilla/layout/html/base/src/nsHTMLContainerFrame.cpp +++ b/mozilla/layout/html/base/src/nsHTMLContainerFrame.cpp @@ -55,7 +55,6 @@ #include "nsIView.h" #include "nsIViewManager.h" #include "nsViewsCID.h" -#include "nsHTMLIIDs.h" #include "nsIDOMEvent.h" #include "nsIScrollableView.h" #include "nsWidgetsCID.h" diff --git a/mozilla/layout/html/base/src/nsHTMLFrame.cpp b/mozilla/layout/html/base/src/nsHTMLFrame.cpp index 3b3bfbf46ff..b66181a93ad 100644 --- a/mozilla/layout/html/base/src/nsHTMLFrame.cpp +++ b/mozilla/layout/html/base/src/nsHTMLFrame.cpp @@ -46,7 +46,6 @@ #include "nsIView.h" #include "nsIViewManager.h" #include "nsIWidget.h" -#include "nsHTMLIIDs.h" #include "nsPageFrame.h" #include "nsIRenderingContext.h" #include "nsGUIEvent.h" diff --git a/mozilla/layout/html/base/src/nsHTMLIIDs.cpp b/mozilla/layout/html/base/src/nsHTMLIIDs.cpp deleted file mode 100644 index a1aee878893..00000000000 --- a/mozilla/layout/html/base/src/nsHTMLIIDs.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: NPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Netscape 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/NPL/ - * - * 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 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 NPL, 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 NPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ -#include "nsHTMLIIDs.h" -#include "nsIHTMLContent.h" -#include "nsIPageSequenceFrame.h" -#include "nsITextContent.h" - -const nsIID kIHTMLContentIID = NS_IHTMLCONTENT_IID; -const nsIID kIPageSequenceFrameIID = NS_IPAGESEQUENCEFRAME_IID; -const nsIID kITextContentIID = NS_ITEXT_CONTENT_IID; diff --git a/mozilla/layout/html/base/src/nsHTMLIIDs.h b/mozilla/layout/html/base/src/nsHTMLIIDs.h deleted file mode 100644 index 7e376b3dc7a..00000000000 --- a/mozilla/layout/html/base/src/nsHTMLIIDs.h +++ /dev/null @@ -1,50 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: NPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Netscape 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/NPL/ - * - * 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 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 NPL, 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 NPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ -#ifndef nsHTMLIIDs_h___ -#define nsHTMLIIDs_h___ - -#include "nsISupports.h" - -// Alphabetically ordered list of externally defined IID's -extern const nsIID kIAreaFrameIID; -extern const nsIID kIHTMLContentIID; -extern const nsIID kIHTMLReflowIID; -extern const nsIID kIPageSequenceFrameIID; -extern const nsIID kIStyledContentIID; -extern const nsIID kITextContentIID; - -#endif /* nsHTMLIIDs_h___ */ diff --git a/mozilla/layout/html/base/src/nsHTMLReflowCommand.cpp b/mozilla/layout/html/base/src/nsHTMLReflowCommand.cpp index 80701750150..6ff371245c5 100644 --- a/mozilla/layout/html/base/src/nsHTMLReflowCommand.cpp +++ b/mozilla/layout/html/base/src/nsHTMLReflowCommand.cpp @@ -43,7 +43,6 @@ #include "nsIContent.h" #include "nsIStyleContext.h" #include "nsStyleConsts.h" -#include "nsHTMLIIDs.h" #include "nsFrame.h" #include "nsContainerFrame.h" #include "nsLayoutAtoms.h" diff --git a/mozilla/layout/html/base/src/nsImageFrame.cpp b/mozilla/layout/html/base/src/nsImageFrame.cpp index 732bb51dc88..dc3286e3001 100644 --- a/mozilla/layout/html/base/src/nsImageFrame.cpp +++ b/mozilla/layout/html/base/src/nsImageFrame.cpp @@ -41,7 +41,6 @@ #include "nsIPresContext.h" #include "nsIRenderingContext.h" #include "nsIPresShell.h" -#include "nsHTMLIIDs.h" #include "nsIImage.h" #include "nsIWidget.h" #include "nsHTMLAtoms.h" diff --git a/mozilla/layout/html/base/src/nsImageMap.cpp b/mozilla/layout/html/base/src/nsImageMap.cpp index 070b49dfd10..34348f36b9c 100644 --- a/mozilla/layout/html/base/src/nsImageMap.cpp +++ b/mozilla/layout/html/base/src/nsImageMap.cpp @@ -56,7 +56,6 @@ #include "nsINameSpaceManager.h" #include "nsHTMLAtoms.h" #include "nsIHTMLContent.h" -#include "nsHTMLIIDs.h" #include "nsIDOMEventReceiver.h" #include "nsIPresShell.h" #include "nsIFrame.h" @@ -964,45 +963,51 @@ nsImageMap::IsInside(nscoord aX, nscoord aY, if (area->IsInside(aX, aY)) { if (area->GetHasURL()) { // Set the image loader's source URL and base URL - nsIURI* baseUri = nsnull; + nsCOMPtr baseUri; + if (mMap) { - nsIHTMLContent* htmlContent; - if (NS_SUCCEEDED( mMap->QueryInterface(kIHTMLContentIID, (void**)&htmlContent) )) { - htmlContent->GetBaseURL(baseUri); - NS_RELEASE(htmlContent); + nsCOMPtr htmlContent(do_QueryInterface(mMap)); + if (htmlContent) { + htmlContent->GetBaseURL(*getter_AddRefs(baseUri)); } else { - nsIDocument* doc; - if (NS_SUCCEEDED( mMap->GetDocument(doc) ) && doc) { - doc->GetBaseURL(baseUri); // Could just use mDocument here... - NS_RELEASE(doc); + nsCOMPtr doc; + mMap->GetDocument(*getter_AddRefs(doc)); + + if (doc) { + // Could just use mDocument here... + doc->GetBaseURL(*getter_AddRefs(baseUri)); } } } - if (!baseUri) return PR_FALSE; - + + if (!baseUri) { + return PR_FALSE; + } + nsAutoString href; area->GetHREF(href); NS_MakeAbsoluteURI(aAbsURL, href, baseUri); - - NS_RELEASE(baseUri); } area->GetTarget(aTarget); if (mMap && (aTarget.Length() == 0)) { - nsIHTMLContent* content = nsnull; - nsresult result = mMap->QueryInterface(kIHTMLContentIID, (void**)&content); - if ((NS_OK == result) && content) { + nsCOMPtr content(do_QueryInterface(mMap)); + + if (content) { content->GetBaseTarget(aTarget); - NS_RELEASE(content); } } + area->GetAltText(aAltText); *aSuppress = area->mSuppressFeedback; + area->GetArea(aContent); + return PR_TRUE; } } + return PR_FALSE; } diff --git a/mozilla/layout/html/base/src/nsInlineFrame.cpp b/mozilla/layout/html/base/src/nsInlineFrame.cpp index 5ce33aeb5a2..a41efb2773a 100644 --- a/mozilla/layout/html/base/src/nsInlineFrame.cpp +++ b/mozilla/layout/html/base/src/nsInlineFrame.cpp @@ -36,7 +36,6 @@ * ***** END LICENSE BLOCK ***** */ #include "nsCOMPtr.h" #include "nsInlineFrame.h" -#include "nsHTMLIIDs.h" #include "nsHTMLAtoms.h" #include "nsHTMLParts.h" #include "nsIStyleContext.h" diff --git a/mozilla/layout/html/base/src/nsLineLayout.cpp b/mozilla/layout/html/base/src/nsLineLayout.cpp index 803d646f4d0..3581555989b 100644 --- a/mozilla/layout/html/base/src/nsLineLayout.cpp +++ b/mozilla/layout/html/base/src/nsLineLayout.cpp @@ -44,7 +44,6 @@ #include "nsInlineFrame.h" #include "nsStyleConsts.h" #include "nsHTMLContainerFrame.h" -#include "nsHTMLIIDs.h" #include "nsSpaceManager.h" #include "nsIStyleContext.h" #include "nsIPresContext.h" diff --git a/mozilla/layout/html/base/src/nsPageContentFrame.cpp b/mozilla/layout/html/base/src/nsPageContentFrame.cpp index 0abb4c14249..63befac9f39 100644 --- a/mozilla/layout/html/base/src/nsPageContentFrame.cpp +++ b/mozilla/layout/html/base/src/nsPageContentFrame.cpp @@ -41,7 +41,6 @@ #include "nsIStyleContext.h" #include "nsIRenderingContext.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsLayoutAtoms.h" #include "nsIStyleSet.h" #include "nsIPresShell.h" diff --git a/mozilla/layout/html/base/src/nsPageFrame.cpp b/mozilla/layout/html/base/src/nsPageFrame.cpp index 3974c6be3b8..f91e16b65ae 100644 --- a/mozilla/layout/html/base/src/nsPageFrame.cpp +++ b/mozilla/layout/html/base/src/nsPageFrame.cpp @@ -41,7 +41,6 @@ #include "nsIStyleContext.h" #include "nsIRenderingContext.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsLayoutAtoms.h" #include "nsIStyleSet.h" #include "nsIPresShell.h" diff --git a/mozilla/layout/html/base/src/nsPlaceholderFrame.cpp b/mozilla/layout/html/base/src/nsPlaceholderFrame.cpp index 9568687c85d..12c7f5658fc 100644 --- a/mozilla/layout/html/base/src/nsPlaceholderFrame.cpp +++ b/mozilla/layout/html/base/src/nsPlaceholderFrame.cpp @@ -36,7 +36,6 @@ * ***** END LICENSE BLOCK ***** */ #include "nsPlaceholderFrame.h" #include "nsLineLayout.h" -#include "nsHTMLIIDs.h" #include "nsIContent.h" #include "nsIPresContext.h" #include "nsIRenderingContext.h" diff --git a/mozilla/layout/html/base/src/nsPresShell.cpp b/mozilla/layout/html/base/src/nsPresShell.cpp index f51917be999..1f41cee5618 100644 --- a/mozilla/layout/html/base/src/nsPresShell.cpp +++ b/mozilla/layout/html/base/src/nsPresShell.cpp @@ -60,7 +60,6 @@ #include "nsIPref.h" #include "nsIViewObserver.h" #include "nsContainerFrame.h" -#include "nsHTMLIIDs.h" #include "nsIDeviceContext.h" #include "nsIEventStateManager.h" #include "nsIDOMEvent.h" diff --git a/mozilla/layout/html/base/src/nsScrollFrame.cpp b/mozilla/layout/html/base/src/nsScrollFrame.cpp index 83524abece3..a71a027f5ae 100644 --- a/mozilla/layout/html/base/src/nsScrollFrame.cpp +++ b/mozilla/layout/html/base/src/nsScrollFrame.cpp @@ -45,7 +45,6 @@ #include "nsIView.h" #include "nsIViewManager.h" #include "nsHTMLContainerFrame.h" -#include "nsHTMLIIDs.h" #include "nsCSSRendering.h" #include "nsIScrollableView.h" #include "nsWidgetsCID.h" diff --git a/mozilla/layout/html/base/src/nsSimplePageSequence.cpp b/mozilla/layout/html/base/src/nsSimplePageSequence.cpp index 93a2e84cca6..d56c7c7bc2a 100644 --- a/mozilla/layout/html/base/src/nsSimplePageSequence.cpp +++ b/mozilla/layout/html/base/src/nsSimplePageSequence.cpp @@ -41,7 +41,6 @@ #include "nsIRenderingContext.h" #include "nsIStyleContext.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsIDeviceContext.h" #include "nsIViewManager.h" #include "nsIPresShell.h" @@ -203,7 +202,7 @@ nsSimplePageSequenceFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr if (NULL == aInstancePtr) { return NS_ERROR_NULL_POINTER; } - if (aIID.Equals(kIPageSequenceFrameIID)) { + if (aIID.Equals(NS_GET_IID(nsIPageSequenceFrame))) { *aInstancePtr = (void*)(nsIPageSequenceFrame*)this; return NS_OK; } diff --git a/mozilla/layout/html/base/src/nsSpacerFrame.cpp b/mozilla/layout/html/base/src/nsSpacerFrame.cpp index fe0f7d9b4d3..473f90b19fc 100644 --- a/mozilla/layout/html/base/src/nsSpacerFrame.cpp +++ b/mozilla/layout/html/base/src/nsSpacerFrame.cpp @@ -38,7 +38,6 @@ #include "nsIHTMLContent.h" #include "nsFrame.h" #include "nsLineLayout.h" -#include "nsHTMLIIDs.h" #include "nsIPresContext.h" #include "nsHTMLAtoms.h" #include "nsUnitConversion.h" diff --git a/mozilla/layout/html/base/src/nsTextFrame.cpp b/mozilla/layout/html/base/src/nsTextFrame.cpp index a1265fdc953..aceb8e874f1 100644 --- a/mozilla/layout/html/base/src/nsTextFrame.cpp +++ b/mozilla/layout/html/base/src/nsTextFrame.cpp @@ -52,7 +52,6 @@ #include "nsCoord.h" #include "nsIFontMetrics.h" #include "nsIRenderingContext.h" -#include "nsHTMLIIDs.h" #include "nsIPresShell.h" #include "nsIView.h" #include "nsIViewManager.h" @@ -5589,79 +5588,74 @@ nsTextFrame::ComputeTotalWordDimensions(nsIPresContext* aPresContext, PRUnichar *newWordBuf = aWordBuf; PRUint32 newWordBufSize = aWordBufSize; while (nsnull != aNextFrame) { - nsIContent* content = nsnull; - if ((NS_OK == aNextFrame->GetContent(&content)) && (nsnull != content)) { -#ifdef DEBUG_WORD_WRAPPING - printf(" next textRun="); - nsFrame::ListTag(stdout, aNextFrame); - printf("\n"); -#endif - nsITextContent* tc; - if (NS_OK == content->QueryInterface(kITextContentIID, (void**)&tc)) { - PRBool stop = PR_FALSE; - nsTextDimensions moreDimensions; - moreDimensions = ComputeWordFragmentDimensions(aPresContext, - aLineBreaker, - aLineLayout, - aReflowState, - aNextFrame, content, tc, - &stop, - newWordBuf, - aWordLen, - newWordBufSize, - aIsBreakable); - if (moreDimensions.width < 0) { - PRUint32 moreSize = -moreDimensions.width; - //Oh, wordBuf is too small, we have to grow it - newWordBufSize += moreSize; - if (newWordBuf != aWordBuf) { - newWordBuf = (PRUnichar*)nsMemory::Realloc(newWordBuf, sizeof(PRUnichar)*newWordBufSize); - NS_ASSERTION(newWordBuf, "not enough memory"); - } else { - newWordBuf = (PRUnichar*)nsMemory::Alloc(sizeof(PRUnichar)*newWordBufSize); - NS_ASSERTION(newWordBuf, "not enough memory"); - if(newWordBuf) { - memcpy((void*)newWordBuf, aWordBuf, sizeof(PRUnichar)*(newWordBufSize-moreSize)); - } - } + nsCOMPtr content; + aNextFrame->GetContent(getter_AddRefs(content)); +#ifdef DEBUG_WORD_WRAPPING + printf(" next textRun="); + nsFrame::ListTag(stdout, aNextFrame); + printf("\n"); +#endif + + nsCOMPtr tc(do_QueryInterface(content)); + if (tc) { + PRBool stop = PR_FALSE; + nsTextDimensions moreDimensions; + moreDimensions = ComputeWordFragmentDimensions(aPresContext, + aLineBreaker, + aLineLayout, + aReflowState, + aNextFrame, content, tc, + &stop, + newWordBuf, + aWordLen, + newWordBufSize, + aIsBreakable); + if (moreDimensions.width < 0) { + PRUint32 moreSize = -moreDimensions.width; + //Oh, wordBuf is too small, we have to grow it + newWordBufSize += moreSize; + if (newWordBuf != aWordBuf) { + newWordBuf = (PRUnichar*)nsMemory::Realloc(newWordBuf, sizeof(PRUnichar)*newWordBufSize); + NS_ASSERTION(newWordBuf, "not enough memory"); + } else { + newWordBuf = (PRUnichar*)nsMemory::Alloc(sizeof(PRUnichar)*newWordBufSize); + NS_ASSERTION(newWordBuf, "not enough memory"); if(newWordBuf) { - moreDimensions = ComputeWordFragmentDimensions(aPresContext, - aLineBreaker, - aLineLayout, - aReflowState, - aNextFrame, content, tc, - &stop, - newWordBuf, - aWordLen, - newWordBufSize, - aIsBreakable); - NS_ASSERTION((moreDimensions.width >= 0), "ComputeWordFragmentWidth is returning negative"); - } else { - stop = PR_TRUE; - moreDimensions.Clear(); - } + memcpy((void*)newWordBuf, aWordBuf, sizeof(PRUnichar)*(newWordBufSize-moreSize)); + } } - NS_RELEASE(tc); - NS_RELEASE(content); - addedDimensions.Combine(moreDimensions); -#ifdef DEBUG_WORD_WRAPPING - printf(" moreWidth=%d (addedWidth=%d) stop=%c\n", moreDimensions.width, - addedDimensions.width, stop?'T':'F'); -#endif - if (stop) { - goto done; - } + if(newWordBuf) { + moreDimensions = + ComputeWordFragmentDimensions(aPresContext, aLineBreaker, + aLineLayout, aReflowState, + aNextFrame, content, tc, &stop, + newWordBuf, aWordLen, newWordBufSize, + aIsBreakable); + NS_ASSERTION((moreDimensions.width >= 0), + "ComputeWordFragmentWidth is returning negative"); + } else { + stop = PR_TRUE; + moreDimensions.Clear(); + } } - else { - // It claimed it was text but it doesn't implement the - // nsITextContent API. Therefore I don't know what to do with it - // and can't look inside it. Oh well. - NS_RELEASE(content); + + addedDimensions.Combine(moreDimensions); +#ifdef DEBUG_WORD_WRAPPING + printf(" moreWidth=%d (addedWidth=%d) stop=%c\n", moreDimensions.width, + addedDimensions.width, stop?'T':'F'); +#endif + if (stop) { goto done; } } + else { + // It claimed it was text but it doesn't implement the + // nsITextContent API. Therefore I don't know what to do with it + // and can't look inside it. Oh well. + goto done; + } // Move on to the next frame in the text-run aNextFrame = aLineLayout.FindNextText(aPresContext, aNextFrame); @@ -5805,12 +5799,11 @@ nsTextFrame::ToCString(nsString& aBuf, PRInt32* aTotalContentLength) const const nsTextFragment* frag; // Get the frames text content - nsITextContent* tc; - if (NS_OK != mContent->QueryInterface(kITextContentIID, (void**) &tc)) { + nsCOMPtr tc(do_QueryInterface(mContent)); + if (!tc) { return; } tc->GetText(&frag); - NS_RELEASE(tc); // Compute the total length of the text content. *aTotalContentLength = frag->GetLength(); diff --git a/mozilla/layout/html/base/src/nsTextTransformer.cpp b/mozilla/layout/html/base/src/nsTextTransformer.cpp index 09412d876e3..2aa97fa52d1 100644 --- a/mozilla/layout/html/base/src/nsTextTransformer.cpp +++ b/mozilla/layout/html/base/src/nsTextTransformer.cpp @@ -44,7 +44,6 @@ #include "nsStyleConsts.h" #include "nsILineBreaker.h" #include "nsIWordBreaker.h" -#include "nsHTMLIIDs.h" #include "nsIServiceManager.h" #include "nsUnicharUtilCIID.h" #include "nsICaseConversion.h" diff --git a/mozilla/layout/html/base/src/nsViewportFrame.cpp b/mozilla/layout/html/base/src/nsViewportFrame.cpp index f1fdcf962b1..db706b84291 100644 --- a/mozilla/layout/html/base/src/nsViewportFrame.cpp +++ b/mozilla/layout/html/base/src/nsViewportFrame.cpp @@ -37,7 +37,6 @@ #include "nsCOMPtr.h" #include "nsContainerFrame.h" #include "nsHTMLParts.h" -#include "nsHTMLIIDs.h" #include "nsLayoutAtoms.h" #include "nsIViewManager.h" #include "nsIScrollableFrame.h" diff --git a/mozilla/layout/html/document/src/nsFrameFrame.cpp b/mozilla/layout/html/document/src/nsFrameFrame.cpp index b98493b0921..7714a736760 100644 --- a/mozilla/layout/html/document/src/nsFrameFrame.cpp +++ b/mozilla/layout/html/document/src/nsFrameFrame.cpp @@ -52,7 +52,6 @@ #include "nsIMarkupDocumentViewer.h" #include "nsIPresContext.h" #include "nsIPresShell.h" -#include "nsHTMLIIDs.h" #include "nsIComponentManager.h" #include "nsIStreamListener.h" #include "nsIURL.h" diff --git a/mozilla/layout/html/document/src/nsFrameSetFrame.cpp b/mozilla/layout/html/document/src/nsFrameSetFrame.cpp index 6820963d6ee..04f88aa38ae 100644 --- a/mozilla/layout/html/document/src/nsFrameSetFrame.cpp +++ b/mozilla/layout/html/document/src/nsFrameSetFrame.cpp @@ -1,4 +1,3 @@ - /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * The contents of this file are subject to the Netscape Public @@ -27,7 +26,6 @@ #include "nsHTMLContainerFrame.h" #include "nsIPresContext.h" #include "nsIPresShell.h" -#include "nsHTMLIIDs.h" #include "nsIComponentManager.h" #include "nsIStreamListener.h" #include "nsIURL.h" @@ -408,13 +406,13 @@ nsHTMLFramesetFrame::Init(nsIPresContext* aPresContext, continue; nsCOMPtr tag; child->GetTag(*getter_AddRefs(tag)); - if ((nsHTMLAtoms::frameset == tag) || (nsHTMLAtoms::frame == tag)) { + if (tag == nsHTMLAtoms::frameset || tag == nsHTMLAtoms::frame) { nsCOMPtr kidSC; - nsresult result; + nsresult result; aPresContext->ResolveStyleContextFor(child, mStyleContext, getter_AddRefs(kidSC)); - if (nsHTMLAtoms::frameset == tag) { + if (tag == nsHTMLAtoms::frameset) { result = NS_NewHTMLFramesetFrame(shell, &frame); mChildTypes[mChildCount] = FRAMESET; @@ -645,9 +643,9 @@ PRInt32 nsHTMLFramesetFrame::GetBorderWidth(nsIPresContext* aPresContext, float p2t; aPresContext->GetScaledPixelsToTwips(&p2t); nsHTMLValue htmlVal; - nsIHTMLContent* content = nsnull; - mContent->QueryInterface(kIHTMLContentIID, (void**)&content); - if (nsnull != content) { + nsCOMPtr content(do_QueryInterface(mContent)); + + if (content) { if (NS_CONTENT_ATTR_HAS_VALUE == (content->GetHTMLAttribute(nsHTMLAtoms::border, htmlVal))) { nsHTMLUnit unit = htmlVal.GetUnit(); PRInt32 intVal = 0; @@ -659,13 +657,12 @@ PRInt32 nsHTMLFramesetFrame::GetBorderWidth(nsIPresContext* aPresContext, if (intVal < 0) { intVal = 0; } - NS_RELEASE(content); + if (forcing && intVal == 0) { intVal = DEFAULT_BORDER_WIDTH_PX; } return NSIntPixelsToTwips(intVal, p2t); } - NS_RELEASE(content); } if (mParentBorderWidth > 0 || @@ -709,26 +706,24 @@ nsHTMLFramesetFrame::GetDesiredSize(nsIPresContext* aPresContext, nsHTMLFramesetFrame* nsHTMLFramesetFrame::GetFramesetParent(nsIFrame* aChild) { nsHTMLFramesetFrame* parent = nsnull; - nsIContent* content = nsnull; - aChild->GetContent(&content); - if (nsnull != content) { - nsIContent* contentParent = nsnull; - content->GetParent(contentParent); - if (nsnull != contentParent) { - nsIHTMLContent* contentParent2 = nsnull; - contentParent->QueryInterface(kIHTMLContentIID, (void**)&contentParent2); - if (nsnull != contentParent2) { - nsIAtom* tag; - contentParent2->GetTag(tag); - if (nsHTMLAtoms::frameset == tag) { - aChild->GetParent((nsIFrame**)&parent); - } - NS_IF_RELEASE(tag); - NS_RELEASE(contentParent2); + nsCOMPtr content; + aChild->GetContent(getter_AddRefs(content)); + + if (content) { + nsCOMPtr contentParent; + content->GetParent(*getter_AddRefs(contentParent)); + + nsCOMPtr contentParent2 = + do_QueryInterface(contentParent); + + if (contentParent2) { + nsCOMPtr tag; + contentParent2->GetTag(*getter_AddRefs(tag)); + + if (tag == nsHTMLAtoms::frameset) { + aChild->GetParent((nsIFrame**)&parent); } - NS_RELEASE(contentParent); } - NS_RELEASE(content); } return parent; @@ -862,9 +857,10 @@ void nsHTMLFramesetFrame::ParseRowCol(nsIPresContext* aPresContext, nsIAtom* aAt { nsHTMLValue value; nsAutoString rowsCols; - nsIHTMLContent* content = nsnull; - mContent->QueryInterface(kIHTMLContentIID, (void**)&content); - if (nsnull != content) { + + nsCOMPtr content(do_QueryInterface(mContent)); + + if (content) { if (NS_CONTENT_ATTR_HAS_VALUE == content->GetHTMLAttribute(aAttrType, value)) { if (eHTMLUnit_String == value.GetUnit()) { value.GetStringValue(rowsCols); @@ -875,11 +871,9 @@ void nsHTMLFramesetFrame::ParseRowCol(nsIPresContext* aPresContext, nsIAtom* aAt (*aSpecs)[i] = specs[i]; } delete [] specs; - NS_RELEASE(content); return; } } - NS_RELEASE(content); } aNumSpecs = 1; *aSpecs = new nsFramesetSpec[1]; @@ -1054,11 +1048,10 @@ nsFrameborder GetFrameBorderHelper(nsIHTMLContent* aContent) nsFrameborder nsHTMLFramesetFrame::GetFrameBorder() { nsFrameborder result = eFrameborder_Notset; - nsIHTMLContent* content = nsnull; - mContent->QueryInterface(kIHTMLContentIID, (void**) &content); + nsCOMPtr content(do_QueryInterface(mContent)); + if (content) { result = GetFrameBorderHelper(content); - NS_RELEASE(content); } if (eFrameborder_Notset == result) { return mParentFrameborder; @@ -1069,11 +1062,11 @@ nsFrameborder nsHTMLFramesetFrame::GetFrameBorder() nsFrameborder nsHTMLFramesetFrame::GetFrameBorder(nsIContent* aContent) { nsFrameborder result = eFrameborder_Notset; - nsIHTMLContent* content = nsnull; - aContent->QueryInterface(kIHTMLContentIID, (void**) &content); - if (nsnull != content) { + + nsCOMPtr content(do_QueryInterface(mContent)); + + if (content) { result = GetFrameBorderHelper(content); - NS_RELEASE(content); } if (eFrameborder_Notset == result) { return GetFrameBorder(); @@ -1084,9 +1077,10 @@ nsFrameborder nsHTMLFramesetFrame::GetFrameBorder(nsIContent* aContent) nscolor nsHTMLFramesetFrame::GetBorderColor() { nscolor result = NO_COLOR; - nsIHTMLContent* content = nsnull; - mContent->QueryInterface(kIHTMLContentIID, (void**)&content); - if (nsnull != content) { + + nsCOMPtr content(do_QueryInterface(mContent)); + + if (content) { nsHTMLValue value; if (NS_CONTENT_ATTR_HAS_VALUE == (content->GetHTMLAttribute(nsHTMLAtoms::bordercolor, value))) { if ((eHTMLUnit_Color == value.GetUnit()) || @@ -1094,7 +1088,6 @@ nscolor nsHTMLFramesetFrame::GetBorderColor() result = value.GetColorValue(); } } - NS_RELEASE(content); } if (NO_COLOR == result) { return mParentBorderColor; @@ -1105,9 +1098,10 @@ nscolor nsHTMLFramesetFrame::GetBorderColor() nscolor nsHTMLFramesetFrame::GetBorderColor(nsIContent* aContent) { nscolor result = NO_COLOR; - nsIHTMLContent* content = nsnull; - aContent->QueryInterface(kIHTMLContentIID, (void**)&content); - if (nsnull != content) { + + nsCOMPtr content(do_QueryInterface(aContent)); + + if (content) { nsHTMLValue value; if (NS_CONTENT_ATTR_HAS_VALUE == (content->GetHTMLAttribute(nsHTMLAtoms::bordercolor, value))) { if ((eHTMLUnit_Color == value.GetUnit()) || @@ -1115,7 +1109,6 @@ nscolor nsHTMLFramesetFrame::GetBorderColor(nsIContent* aContent) result = value.GetColorValue(); } } - NS_RELEASE(content); } if (NO_COLOR == result) { return GetBorderColor(); @@ -1454,19 +1447,16 @@ PRBool nsHTMLFramesetFrame::GetNoResize(nsIFrame* aChildFrame) { PRBool result = PR_FALSE; - nsIContent* content = nsnull; - aChildFrame->GetContent(&content); - if (nsnull != content) { - nsIHTMLContent* htmlContent = nsnull; - content->QueryInterface(kIHTMLContentIID, (void**)&htmlContent); - if (nsnull != htmlContent) { - nsHTMLValue value; - if (NS_CONTENT_ATTR_HAS_VALUE == htmlContent->GetHTMLAttribute(nsHTMLAtoms::noresize, value)) { - result = PR_TRUE; - } - NS_RELEASE(htmlContent); + nsCOMPtr content; + aChildFrame->GetContent(getter_AddRefs(content)); + + nsCOMPtr htmlContent(do_QueryInterface(content)); + + if (htmlContent) { + nsHTMLValue value; + if (NS_CONTENT_ATTR_HAS_VALUE == htmlContent->GetHTMLAttribute(nsHTMLAtoms::noresize, value)) { + result = PR_TRUE; } - NS_RELEASE(content); } return result; } @@ -1507,9 +1497,9 @@ nsHTMLFramesetFrame::RecalculateBorderResize() if (child) { nsCOMPtr tag; child->GetTag(*getter_AddRefs(tag)); - if (nsHTMLAtoms::frameset == tag) { + if (tag == nsHTMLAtoms::frameset) { childTypes[frameOrFramesetChildIndex++] = FRAMESET; - } else if (nsHTMLAtoms::frame == tag) { + } else if (tag == nsHTMLAtoms::frame) { childTypes[frameOrFramesetChildIndex++] = FRAME; } // Don't overflow childTypes array diff --git a/mozilla/layout/html/forms/src/nsComboboxControlFrame.cpp b/mozilla/layout/html/forms/src/nsComboboxControlFrame.cpp index baf7d67eac7..ff506fab997 100644 --- a/mozilla/layout/html/forms/src/nsComboboxControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsComboboxControlFrame.cpp @@ -43,7 +43,6 @@ #include "nsFormFrame.h" #include "nsFormControlFrame.h" #include "nsIHTMLContent.h" -#include "nsHTMLIIDs.h" #include "nsHTMLAtoms.h" #include "nsHTMLParts.h" #include "nsIFormControl.h" @@ -1748,18 +1747,16 @@ NS_IMETHODIMP nsComboboxControlFrame::GetName(nsAString* aResult) { nsresult result = NS_FORM_NOTOK; - if (mContent) { - nsIHTMLContent* formControl = nsnull; - result = mContent->QueryInterface(kIHTMLContentIID, (void**)&formControl); - if ((NS_OK == result) && formControl) { - nsHTMLValue value; - result = formControl->GetHTMLAttribute(nsHTMLAtoms::name, value); - if (NS_CONTENT_ATTR_HAS_VALUE == result) { - if (eHTMLUnit_String == value.GetUnit()) { - value.GetStringValue(*aResult); - } + + nsCOMPtr formControl(do_QueryInterface(mContent)); + + if (formControl) { + nsHTMLValue value; + result = formControl->GetHTMLAttribute(nsHTMLAtoms::name, value); + if (NS_CONTENT_ATTR_HAS_VALUE == result) { + if (eHTMLUnit_String == value.GetUnit()) { + value.GetStringValue(*aResult); } - NS_RELEASE(formControl); } } return result; diff --git a/mozilla/layout/html/forms/src/nsFieldSetFrame.cpp b/mozilla/layout/html/forms/src/nsFieldSetFrame.cpp index a53fa37a181..8f1762723b7 100644 --- a/mozilla/layout/html/forms/src/nsFieldSetFrame.cpp +++ b/mozilla/layout/html/forms/src/nsFieldSetFrame.cpp @@ -51,7 +51,6 @@ #include "nsIAtom.h" #include "nsIPresContext.h" #include "nsIHTMLContent.h" -#include "nsHTMLIIDs.h" #include "nsHTMLParts.h" #include "nsHTMLAtoms.h" #include "nsIStyleContext.h" diff --git a/mozilla/layout/html/forms/src/nsFileControlFrame.cpp b/mozilla/layout/html/forms/src/nsFileControlFrame.cpp index ebcbfd17078..6abf831c1e9 100644 --- a/mozilla/layout/html/forms/src/nsFileControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsFileControlFrame.cpp @@ -45,7 +45,6 @@ #include "nsIAtom.h" #include "nsIPresContext.h" #include "nsIHTMLContent.h" -#include "nsHTMLIIDs.h" #include "nsHTMLAtoms.h" #include "nsIPresState.h" #include "nsWidgetsCID.h" @@ -508,18 +507,16 @@ NS_IMETHODIMP nsFileControlFrame::GetName(nsAString* aResult) { nsresult result = NS_FORM_NOTOK; - if (mContent) { - nsIHTMLContent* formControl = nsnull; - result = mContent->QueryInterface(kIHTMLContentIID, (void**)&formControl); - if ((NS_OK == result) && formControl) { - nsHTMLValue value; - result = formControl->GetHTMLAttribute(nsHTMLAtoms::name, value); - if (NS_CONTENT_ATTR_HAS_VALUE == result) { - if (eHTMLUnit_String == value.GetUnit()) { - value.GetStringValue(*aResult); - } + + nsCOMPtr formControl(do_QueryInterface(mContent)); + + if (formControl) { + nsHTMLValue value; + result = formControl->GetHTMLAttribute(nsHTMLAtoms::name, value); + if (NS_CONTENT_ATTR_HAS_VALUE == result) { + if (eHTMLUnit_String == value.GetUnit()) { + value.GetStringValue(*aResult); } - NS_RELEASE(formControl); } } return result; diff --git a/mozilla/layout/html/forms/src/nsFormControlFrame.cpp b/mozilla/layout/html/forms/src/nsFormControlFrame.cpp index 9c7546f2e2a..f24c84bc704 100644 --- a/mozilla/layout/html/forms/src/nsFormControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsFormControlFrame.cpp @@ -44,7 +44,6 @@ #include "nsIStyleContext.h" #include "nsLeafFrame.h" #include "nsCSSRendering.h" -#include "nsHTMLIIDs.h" #include "nsIView.h" #include "nsIViewManager.h" #include "nsCoord.h" @@ -687,15 +686,15 @@ nsFormControlFrame::GetMaxLength(PRInt32* aSize) { *aSize = -1; nsresult result = NS_CONTENT_ATTR_NOT_THERE; - nsIHTMLContent* content = nsnull; - mContent->QueryInterface(kIHTMLContentIID, (void**) &content); - if (nsnull != content) { + + nsCOMPtr content(do_QueryInterface(mContent)); + + if (content) { nsHTMLValue value; result = content->GetHTMLAttribute(nsHTMLAtoms::maxlength, value); if (eHTMLUnit_Integer == value.GetUnit()) { *aSize = value.GetIntValue(); } - NS_RELEASE(content); } return result; } @@ -705,15 +704,15 @@ nsFormControlFrame::GetSizeFromContent(PRInt32* aSize) const { *aSize = -1; nsresult result = NS_CONTENT_ATTR_NOT_THERE; - nsIHTMLContent* content = nsnull; - mContent->QueryInterface(kIHTMLContentIID, (void**) &content); - if (nsnull != content) { + + nsCOMPtr content(do_QueryInterface(mContent)); + + if (content) { nsHTMLValue value; result = content->GetHTMLAttribute(nsHTMLAtoms::size, value); if (eHTMLUnit_Integer == value.GetUnit()) { *aSize = value.GetIntValue(); } - NS_RELEASE(content); } return result; } @@ -737,18 +736,16 @@ NS_IMETHODIMP nsFormControlFrame::GetName(nsAString* aResult) { nsresult result = NS_FORM_NOTOK; - if (mContent) { - nsIHTMLContent* formControl = nsnull; - result = mContent->QueryInterface(kIHTMLContentIID, (void**)&formControl); - if ((NS_OK == result) && formControl) { - nsHTMLValue value; - result = formControl->GetHTMLAttribute(nsHTMLAtoms::name, value); - if (NS_CONTENT_ATTR_HAS_VALUE == result) { - if (eHTMLUnit_String == value.GetUnit()) { - value.GetStringValue(*aResult); - } + + nsCOMPtr formControl(do_QueryInterface(mContent)); + + if (formControl) { + nsHTMLValue value; + result = formControl->GetHTMLAttribute(nsHTMLAtoms::name, value); + if (NS_CONTENT_ATTR_HAS_VALUE == result) { + if (eHTMLUnit_String == value.GetUnit()) { + value.GetStringValue(*aResult); } - NS_RELEASE(formControl); } } return result; @@ -759,18 +756,16 @@ NS_IMETHODIMP nsFormControlFrame::GetValue(nsAString* aResult) { nsresult result = NS_FORM_NOTOK; - if (mContent) { - nsIHTMLContent* formControl = nsnull; - result = mContent->QueryInterface(kIHTMLContentIID, (void**)&formControl); - if ((NS_OK == result) && formControl) { - nsHTMLValue value; - result = formControl->GetHTMLAttribute(nsHTMLAtoms::value, value); - if (NS_CONTENT_ATTR_HAS_VALUE == result) { - if (eHTMLUnit_String == value.GetUnit()) { - value.GetStringValue(*aResult); - } + + nsCOMPtr formControl(do_QueryInterface(mContent)); + + if (formControl) { + nsHTMLValue value; + result = formControl->GetHTMLAttribute(nsHTMLAtoms::value, value); + if (NS_CONTENT_ATTR_HAS_VALUE == result) { + if (eHTMLUnit_String == value.GetUnit()) { + value.GetStringValue(*aResult); } - NS_RELEASE(formControl); } } return result; diff --git a/mozilla/layout/html/forms/src/nsFormControlHelper.cpp b/mozilla/layout/html/forms/src/nsFormControlHelper.cpp index 597664212bd..6a6a6ce8e45 100644 --- a/mozilla/layout/html/forms/src/nsFormControlHelper.cpp +++ b/mozilla/layout/html/forms/src/nsFormControlHelper.cpp @@ -44,7 +44,6 @@ #include "nsIStyleContext.h" #include "nsLeafFrame.h" #include "nsCSSRendering.h" -#include "nsHTMLIIDs.h" #include "nsIView.h" #include "nsIViewManager.h" #include "nsCoord.h" @@ -174,15 +173,14 @@ nsFormControlHelper::GetWrapProperty(nsIContent * aContent, nsString &aOutValue) { aOutValue.SetLength(0); nsresult result = NS_CONTENT_ATTR_NOT_THERE; - nsIHTMLContent* content = nsnull; - aContent->QueryInterface(kIHTMLContentIID, (void**) &content); - if (nsnull != content) { + nsCOMPtr content(do_QueryInterface(aContent)); + + if (content) { nsHTMLValue value; result = content->GetHTMLAttribute(nsHTMLAtoms::wrap, value); if (eHTMLUnit_String == value.GetUnit()) { value.GetStringValue(aOutValue); } - NS_RELEASE(content); } return result; } @@ -404,17 +402,15 @@ nsFormControlHelper::CalculateSize (nsIPresContext* aPresContext, aDesiredSize.width = CSS_NOTSET; aDesiredSize.height = CSS_NOTSET; - nsIContent* iContent = nsnull; - aFrame->GetFormContent((nsIContent*&) iContent); - if (!iContent) { - return 0; - } - nsIHTMLContent* hContent = nsnull; - nsresult result = iContent->QueryInterface(kIHTMLContentIID, (void**)&hContent); - if ((NS_OK != result) || !hContent) { - NS_RELEASE(iContent); + nsCOMPtr iContent; + aFrame->GetFormContent(*getter_AddRefs(iContent)); + + nsCOMPtr hContent(do_QueryInterface(iContent)); + + if (!hContent) { return 0; } + nsAutoString valAttr; nsresult valStatus = NS_CONTENT_ATTR_NOT_THERE; if (nsnull != aSpec.mColValueAttr) { @@ -510,13 +506,10 @@ nsFormControlHelper::CalculateSize (nsIPresContext* aPresContext, } } - NS_RELEASE(hContent); if (ATTR_NOTSET == numRows) { numRows = (aRowHeight > 0) ? (aDesiredSize.height / aRowHeight) : 0; } - NS_RELEASE(iContent); - return numRows; } @@ -704,10 +697,10 @@ nsresult nsFormControlHelper::GetName(nsIContent* aContent, nsAString* aResult) { nsresult result = NS_FORM_NOTOK; - if (nsnull != aContent) { - nsIHTMLContent* formControl = nsnull; - result = aContent->QueryInterface(kIHTMLContentIID, (void**)&formControl); - if ((NS_OK == result) && formControl) { + if (aContent) { + nsCOMPtr formControl(do_QueryInterface(aContent)); + + if (formControl) { nsHTMLValue value; result = formControl->GetHTMLAttribute(nsHTMLAtoms::name, value); if (NS_CONTENT_ATTR_HAS_VALUE == result) { @@ -715,7 +708,6 @@ nsFormControlHelper::GetName(nsIContent* aContent, nsAString* aResult) value.GetStringValue(*aResult); } } - NS_RELEASE(formControl); } } return result; @@ -726,18 +718,16 @@ nsresult nsFormControlHelper::GetValue(nsIContent* aContent, nsAString* aResult) { nsresult result = NS_FORM_NOTOK; - if (nsnull != aContent) { - nsIHTMLContent* formControl = nsnull; - result = aContent->QueryInterface(kIHTMLContentIID, (void**)&formControl); - if ((NS_OK == result) && formControl) { - nsHTMLValue value; - result = formControl->GetHTMLAttribute(nsHTMLAtoms::value, value); - if (NS_CONTENT_ATTR_HAS_VALUE == result) { - if (eHTMLUnit_String == value.GetUnit()) { - value.GetStringValue(*aResult); - } + + nsCOMPtr formControl(do_QueryInterface(aContent)); + + if (formControl) { + nsHTMLValue value; + result = formControl->GetHTMLAttribute(nsHTMLAtoms::value, value); + if (NS_CONTENT_ATTR_HAS_VALUE == result) { + if (eHTMLUnit_String == value.GetUnit()) { + value.GetStringValue(*aResult); } - NS_RELEASE(formControl); } } return result; diff --git a/mozilla/layout/html/forms/src/nsFormFrame.cpp b/mozilla/layout/html/forms/src/nsFormFrame.cpp index a87fc32fa30..5afad9ba682 100644 --- a/mozilla/layout/html/forms/src/nsFormFrame.cpp +++ b/mozilla/layout/html/forms/src/nsFormFrame.cpp @@ -58,13 +58,11 @@ #include "nsIForm.h" #include "nsIFormControl.h" #include "nsIAtom.h" -#include "nsHTMLIIDs.h" #include "nsIRenderingContext.h" #include "nsIPresShell.h" #include "nsIPresContext.h" #include "nsIStyleContext.h" #include "nsCSSRendering.h" -#include "nsHTMLIIDs.h" #include "nsDebug.h" #include "nsIWidget.h" #include "nsVoidArray.h" @@ -260,22 +258,18 @@ nsFormFrame::GetDisabled(nsIFrame* aChildFrame, nsIContent* aContent) { PRBool result = PR_FALSE; - nsIContent* content = aContent; - if (nsnull == content) { - aChildFrame->GetContent(&content); + nsCOMPtr content = aContent; + + if (!content) { + aChildFrame->GetContent(getter_AddRefs(content)); } - if (nsnull != content) { - nsIHTMLContent* htmlContent = nsnull; - content->QueryInterface(kIHTMLContentIID, (void**)&htmlContent); - if (nsnull != htmlContent) { - nsHTMLValue value; - if (NS_CONTENT_ATTR_HAS_VALUE == htmlContent->GetHTMLAttribute(nsHTMLAtoms::disabled, value)) { - result = PR_TRUE; - } - NS_RELEASE(htmlContent); - } - if (nsnull == aContent) { - NS_RELEASE(content); + + nsCOMPtr htmlContent(do_QueryInterface(content)); + + if (htmlContent) { + nsHTMLValue value; + if (NS_CONTENT_ATTR_HAS_VALUE == htmlContent->GetHTMLAttribute(nsHTMLAtoms::disabled, value)) { + result = PR_TRUE; } } return result; @@ -286,22 +280,18 @@ nsFormFrame::GetReadonly(nsIFrame* aChildFrame, nsIContent* aContent) { PRBool result = PR_FALSE; - nsIContent* content = aContent; - if (nsnull == content) { - aChildFrame->GetContent(&content); + nsCOMPtr content = aContent; + + if (!content) { + aChildFrame->GetContent(getter_AddRefs(content)); } - if (nsnull != content) { - nsIHTMLContent* htmlContent = nsnull; - content->QueryInterface(kIHTMLContentIID, (void**)&htmlContent); - if (nsnull != htmlContent) { - nsHTMLValue value; - if (NS_CONTENT_ATTR_HAS_VALUE == htmlContent->GetHTMLAttribute(nsHTMLAtoms::readonly, value)) { - result = PR_TRUE; - } - NS_RELEASE(htmlContent); - } - if (nsnull == aContent) { - NS_RELEASE(content); + + nsCOMPtr htmlContent(do_QueryInterface(content)); + + if (htmlContent) { + nsHTMLValue value; + if (NS_CONTENT_ATTR_HAS_VALUE == htmlContent->GetHTMLAttribute(nsHTMLAtoms::readonly, value)) { + result = PR_TRUE; } } return result; @@ -314,25 +304,21 @@ nsFormFrame::GetName(nsIFrame* aChildFrame, { nsresult result = NS_FORM_NOTOK; - nsIContent* content = aContent; - if (nsnull == content) { - aChildFrame->GetContent(&content); + nsCOMPtr content = aContent; + + if (!content) { + aChildFrame->GetContent(getter_AddRefs(content)); } - if (nsnull != content) { - nsIHTMLContent* htmlContent = nsnull; - result = content->QueryInterface(kIHTMLContentIID, (void**)&htmlContent); - if (NS_SUCCEEDED(result) && (nsnull != htmlContent)) { - nsHTMLValue value; - result = htmlContent->GetHTMLAttribute(nsHTMLAtoms::name, value); - if (NS_CONTENT_ATTR_HAS_VALUE == result) { - if (eHTMLUnit_String == value.GetUnit()) { - value.GetStringValue(aName); - } + + nsCOMPtr htmlContent(do_QueryInterface(content)); + + if (htmlContent) { + nsHTMLValue value; + result = htmlContent->GetHTMLAttribute(nsHTMLAtoms::name, value); + if (NS_CONTENT_ATTR_HAS_VALUE == result) { + if (eHTMLUnit_String == value.GetUnit()) { + value.GetStringValue(aName); } - NS_RELEASE(htmlContent); - } - if (nsnull == aContent) { - NS_RELEASE(content); } } return result; @@ -345,25 +331,21 @@ nsFormFrame::GetValue(nsIFrame* aChildFrame, { nsresult result = NS_FORM_NOTOK; - nsIContent* content = aContent; - if (nsnull == content) { - aChildFrame->GetContent(&content); + nsCOMPtr content = aContent; + + if (!content) { + aChildFrame->GetContent(getter_AddRefs(content)); } - if (nsnull != content) { - nsIHTMLContent* htmlContent = nsnull; - result = content->QueryInterface(kIHTMLContentIID, (void**)&htmlContent); - if (NS_SUCCEEDED(result) && (nsnull != htmlContent)) { - nsHTMLValue value; - result = htmlContent->GetHTMLAttribute(nsHTMLAtoms::value, value); - if (NS_CONTENT_ATTR_HAS_VALUE == result) { - if (eHTMLUnit_String == value.GetUnit()) { - value.GetStringValue(aValue); - } + + nsCOMPtr htmlContent(do_QueryInterface(content)); + + if (htmlContent) { + nsHTMLValue value; + result = htmlContent->GetHTMLAttribute(nsHTMLAtoms::value, value); + if (NS_CONTENT_ATTR_HAS_VALUE == result) { + if (eHTMLUnit_String == value.GetUnit()) { + value.GetStringValue(aValue); } - NS_RELEASE(htmlContent); - } - if (nsnull == aContent) { - NS_RELEASE(content); } } return result; diff --git a/mozilla/layout/html/forms/src/nsGfxTextControlFrame2.cpp b/mozilla/layout/html/forms/src/nsGfxTextControlFrame2.cpp index f0fa2111ff3..38cb5ecd7fb 100644 --- a/mozilla/layout/html/forms/src/nsGfxTextControlFrame2.cpp +++ b/mozilla/layout/html/forms/src/nsGfxTextControlFrame2.cpp @@ -77,7 +77,6 @@ #include "nsIPrintContext.h" #include "nsIPrintPreviewContext.h" #endif // USE_QI_IN_SUPPRESS_EVENT_HANDLERS -#include "nsHTMLIIDs.h" #include "nsHTMLAtoms.h" #include "nsIComponentManager.h" #include "nsIView.h" @@ -1560,31 +1559,25 @@ nsGfxTextControlFrame2::GetColRowSizeAttr(nsIFormControlFrame* aFrame, nsHTMLValue & aRowSize, nsresult & aRowStatus) { - nsIContent* iContent = nsnull; - aFrame->GetFormContent((nsIContent*&) iContent); - if (!iContent) { - return NS_ERROR_FAILURE; - } - nsIHTMLContent* hContent = nsnull; - nsresult result = iContent->QueryInterface(kIHTMLContentIID, (void**)&hContent); - if ((NS_OK != result) || !hContent) { - NS_RELEASE(iContent); + nsCOMPtr iContent; + aFrame->GetFormContent(*getter_AddRefs(iContent)); + + nsCOMPtr hContent(do_QueryInterface(iContent)); + + if (!hContent) { return NS_ERROR_FAILURE; } aColStatus = NS_CONTENT_ATTR_NOT_THERE; - if (nsnull != aColSizeAttr) { + if (aColSizeAttr) { aColStatus = hContent->GetHTMLAttribute(aColSizeAttr, aColSize); } aRowStatus= NS_CONTENT_ATTR_NOT_THERE; - if (nsnull != aRowSizeAttr) { + if (aRowSizeAttr) { aRowStatus = hContent->GetHTMLAttribute(aRowSizeAttr, aRowSize); } - NS_RELEASE(hContent); - NS_RELEASE(iContent); - return NS_OK; } @@ -2464,15 +2457,14 @@ nsGfxTextControlFrame2::GetSizeFromContent(PRInt32* aSize) const { *aSize = -1; nsresult result = NS_CONTENT_ATTR_NOT_THERE; - nsIHTMLContent* content = nsnull; - mContent->QueryInterface(kIHTMLContentIID, (void**) &content); - if (nsnull != content) { + nsCOMPtr content(do_QueryInterface(mContent)); + + if (content) { nsHTMLValue value; result = content->GetHTMLAttribute(nsHTMLAtoms::size, value); if (eHTMLUnit_Integer == value.GetUnit()) { *aSize = value.GetIntValue(); } - NS_RELEASE(content); } if (*aSize < 1) { // This is part of bug 46224 @@ -3102,15 +3094,15 @@ nsGfxTextControlFrame2::GetMaxLength(PRInt32* aSize) { *aSize = -1; nsresult rv = NS_CONTENT_ATTR_NOT_THERE; - nsIHTMLContent* content = nsnull; - mContent->QueryInterface(kIHTMLContentIID, (void**) &content); - if (nsnull != content) { + + nsCOMPtr content(do_QueryInterface(mContent)); + + if (content) { nsHTMLValue value; rv = content->GetHTMLAttribute(nsHTMLAtoms::maxlength, value); if (eHTMLUnit_Integer == value.GetUnit()) { *aSize = value.GetIntValue(); } - NS_RELEASE(content); } return rv; } @@ -3119,13 +3111,12 @@ NS_IMETHODIMP nsGfxTextControlFrame2::DoesAttributeExist(nsIAtom *aAtt) { nsresult rv = NS_CONTENT_ATTR_NOT_THERE; - nsIHTMLContent* content = nsnull; - mContent->QueryInterface(kIHTMLContentIID, (void**) &content); - if (nsnull != content) - { + + nsCOMPtr content(do_QueryInterface(mContent)); + + if (content) { nsHTMLValue value; rv = content->GetHTMLAttribute(aAtt, value); - NS_RELEASE(content); } return rv; } diff --git a/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.cpp b/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.cpp index 886b31fc5ed..fc92bf64212 100644 --- a/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.cpp @@ -51,7 +51,6 @@ #include "nsIStyleContext.h" #include "nsLeafFrame.h" #include "nsCSSRendering.h" -#include "nsHTMLIIDs.h" #include "nsISupports.h" #include "nsHTMLAtoms.h" #include "nsIImage.h" @@ -236,18 +235,16 @@ NS_IMETHODIMP nsHTMLButtonControlFrame::GetName(nsAString* aResult) { nsresult result = NS_FORM_NOTOK; - if (mContent) { - nsIHTMLContent* formControl = nsnull; - result = mContent->QueryInterface(kIHTMLContentIID, (void**)&formControl); - if ((NS_OK == result) && formControl) { - nsHTMLValue value; - result = formControl->GetHTMLAttribute(nsHTMLAtoms::name, value); - if (NS_CONTENT_ATTR_HAS_VALUE == result) { - if (eHTMLUnit_String == value.GetUnit()) { - value.GetStringValue(*aResult); - } + + nsCOMPtr formControl(do_QueryInterface(mContent)); + + if (formControl) { + nsHTMLValue value; + result = formControl->GetHTMLAttribute(nsHTMLAtoms::name, value); + if (NS_CONTENT_ATTR_HAS_VALUE == result) { + if (eHTMLUnit_String == value.GetUnit()) { + value.GetStringValue(*aResult); } - NS_RELEASE(formControl); } } return result; @@ -257,18 +254,16 @@ NS_IMETHODIMP nsHTMLButtonControlFrame::GetValue(nsAString* aResult) { nsresult result = NS_FORM_NOTOK; - if (mContent) { - nsIHTMLContent* formControl = nsnull; - result = mContent->QueryInterface(kIHTMLContentIID, (void**)&formControl); - if ((NS_OK == result) && formControl) { - nsHTMLValue value; - result = formControl->GetHTMLAttribute(nsHTMLAtoms::value, value); - if (NS_CONTENT_ATTR_HAS_VALUE == result) { - if (eHTMLUnit_String == value.GetUnit()) { - value.GetStringValue(*aResult); - } + + nsCOMPtr formControl(do_QueryInterface(mContent)); + + if (formControl) { + nsHTMLValue value; + result = formControl->GetHTMLAttribute(nsHTMLAtoms::value, value); + if (NS_CONTENT_ATTR_HAS_VALUE == result) { + if (eHTMLUnit_String == value.GetUnit()) { + value.GetStringValue(*aResult); } - NS_RELEASE(formControl); } } return result; diff --git a/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.h b/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.h index 3390a2ab199..9aa093d4536 100644 --- a/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.h +++ b/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.h @@ -52,7 +52,6 @@ #include "nsIStyleContext.h" #include "nsLeafFrame.h" #include "nsCSSRendering.h" -#include "nsHTMLIIDs.h" #include "nsISupports.h" #include "nsHTMLAtoms.h" #include "nsIImage.h" diff --git a/mozilla/layout/html/forms/src/nsImageControlFrame.cpp b/mozilla/layout/html/forms/src/nsImageControlFrame.cpp index 8a39c08f530..542caa44f1d 100644 --- a/mozilla/layout/html/forms/src/nsImageControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsImageControlFrame.cpp @@ -47,7 +47,6 @@ #include "nsIStyleContext.h" #include "nsLeafFrame.h" #include "nsCSSRendering.h" -#include "nsHTMLIIDs.h" #include "nsIViewManager.h" #include "nsISupports.h" #include "nsHTMLAtoms.h" diff --git a/mozilla/layout/html/forms/src/nsIsIndexFrame.cpp b/mozilla/layout/html/forms/src/nsIsIndexFrame.cpp index 5ec3b30a680..dfd1539f272 100644 --- a/mozilla/layout/html/forms/src/nsIsIndexFrame.cpp +++ b/mozilla/layout/html/forms/src/nsIsIndexFrame.cpp @@ -42,7 +42,6 @@ #include "nsIAtom.h" #include "nsIPresContext.h" #include "nsIHTMLContent.h" -#include "nsHTMLIIDs.h" #include "nsHTMLAtoms.h" #include "nsIPresState.h" #include "nsWidgetsCID.h" diff --git a/mozilla/layout/html/forms/src/nsLegendFrame.cpp b/mozilla/layout/html/forms/src/nsLegendFrame.cpp index 51f8aa1fbd0..759163d30be 100644 --- a/mozilla/layout/html/forms/src/nsLegendFrame.cpp +++ b/mozilla/layout/html/forms/src/nsLegendFrame.cpp @@ -46,7 +46,6 @@ #include "nsISupports.h" #include "nsIAtom.h" #include "nsIHTMLContent.h" -#include "nsHTMLIIDs.h" #include "nsHTMLParts.h" #include "nsHTMLAtoms.h" #include "nsIStyleContext.h" @@ -144,16 +143,16 @@ PRInt32 nsLegendFrame::GetAlign() intValue = NS_STYLE_TEXT_ALIGN_RIGHT; } #endif // IBMBIDI - nsIHTMLContent* content = nsnull; - mContent->QueryInterface(kIHTMLContentIID, (void**) &content); - if (nsnull != content) { + + nsCOMPtr content(do_QueryInterface(mContent)); + + if (content) { nsHTMLValue value; if (NS_CONTENT_ATTR_HAS_VALUE == (content->GetHTMLAttribute(nsHTMLAtoms::align, value))) { if (eHTMLUnit_Enumerated == value.GetUnit()) { intValue = value.GetIntValue(); } } - NS_RELEASE(content); } return intValue; } diff --git a/mozilla/layout/html/forms/src/nsListControlFrame.cpp b/mozilla/layout/html/forms/src/nsListControlFrame.cpp index d3edfeaed46..8a29b951e67 100644 --- a/mozilla/layout/html/forms/src/nsListControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsListControlFrame.cpp @@ -42,7 +42,6 @@ #include "nsListControlFrame.h" #include "nsFormControlFrame.h" // for COMPARE macro #include "nsFormControlHelper.h" -#include "nsHTMLIIDs.h" #include "nsHTMLAtoms.h" #include "nsIHTMLContent.h" #include "nsIFormControl.h" diff --git a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp index 7464b35f1e9..48e5d83105a 100644 --- a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp @@ -56,7 +56,6 @@ #include "nsTableColFrame.h" #include "nsIDOMHTMLTableColElement.h" #include "nsTableCellFrame.h" // to get IS_CELL_FRAME -#include "nsHTMLIIDs.h" #include "nsIStyleFrameConstruction.h" #include "nsHTMLParts.h" #include "nsIPresShell.h" diff --git a/mozilla/layout/html/table/src/BasicTableLayoutStrategy.cpp b/mozilla/layout/html/table/src/BasicTableLayoutStrategy.cpp index 8c253cd9c00..f1a908cad5c 100644 --- a/mozilla/layout/html/table/src/BasicTableLayoutStrategy.cpp +++ b/mozilla/layout/html/table/src/BasicTableLayoutStrategy.cpp @@ -43,7 +43,6 @@ #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsVoidArray.h" -#include "nsHTMLIIDs.h" #ifdef DEBUG_TABLE_STRATEGY static PRInt32 gsDebugCount = 0; diff --git a/mozilla/layout/html/table/src/FixedTableLayoutStrategy.cpp b/mozilla/layout/html/table/src/FixedTableLayoutStrategy.cpp index 21ae0f44dce..a79ff7291c4 100644 --- a/mozilla/layout/html/table/src/FixedTableLayoutStrategy.cpp +++ b/mozilla/layout/html/table/src/FixedTableLayoutStrategy.cpp @@ -41,7 +41,6 @@ #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsVoidArray.h" -#include "nsHTMLIIDs.h" FixedTableLayoutStrategy::FixedTableLayoutStrategy(nsTableFrame *aFrame) : BasicTableLayoutStrategy(aFrame) diff --git a/mozilla/layout/html/table/src/nsTableCellFrame.cpp b/mozilla/layout/html/table/src/nsTableCellFrame.cpp index 0f3b5a67222..a3a2705bb59 100644 --- a/mozilla/layout/html/table/src/nsTableCellFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableCellFrame.cpp @@ -48,11 +48,9 @@ #include "nsCSSRendering.h" #include "nsIContent.h" #include "nsIHTMLContent.h" -#include "nsHTMLIIDs.h" #include "nsHTMLParts.h" #include "nsHTMLValue.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsVoidArray.h" #include "nsIView.h" #include "nsStyleUtil.h" @@ -713,15 +711,14 @@ nsTableCellFrame::HasVerticalAlignBaseline() PRInt32 nsTableCellFrame::GetRowSpan() { PRInt32 rowSpan=1; - nsIHTMLContent *hc=nsnull; - nsresult rv = mContent->QueryInterface(kIHTMLContentIID, (void**) &hc); - if (NS_OK==rv) { + nsCOMPtr hc(do_QueryInterface(mContent)); + + if (hc) { nsHTMLValue val; hc->GetHTMLAttribute(nsHTMLAtoms::rowspan, val); if (eHTMLUnit_Integer == val.GetUnit()) { rowSpan=val.GetIntValue(); } - NS_RELEASE(hc); } return rowSpan; } @@ -729,15 +726,14 @@ PRInt32 nsTableCellFrame::GetRowSpan() PRInt32 nsTableCellFrame::GetColSpan() { PRInt32 colSpan=1; - nsIHTMLContent *hc=nsnull; - nsresult rv = mContent->QueryInterface(kIHTMLContentIID, (void**) &hc); - if (NS_OK==rv) { + nsCOMPtr hc(do_QueryInterface(mContent)); + + if (hc) { nsHTMLValue val; hc->GetHTMLAttribute(nsHTMLAtoms::colspan, val); if (eHTMLUnit_Integer == val.GetUnit()) { colSpan=val.GetIntValue(); } - NS_RELEASE(hc); } return colSpan; } diff --git a/mozilla/layout/html/table/src/nsTableColFrame.cpp b/mozilla/layout/html/table/src/nsTableColFrame.cpp index 577bb2ec779..ba8b5b36bc6 100644 --- a/mozilla/layout/html/table/src/nsTableColFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableColFrame.cpp @@ -40,7 +40,6 @@ #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" -#include "nsHTMLIIDs.h" #include "nsHTMLAtoms.h" #include "nsCSSRendering.h" #include "nsLayoutAtoms.h" diff --git a/mozilla/layout/html/table/src/nsTableColGroupFrame.cpp b/mozilla/layout/html/table/src/nsTableColGroupFrame.cpp index 816b72caf94..9e61106a271 100644 --- a/mozilla/layout/html/table/src/nsTableColGroupFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableColGroupFrame.cpp @@ -46,7 +46,6 @@ #include "nsIHTMLContent.h" #include "nsHTMLParts.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsCOMPtr.h" #include "nsCSSRendering.h" #include "nsIPresShell.h" diff --git a/mozilla/layout/html/table/src/nsTableFrame.cpp b/mozilla/layout/html/table/src/nsTableFrame.cpp index 01e4bb39e9e..df1d01224d9 100644 --- a/mozilla/layout/html/table/src/nsTableFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableFrame.cpp @@ -61,7 +61,6 @@ #include "nsVoidArray.h" #include "nsIView.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsHTMLReflowCommand.h" #include "nsLayoutAtoms.h" #include "nsIDeviceContext.h" diff --git a/mozilla/layout/html/table/src/nsTableOuterFrame.cpp b/mozilla/layout/html/table/src/nsTableOuterFrame.cpp index 3d317f3b2ea..5e3e75caa51 100644 --- a/mozilla/layout/html/table/src/nsTableOuterFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableOuterFrame.cpp @@ -46,7 +46,6 @@ #include "nsIContent.h" #include "nsVoidArray.h" #include "prinrval.h" -#include "nsHTMLIIDs.h" #include "nsLayoutAtoms.h" #include "nsHTMLParts.h" #include "nsIPresShell.h" diff --git a/mozilla/layout/html/table/src/nsTableRowFrame.cpp b/mozilla/layout/html/table/src/nsTableRowFrame.cpp index 1a22c1d069e..c540ff51564 100644 --- a/mozilla/layout/html/table/src/nsTableRowFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableRowFrame.cpp @@ -49,7 +49,6 @@ #include "nsIView.h" #include "nsReflowPath.h" #include "nsCSSRendering.h" -#include "nsHTMLIIDs.h" #include "nsLayoutAtoms.h" #include "nsHTMLParts.h" #include "nsTableColGroupFrame.h" diff --git a/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp b/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp index f0dfeeece0e..6f97020a5bc 100644 --- a/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp @@ -46,7 +46,6 @@ #include "nsIContent.h" #include "nsIView.h" #include "nsReflowPath.h" -#include "nsHTMLIIDs.h" #include "nsIDeviceContext.h" #include "nsHTMLAtoms.h" #include "nsIStyleSet.h" diff --git a/mozilla/layout/macbuild/layout.xml b/mozilla/layout/macbuild/layout.xml index 941925b99a4..e5e6d7a2f22 100644 --- a/mozilla/layout/macbuild/layout.xml +++ b/mozilla/layout/macbuild/layout.xml @@ -983,13 +983,6 @@ Text Debug - - Name - nsHTMLIIDs.cpp - MacOS - Text - Debug - Name nsImageMap.cpp @@ -2181,11 +2174,6 @@ nsHTMLContainerFrame.cpp MacOS - - Name - nsHTMLIIDs.cpp - MacOS - Name nsImageMap.cpp @@ -3918,13 +3906,6 @@ Text Debug - - Name - nsHTMLIIDs.cpp - MacOS - Text - Debug - Name nsImageMap.cpp @@ -5136,11 +5117,6 @@ nsHTMLContainerFrame.cpp MacOS - - Name - nsHTMLIIDs.cpp - MacOS - Name nsImageMap.cpp @@ -6164,12 +6140,6 @@ nsHTMLFrame.cpp MacOS - - layout.shlb - Name - nsHTMLIIDs.cpp - MacOS - layout.shlb Name diff --git a/mozilla/layout/mathml/base/src/nsMathMLChar.cpp b/mozilla/layout/mathml/base/src/nsMathMLChar.cpp index 52a2cc81b6c..d6d48d16ce4 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLChar.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLChar.cpp @@ -25,7 +25,6 @@ #include "nsIHTMLContent.h" #include "nsFrame.h" #include "nsLineLayout.h" -#include "nsHTMLIIDs.h" #include "nsIPresContext.h" #include "nsHTMLAtoms.h" #include "nsUnitConversion.h" diff --git a/mozilla/layout/mathml/base/src/nsMathMLContainerFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLContainerFrame.cpp index 02107b1ed54..26933e58983 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLContainerFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLContainerFrame.cpp @@ -26,7 +26,6 @@ #include "nsIHTMLContent.h" #include "nsFrame.h" #include "nsLineLayout.h" -#include "nsHTMLIIDs.h" #include "nsIPresContext.h" #include "nsIPresShell.h" #include "nsHTMLAtoms.h" diff --git a/mozilla/layout/mathml/base/src/nsMathMLForeignFrameWrapper.cpp b/mozilla/layout/mathml/base/src/nsMathMLForeignFrameWrapper.cpp index 5aa7981bc6b..640a03abf13 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLForeignFrameWrapper.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLForeignFrameWrapper.cpp @@ -30,7 +30,6 @@ #include "nsFrame.h" #include "nsAreaFrame.h" #include "nsLineLayout.h" -#include "nsHTMLIIDs.h" #include "nsIPresContext.h" #include "nsHTMLAtoms.h" #include "nsUnitConversion.h" diff --git a/mozilla/layout/mathml/base/src/nsMathMLmactionFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLmactionFrame.cpp index 53523dc5fa1..6ec26a8baec 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLmactionFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLmactionFrame.cpp @@ -24,7 +24,6 @@ #include "nsIHTMLContent.h" #include "nsFrame.h" #include "nsLineLayout.h" -#include "nsHTMLIIDs.h" #include "nsIPresContext.h" #include "nsHTMLAtoms.h" #include "nsUnitConversion.h" diff --git a/mozilla/layout/mathml/base/src/nsMathMLmfencedFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLmfencedFrame.cpp index 00559f686b0..b993067d145 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLmfencedFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLmfencedFrame.cpp @@ -27,7 +27,6 @@ #include "nsIHTMLContent.h" #include "nsFrame.h" #include "nsLineLayout.h" -#include "nsHTMLIIDs.h" #include "nsIPresContext.h" #include "nsHTMLAtoms.h" #include "nsUnitConversion.h" diff --git a/mozilla/layout/mathml/base/src/nsMathMLmfracFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLmfracFrame.cpp index c5d9414e3d7..65963d5c857 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLmfracFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLmfracFrame.cpp @@ -27,7 +27,6 @@ #include "nsIHTMLContent.h" #include "nsFrame.h" #include "nsLineLayout.h" -#include "nsHTMLIIDs.h" #include "nsIPresContext.h" #include "nsHTMLAtoms.h" #include "nsUnitConversion.h" diff --git a/mozilla/layout/mathml/base/src/nsMathMLmiFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLmiFrame.cpp index 98a57f7371f..5a517be8d46 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLmiFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLmiFrame.cpp @@ -25,7 +25,6 @@ #include "nsIHTMLContent.h" #include "nsFrame.h" #include "nsLineLayout.h" -#include "nsHTMLIIDs.h" #include "nsIPresContext.h" #include "nsHTMLAtoms.h" #include "nsUnitConversion.h" diff --git a/mozilla/layout/mathml/base/src/nsMathMLmmultiscriptsFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLmmultiscriptsFrame.cpp index 16424d0f2f6..21f59f47413 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLmmultiscriptsFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLmmultiscriptsFrame.cpp @@ -27,7 +27,6 @@ #include "nsIHTMLContent.h" #include "nsFrame.h" #include "nsLineLayout.h" -#include "nsHTMLIIDs.h" #include "nsIPresContext.h" #include "nsHTMLAtoms.h" #include "nsUnitConversion.h" diff --git a/mozilla/layout/mathml/base/src/nsMathMLmoFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLmoFrame.cpp index ea202a4f72b..7bd6fab1fd1 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLmoFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLmoFrame.cpp @@ -27,7 +27,6 @@ #include "nsIHTMLContent.h" #include "nsFrame.h" #include "nsLineLayout.h" -#include "nsHTMLIIDs.h" #include "nsIPresContext.h" #include "nsHTMLAtoms.h" #include "nsUnitConversion.h" diff --git a/mozilla/layout/mathml/base/src/nsMathMLmoverFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLmoverFrame.cpp index 0225623e2df..fd3538f5735 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLmoverFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLmoverFrame.cpp @@ -28,7 +28,6 @@ #include "nsIHTMLContent.h" #include "nsFrame.h" #include "nsLineLayout.h" -#include "nsHTMLIIDs.h" #include "nsIPresContext.h" #include "nsHTMLAtoms.h" #include "nsUnitConversion.h" diff --git a/mozilla/layout/mathml/base/src/nsMathMLmpaddedFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLmpaddedFrame.cpp index 9e5adc7a616..27c68699eb9 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLmpaddedFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLmpaddedFrame.cpp @@ -26,7 +26,6 @@ #include "nsIHTMLContent.h" #include "nsFrame.h" #include "nsLineLayout.h" -#include "nsHTMLIIDs.h" #include "nsIPresContext.h" #include "nsHTMLAtoms.h" #include "nsUnitConversion.h" diff --git a/mozilla/layout/mathml/base/src/nsMathMLmphantomFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLmphantomFrame.cpp index e1162de4dc3..35764432833 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLmphantomFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLmphantomFrame.cpp @@ -26,7 +26,6 @@ #include "nsIHTMLContent.h" #include "nsFrame.h" #include "nsLineLayout.h" -#include "nsHTMLIIDs.h" #include "nsIPresContext.h" #include "nsHTMLAtoms.h" #include "nsUnitConversion.h" diff --git a/mozilla/layout/mathml/base/src/nsMathMLmrootFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLmrootFrame.cpp index 4332740cd14..526798bb0e8 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLmrootFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLmrootFrame.cpp @@ -28,7 +28,6 @@ #include "nsIHTMLContent.h" #include "nsFrame.h" #include "nsLineLayout.h" -#include "nsHTMLIIDs.h" #include "nsIPresContext.h" #include "nsHTMLAtoms.h" #include "nsUnitConversion.h" diff --git a/mozilla/layout/mathml/base/src/nsMathMLmrowFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLmrowFrame.cpp index cc898c779fe..bd33e7f647b 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLmrowFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLmrowFrame.cpp @@ -26,7 +26,6 @@ #include "nsIHTMLContent.h" #include "nsFrame.h" #include "nsLineLayout.h" -#include "nsHTMLIIDs.h" #include "nsIPresContext.h" #include "nsHTMLAtoms.h" #include "nsUnitConversion.h" diff --git a/mozilla/layout/mathml/base/src/nsMathMLmsFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLmsFrame.cpp index f3af3437dfa..09d040eb648 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLmsFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLmsFrame.cpp @@ -25,7 +25,6 @@ #include "nsIHTMLContent.h" #include "nsFrame.h" #include "nsLineLayout.h" -#include "nsHTMLIIDs.h" #include "nsIPresContext.h" #include "nsHTMLAtoms.h" #include "nsUnitConversion.h" diff --git a/mozilla/layout/mathml/base/src/nsMathMLmspaceFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLmspaceFrame.cpp index a77c7d49a85..b3ed9ecc1d2 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLmspaceFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLmspaceFrame.cpp @@ -25,7 +25,6 @@ #include "nsIHTMLContent.h" #include "nsFrame.h" #include "nsLineLayout.h" -#include "nsHTMLIIDs.h" #include "nsIPresContext.h" #include "nsHTMLAtoms.h" #include "nsUnitConversion.h" diff --git a/mozilla/layout/mathml/base/src/nsMathMLmsqrtFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLmsqrtFrame.cpp index 8ffb086bc43..7280174b25b 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLmsqrtFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLmsqrtFrame.cpp @@ -28,7 +28,6 @@ #include "nsIHTMLContent.h" #include "nsFrame.h" #include "nsLineLayout.h" -#include "nsHTMLIIDs.h" #include "nsIPresContext.h" #include "nsHTMLAtoms.h" #include "nsUnitConversion.h" diff --git a/mozilla/layout/mathml/base/src/nsMathMLmstyleFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLmstyleFrame.cpp index 4e94f6a09c6..a2391fe38de 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLmstyleFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLmstyleFrame.cpp @@ -26,7 +26,6 @@ #include "nsIHTMLContent.h" #include "nsFrame.h" #include "nsLineLayout.h" -#include "nsHTMLIIDs.h" #include "nsIPresContext.h" #include "nsHTMLAtoms.h" #include "nsUnitConversion.h" diff --git a/mozilla/layout/mathml/base/src/nsMathMLmsubFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLmsubFrame.cpp index f57e0b10b26..61bc4147333 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLmsubFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLmsubFrame.cpp @@ -27,7 +27,6 @@ #include "nsIHTMLContent.h" #include "nsFrame.h" #include "nsLineLayout.h" -#include "nsHTMLIIDs.h" #include "nsIPresContext.h" #include "nsHTMLAtoms.h" #include "nsUnitConversion.h" diff --git a/mozilla/layout/mathml/base/src/nsMathMLmsubsupFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLmsubsupFrame.cpp index 33b1067ef96..bcafe1393a0 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLmsubsupFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLmsubsupFrame.cpp @@ -27,7 +27,6 @@ #include "nsIHTMLContent.h" #include "nsFrame.h" #include "nsLineLayout.h" -#include "nsHTMLIIDs.h" #include "nsIPresContext.h" #include "nsHTMLAtoms.h" #include "nsUnitConversion.h" diff --git a/mozilla/layout/mathml/base/src/nsMathMLmsupFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLmsupFrame.cpp index 2673c1ffe84..ddbcb77e333 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLmsupFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLmsupFrame.cpp @@ -26,7 +26,6 @@ #include "nsIHTMLContent.h" #include "nsFrame.h" #include "nsLineLayout.h" -#include "nsHTMLIIDs.h" #include "nsIPresContext.h" #include "nsHTMLAtoms.h" #include "nsUnitConversion.h" diff --git a/mozilla/layout/mathml/base/src/nsMathMLmtableFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLmtableFrame.cpp index f3e79e5692f..ea716fdf3f6 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLmtableFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLmtableFrame.cpp @@ -25,7 +25,6 @@ #include "nsFrame.h" #include "nsAreaFrame.h" #include "nsLineLayout.h" -#include "nsHTMLIIDs.h" #include "nsIPresContext.h" #include "nsHTMLAtoms.h" #include "nsUnitConversion.h" diff --git a/mozilla/layout/mathml/base/src/nsMathMLmtextFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLmtextFrame.cpp index 7ec5645004a..b2f02e89f6b 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLmtextFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLmtextFrame.cpp @@ -24,7 +24,6 @@ #include "nsIHTMLContent.h" #include "nsFrame.h" #include "nsLineLayout.h" -#include "nsHTMLIIDs.h" #include "nsIPresContext.h" #include "nsHTMLAtoms.h" #include "nsUnitConversion.h" diff --git a/mozilla/layout/mathml/base/src/nsMathMLmunderFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLmunderFrame.cpp index 527c07d78f9..38468822abc 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLmunderFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLmunderFrame.cpp @@ -28,7 +28,6 @@ #include "nsIHTMLContent.h" #include "nsFrame.h" #include "nsLineLayout.h" -#include "nsHTMLIIDs.h" #include "nsIPresContext.h" #include "nsHTMLAtoms.h" #include "nsUnitConversion.h" diff --git a/mozilla/layout/mathml/base/src/nsMathMLmunderoverFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLmunderoverFrame.cpp index e0655c74b18..6a5f035d5ae 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLmunderoverFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLmunderoverFrame.cpp @@ -28,7 +28,6 @@ #include "nsIHTMLContent.h" #include "nsFrame.h" #include "nsLineLayout.h" -#include "nsHTMLIIDs.h" #include "nsIPresContext.h" #include "nsHTMLAtoms.h" #include "nsUnitConversion.h" diff --git a/mozilla/layout/style/nsCSSStyleSheet.cpp b/mozilla/layout/style/nsCSSStyleSheet.cpp index ea5a284f9fb..d7d098def7b 100644 --- a/mozilla/layout/style/nsCSSStyleSheet.cpp +++ b/mozilla/layout/style/nsCSSStyleSheet.cpp @@ -71,7 +71,6 @@ #include "nsUnicharUtils.h" #include "nsVoidArray.h" #include "nsIUnicharInputStream.h" -#include "nsHTMLIIDs.h" #include "nsIDOMHTMLAnchorElement.h" #include "nsIDOMHTMLLinkElement.h" #include "nsIDOMHTMLAreaElement.h" diff --git a/mozilla/layout/style/nsHTMLCSSStyleSheet.cpp b/mozilla/layout/style/nsHTMLCSSStyleSheet.cpp index c2af8ba3e39..79f4fd1d5c3 100644 --- a/mozilla/layout/style/nsHTMLCSSStyleSheet.cpp +++ b/mozilla/layout/style/nsHTMLCSSStyleSheet.cpp @@ -47,7 +47,6 @@ #include "nsIHTMLContent.h" #include "nsIStyleRule.h" #include "nsIFrame.h" -#include "nsHTMLIIDs.h" #include "nsICSSStyleRule.h" #include "nsIStyleRuleProcessor.h" #include "nsIStyleContext.h" diff --git a/mozilla/layout/style/nsHTMLStyleSheet.cpp b/mozilla/layout/style/nsHTMLStyleSheet.cpp index 864f0b9bb9f..63dc49afbb3 100644 --- a/mozilla/layout/style/nsHTMLStyleSheet.cpp +++ b/mozilla/layout/style/nsHTMLStyleSheet.cpp @@ -48,7 +48,6 @@ #include "nsIPresContext.h" #include "nsIEventStateManager.h" #include "nsIDocument.h" -#include "nsHTMLIIDs.h" #include "nsICSSFrameConstructor.h" #include "nsIStyleFrameConstruction.h" #include "nsHTMLParts.h" diff --git a/mozilla/layout/tables/BasicTableLayoutStrategy.cpp b/mozilla/layout/tables/BasicTableLayoutStrategy.cpp index 8c253cd9c00..f1a908cad5c 100644 --- a/mozilla/layout/tables/BasicTableLayoutStrategy.cpp +++ b/mozilla/layout/tables/BasicTableLayoutStrategy.cpp @@ -43,7 +43,6 @@ #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsVoidArray.h" -#include "nsHTMLIIDs.h" #ifdef DEBUG_TABLE_STRATEGY static PRInt32 gsDebugCount = 0; diff --git a/mozilla/layout/tables/FixedTableLayoutStrategy.cpp b/mozilla/layout/tables/FixedTableLayoutStrategy.cpp index 21ae0f44dce..a79ff7291c4 100644 --- a/mozilla/layout/tables/FixedTableLayoutStrategy.cpp +++ b/mozilla/layout/tables/FixedTableLayoutStrategy.cpp @@ -41,7 +41,6 @@ #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsVoidArray.h" -#include "nsHTMLIIDs.h" FixedTableLayoutStrategy::FixedTableLayoutStrategy(nsTableFrame *aFrame) : BasicTableLayoutStrategy(aFrame) diff --git a/mozilla/layout/tables/nsTableCellFrame.cpp b/mozilla/layout/tables/nsTableCellFrame.cpp index 0f3b5a67222..a3a2705bb59 100644 --- a/mozilla/layout/tables/nsTableCellFrame.cpp +++ b/mozilla/layout/tables/nsTableCellFrame.cpp @@ -48,11 +48,9 @@ #include "nsCSSRendering.h" #include "nsIContent.h" #include "nsIHTMLContent.h" -#include "nsHTMLIIDs.h" #include "nsHTMLParts.h" #include "nsHTMLValue.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsVoidArray.h" #include "nsIView.h" #include "nsStyleUtil.h" @@ -713,15 +711,14 @@ nsTableCellFrame::HasVerticalAlignBaseline() PRInt32 nsTableCellFrame::GetRowSpan() { PRInt32 rowSpan=1; - nsIHTMLContent *hc=nsnull; - nsresult rv = mContent->QueryInterface(kIHTMLContentIID, (void**) &hc); - if (NS_OK==rv) { + nsCOMPtr hc(do_QueryInterface(mContent)); + + if (hc) { nsHTMLValue val; hc->GetHTMLAttribute(nsHTMLAtoms::rowspan, val); if (eHTMLUnit_Integer == val.GetUnit()) { rowSpan=val.GetIntValue(); } - NS_RELEASE(hc); } return rowSpan; } @@ -729,15 +726,14 @@ PRInt32 nsTableCellFrame::GetRowSpan() PRInt32 nsTableCellFrame::GetColSpan() { PRInt32 colSpan=1; - nsIHTMLContent *hc=nsnull; - nsresult rv = mContent->QueryInterface(kIHTMLContentIID, (void**) &hc); - if (NS_OK==rv) { + nsCOMPtr hc(do_QueryInterface(mContent)); + + if (hc) { nsHTMLValue val; hc->GetHTMLAttribute(nsHTMLAtoms::colspan, val); if (eHTMLUnit_Integer == val.GetUnit()) { colSpan=val.GetIntValue(); } - NS_RELEASE(hc); } return colSpan; } diff --git a/mozilla/layout/tables/nsTableColFrame.cpp b/mozilla/layout/tables/nsTableColFrame.cpp index 577bb2ec779..ba8b5b36bc6 100644 --- a/mozilla/layout/tables/nsTableColFrame.cpp +++ b/mozilla/layout/tables/nsTableColFrame.cpp @@ -40,7 +40,6 @@ #include "nsIStyleContext.h" #include "nsStyleConsts.h" #include "nsIPresContext.h" -#include "nsHTMLIIDs.h" #include "nsHTMLAtoms.h" #include "nsCSSRendering.h" #include "nsLayoutAtoms.h" diff --git a/mozilla/layout/tables/nsTableColGroupFrame.cpp b/mozilla/layout/tables/nsTableColGroupFrame.cpp index 816b72caf94..9e61106a271 100644 --- a/mozilla/layout/tables/nsTableColGroupFrame.cpp +++ b/mozilla/layout/tables/nsTableColGroupFrame.cpp @@ -46,7 +46,6 @@ #include "nsIHTMLContent.h" #include "nsHTMLParts.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsCOMPtr.h" #include "nsCSSRendering.h" #include "nsIPresShell.h" diff --git a/mozilla/layout/tables/nsTableFrame.cpp b/mozilla/layout/tables/nsTableFrame.cpp index 01e4bb39e9e..df1d01224d9 100644 --- a/mozilla/layout/tables/nsTableFrame.cpp +++ b/mozilla/layout/tables/nsTableFrame.cpp @@ -61,7 +61,6 @@ #include "nsVoidArray.h" #include "nsIView.h" #include "nsHTMLAtoms.h" -#include "nsHTMLIIDs.h" #include "nsHTMLReflowCommand.h" #include "nsLayoutAtoms.h" #include "nsIDeviceContext.h" diff --git a/mozilla/layout/tables/nsTableOuterFrame.cpp b/mozilla/layout/tables/nsTableOuterFrame.cpp index 3d317f3b2ea..5e3e75caa51 100644 --- a/mozilla/layout/tables/nsTableOuterFrame.cpp +++ b/mozilla/layout/tables/nsTableOuterFrame.cpp @@ -46,7 +46,6 @@ #include "nsIContent.h" #include "nsVoidArray.h" #include "prinrval.h" -#include "nsHTMLIIDs.h" #include "nsLayoutAtoms.h" #include "nsHTMLParts.h" #include "nsIPresShell.h" diff --git a/mozilla/layout/tables/nsTableRowFrame.cpp b/mozilla/layout/tables/nsTableRowFrame.cpp index 1a22c1d069e..c540ff51564 100644 --- a/mozilla/layout/tables/nsTableRowFrame.cpp +++ b/mozilla/layout/tables/nsTableRowFrame.cpp @@ -49,7 +49,6 @@ #include "nsIView.h" #include "nsReflowPath.h" #include "nsCSSRendering.h" -#include "nsHTMLIIDs.h" #include "nsLayoutAtoms.h" #include "nsHTMLParts.h" #include "nsTableColGroupFrame.h" diff --git a/mozilla/layout/tables/nsTableRowGroupFrame.cpp b/mozilla/layout/tables/nsTableRowGroupFrame.cpp index f0dfeeece0e..6f97020a5bc 100644 --- a/mozilla/layout/tables/nsTableRowGroupFrame.cpp +++ b/mozilla/layout/tables/nsTableRowGroupFrame.cpp @@ -46,7 +46,6 @@ #include "nsIContent.h" #include "nsIView.h" #include "nsReflowPath.h" -#include "nsHTMLIIDs.h" #include "nsIDeviceContext.h" #include "nsHTMLAtoms.h" #include "nsIStyleSet.h" diff --git a/mozilla/layout/xul/base/src/nsBoxFrame.cpp b/mozilla/layout/xul/base/src/nsBoxFrame.cpp index 938f9327d5d..338c1081000 100644 --- a/mozilla/layout/xul/base/src/nsBoxFrame.cpp +++ b/mozilla/layout/xul/base/src/nsBoxFrame.cpp @@ -68,7 +68,6 @@ #include "nsIStyleContext.h" #include "nsIPresContext.h" #include "nsCOMPtr.h" -#include "nsHTMLIIDs.h" #include "nsUnitConversion.h" #include "nsINameSpaceManager.h" #include "nsHTMLAtoms.h" diff --git a/mozilla/layout/xul/base/src/nsBoxToBlockAdaptor.cpp b/mozilla/layout/xul/base/src/nsBoxToBlockAdaptor.cpp index 0a8d08ed0f9..d8681a093e5 100644 --- a/mozilla/layout/xul/base/src/nsBoxToBlockAdaptor.cpp +++ b/mozilla/layout/xul/base/src/nsBoxToBlockAdaptor.cpp @@ -47,7 +47,6 @@ #include "nsIStyleContext.h" #include "nsIPresContext.h" #include "nsCOMPtr.h" -#include "nsHTMLIIDs.h" #include "nsUnitConversion.h" #include "nsINameSpaceManager.h" #include "nsHTMLAtoms.h" diff --git a/mozilla/layout/xul/base/src/nsContainerBox.cpp b/mozilla/layout/xul/base/src/nsContainerBox.cpp index 9247d87e10b..86da0c2aa79 100644 --- a/mozilla/layout/xul/base/src/nsContainerBox.cpp +++ b/mozilla/layout/xul/base/src/nsContainerBox.cpp @@ -61,7 +61,6 @@ #include "nsIStyleContext.h" #include "nsIPresContext.h" #include "nsCOMPtr.h" -#include "nsHTMLIIDs.h" #include "nsUnitConversion.h" #include "nsINameSpaceManager.h" #include "nsHTMLAtoms.h" diff --git a/mozilla/layout/xul/base/src/nsDeckFrame.cpp b/mozilla/layout/xul/base/src/nsDeckFrame.cpp index 1d267a82403..c0a0f7c279b 100644 --- a/mozilla/layout/xul/base/src/nsDeckFrame.cpp +++ b/mozilla/layout/xul/base/src/nsDeckFrame.cpp @@ -47,7 +47,6 @@ #include "nsIPresContext.h" #include "nsIContent.h" #include "nsCOMPtr.h" -#include "nsHTMLIIDs.h" #include "nsUnitConversion.h" #include "nsINameSpaceManager.h" #include "nsXULAtoms.h" diff --git a/mozilla/layout/xul/base/src/nsDocElementBoxFrame.cpp b/mozilla/layout/xul/base/src/nsDocElementBoxFrame.cpp index 95df794246a..32c55a7aa17 100644 --- a/mozilla/layout/xul/base/src/nsDocElementBoxFrame.cpp +++ b/mozilla/layout/xul/base/src/nsDocElementBoxFrame.cpp @@ -44,7 +44,6 @@ #include "nsIView.h" #include "nsIViewManager.h" #include "nsIWidget.h" -#include "nsHTMLIIDs.h" #include "nsPageFrame.h" #include "nsIRenderingContext.h" #include "nsGUIEvent.h" diff --git a/mozilla/layout/xul/base/src/nsGrippyFrame.cpp b/mozilla/layout/xul/base/src/nsGrippyFrame.cpp index c6e3de6f61e..917408cf149 100644 --- a/mozilla/layout/xul/base/src/nsGrippyFrame.cpp +++ b/mozilla/layout/xul/base/src/nsGrippyFrame.cpp @@ -48,7 +48,6 @@ #include "nsIPresContext.h" #include "nsIContent.h" #include "nsCOMPtr.h" -#include "nsHTMLIIDs.h" #include "nsUnitConversion.h" #include "nsINameSpaceManager.h" #include "nsHTMLAtoms.h" diff --git a/mozilla/layout/xul/base/src/nsImageBoxFrame.cpp b/mozilla/layout/xul/base/src/nsImageBoxFrame.cpp index b624e327ddf..b3106223daf 100644 --- a/mozilla/layout/xul/base/src/nsImageBoxFrame.cpp +++ b/mozilla/layout/xul/base/src/nsImageBoxFrame.cpp @@ -60,7 +60,6 @@ #include "nsIPresContext.h" #include "nsIRenderingContext.h" #include "nsIPresShell.h" -#include "nsHTMLIIDs.h" #include "nsIImage.h" #include "nsIWidget.h" #include "nsHTMLAtoms.h" diff --git a/mozilla/layout/xul/base/src/nsRootBoxFrame.cpp b/mozilla/layout/xul/base/src/nsRootBoxFrame.cpp index 277f2f41aea..d497b962f08 100644 --- a/mozilla/layout/xul/base/src/nsRootBoxFrame.cpp +++ b/mozilla/layout/xul/base/src/nsRootBoxFrame.cpp @@ -44,7 +44,6 @@ #include "nsIView.h" #include "nsIViewManager.h" #include "nsIWidget.h" -#include "nsHTMLIIDs.h" #include "nsPageFrame.h" #include "nsIRenderingContext.h" #include "nsGUIEvent.h" diff --git a/mozilla/layout/xul/base/src/nsScrollBoxFrame.cpp b/mozilla/layout/xul/base/src/nsScrollBoxFrame.cpp index d90d5b316ce..3d5e94a4abb 100644 --- a/mozilla/layout/xul/base/src/nsScrollBoxFrame.cpp +++ b/mozilla/layout/xul/base/src/nsScrollBoxFrame.cpp @@ -47,7 +47,6 @@ #include "nsIView.h" #include "nsIViewManager.h" #include "nsHTMLContainerFrame.h" -#include "nsHTMLIIDs.h" #include "nsCSSRendering.h" #include "nsIScrollableView.h" #include "nsWidgetsCID.h" diff --git a/mozilla/layout/xul/base/src/nsScrollbarButtonFrame.cpp b/mozilla/layout/xul/base/src/nsScrollbarButtonFrame.cpp index 5662cc289ad..28c99282547 100644 --- a/mozilla/layout/xul/base/src/nsScrollbarButtonFrame.cpp +++ b/mozilla/layout/xul/base/src/nsScrollbarButtonFrame.cpp @@ -47,7 +47,6 @@ #include "nsIPresContext.h" #include "nsIContent.h" #include "nsCOMPtr.h" -#include "nsHTMLIIDs.h" #include "nsUnitConversion.h" #include "nsINameSpaceManager.h" #include "nsHTMLAtoms.h" diff --git a/mozilla/layout/xul/base/src/nsSliderFrame.cpp b/mozilla/layout/xul/base/src/nsSliderFrame.cpp index b481995c43c..8aa921e7ce9 100644 --- a/mozilla/layout/xul/base/src/nsSliderFrame.cpp +++ b/mozilla/layout/xul/base/src/nsSliderFrame.cpp @@ -48,7 +48,6 @@ #include "nsIPresContext.h" #include "nsIContent.h" #include "nsCOMPtr.h" -#include "nsHTMLIIDs.h" #include "nsUnitConversion.h" #include "nsINameSpaceManager.h" #include "nsXULAtoms.h" diff --git a/mozilla/layout/xul/base/src/nsStackFrame.cpp b/mozilla/layout/xul/base/src/nsStackFrame.cpp index eeee7b21b26..4fb8218e588 100644 --- a/mozilla/layout/xul/base/src/nsStackFrame.cpp +++ b/mozilla/layout/xul/base/src/nsStackFrame.cpp @@ -47,7 +47,6 @@ #include "nsIPresContext.h" #include "nsIContent.h" #include "nsCOMPtr.h" -#include "nsHTMLIIDs.h" #include "nsUnitConversion.h" #include "nsINameSpaceManager.h" #include "nsXULAtoms.h"