зеркало из https://github.com/mozilla/gecko-dev.git
Bug 893117: Remove nsIDOMHTMLLegendElement r=bz
This commit is contained in:
Родитель
8273fe7d29
Коммит
f8699dfe4e
|
@ -25,30 +25,13 @@ NS_IMPL_RELEASE_INHERITED(HTMLLegendElement, Element)
|
|||
|
||||
|
||||
// QueryInterface implementation for HTMLLegendElement
|
||||
NS_INTERFACE_TABLE_HEAD(HTMLLegendElement)
|
||||
NS_INTERFACE_MAP_BEGIN(HTMLLegendElement)
|
||||
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
|
||||
NS_INTERFACE_TABLE_INHERITED1(HTMLLegendElement, nsIDOMHTMLLegendElement)
|
||||
NS_INTERFACE_TABLE_TO_MAP_SEGUE
|
||||
NS_ELEMENT_INTERFACE_MAP_END
|
||||
|
||||
|
||||
// nsIDOMHTMLLegendElement
|
||||
|
||||
|
||||
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
|
||||
static const nsAttrValue::EnumTable kAlignTable[] = {
|
||||
{ "left", NS_STYLE_TEXT_ALIGN_LEFT },
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#define mozilla_dom_HTMLLegendElement_h
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsIDOMHTMLLegendElement.h"
|
||||
#include "nsGenericHTMLElement.h"
|
||||
#include "mozilla/dom/HTMLFormElement.h"
|
||||
|
||||
|
@ -15,7 +14,7 @@ namespace mozilla {
|
|||
namespace dom {
|
||||
|
||||
class HTMLLegendElement MOZ_FINAL : public nsGenericHTMLElement,
|
||||
public nsIDOMHTMLLegendElement
|
||||
public nsIDOMHTMLElement
|
||||
{
|
||||
public:
|
||||
HTMLLegendElement(already_AddRefed<nsINodeInfo> aNodeInfo)
|
||||
|
@ -35,9 +34,6 @@ public:
|
|||
// nsIDOMElement
|
||||
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
|
||||
|
||||
// nsIDOMHTMLLegendElement
|
||||
NS_DECL_NSIDOMHTMLLEGENDELEMENT
|
||||
|
||||
// nsIDOMHTMLElement
|
||||
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
||||
|
||||
|
@ -86,7 +82,11 @@ public:
|
|||
|
||||
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)
|
||||
{
|
||||
SetHTMLAttr(nsGkAtoms::align, aAlign, aError);
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
#include "nsIDOMHTMLFrameElement.h"
|
||||
#include "nsIDOMHTMLInputElement.h"
|
||||
#include "nsIDOMHTMLMapElement.h"
|
||||
#include "nsIDOMHTMLLegendElement.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIDOMRange.h"
|
||||
#include "nsIHTMLDocument.h"
|
||||
|
|
|
@ -36,7 +36,6 @@ XPIDL_SOURCES += [
|
|||
'nsIDOMHTMLInputElement.idl',
|
||||
'nsIDOMHTMLLIElement.idl',
|
||||
'nsIDOMHTMLLabelElement.idl',
|
||||
'nsIDOMHTMLLegendElement.idl',
|
||||
'nsIDOMHTMLLinkElement.idl',
|
||||
'nsIDOMHTMLMapElement.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
|
||||
partial interface HTMLLegendElement {
|
||||
[SetterThrows]
|
||||
attribute DOMString align;
|
||||
};
|
||||
|
|
|
@ -42,7 +42,6 @@
|
|||
#include "nsIDOMXULElement.h"
|
||||
#include "nsContainerFrame.h"
|
||||
#include "nsINameSpaceManager.h"
|
||||
#include "nsIDOMHTMLLegendElement.h"
|
||||
#include "nsIComboboxControlFrame.h"
|
||||
#include "nsIListControlFrame.h"
|
||||
#include "nsISelectControlFrame.h"
|
||||
|
@ -5879,7 +5878,7 @@ nsCSSFrameConstructor::IsValidSibling(nsIFrame* aSibling,
|
|||
nsGkAtoms::blockFrame == parentType)) {
|
||||
// Legends can be sibling of legends but not of other content in the fieldset
|
||||
nsIAtom* sibType = aSibling->GetContentInsertionFrame()->GetType();
|
||||
nsCOMPtr<nsIDOMHTMLLegendElement> legendContent(do_QueryInterface(aContent));
|
||||
bool legendContent = aContent->IsHTML(nsGkAtoms::legend);
|
||||
|
||||
if ((legendContent && (nsGkAtoms::legendFrame != sibType)) ||
|
||||
(!legendContent && (nsGkAtoms::legendFrame == sibType)))
|
||||
|
@ -5987,8 +5986,7 @@ GetAdjustedParentFrame(nsIFrame* aParentFrame,
|
|||
if (nsGkAtoms::fieldSetFrame == aParentFrameType) {
|
||||
// If the parent is a fieldSet, use the fieldSet's area frame as the
|
||||
// parent unless the new content is a legend.
|
||||
nsCOMPtr<nsIDOMHTMLLegendElement> legendContent(do_QueryInterface(aChildContent));
|
||||
if (!legendContent) {
|
||||
if (!aChildContent->IsHTML(nsGkAtoms::legend)) {
|
||||
newParent = GetFieldSetBlockFrame(aParentFrame);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include "nsLegendFrame.h"
|
||||
#include "nsIDOMNode.h"
|
||||
#include "nsIDOMHTMLFieldSetElement.h"
|
||||
#include "nsIDOMHTMLLegendElement.h"
|
||||
#include "nsCSSRendering.h"
|
||||
#include <algorithm>
|
||||
#include "nsIContent.h"
|
||||
|
|
Загрузка…
Ссылка в новой задаче