Bug 893117: Remove nsIDOMHTMLLegendElement r=bz
This commit is contained in:
@@ -25,30 +25,13 @@ NS_IMPL_RELEASE_INHERITED(HTMLLegendElement, Element)
|
|||||||
|
|
||||||
|
|
||||||
// QueryInterface implementation for HTMLLegendElement
|
// QueryInterface implementation for HTMLLegendElement
|
||||||
NS_INTERFACE_TABLE_HEAD(HTMLLegendElement)
|
NS_INTERFACE_MAP_BEGIN(HTMLLegendElement)
|
||||||
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
|
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
|
||||||
NS_INTERFACE_TABLE_INHERITED1(HTMLLegendElement, nsIDOMHTMLLegendElement)
|
|
||||||
NS_INTERFACE_TABLE_TO_MAP_SEGUE
|
|
||||||
NS_ELEMENT_INTERFACE_MAP_END
|
NS_ELEMENT_INTERFACE_MAP_END
|
||||||
|
|
||||||
|
|
||||||
// nsIDOMHTMLLegendElement
|
|
||||||
|
|
||||||
|
|
||||||
NS_IMPL_ELEMENT_CLONE(HTMLLegendElement)
|
NS_IMPL_ELEMENT_CLONE(HTMLLegendElement)
|
||||||
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLLegendElement::GetForm(nsIDOMHTMLFormElement** aForm)
|
|
||||||
{
|
|
||||||
Element* form = GetFormElement();
|
|
||||||
|
|
||||||
return form ? CallQueryInterface(form, aForm) : NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
NS_IMPL_STRING_ATTR(HTMLLegendElement, Align, align)
|
|
||||||
|
|
||||||
// this contains center, because IE4 does
|
// this contains center, because IE4 does
|
||||||
static const nsAttrValue::EnumTable kAlignTable[] = {
|
static const nsAttrValue::EnumTable kAlignTable[] = {
|
||||||
{ "left", NS_STYLE_TEXT_ALIGN_LEFT },
|
{ "left", NS_STYLE_TEXT_ALIGN_LEFT },
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
#define mozilla_dom_HTMLLegendElement_h
|
#define mozilla_dom_HTMLLegendElement_h
|
||||||
|
|
||||||
#include "mozilla/Attributes.h"
|
#include "mozilla/Attributes.h"
|
||||||
#include "nsIDOMHTMLLegendElement.h"
|
|
||||||
#include "nsGenericHTMLElement.h"
|
#include "nsGenericHTMLElement.h"
|
||||||
#include "mozilla/dom/HTMLFormElement.h"
|
#include "mozilla/dom/HTMLFormElement.h"
|
||||||
|
|
||||||
@@ -15,7 +14,7 @@ namespace mozilla {
|
|||||||
namespace dom {
|
namespace dom {
|
||||||
|
|
||||||
class HTMLLegendElement MOZ_FINAL : public nsGenericHTMLElement,
|
class HTMLLegendElement MOZ_FINAL : public nsGenericHTMLElement,
|
||||||
public nsIDOMHTMLLegendElement
|
public nsIDOMHTMLElement
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
HTMLLegendElement(already_AddRefed<nsINodeInfo> aNodeInfo)
|
HTMLLegendElement(already_AddRefed<nsINodeInfo> aNodeInfo)
|
||||||
@@ -35,9 +34,6 @@ public:
|
|||||||
// nsIDOMElement
|
// nsIDOMElement
|
||||||
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
|
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
|
||||||
|
|
||||||
// nsIDOMHTMLLegendElement
|
|
||||||
NS_DECL_NSIDOMHTMLLEGENDELEMENT
|
|
||||||
|
|
||||||
// nsIDOMHTMLElement
|
// nsIDOMHTMLElement
|
||||||
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
||||||
|
|
||||||
@@ -86,7 +82,11 @@ public:
|
|||||||
|
|
||||||
already_AddRefed<HTMLFormElement> GetForm();
|
already_AddRefed<HTMLFormElement> GetForm();
|
||||||
|
|
||||||
// The XPCOM GetAlign is OK for us
|
void GetAlign(nsAString& aAlign)
|
||||||
|
{
|
||||||
|
GetHTMLAttr(nsGkAtoms::align, aAlign);
|
||||||
|
}
|
||||||
|
|
||||||
void SetAlign(const nsAString& aAlign, ErrorResult& aError)
|
void SetAlign(const nsAString& aAlign, ErrorResult& aError)
|
||||||
{
|
{
|
||||||
SetHTMLAttr(nsGkAtoms::align, aAlign, aError);
|
SetHTMLAttr(nsGkAtoms::align, aAlign, aError);
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
#include "nsIDOMHTMLFrameElement.h"
|
#include "nsIDOMHTMLFrameElement.h"
|
||||||
#include "nsIDOMHTMLInputElement.h"
|
#include "nsIDOMHTMLInputElement.h"
|
||||||
#include "nsIDOMHTMLMapElement.h"
|
#include "nsIDOMHTMLMapElement.h"
|
||||||
#include "nsIDOMHTMLLegendElement.h"
|
|
||||||
#include "nsIDOMDocument.h"
|
#include "nsIDOMDocument.h"
|
||||||
#include "nsIDOMRange.h"
|
#include "nsIDOMRange.h"
|
||||||
#include "nsIHTMLDocument.h"
|
#include "nsIHTMLDocument.h"
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ XPIDL_SOURCES += [
|
|||||||
'nsIDOMHTMLInputElement.idl',
|
'nsIDOMHTMLInputElement.idl',
|
||||||
'nsIDOMHTMLLIElement.idl',
|
'nsIDOMHTMLLIElement.idl',
|
||||||
'nsIDOMHTMLLabelElement.idl',
|
'nsIDOMHTMLLabelElement.idl',
|
||||||
'nsIDOMHTMLLegendElement.idl',
|
|
||||||
'nsIDOMHTMLLinkElement.idl',
|
'nsIDOMHTMLLinkElement.idl',
|
||||||
'nsIDOMHTMLMapElement.idl',
|
'nsIDOMHTMLMapElement.idl',
|
||||||
'nsIDOMHTMLMediaElement.idl',
|
'nsIDOMHTMLMediaElement.idl',
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
||||||
|
|
||||||
#include "nsIDOMHTMLElement.idl"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The nsIDOMHTMLLegendElement interface is the interface to a [X]HTML
|
|
||||||
* legend element.
|
|
||||||
*
|
|
||||||
* This interface is trying to follow the DOM Level 2 HTML specification:
|
|
||||||
* http://www.w3.org/TR/DOM-Level-2-HTML/
|
|
||||||
*
|
|
||||||
* with changes from the work-in-progress WHATWG HTML specification:
|
|
||||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
|
||||||
*/
|
|
||||||
|
|
||||||
[scriptable, uuid(2e4567be-3d91-4df8-bdf9-f3bd96a6cd06)]
|
|
||||||
interface nsIDOMHTMLLegendElement : nsIDOMHTMLElement
|
|
||||||
{
|
|
||||||
readonly attribute nsIDOMHTMLFormElement form;
|
|
||||||
attribute DOMString align;
|
|
||||||
};
|
|
||||||
@@ -19,5 +19,6 @@ interface HTMLLegendElement : HTMLElement {
|
|||||||
|
|
||||||
// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
|
// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
|
||||||
partial interface HTMLLegendElement {
|
partial interface HTMLLegendElement {
|
||||||
|
[SetterThrows]
|
||||||
attribute DOMString align;
|
attribute DOMString align;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -42,7 +42,6 @@
|
|||||||
#include "nsIDOMXULElement.h"
|
#include "nsIDOMXULElement.h"
|
||||||
#include "nsContainerFrame.h"
|
#include "nsContainerFrame.h"
|
||||||
#include "nsINameSpaceManager.h"
|
#include "nsINameSpaceManager.h"
|
||||||
#include "nsIDOMHTMLLegendElement.h"
|
|
||||||
#include "nsIComboboxControlFrame.h"
|
#include "nsIComboboxControlFrame.h"
|
||||||
#include "nsIListControlFrame.h"
|
#include "nsIListControlFrame.h"
|
||||||
#include "nsISelectControlFrame.h"
|
#include "nsISelectControlFrame.h"
|
||||||
@@ -5879,7 +5878,7 @@ nsCSSFrameConstructor::IsValidSibling(nsIFrame* aSibling,
|
|||||||
nsGkAtoms::blockFrame == parentType)) {
|
nsGkAtoms::blockFrame == parentType)) {
|
||||||
// Legends can be sibling of legends but not of other content in the fieldset
|
// Legends can be sibling of legends but not of other content in the fieldset
|
||||||
nsIAtom* sibType = aSibling->GetContentInsertionFrame()->GetType();
|
nsIAtom* sibType = aSibling->GetContentInsertionFrame()->GetType();
|
||||||
nsCOMPtr<nsIDOMHTMLLegendElement> legendContent(do_QueryInterface(aContent));
|
bool legendContent = aContent->IsHTML(nsGkAtoms::legend);
|
||||||
|
|
||||||
if ((legendContent && (nsGkAtoms::legendFrame != sibType)) ||
|
if ((legendContent && (nsGkAtoms::legendFrame != sibType)) ||
|
||||||
(!legendContent && (nsGkAtoms::legendFrame == sibType)))
|
(!legendContent && (nsGkAtoms::legendFrame == sibType)))
|
||||||
@@ -5987,8 +5986,7 @@ GetAdjustedParentFrame(nsIFrame* aParentFrame,
|
|||||||
if (nsGkAtoms::fieldSetFrame == aParentFrameType) {
|
if (nsGkAtoms::fieldSetFrame == aParentFrameType) {
|
||||||
// If the parent is a fieldSet, use the fieldSet's area frame as the
|
// If the parent is a fieldSet, use the fieldSet's area frame as the
|
||||||
// parent unless the new content is a legend.
|
// parent unless the new content is a legend.
|
||||||
nsCOMPtr<nsIDOMHTMLLegendElement> legendContent(do_QueryInterface(aChildContent));
|
if (!aChildContent->IsHTML(nsGkAtoms::legend)) {
|
||||||
if (!legendContent) {
|
|
||||||
newParent = GetFieldSetBlockFrame(aParentFrame);
|
newParent = GetFieldSetBlockFrame(aParentFrame);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
#include "nsLegendFrame.h"
|
#include "nsLegendFrame.h"
|
||||||
#include "nsIDOMNode.h"
|
#include "nsIDOMNode.h"
|
||||||
#include "nsIDOMHTMLFieldSetElement.h"
|
#include "nsIDOMHTMLFieldSetElement.h"
|
||||||
#include "nsIDOMHTMLLegendElement.h"
|
|
||||||
#include "nsCSSRendering.h"
|
#include "nsCSSRendering.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include "nsIContent.h"
|
#include "nsIContent.h"
|
||||||
|
|||||||
Reference in New Issue
Block a user