mirror of
https://github.com/roytam1/mozilla45esr.git
synced 2026-05-26 15:39:48 +00:00
50ff970e7e
- #375, Bug 1112537 - Optimize String#split('foo').join('bar') pattern. (includes M1235403) r=nbp (36326dfa2) - #415: M1373195 backport (e880223af) - #415: M1376936 M1375331 (33344c644) - #415: M1348095 (consolidated) (d1001e7ef) - #413: update to HTML colspan/rowspan from M1359822, plus M1271126 + M1373095 (no tests) (6958789e8) - #416: M1366903 M1371283 M1368576 (baaf2ee89) - #416: M1368105 (1efa1540f) - checkin additional JS tests (687ba7579) - #416: M1374047 M1365413 M1369913 M1371424 M1346590 M1376087 M1322896 M1354796 M1365333 M1373970 M1355168 (1bc1dd390) - #416: M1265568 M1305036 (257cfd929) - #419: M1377329 (fb72079d0) - #418: M1333106 M1337672 (b1cfd7830) - #416: M1362924 (61ec43889) - #416: M1365189 M1365875 (d9876efcf) - #416: M1378147 M1371890 M1380426 (177c87d34) - #416: note to self on M1377426 (5bcd1c461) - fix debug bustage, shutdown crash (be4d0ed86) - #414: new wildcard based blacklist, updated strings (6ccb443e7) - #416: update certs/pins (797260262) - fix FontDirWrapper off-by-one bugs and warnings (51e6a2cf9) - 104fx_copy should also allow copying debug builds (054bbf081) - #416: M1383000 M1376459 M1372467 M1372383 M1383002 (2f4742e52) - #416: M1308908 M1342433(no tests) (5757a9534) - #416: M1368362 (1cf170047) - #72: additional debugging (0683827d2) - #416: M1381016 M1371657 (afc820240) - #416: update certs for FPR2 final (4ca64d74e) - M1257208 Fix build errors with gcc >= 5 (4c64d8d6d) with additional nsINode* to nsTextNode* change in ResetDir() in DirectionalityUtils.cpp
175 lines
4.8 KiB
C++
175 lines
4.8 KiB
C++
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
|
/* 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/. */
|
|
#ifndef mozilla_dom_HTMLTableCellElement_h
|
|
#define mozilla_dom_HTMLTableCellElement_h
|
|
|
|
#include "mozilla/Attributes.h"
|
|
#include "nsGenericHTMLElement.h"
|
|
#include "nsIDOMHTMLTableCellElement.h"
|
|
|
|
namespace mozilla {
|
|
namespace dom {
|
|
|
|
class HTMLTableElement;
|
|
|
|
class HTMLTableCellElement final : public nsGenericHTMLElement,
|
|
public nsIDOMHTMLTableCellElement
|
|
{
|
|
public:
|
|
explicit HTMLTableCellElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
|
|
: nsGenericHTMLElement(aNodeInfo)
|
|
{
|
|
SetHasWeirdParserInsertionMode();
|
|
}
|
|
|
|
// nsISupports
|
|
NS_DECL_ISUPPORTS_INHERITED
|
|
|
|
// nsIDOMHTMLTableCellElement
|
|
NS_DECL_NSIDOMHTMLTABLECELLELEMENT
|
|
|
|
uint32_t ColSpan() const
|
|
{
|
|
return GetIntAttr(nsGkAtoms::colspan, 1);
|
|
}
|
|
void SetColSpan(uint32_t aColSpan, ErrorResult& aError)
|
|
{
|
|
SetUnsignedIntAttr(nsGkAtoms::colspan, aColSpan, aError);
|
|
}
|
|
uint32_t RowSpan() const
|
|
{
|
|
return GetIntAttr(nsGkAtoms::rowspan, 1);
|
|
}
|
|
void SetRowSpan(uint32_t aRowSpan, ErrorResult& aError)
|
|
{
|
|
SetUnsignedIntAttr(nsGkAtoms::rowspan, aRowSpan, aError);
|
|
}
|
|
//already_AddRefed<nsDOMSettableTokenList> Headers() const;
|
|
void GetHeaders(DOMString& aHeaders)
|
|
{
|
|
GetHTMLAttr(nsGkAtoms::headers, aHeaders);
|
|
}
|
|
void SetHeaders(const nsAString& aHeaders, ErrorResult& aError)
|
|
{
|
|
SetHTMLAttr(nsGkAtoms::headers, aHeaders, aError);
|
|
}
|
|
int32_t CellIndex() const;
|
|
|
|
void GetAbbr(DOMString& aAbbr)
|
|
{
|
|
GetHTMLAttr(nsGkAtoms::abbr, aAbbr);
|
|
}
|
|
void SetAbbr(const nsAString& aAbbr, ErrorResult& aError)
|
|
{
|
|
SetHTMLAttr(nsGkAtoms::abbr, aAbbr, aError);
|
|
}
|
|
void GetScope(DOMString& aScope)
|
|
{
|
|
GetHTMLAttr(nsGkAtoms::scope, aScope);
|
|
}
|
|
void SetScope(const nsAString& aScope, ErrorResult& aError)
|
|
{
|
|
SetHTMLAttr(nsGkAtoms::scope, aScope, aError);
|
|
}
|
|
void GetAlign(DOMString& aAlign);
|
|
void SetAlign(const nsAString& aAlign, ErrorResult& aError)
|
|
{
|
|
SetHTMLAttr(nsGkAtoms::align, aAlign, aError);
|
|
}
|
|
void GetAxis(DOMString& aAxis)
|
|
{
|
|
GetHTMLAttr(nsGkAtoms::axis, aAxis);
|
|
}
|
|
void SetAxis(const nsAString& aAxis, ErrorResult& aError)
|
|
{
|
|
SetHTMLAttr(nsGkAtoms::axis, aAxis, aError);
|
|
}
|
|
void GetHeight(DOMString& aHeight)
|
|
{
|
|
GetHTMLAttr(nsGkAtoms::height, aHeight);
|
|
}
|
|
void SetHeight(const nsAString& aHeight, ErrorResult& aError)
|
|
{
|
|
SetHTMLAttr(nsGkAtoms::height, aHeight, aError);
|
|
}
|
|
void GetWidth(DOMString& aWidth)
|
|
{
|
|
GetHTMLAttr(nsGkAtoms::width, aWidth);
|
|
}
|
|
void SetWidth(const nsAString& aWidth, ErrorResult& aError)
|
|
{
|
|
SetHTMLAttr(nsGkAtoms::width, aWidth, aError);
|
|
}
|
|
void GetCh(DOMString& aCh)
|
|
{
|
|
GetHTMLAttr(nsGkAtoms::_char, aCh);
|
|
}
|
|
void SetCh(const nsAString& aCh, ErrorResult& aError)
|
|
{
|
|
SetHTMLAttr(nsGkAtoms::_char, aCh, aError);
|
|
}
|
|
void GetChOff(DOMString& aChOff)
|
|
{
|
|
GetHTMLAttr(nsGkAtoms::charoff, aChOff);
|
|
}
|
|
void SetChOff(const nsAString& aChOff, ErrorResult& aError)
|
|
{
|
|
SetHTMLAttr(nsGkAtoms::charoff, aChOff, aError);
|
|
}
|
|
bool NoWrap()
|
|
{
|
|
return GetBoolAttr(nsGkAtoms::nowrap);
|
|
}
|
|
void SetNoWrap(bool aNoWrap, ErrorResult& aError)
|
|
{
|
|
SetHTMLBoolAttr(nsGkAtoms::nowrap, aNoWrap, aError);
|
|
}
|
|
void GetVAlign(DOMString& aVAlign)
|
|
{
|
|
GetHTMLAttr(nsGkAtoms::valign, aVAlign);
|
|
}
|
|
void SetVAlign(const nsAString& aVAlign, ErrorResult& aError)
|
|
{
|
|
SetHTMLAttr(nsGkAtoms::valign, aVAlign, aError);
|
|
}
|
|
void GetBgColor(DOMString& aBgColor)
|
|
{
|
|
GetHTMLAttr(nsGkAtoms::bgcolor, aBgColor);
|
|
}
|
|
void SetBgColor(const nsAString& aBgColor, ErrorResult& aError)
|
|
{
|
|
SetHTMLAttr(nsGkAtoms::bgcolor, aBgColor, aError);
|
|
}
|
|
|
|
virtual bool ParseAttribute(int32_t aNamespaceID,
|
|
nsIAtom* aAttribute,
|
|
const nsAString& aValue,
|
|
nsAttrValue& aResult) override;
|
|
virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const override;
|
|
NS_IMETHOD WalkContentStyleRules(nsRuleWalker* aRuleWalker) override;
|
|
NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const override;
|
|
|
|
virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const override;
|
|
|
|
protected:
|
|
virtual ~HTMLTableCellElement();
|
|
|
|
virtual JSObject* WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto) override;
|
|
|
|
HTMLTableElement* GetTable() const;
|
|
|
|
HTMLTableRowElement* GetRow() const;
|
|
|
|
private:
|
|
static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
|
|
nsRuleData* aData);
|
|
};
|
|
|
|
} // namespace dom
|
|
} // namespace mozilla
|
|
|
|
#endif /* mozilla_dom_HTMLTableCellElement_h */
|