Bug 531030 - Remove support for the spacer element; r=bzbarsky a=blocking-betaN
authorMs2ger <ms2ger@gmail.com>
Fri, 20 Aug 2010 08:05:05 +0200
changeset 51016 45716b17fb827b01cc6f8451e8265041164d6838
parent 51015 b8be965a16f8e4fca4900d2c45d60d997d6b1984
child 51017 9fd65dc00474a270200c9ad5118b274b6db095b1
push id15208
push userdgottwald@mozilla.com
push dateFri, 20 Aug 2010 06:06:35 +0000
treeherdermozilla-central@45716b17fb82 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbzbarsky, blocking-betaN
bugs531030
milestone2.0b5pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 531030 - Remove support for the spacer element; r=bzbarsky a=blocking-betaN
content/html/content/src/nsHTMLSharedElement.cpp
content/html/content/test/test_bug389797.html
dom/base/nsDOMClassInfo.cpp
dom/base/nsDOMClassInfoClasses.h
editor/libeditor/html/nsHTMLEditUtils.cpp
layout/base/nsCSSFrameConstructor.cpp
layout/generic/Makefile.in
layout/generic/nsHTMLParts.h
layout/generic/nsQueryFrame.h
layout/generic/nsSpacerFrame.cpp
parser/htmlparser/public/nsHTMLTagList.h
parser/htmlparser/src/nsElementTable.cpp
--- a/content/html/content/src/nsHTMLSharedElement.cpp
+++ b/content/html/content/src/nsHTMLSharedElement.cpp
@@ -154,17 +154,16 @@ nsHTMLSharedElement::~nsHTMLSharedElemen
 
 NS_IMPL_ADDREF_INHERITED(nsHTMLSharedElement, nsGenericElement)
 NS_IMPL_RELEASE_INHERITED(nsHTMLSharedElement, nsGenericElement)
 
 
 DOMCI_DATA(HTMLParamElement, nsHTMLSharedElement)
 DOMCI_DATA(HTMLIsIndexElement, nsHTMLSharedElement)
 DOMCI_DATA(HTMLBaseElement, nsHTMLSharedElement)
-DOMCI_DATA(HTMLSpacerElement, nsHTMLSharedElement)
 DOMCI_DATA(HTMLDirectoryElement, nsHTMLSharedElement)
 DOMCI_DATA(HTMLMenuElement, nsHTMLSharedElement)
 DOMCI_DATA(HTMLQuoteElement, nsHTMLSharedElement)
 DOMCI_DATA(HTMLHeadElement, nsHTMLSharedElement)
 DOMCI_DATA(HTMLHtmlElement, nsHTMLSharedElement)
 
 nsIClassInfo*
 nsHTMLSharedElement::GetClassInfoInternal()
@@ -173,19 +172,16 @@ nsHTMLSharedElement::GetClassInfoInterna
     return NS_GetDOMClassInfoInstance(eDOMClassInfo_HTMLParamElement_id);
   }
   if (mNodeInfo->Equals(nsGkAtoms::isindex)) {
     return NS_GetDOMClassInfoInstance(eDOMClassInfo_HTMLIsIndexElement_id);
   }
   if (mNodeInfo->Equals(nsGkAtoms::base)) {
     return NS_GetDOMClassInfoInstance(eDOMClassInfo_HTMLBaseElement_id);
   }
-  if (mNodeInfo->Equals(nsGkAtoms::spacer)) {
-    return NS_GetDOMClassInfoInstance(eDOMClassInfo_HTMLSpacerElement_id);
-  }
   if (mNodeInfo->Equals(nsGkAtoms::dir)) {
     return NS_GetDOMClassInfoInstance(eDOMClassInfo_HTMLDirectoryElement_id);
   }
   if (mNodeInfo->Equals(nsGkAtoms::menu)) {
     return NS_GetDOMClassInfoInstance(eDOMClassInfo_HTMLMenuElement_id);
   }
   if (mNodeInfo->Equals(nsGkAtoms::q)) {
     return NS_GetDOMClassInfoInstance(eDOMClassInfo_HTMLQuoteElement_id);
@@ -273,136 +269,31 @@ NS_IMPL_URI_ATTR(nsHTMLSharedElement, Hr
 NS_IMPL_STRING_ATTR(nsHTMLSharedElement, Target, target)
 
 PRBool
 nsHTMLSharedElement::ParseAttribute(PRInt32 aNamespaceID,
                                     nsIAtom* aAttribute,
                                     const nsAString& aValue,
                                     nsAttrValue& aResult)
 {
-  if (aNamespaceID == kNameSpaceID_None) {
-    if (mNodeInfo->Equals(nsGkAtoms::spacer)) {
-      if (aAttribute == nsGkAtoms::size) {
-        return aResult.ParseIntWithBounds(aValue, 0);
-      }
-      if (aAttribute == nsGkAtoms::align) {
-        return ParseAlignValue(aValue, aResult);
-      }
-      if (aAttribute == nsGkAtoms::width ||
-          aAttribute == nsGkAtoms::height) {
-        return aResult.ParseSpecialIntValue(aValue, PR_TRUE);
-      }
+  if (aNamespaceID == kNameSpaceID_None &&
+      (mNodeInfo->Equals(nsGkAtoms::dir) ||
+       mNodeInfo->Equals(nsGkAtoms::menu))) {
+    if (aAttribute == nsGkAtoms::type) {
+      return aResult.ParseEnumValue(aValue, kListTypeTable, PR_FALSE);
     }
-    else if (mNodeInfo->Equals(nsGkAtoms::dir) ||
-             mNodeInfo->Equals(nsGkAtoms::menu)) {
-      if (aAttribute == nsGkAtoms::type) {
-        return aResult.ParseEnumValue(aValue, kListTypeTable, PR_FALSE);
-      }
-      if (aAttribute == nsGkAtoms::start) {
-        return aResult.ParseIntWithBounds(aValue, 1);
-      }
+    if (aAttribute == nsGkAtoms::start) {
+      return aResult.ParseIntWithBounds(aValue, 1);
     }
   }
 
   return nsGenericHTMLElement::ParseAttribute(aNamespaceID, aAttribute, aValue,
                                               aResult);
 }
 
-// spacer element code
-
-static void
-SpacerMapAttributesIntoRule(const nsMappedAttributes* aAttributes,
-                            nsRuleData* aData)
-{
-  nsGenericHTMLElement::MapImageMarginAttributeInto(aAttributes, aData);
-  nsGenericHTMLElement::MapImageSizeAttributesInto(aAttributes, aData);
-
-  if (aData->mSIDs & (NS_STYLE_INHERIT_BIT(Position) |
-                      NS_STYLE_INHERIT_BIT(Display))) {
-    PRBool typeIsBlock = PR_FALSE;
-    const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::type);
-    if (value && value->Type() == nsAttrValue::eString) {
-      const nsString& tmp(value->GetStringValue());
-      if (tmp.LowerCaseEqualsLiteral("line") ||
-          tmp.LowerCaseEqualsLiteral("vert") ||
-          tmp.LowerCaseEqualsLiteral("vertical") ||
-          tmp.LowerCaseEqualsLiteral("block")) {
-        // This is not strictly 100% compatible: if the spacer is given
-        // a width of zero then it is basically ignored.
-        typeIsBlock = PR_TRUE;
-      }
-    }
-
-    if (aData->mSIDs & NS_STYLE_INHERIT_BIT(Position)) {
-      if (typeIsBlock) {
-        // width: value
-        if (aData->mPositionData->mWidth.GetUnit() == eCSSUnit_Null) {
-          const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::width);
-          if (value && value->Type() == nsAttrValue::eInteger) {
-            aData->mPositionData->
-              mWidth.SetFloatValue((float)value->GetIntegerValue(),
-                                   eCSSUnit_Pixel);
-          } else if (value && value->Type() == nsAttrValue::ePercent) {
-            aData->mPositionData->
-              mWidth.SetPercentValue(value->GetPercentValue());
-          }
-        }
-
-        // height: value
-        if (aData->mPositionData->mHeight.GetUnit() == eCSSUnit_Null) {
-          const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::height);
-          if (value && value->Type() == nsAttrValue::eInteger) {
-            aData->mPositionData->
-              mHeight.SetFloatValue((float)value->GetIntegerValue(),
-                                    eCSSUnit_Pixel);
-          } else if (value && value->Type() == nsAttrValue::ePercent) {
-            aData->mPositionData->
-              mHeight.SetPercentValue(value->GetPercentValue());
-          }
-        }
-      } else {
-        // size: value
-        if (aData->mPositionData->mWidth.GetUnit() == eCSSUnit_Null) {
-          const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::size);
-          if (value && value->Type() == nsAttrValue::eInteger)
-            aData->mPositionData->
-              mWidth.SetFloatValue((float)value->GetIntegerValue(),
-                                   eCSSUnit_Pixel);
-        }
-      }
-    }
-
-    if (aData->mSIDs & NS_STYLE_INHERIT_BIT(Display)) {
-      const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::align);
-      if (value && value->Type() == nsAttrValue::eEnum) {
-        PRInt32 align = value->GetEnumValue();
-        if (aData->mDisplayData->mFloat.GetUnit() == eCSSUnit_Null) {
-          if (align == NS_STYLE_TEXT_ALIGN_LEFT)
-            aData->mDisplayData->mFloat.SetIntValue(NS_STYLE_FLOAT_LEFT,
-                                                    eCSSUnit_Enumerated);
-          else if (align == NS_STYLE_TEXT_ALIGN_RIGHT)
-            aData->mDisplayData->mFloat.SetIntValue(NS_STYLE_FLOAT_RIGHT,
-                                                    eCSSUnit_Enumerated);
-        }
-      }
-
-      if (typeIsBlock) {
-        if (aData->mDisplayData->mDisplay.GetUnit() == eCSSUnit_Null) {
-          aData->mDisplayData->mDisplay.SetIntValue(NS_STYLE_DISPLAY_BLOCK,
-                                                    eCSSUnit_Enumerated);
-        }
-      }
-    }
-    // Any new structs that don't need typeIsBlock should go outside
-    // the code that calculates it.
-  }
-
-  nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
-}
-
 static void
 DirectoryMenuMapAttributesIntoRule(const nsMappedAttributes* aAttributes,
                                nsRuleData* aData)
 {
   if (aData->mSIDs & NS_STYLE_INHERIT_BIT(List)) {
     if (aData->mListData->mType.GetUnit() == eCSSUnit_Null) {
       // type: enum
       const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::type);
@@ -417,35 +308,16 @@ DirectoryMenuMapAttributesIntoRule(const
   }
 
   nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
 }
 
 NS_IMETHODIMP_(PRBool)
 nsHTMLSharedElement::IsAttributeMapped(const nsIAtom* aAttribute) const
 {
-  if (mNodeInfo->Equals(nsGkAtoms::spacer)) {
-    static const MappedAttributeEntry attributes[] = {
-      // XXXldb This is just wrong.
-      { &nsGkAtoms::usemap },
-      { &nsGkAtoms::ismap },
-      { &nsGkAtoms::align },
-      { nsnull }
-    };
-
-    static const MappedAttributeEntry* const map[] = {
-      attributes,
-      sCommonAttributeMap,
-      sImageMarginSizeAttributeMap,
-      sImageBorderAttributeMap,
-    };
-
-    return FindAttributeDependence(aAttribute, map, NS_ARRAY_LENGTH(map));
-  }
-
   if (mNodeInfo->Equals(nsGkAtoms::dir)) {
     static const MappedAttributeEntry attributes[] = {
       { &nsGkAtoms::type },
       // { &nsGkAtoms::compact }, // XXX
       { nsnull} 
     };
   
     static const MappedAttributeEntry* const map[] = {
@@ -593,18 +465,14 @@ nsHTMLSharedElement::UnbindFromTree(PRBo
       doc->SetBaseURI(nsnull);
     }
   }
 }
 
 nsMapRuleToAttributesFunc
 nsHTMLSharedElement::GetAttributeMappingFunction() const
 {
-  if (mNodeInfo->Equals(nsGkAtoms::spacer)) {
-    return &SpacerMapAttributesIntoRule;
-  }
-  else if (mNodeInfo->Equals(nsGkAtoms::dir) ||
-           mNodeInfo->Equals(nsGkAtoms::menu)) {
+  if (mNodeInfo->Equals(nsGkAtoms::dir) || mNodeInfo->Equals(nsGkAtoms::menu)) {
     return &DirectoryMenuMapAttributesIntoRule;
   }
 
   return nsGenericHTMLElement::GetAttributeMappingFunction();
 }
--- a/content/html/content/test/test_bug389797.html
+++ b/content/html/content/test/test_bug389797.html
@@ -100,17 +100,16 @@ objectIfaces2.push("nsIImageLoadingConte
    dl
    embed
    ins
    isindex
    menu
    ol
    param
    q
-   spacer
    ul
    wbr
    head
    html
  */
 
 HTML_TAG("a", "Anchor");
 HTML_TAG("abbr", ""); // HTMLElement
@@ -205,17 +204,16 @@ HTML_TAG("plaintext", ""); // HTMLElemen
 HTML_TAG("pre", "Pre");
 HTML_TAG("q", "Quote");
 HTML_TAG("s", ""); // HTMLElement
 HTML_TAG("samp", ""); // HTMLElement
 HTML_TAG("script", "Script", [], [ "nsIScriptLoaderObserver" ]);
 HTML_TAG("section", "") // HTMLElement
 HTML_TAG("select", "Select");
 HTML_TAG("small", ""); // HTMLElement
-HTML_TAG("spacer", "Spacer");
 HTML_TAG("span", "Span");
 HTML_TAG("strike", ""); // HTMLElement
 HTML_TAG("strong", ""); // HTMLElement
 HTML_TAG("style", "Style", [ "nsIDOMLinkStyle" ]);
 HTML_TAG("sub", ""); // HTMLElement
 HTML_TAG("sup", ""); // HTMLElement
 HTML_TAG("table", "Table");
 HTML_TAG("tbody", "TableSection");
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -832,18 +832,16 @@ static nsDOMClassInfoData sClassInfoData
                            ELEMENT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(HTMLQuoteElement, nsElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(HTMLScriptElement, nsElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(HTMLSelectElement, nsHTMLSelectElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS |
                            nsIXPCScriptable::WANT_GETPROPERTY)
-  NS_DEFINE_CLASSINFO_DATA(HTMLSpacerElement, nsElementSH,
-                           ELEMENT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(HTMLSpanElement, nsElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(HTMLStyleElement, nsElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(HTMLTableCaptionElement, nsElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(HTMLTableCellElement, nsElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
@@ -2709,21 +2707,16 @@ nsDOMClassInfo::Init()
     DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(HTMLSelectElement, nsIDOMHTMLSelectElement)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLSelectElement)
     DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
   DOM_CLASSINFO_MAP_END
 
-  DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(HTMLSpacerElement, nsIDOMHTMLElement)
-    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLElement)
-    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
-  DOM_CLASSINFO_MAP_END
-
   DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(HTMLSpanElement, nsIDOMHTMLElement)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLElement)
     DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(HTMLStyleElement, nsIDOMHTMLStyleElement)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLStyleElement)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMLinkStyle)
--- a/dom/base/nsDOMClassInfoClasses.h
+++ b/dom/base/nsDOMClassInfoClasses.h
@@ -125,17 +125,16 @@ DOMCI_CLASS(HTMLOptGroupElement)
 DOMCI_CLASS(HTMLOptionElement)
 DOMCI_CLASS(HTMLOutputElement)
 DOMCI_CLASS(HTMLParagraphElement)
 DOMCI_CLASS(HTMLParamElement)
 DOMCI_CLASS(HTMLPreElement)
 DOMCI_CLASS(HTMLQuoteElement)
 DOMCI_CLASS(HTMLScriptElement)
 DOMCI_CLASS(HTMLSelectElement)
-DOMCI_CLASS(HTMLSpacerElement)
 DOMCI_CLASS(HTMLSpanElement)
 DOMCI_CLASS(HTMLStyleElement)
 DOMCI_CLASS(HTMLTableCaptionElement)
 DOMCI_CLASS(HTMLTableCellElement)
 DOMCI_CLASS(HTMLTableColElement)
 DOMCI_CLASS(HTMLTableElement)
 DOMCI_CLASS(HTMLTableRowElement)
 DOMCI_CLASS(HTMLTableSectionElement)
--- a/editor/libeditor/html/nsHTMLEditUtils.cpp
+++ b/editor/libeditor/html/nsHTMLEditUtils.cpp
@@ -685,17 +685,16 @@ static const nsElementInfo kElements[eHT
   ELEM(script, PR_TRUE, PR_FALSE, GROUP_HEAD_CONTENT | GROUP_SPECIAL,
        GROUP_LEAF),
   ELEM(section, PR_TRUE, PR_TRUE, GROUP_BLOCK, GROUP_FLOW_ELEMENT),
   ELEM(select, PR_TRUE, PR_FALSE, GROUP_FORMCONTROL, GROUP_SELECT_CONTENT),
   ELEM(small, PR_TRUE, PR_TRUE, GROUP_FONTSTYLE, GROUP_INLINE_ELEMENT),
 #if defined(MOZ_MEDIA)
   ELEM(source, PR_FALSE, PR_FALSE, GROUP_NONE, GROUP_NONE),
 #endif
-  ELEM(spacer, PR_FALSE, PR_FALSE, GROUP_NONE, GROUP_NONE),
   ELEM(span, PR_TRUE, PR_TRUE, GROUP_SPECIAL, GROUP_INLINE_ELEMENT),
   ELEM(strike, PR_TRUE, PR_TRUE, GROUP_FONTSTYLE, GROUP_INLINE_ELEMENT),
   ELEM(strong, PR_TRUE, PR_TRUE, GROUP_PHRASE, GROUP_INLINE_ELEMENT),
   ELEM(style, PR_TRUE, PR_FALSE, GROUP_HEAD_CONTENT, GROUP_LEAF),
   ELEM(sub, PR_TRUE, PR_TRUE, GROUP_SPECIAL, GROUP_INLINE_ELEMENT),
   ELEM(sup, PR_TRUE, PR_TRUE, GROUP_SPECIAL, GROUP_INLINE_ELEMENT),
   ELEM(table, PR_TRUE, PR_FALSE, GROUP_BLOCK, GROUP_TABLE_CONTENT),
   ELEM(tbody, PR_TRUE, PR_FALSE, GROUP_TABLE_CONTENT, GROUP_TBODY_CONTENT),
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -3594,17 +3594,16 @@ nsCSSFrameConstructor::FindHTMLData(nsIC
     SIMPLE_TAG_CHAIN(object, nsCSSFrameConstructor::FindObjectData),
     SIMPLE_TAG_CHAIN(applet, nsCSSFrameConstructor::FindObjectData),
     SIMPLE_TAG_CHAIN(embed, nsCSSFrameConstructor::FindObjectData),
     COMPLEX_TAG_CREATE(fieldset,
                        &nsCSSFrameConstructor::ConstructFieldSetFrame),
     SIMPLE_TAG_CREATE(legend, NS_NewLegendFrame),
     SIMPLE_TAG_CREATE(frameset, NS_NewHTMLFramesetFrame),
     SIMPLE_TAG_CREATE(iframe, NS_NewSubDocumentFrame),
-    SIMPLE_TAG_CREATE(spacer, NS_NewSpacerFrame),
     COMPLEX_TAG_CREATE(button, &nsCSSFrameConstructor::ConstructButtonFrame),
     SIMPLE_TAG_CREATE(canvas, NS_NewHTMLCanvasFrame),
 #if defined(MOZ_MEDIA)
     SIMPLE_TAG_CREATE(video, NS_NewHTMLVideoFrame),
     SIMPLE_TAG_CREATE(audio, NS_NewHTMLVideoFrame),
 #endif
     SIMPLE_TAG_CREATE(isindex, NS_NewIsIndexFrame)
   };
--- a/layout/generic/Makefile.in
+++ b/layout/generic/Makefile.in
@@ -107,17 +107,16 @@ CPPSRCS		= \
 		nsLineBox.cpp \
 		nsLineLayout.cpp \
 		nsObjectFrame.cpp \
 		nsPageContentFrame.cpp \
 		nsPageFrame.cpp \
 		nsPlaceholderFrame.cpp \
 		nsSelection.cpp \
 		nsSimplePageSequence.cpp \
-		nsSpacerFrame.cpp \
 		nsSplittableFrame.cpp \
 		nsTextFrameThebes.cpp \
 		nsTextFrameUtils.cpp \
 		nsTextRunTransformations.cpp \
 		nsViewportFrame.cpp \
 		$(NULL)
 
 ifdef MOZ_MEDIA
--- a/layout/generic/nsHTMLParts.h
+++ b/layout/generic/nsHTMLParts.h
@@ -132,18 +132,16 @@ nsIFrame*
 NS_NewImageFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 nsIFrame*
 NS_NewInlineFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 nsIFrame*
 NS_NewPositionedInlineFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 nsIFrame*
 NS_NewObjectFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 nsIFrame*
-NS_NewSpacerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
-nsIFrame*
 NS_NewTextFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 nsIFrame*
 NS_NewContinuingTextFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 nsIFrame*
 NS_NewEmptyFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 inline nsIFrame*
 NS_NewWBRFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) {
   return NS_NewEmptyFrame(aPresShell, aContext);
--- a/layout/generic/nsQueryFrame.h
+++ b/layout/generic/nsQueryFrame.h
@@ -240,17 +240,16 @@ public:
     nsTextControlFrame_id,
     nsTextFrame_id,
     nsTitleBarFrame_id,
     nsTreeBodyFrame_id,
     nsTreeColFrame_id,
     nsVideoFrame_id,
     nsXULLabelFrame_id,
     nsXULScrollFrame_id,
-    SpacerFrame_id,
     ViewportFrame_id,
 
     // The PresArena implementation uses this bit to distinguish
     // objects allocated by size (that is, non-frames) from objects
     // allocated by code (that is, frames).  It should not collide
     // with any frame ID.  It is not 0x80000000 to avoid the question
     // of whether enumeration constants are signed.
     NON_FRAME_MARKER = 0x40000000
deleted file mode 100644
--- a/layout/generic/nsSpacerFrame.cpp
+++ /dev/null
@@ -1,214 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/* rendering object for HTML <spacer> element */
-
-#include "nsHTMLParts.h"
-#include "nsFrame.h"
-#include "nsLineLayout.h"
-#include "nsPresContext.h"
-#include "nsGkAtoms.h"
-#include "nsStyleConsts.h"
-#include "nsINameSpaceManager.h"
-
-// Spacer type's
-#define TYPE_WORD  0            // horizontal space
-#define TYPE_LINE  1            // line-break + vertical space
-#define TYPE_IMAGE 2            // acts like a sized image with nothing to see
-
-class SpacerFrame : public nsFrame
-{
-public:
-  NS_DECL_FRAMEARENA_HELPERS
-
-  friend nsIFrame* NS_NewSpacerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
-
-  // nsIHTMLReflow
-  virtual nscoord GetMinWidth(nsIRenderingContext *aRenderingContext);
-  virtual nscoord GetPrefWidth(nsIRenderingContext *aRenderingContext);
-  NS_IMETHOD Reflow(nsPresContext*          aPresContext,
-                    nsHTMLReflowMetrics&     aDesiredSize,
-                    const nsHTMLReflowState& aReflowState,
-                    nsReflowStatus&          aStatus);
-
-  PRUint8 GetSpacerType();
-
-protected:
-  SpacerFrame(nsStyleContext* aContext) : nsFrame(aContext) {}
-  virtual ~SpacerFrame();
-  void GetDesiredSize(nsHTMLReflowMetrics& aMetrics, nsSize aPercentBase);
-};
-
-nsIFrame*
-NS_NewSpacerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
-{
-#ifdef DEBUG
-  const nsStyleDisplay* disp = aContext->GetStyleDisplay();
-  NS_ASSERTION(!disp->IsAbsolutelyPositioned() && !disp->IsFloating(),
-               "Spacers should not be positioned and should not float");
-#endif
-
-  return new (aPresShell) SpacerFrame(aContext);
-}
-
-NS_IMPL_FRAMEARENA_HELPERS(SpacerFrame)
-
-SpacerFrame::~SpacerFrame()
-{
-}
-
-/* virtual */ nscoord
-SpacerFrame::GetMinWidth(nsIRenderingContext *aRenderingContext)
-{
-  nsHTMLReflowMetrics metrics;
-  DISPLAY_MIN_WIDTH(this, metrics.width);
-  GetDesiredSize(metrics, nsSize(0, 0));
-  return metrics.width;
-}
-
-/* virtual */ nscoord
-SpacerFrame::GetPrefWidth(nsIRenderingContext *aRenderingContext)
-{
-  nsHTMLReflowMetrics metrics;
-  DISPLAY_PREF_WIDTH(this, metrics.width);
-  GetDesiredSize(metrics, nsSize(0, 0));
-  return metrics.width;
-}
-
-NS_IMETHODIMP
-SpacerFrame::Reflow(nsPresContext*          aPresContext,
-                    nsHTMLReflowMetrics&     aMetrics,
-                    const nsHTMLReflowState& aReflowState,
-                    nsReflowStatus&          aStatus)
-{
-  DO_GLOBAL_REFLOW_COUNT("SpacerFrame");
-  DISPLAY_REFLOW(aPresContext, this, aReflowState, aMetrics, aStatus);
-  aStatus = NS_FRAME_COMPLETE;
-
-  // XXX Bug 379654 Should use containing block size!
-  nsSize percentBase(aReflowState.availableWidth, aReflowState.availableHeight);
-  if (percentBase.width == NS_UNCONSTRAINEDSIZE)
-    percentBase.width = 0;
-  if (percentBase.height == NS_UNCONSTRAINEDSIZE)
-    percentBase.height = 0;
-
-  if (GetSpacerType() == TYPE_LINE)
-    aStatus = NS_INLINE_LINE_BREAK_AFTER(NS_FRAME_COMPLETE);
-
-  GetDesiredSize(aMetrics, percentBase);
-
-  NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aMetrics);
-  return NS_OK;
-}
-
-void
-SpacerFrame::GetDesiredSize(nsHTMLReflowMetrics& aMetrics, nsSize aPercentBase)
-{
-  // By default, we have no area
-  aMetrics.width = 0;
-  aMetrics.height = 0;
-
-  // XXX Bug 379654 This code doesn't handle some value types for width
-  // and height, doesn't handle min/max-width/height, doesn't handle
-  // border and padding, doesn't handle 'ch' units, doesn't handle the
-  // enumerated values on width, etc.  But it probably doesn't much
-  // matter.
-
-  const nsStylePosition* position = GetStylePosition();
-
-  PRUint8 type = GetSpacerType();
-  switch (type) {
-  case TYPE_WORD:
-    break;
-
-  case TYPE_LINE:
-    if (eStyleUnit_Coord == position->mHeight.GetUnit()) {
-      aMetrics.height = position->mHeight.GetCoordValue();
-    }
-    break;
-
-  case TYPE_IMAGE:
-    // width
-    nsStyleUnit unit = position->mWidth.GetUnit();
-    if (eStyleUnit_Coord == unit) {
-      aMetrics.width = position->mWidth.GetCoordValue();
-    }
-    else if (eStyleUnit_Percent == unit) 
-    {
-      float factor = position->mWidth.GetPercentValue();
-      aMetrics.width = NSToCoordRound(factor * aPercentBase.width);
-    }
-    // else treat enumerated values and calc() like 'auto'
-
-    // height
-    unit = position->mHeight.GetUnit();
-    if (eStyleUnit_Coord == unit) {
-      aMetrics.height = position->mHeight.GetCoordValue();
-    }
-    else if (eStyleUnit_Percent == unit) 
-    {
-      float factor = position->mHeight.GetPercentValue();
-      aMetrics.height = NSToCoordRound(factor * aPercentBase.height);
-    }
-    break;
-  }
-
-  if (aMetrics.width || aMetrics.height) {
-    // Make sure that the other dimension is non-zero
-    if (!aMetrics.width) aMetrics.width = 1;
-    if (!aMetrics.height) aMetrics.height = 1;
-  }
-}
-
-PRUint8
-SpacerFrame::GetSpacerType()
-{
-  PRUint8 type = TYPE_WORD;
-  static nsIContent::AttrValuesArray strings[] =
-    {&nsGkAtoms::line, &nsGkAtoms::vert, &nsGkAtoms::vertical,
-     &nsGkAtoms::block, nsnull};
-  switch (mContent->FindAttrValueIn(kNameSpaceID_None, nsGkAtoms::type,
-                                    strings, eIgnoreCase)) {
-    case 0:
-    case 1:
-    case 2:
-      return TYPE_LINE;
-    case 3:
-      return TYPE_IMAGE;
-  }
-  return type;
-}
--- a/parser/htmlparser/public/nsHTMLTagList.h
+++ b/parser/htmlparser/public/nsHTMLTagList.h
@@ -161,17 +161,16 @@ HTML_HTMLELEMENT_TAG(s)
 HTML_HTMLELEMENT_TAG(samp)
 HTML_TAG(script, Script)
 HTML_HTMLELEMENT_TAG(section)
 HTML_TAG(select, Select)
 HTML_HTMLELEMENT_TAG(small)
 #if defined(MOZ_MEDIA)
 HTML_TAG(source, Source)
 #endif
-HTML_TAG(spacer, Shared)
 HTML_TAG(span, Span)
 HTML_HTMLELEMENT_TAG(strike)
 HTML_HTMLELEMENT_TAG(strong)
 HTML_TAG(style, Style)
 HTML_HTMLELEMENT_TAG(sub)
 HTML_HTMLELEMENT_TAG(sup)
 HTML_TAG(table, Table)
 HTML_TAG(tbody, TableSection)
--- a/parser/htmlparser/src/nsElementTable.cpp
+++ b/parser/htmlparser/src/nsElementTable.cpp
@@ -1071,26 +1071,16 @@ const nsHTMLElement gHTMLElements[] = {
     /*autoclose starttags and endtags*/ &gPAutoClose, 0, 0,0,
     /*parent,incl,exclgroups*/          kSpecial, kNone, kNone,
     /*special props, prop-range*/       kNonContainer,kNoPropRange,
     /*special parents,kids*/            &gSourceParents,0,
   },
 #endif
   {
     
-    /*tag*/                             eHTMLTag_spacer,
-    /*req-parent excl-parent*/          eHTMLTag_unknown,eHTMLTag_unknown,
-    /*rootnodes,endrootnodes*/          &gRootTags,&gRootTags,
-    /*autoclose starttags and endtags*/ 0,0,0,0,
-    /*parent,incl,exclgroups*/          kExtensions, kNone, kNone,
-    /*special props, prop-range*/       kNonContainer,kDefaultPropRange,
-    /*special parents,kids*/            0,0,
-  },
-  {
-    
           // I made span a special% tag again, (instead of inline).
           // This fixes the case:  <font color="blue"><p><span>text</span>
 
     /*tag*/                             eHTMLTag_span,
     /*req-parent excl-parent*/          eHTMLTag_unknown,eHTMLTag_unknown,
     /*rootnodes,endrootnodes*/          &gRootTags,&gRootTags,
     /*autoclose starttags and endtags*/ 0,0,0,0,
     /*parent,incl,exclgroups*/          kSpecial, (kInlineEntity|kSelf|kFlowEntity), kNone,