зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 8dfdebcc8ce6 (bug 893117)
This commit is contained in:
Родитель
14523b53f5
Коммит
0127f3f3f9
|
@ -228,7 +228,7 @@ let Util = {
|
|||
aElement instanceof Ci.nsIDOMHTMLLIElement ||
|
||||
aElement instanceof Ci.nsIDOMHTMLPreElement ||
|
||||
aElement instanceof Ci.nsIDOMHTMLHeadingElement ||
|
||||
aElement instanceof HTMLTableCellElement ||
|
||||
aElement instanceof Ci.nsIDOMHTMLTableCellElement ||
|
||||
aElement instanceof Ci.nsIDOMHTMLBodyElement);
|
||||
},
|
||||
|
||||
|
|
|
@ -36,6 +36,8 @@ NS_IMPL_RELEASE_INHERITED(HTMLTableCellElement, Element)
|
|||
// QueryInterface implementation for HTMLTableCellElement
|
||||
NS_INTERFACE_TABLE_HEAD(HTMLTableCellElement)
|
||||
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
|
||||
NS_INTERFACE_TABLE_INHERITED1(HTMLTableCellElement,
|
||||
nsIDOMHTMLTableCellElement)
|
||||
NS_INTERFACE_TABLE_TO_MAP_SEGUE
|
||||
NS_ELEMENT_INTERFACE_MAP_END
|
||||
|
||||
|
@ -102,6 +104,13 @@ HTMLTableCellElement::CellIndex() const
|
|||
return -1;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableCellElement::GetCellIndex(int32_t* aCellIndex)
|
||||
{
|
||||
*aCellIndex = CellIndex();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableCellElement::WalkContentStyleRules(nsRuleWalker* aRuleWalker)
|
||||
{
|
||||
|
@ -118,6 +127,238 @@ HTMLTableCellElement::WalkContentStyleRules(nsRuleWalker* aRuleWalker)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableCellElement::SetAbbr(const nsAString& aAbbr)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetAbbr(aAbbr, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableCellElement::GetAbbr(nsAString& aAbbr)
|
||||
{
|
||||
nsString abbr;
|
||||
GetAbbr(abbr);
|
||||
aAbbr = abbr;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableCellElement::SetAxis(const nsAString& aAxis)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetAxis(aAxis, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableCellElement::GetAxis(nsAString& aAxis)
|
||||
{
|
||||
nsString axis;
|
||||
GetAxis(axis);
|
||||
aAxis = axis;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableCellElement::SetAlign(const nsAString& aAlign)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetAlign(aAlign, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableCellElement::GetAlign(nsAString& aAlign)
|
||||
{
|
||||
nsString align;
|
||||
GetAlign(align);
|
||||
aAlign = align;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableCellElement::SetVAlign(const nsAString& aVAlign)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetVAlign(aVAlign, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableCellElement::GetVAlign(nsAString& aVAlign)
|
||||
{
|
||||
nsString vAlign;
|
||||
GetVAlign(vAlign);
|
||||
aVAlign = vAlign;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableCellElement::SetCh(const nsAString& aCh)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetCh(aCh, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableCellElement::GetCh(nsAString& aCh)
|
||||
{
|
||||
nsString ch;
|
||||
GetCh(ch);
|
||||
aCh = ch;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableCellElement::SetChOff(const nsAString& aChOff)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetChOff(aChOff, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableCellElement::GetChOff(nsAString& aChOff)
|
||||
{
|
||||
nsString chOff;
|
||||
GetChOff(chOff);
|
||||
aChOff = chOff;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableCellElement::SetBgColor(const nsAString& aBgColor)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetBgColor(aBgColor, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableCellElement::GetBgColor(nsAString& aBgColor)
|
||||
{
|
||||
nsString bgColor;
|
||||
GetBgColor(bgColor);
|
||||
aBgColor = bgColor;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableCellElement::SetHeight(const nsAString& aHeight)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetHeight(aHeight, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableCellElement::GetHeight(nsAString& aHeight)
|
||||
{
|
||||
nsString height;
|
||||
GetHeight(height);
|
||||
aHeight = height;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableCellElement::SetWidth(const nsAString& aWidth)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetWidth(aWidth, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableCellElement::GetWidth(nsAString& aWidth)
|
||||
{
|
||||
nsString width;
|
||||
GetWidth(width);
|
||||
aWidth = width;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableCellElement::SetNoWrap(bool aNoWrap)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetNoWrap(aNoWrap, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableCellElement::GetNoWrap(bool* aNoWrap)
|
||||
{
|
||||
*aNoWrap = NoWrap();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableCellElement::SetScope(const nsAString& aScope)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetScope(aScope, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableCellElement::GetScope(nsAString& aScope)
|
||||
{
|
||||
nsString scope;
|
||||
GetScope(scope);
|
||||
aScope = scope;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableCellElement::SetHeaders(const nsAString& aHeaders)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetHeaders(aHeaders, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableCellElement::GetHeaders(nsAString& aHeaders)
|
||||
{
|
||||
nsString headers;
|
||||
GetHeaders(headers);
|
||||
aHeaders = headers;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableCellElement::SetColSpan(int32_t aColSpan)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetColSpan(aColSpan, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableCellElement::GetColSpan(int32_t* aColSpan)
|
||||
{
|
||||
*aColSpan = ColSpan();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableCellElement::SetRowSpan(int32_t aRowSpan)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetRowSpan(aRowSpan, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableCellElement::GetRowSpan(int32_t* aRowSpan)
|
||||
{
|
||||
*aRowSpan = RowSpan();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
HTMLTableCellElement::GetAlign(nsString& aValue)
|
||||
{
|
||||
|
@ -203,7 +444,7 @@ HTMLTableCellElement::ParseAttribute(int32_t aNamespaceID,
|
|||
aResult);
|
||||
}
|
||||
|
||||
static
|
||||
static
|
||||
void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
|
||||
nsRuleData* aData)
|
||||
{
|
||||
|
|
|
@ -7,6 +7,9 @@
|
|||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsGenericHTMLElement.h"
|
||||
#include "nsIDOMHTMLTableCellElement.h"
|
||||
|
||||
class nsIDOMHTMLTableRowElement;
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
@ -14,7 +17,7 @@ namespace dom {
|
|||
class HTMLTableElement;
|
||||
|
||||
class HTMLTableCellElement MOZ_FINAL : public nsGenericHTMLElement,
|
||||
public nsIDOMHTMLElement
|
||||
public nsIDOMHTMLTableCellElement
|
||||
{
|
||||
public:
|
||||
HTMLTableCellElement(already_AddRefed<nsINodeInfo> aNodeInfo)
|
||||
|
@ -35,6 +38,9 @@ public:
|
|||
// nsIDOMHTMLElement
|
||||
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
||||
|
||||
// nsIDOMHTMLTableCellElement
|
||||
NS_DECL_NSIDOMHTMLTABLECELLELEMENT
|
||||
|
||||
uint32_t ColSpan() const
|
||||
{
|
||||
return GetIntAttr(nsGkAtoms::colspan, 1);
|
||||
|
|
|
@ -62,6 +62,7 @@ XPIDL_SOURCES += [
|
|||
'nsIDOMHTMLSourceElement.idl',
|
||||
'nsIDOMHTMLStyleElement.idl',
|
||||
'nsIDOMHTMLTableCaptionElem.idl',
|
||||
'nsIDOMHTMLTableCellElement.idl',
|
||||
'nsIDOMHTMLTableColElement.idl',
|
||||
'nsIDOMHTMLTableElement.idl',
|
||||
'nsIDOMHTMLTableRowElement.idl',
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
/* -*- 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 nsIDOMHTMLTableCellElement interface is the interface to a
|
||||
* [X]HTML td 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(1fb22137-c231-4eae-9ca4-557bb0852d89)]
|
||||
interface nsIDOMHTMLTableCellElement : nsIDOMHTMLElement
|
||||
{
|
||||
readonly attribute long cellIndex;
|
||||
attribute DOMString abbr;
|
||||
attribute DOMString align;
|
||||
attribute DOMString axis;
|
||||
attribute DOMString bgColor;
|
||||
attribute DOMString ch;
|
||||
attribute DOMString chOff;
|
||||
attribute long colSpan;
|
||||
attribute DOMString headers;
|
||||
attribute DOMString height;
|
||||
attribute boolean noWrap;
|
||||
attribute long rowSpan;
|
||||
attribute DOMString scope;
|
||||
attribute DOMString vAlign;
|
||||
attribute DOMString width;
|
||||
};
|
Загрузка…
Ссылка в новой задаче