зеркало из https://github.com/mozilla/gecko-dev.git
Merge latest green birch changeset and mozilla-central
This commit is contained in:
Коммит
f4167cf13a
|
@ -227,8 +227,8 @@ let Util = {
|
|||
aElement instanceof Ci.nsIDOMHTMLDivElement ||
|
||||
aElement instanceof Ci.nsIDOMHTMLLIElement ||
|
||||
aElement instanceof Ci.nsIDOMHTMLPreElement ||
|
||||
aElement instanceof HTMLHeadingElement ||
|
||||
aElement instanceof HTMLTableCellElement ||
|
||||
aElement instanceof Ci.nsIDOMHTMLHeadingElement ||
|
||||
aElement instanceof Ci.nsIDOMHTMLTableCellElement ||
|
||||
aElement instanceof Ci.nsIDOMHTMLBodyElement);
|
||||
},
|
||||
|
||||
|
|
|
@ -1185,16 +1185,16 @@ var StartUI = {
|
|||
ContextUI.dismissTabs();
|
||||
},
|
||||
|
||||
onNarrowTitleClick: function onNarrowTitleClick(gridId) {
|
||||
let grid = document.getElementById(gridId);
|
||||
onNarrowTitleClick: function onNarrowTitleClick(sectionId) {
|
||||
let section = document.getElementById(sectionId);
|
||||
|
||||
if (grid.hasAttribute("expanded"))
|
||||
if (section.hasAttribute("expanded"))
|
||||
return;
|
||||
|
||||
for (let expandedGrid of Elements.startUI.querySelectorAll("[expanded]"))
|
||||
expandedGrid.removeAttribute("expanded")
|
||||
for (let expandedSection of Elements.startUI.querySelectorAll(".meta-section[expanded]"))
|
||||
expandedSection.removeAttribute("expanded")
|
||||
|
||||
grid.setAttribute("expanded", "true");
|
||||
section.setAttribute("expanded", "true");
|
||||
},
|
||||
|
||||
handleEvent: function handleEvent(aEvent) {
|
||||
|
|
|
@ -197,31 +197,35 @@
|
|||
<!-- portrait/landscape/filled view -->
|
||||
|
||||
<scrollbox id="start-scrollbox" observes="bcast_preciseInput" flex="1">
|
||||
<vbox id="start-topsites" class="meta-section">
|
||||
<vbox id="start-topsites" class="meta-section" expanded="true">
|
||||
<label class="meta-section-title wide-title" value="&topSitesHeader.label;"/>
|
||||
<label class="meta-section-title narrow-title" value="&snappedTopSitesHeader.label;"
|
||||
onclick="StartUI.onNarrowTitleClick('start-topsites-grid')"/>
|
||||
<richgrid id="start-topsites-grid" set-name="topSites" rows="3" columns="3" tiletype="thumbnail" seltype="multiple" flex="1" expanded="true"/>
|
||||
<html:div class="meta-section-title narrow-title" onclick="StartUI.onNarrowTitleClick('start-topsites')">
|
||||
&narrowTopSitesHeader.label;
|
||||
</html:div>
|
||||
<richgrid id="start-topsites-grid" set-name="topSites" rows="3" columns="3" tiletype="thumbnail" seltype="multiple" flex="1"/>
|
||||
</vbox>
|
||||
|
||||
<vbox id="start-bookmarks" class="meta-section">
|
||||
<label class="meta-section-title wide-title" value="&bookmarksHeader.label;"/>
|
||||
<label class="meta-section-title narrow-title" value="&snappedBookmarksHeader.label;"
|
||||
onclick="StartUI.onNarrowTitleClick('start-bookmarks-grid')"/>
|
||||
<html:div class="meta-section-title narrow-title" onclick="StartUI.onNarrowTitleClick('start-bookmarks')">
|
||||
&narrowBookmarksHeader.label;
|
||||
</html:div>
|
||||
<richgrid id="start-bookmarks-grid" set-name="bookmarks" seltype="multiple" flex="1"/>
|
||||
</vbox>
|
||||
|
||||
<vbox id="start-history" class="meta-section">
|
||||
<label class="meta-section-title wide-title" value="&recentHistoryHeader.label;"/>
|
||||
<label class="meta-section-title narrow-title" value="&snappedRecentHistoryHeader.label;"
|
||||
onclick="StartUI.onNarrowTitleClick('start-history-grid')"/>
|
||||
<html:div class="meta-section-title narrow-title" onclick="StartUI.onNarrowTitleClick('start-history')">
|
||||
&narrowRecentHistoryHeader.label;
|
||||
</html:div>
|
||||
<richgrid id="start-history-grid" set-name="recentHistory" seltype="multiple" flex="1"/>
|
||||
</vbox>
|
||||
|
||||
<vbox id="start-remotetabs" class="meta-section">
|
||||
<label class="meta-section-title wide-title" value="&remoteTabsHeader.label;"/>
|
||||
<label id="snappedRemoteTabsLabel" class="meta-section-title narrow-title" value="&snappedRemoteTabsHeader.label;"
|
||||
onclick="StartUI.onNarrowTitleClick('start-remotetabs-grid')"/>
|
||||
<html:div id="snappedRemoteTabsLabel" class="meta-section-title narrow-title" onclick="StartUI.onNarrowTitleClick('start-remotetabs')">
|
||||
&narrowRemoteTabsHeader.label;
|
||||
</html:div>
|
||||
<richgrid id="start-remotetabs-grid" set-name="remoteTabs" seltype="multiple" flex="1"/>
|
||||
</vbox>
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ let HTMLIFrameElement = Ci.nsIDOMHTMLIFrameElement;
|
|||
let HTMLDocument = Ci.nsIDOMHTMLDocument;
|
||||
let HTMLHtmlElement = Ci.nsIDOMHTMLHtmlElement;
|
||||
let HTMLBodyElement = Ci.nsIDOMHTMLBodyElement;
|
||||
let HTMLLabelElement = Ci.nsIDOMHTMLLabelElement;
|
||||
let HTMLButtonElement = Ci.nsIDOMHTMLButtonElement;
|
||||
let HTMLOptGroupElement = Ci.nsIDOMHTMLOptGroupElement;
|
||||
let HTMLOptionElement = Ci.nsIDOMHTMLOptionElement;
|
||||
|
|
|
@ -25,17 +25,17 @@
|
|||
<!ENTITY recentHistoryHeader.label "Recent History">
|
||||
<!ENTITY remoteTabsHeader.label "Tabs from Other Devices">
|
||||
|
||||
<!-- LOCALIZATION NOTE (snappedRemoteTabsHeader.label): shortened version of startRemoteTabsHeader.label.
|
||||
Needs to be two words or shorter to fit in narrow vertical space.-->
|
||||
<!-- LOCALIZATION NOTE (snappedRemoteTabsHeader.label,
|
||||
snappedBookmarksHeader.label,
|
||||
snappedHistoryHeader.label,
|
||||
snappedTopSitesHeader.label )
|
||||
The '>' character is not part of the name, but is an indicator of more content. Please do not localize the '>' -->
|
||||
<!ENTITY snappedRemoteTabsHeader.label "Remote Tabs >">
|
||||
<!ENTITY snappedBookmarksHeader.label "Bookmarks >">
|
||||
<!ENTITY snappedRecentHistoryHeader.label "Recent History >">
|
||||
<!ENTITY snappedTopSitesHeader.label "Top Sites >">
|
||||
<!-- LOCALIZATION NOTE (narrowTopSitesHeader.label,
|
||||
narrowBookmarksHeader.label,
|
||||
narrowHistoryHeader.label,
|
||||
narrowRemoteTabsHeader.label )
|
||||
are shortened versions of topSitesHeader.label, bookmarksHeader.label, recentHistoryHeader.label
|
||||
and remoteTabsHeader.label. Need to be two words or shorter to fit in narrow vertical space.
|
||||
-->
|
||||
<!ENTITY narrowTopSitesHeader.label "Top Sites">
|
||||
<!ENTITY narrowBookmarksHeader.label "Bookmarks">
|
||||
<!ENTITY narrowRecentHistoryHeader.label "Recent History">
|
||||
<!ENTITY narrowRemoteTabsHeader.label "Remote Tabs">
|
||||
|
||||
<!ENTITY downloadsHeader.label "Downloads">
|
||||
<!ENTITY downloadShowPage.label "Go to Page">
|
||||
|
|
|
@ -249,7 +249,7 @@ documenttab[selected] .documenttab-selection {
|
|||
visibility: collapse;
|
||||
}
|
||||
|
||||
#start-container[viewstate="snapped"] richgrid[expanded] {
|
||||
#start-container[viewstate="snapped"] .meta-section[expanded] > richgrid {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
|
|
|
@ -653,18 +653,31 @@ arrowbox {
|
|||
max-width: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.meta-section {
|
||||
margin: 0 @metro_spacing_large@;
|
||||
}
|
||||
|
||||
.meta-section-title {
|
||||
font-size: @metro_font_large@;
|
||||
font-weight: 100;
|
||||
display: none;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
#start-container[viewstate="snapped"] .meta-section-title.narrow-title,
|
||||
#start-container:not([viewstate="snapped"]) .meta-section-title.wide-title {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.meta-section:not([expanded]) > .meta-section-title.narrow-title:-moz-locale-dir(ltr):after {
|
||||
content: ">";
|
||||
}
|
||||
|
||||
.meta-section:not([expanded]) > .meta-section-title.narrow-title:-moz-locale-dir(rtl):before {
|
||||
content: "<";
|
||||
}
|
||||
|
||||
/* App bars ----------------------------------------------------------------- */
|
||||
appbar {
|
||||
display: block;
|
||||
|
|
|
@ -61,6 +61,8 @@ def find_version(e):
|
|||
args += ['-shared', '-Wl,-t']
|
||||
p = subprocess.Popen(args, stderr=subprocess.STDOUT, stdout=subprocess.PIPE)
|
||||
candidates = [x for x in p.stdout if 'libstdc++.so' in x]
|
||||
if not candidates:
|
||||
return ''
|
||||
assert len(candidates) == 1
|
||||
libstdcxx = parse_ld_line(candidates[-1])
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# 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/.
|
||||
|
||||
if CONFIG['STDCXX_COMPAT']:
|
||||
if CONFIG['MOZ_LIBSTDCXX_TARGET_VERSION'] or CONFIG['MOZ_LIBSTDCXX_HOST_VERSION']:
|
||||
DIRS += ['stdc++compat']
|
||||
|
||||
if CONFIG['USE_ELF_HACK']:
|
||||
|
|
|
@ -14,11 +14,11 @@ STL_FLAGS =
|
|||
NO_EXPAND_LIBS = 1
|
||||
NO_PROFILE_GUIDED_OPTIMIZE = 1
|
||||
|
||||
$(NULL)
|
||||
|
||||
HOST_CPPSRCS = $(CPPSRCS)
|
||||
ifdef MOZ_LIBSTDCXX_HOST_VERSION
|
||||
HOST_CPPSRCS = stdc++compat.cpp
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
CXXFLAGS += -DMOZ_LIBSTDCXX_VERSION=$(MOZ_LIBSTDCXX_TARGET_VERSION)
|
||||
HOST_CXXFLAGS += -DMOZ_LIBSTDCXX_VERSION=$(MOZ_LIBSTDCXX_TARGET_VERSION)
|
||||
HOST_CXXFLAGS += -DMOZ_LIBSTDCXX_VERSION=$(MOZ_LIBSTDCXX_HOST_VERSION)
|
||||
|
|
|
@ -6,11 +6,10 @@
|
|||
|
||||
MODULE = 'build'
|
||||
|
||||
CPP_SOURCES += [
|
||||
'stdc++compat.cpp',
|
||||
]
|
||||
if CONFIG['MOZ_LIBSTDCXX_TARGET_VERSION']:
|
||||
LIBRARY_NAME = 'stdc++compat'
|
||||
CPP_SOURCES += ['stdc++compat.cpp']
|
||||
|
||||
HOST_LIBRARY_NAME = 'host_stdc++compat'
|
||||
|
||||
LIBRARY_NAME = 'stdc++compat'
|
||||
if CONFIG['MOZ_LIBSTDCXX_HOST_VERSION']:
|
||||
HOST_LIBRARY_NAME = 'host_stdc++compat'
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ VISIBILITY_FLAGS =
|
|||
|
||||
# STDCXX_COMPAT is not needed here, and will actually fail because
|
||||
# libstdc++-compat is not built yet.
|
||||
STDCXX_COMPAT =
|
||||
MOZ_LIBSTDCXX_HOST_VERSION =
|
||||
|
||||
ifneq (WINNT,$(HOST_OS_ARCH))
|
||||
HOST_PROGRAM = nsinstall_real$(HOST_BIN_SUFFIX)
|
||||
|
|
|
@ -747,14 +747,18 @@ EXPAND_MKSHLIB_ARGS += --symbol-order $(SYMBOL_ORDER)
|
|||
endif
|
||||
EXPAND_MKSHLIB = $(EXPAND_LIBS_EXEC) $(EXPAND_MKSHLIB_ARGS) -- $(MKSHLIB)
|
||||
|
||||
ifdef STDCXX_COMPAT
|
||||
ifneq (,$(MOZ_LIBSTDCXX_TARGET_VERSION)$(MOZ_LIBSTDCXX_HOST_VERSION))
|
||||
ifneq ($(OS_ARCH),Darwin)
|
||||
CHECK_STDCXX = objdump -p $(1) | grep -e 'GLIBCXX_3\.4\.\(9\|[1-9][0-9]\)' > /dev/null && echo "TEST-UNEXPECTED-FAIL | | We don't want these libstdc++ symbols to be used:" && objdump -T $(1) | grep -e 'GLIBCXX_3\.4\.\(9\|[1-9][0-9]\)' && exit 1 || exit 0
|
||||
endif
|
||||
|
||||
ifdef MOZ_LIBSTDCXX_TARGET_VERSION
|
||||
EXTRA_LIBS += $(call EXPAND_LIBNAME_PATH,stdc++compat,$(DEPTH)/build/unix/stdc++compat)
|
||||
endif
|
||||
ifdef MOZ_LIBSTDCXX_HOST_VERSION
|
||||
HOST_EXTRA_LIBS += $(call EXPAND_LIBNAME_PATH,host_stdc++compat,$(DEPTH)/build/unix/stdc++compat)
|
||||
endif
|
||||
endif
|
||||
|
||||
# autoconf.mk sets OBJ_SUFFIX to an error to avoid use before including
|
||||
# this file
|
||||
|
|
|
@ -7534,10 +7534,8 @@ MOZ_ARG_ENABLE_BOOL(stdcxx-compat,
|
|||
[ --enable-stdcxx-compat Enable compatibility with older libstdc++],
|
||||
STDCXX_COMPAT=1)
|
||||
|
||||
AC_SUBST(STDCXX_COMPAT)
|
||||
|
||||
if test -n "$STDCXX_COMPAT"; then
|
||||
eval $(CXX="$CXX" $PYTHON $_topsrcdir/build/autoconf/libstdcxx.py)
|
||||
eval $(CXX="$CXX" HOST_CXX="$HOST_CXX" $PYTHON $_topsrcdir/build/autoconf/libstdcxx.py)
|
||||
AC_SUBST(MOZ_LIBSTDCXX_TARGET_VERSION)
|
||||
AC_SUBST(MOZ_LIBSTDCXX_HOST_VERSION)
|
||||
fi
|
||||
|
|
|
@ -27,8 +27,11 @@ NS_IMPL_CYCLE_COLLECTION_INHERITED_1(HTMLDataListElement, nsGenericHTMLElement,
|
|||
NS_IMPL_ADDREF_INHERITED(HTMLDataListElement, Element)
|
||||
NS_IMPL_RELEASE_INHERITED(HTMLDataListElement, Element)
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(HTMLDataListElement)
|
||||
NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLDataListElement)
|
||||
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
|
||||
NS_INTERFACE_TABLE_INHERITED1(HTMLDataListElement,
|
||||
nsIDOMHTMLDataListElement)
|
||||
NS_INTERFACE_TABLE_TO_MAP_SEGUE
|
||||
NS_ELEMENT_INTERFACE_MAP_END
|
||||
|
||||
|
||||
|
@ -42,5 +45,13 @@ HTMLDataListElement::MatchOptions(nsIContent* aContent, int32_t aNamespaceID,
|
|||
!aContent->HasAttr(kNameSpaceID_None, nsGkAtoms::disabled);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLDataListElement::GetOptions(nsIDOMHTMLCollection** aOptions)
|
||||
{
|
||||
NS_ADDREF(*aOptions = Options());
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -7,13 +7,14 @@
|
|||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsGenericHTMLElement.h"
|
||||
#include "nsIDOMHTMLDataListElement.h"
|
||||
#include "nsContentList.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class HTMLDataListElement MOZ_FINAL : public nsGenericHTMLElement,
|
||||
public nsIDOMHTMLElement
|
||||
public nsIDOMHTMLDataListElement
|
||||
{
|
||||
public:
|
||||
HTMLDataListElement(already_AddRefed<nsINodeInfo> aNodeInfo)
|
||||
|
@ -34,6 +35,9 @@ public:
|
|||
// nsIDOMHTMLElement
|
||||
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
||||
|
||||
// nsIDOMHTMLDataListElement
|
||||
NS_DECL_NSIDOMHTMLDATALISTELEMENT
|
||||
|
||||
nsContentList* Options()
|
||||
{
|
||||
if (!mOptions) {
|
||||
|
|
|
@ -31,13 +31,66 @@ NS_IMPL_ADDREF_INHERITED(HTMLFontElement, Element)
|
|||
NS_IMPL_RELEASE_INHERITED(HTMLFontElement, Element)
|
||||
|
||||
// QueryInterface implementation for HTMLFontElement
|
||||
NS_INTERFACE_MAP_BEGIN(HTMLFontElement)
|
||||
NS_INTERFACE_TABLE_HEAD(HTMLFontElement)
|
||||
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
|
||||
NS_INTERFACE_TABLE_INHERITED1(HTMLFontElement, nsIDOMHTMLFontElement)
|
||||
NS_INTERFACE_TABLE_TO_MAP_SEGUE
|
||||
NS_ELEMENT_INTERFACE_MAP_END
|
||||
|
||||
|
||||
NS_IMPL_ELEMENT_CLONE(HTMLFontElement)
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLFontElement::GetColor(nsAString& aColor)
|
||||
{
|
||||
nsString color;
|
||||
GetColor(color);
|
||||
aColor = color;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLFontElement::SetColor(const nsAString& aColor)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetColor(aColor, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLFontElement::GetFace(nsAString& aFace)
|
||||
{
|
||||
nsString face;
|
||||
GetFace(face);
|
||||
aFace = face;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLFontElement::SetFace(const nsAString& aFace)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetFace(aFace, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLFontElement::GetSize(nsAString& aSize)
|
||||
{
|
||||
nsString size;
|
||||
GetSize(size);
|
||||
aSize = size;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLFontElement::SetSize(const nsAString& aSize)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetSize(aSize, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
bool
|
||||
HTMLFontElement::ParseAttribute(int32_t aNamespaceID,
|
||||
nsIAtom* aAttribute,
|
||||
|
|
|
@ -7,12 +7,13 @@
|
|||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsGenericHTMLElement.h"
|
||||
#include "nsIDOMHTMLFontElement.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class HTMLFontElement MOZ_FINAL : public nsGenericHTMLElement,
|
||||
public nsIDOMHTMLElement
|
||||
public nsIDOMHTMLFontElement
|
||||
{
|
||||
public:
|
||||
HTMLFontElement(already_AddRefed<nsINodeInfo> aNodeInfo)
|
||||
|
@ -33,6 +34,9 @@ public:
|
|||
// nsIDOMHTMLElement
|
||||
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
||||
|
||||
// nsIDOMHTMLFontElement
|
||||
NS_DECL_NSIDOMHTMLFONTELEMENT
|
||||
|
||||
void GetColor(nsString& aColor)
|
||||
{
|
||||
GetHTMLAttr(nsGkAtoms::color, aColor);
|
||||
|
|
|
@ -26,8 +26,11 @@ NS_IMPL_ADDREF_INHERITED(HTMLHeadingElement, Element)
|
|||
NS_IMPL_RELEASE_INHERITED(HTMLHeadingElement, Element)
|
||||
|
||||
// QueryInterface implementation for HTMLHeadingElement
|
||||
NS_INTERFACE_MAP_BEGIN(HTMLHeadingElement)
|
||||
NS_INTERFACE_TABLE_HEAD(HTMLHeadingElement)
|
||||
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
|
||||
NS_INTERFACE_TABLE_INHERITED1(HTMLHeadingElement,
|
||||
nsIDOMHTMLHeadingElement)
|
||||
NS_INTERFACE_TABLE_TO_MAP_SEGUE
|
||||
NS_ELEMENT_INTERFACE_MAP_END
|
||||
|
||||
|
||||
|
@ -39,6 +42,9 @@ HTMLHeadingElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aScope)
|
|||
return HTMLHeadingElementBinding::Wrap(aCx, aScope, this);
|
||||
}
|
||||
|
||||
NS_IMPL_STRING_ATTR(HTMLHeadingElement, Align, align)
|
||||
|
||||
|
||||
bool
|
||||
HTMLHeadingElement::ParseAttribute(int32_t aNamespaceID,
|
||||
nsIAtom* aAttribute,
|
||||
|
|
|
@ -7,13 +7,14 @@
|
|||
#define mozilla_dom_HTMLHeadingElement_h
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsIDOMHTMLHeadingElement.h"
|
||||
#include "nsGenericHTMLElement.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class HTMLHeadingElement MOZ_FINAL : public nsGenericHTMLElement,
|
||||
public nsIDOMHTMLElement
|
||||
public nsIDOMHTMLHeadingElement
|
||||
{
|
||||
public:
|
||||
HTMLHeadingElement(already_AddRefed<nsINodeInfo> aNodeInfo)
|
||||
|
@ -34,6 +35,9 @@ public:
|
|||
// nsIDOMHTMLElement
|
||||
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
||||
|
||||
// nsIDOMHTMLHeadingElement
|
||||
NS_DECL_NSIDOMHTMLHEADINGELEMENT
|
||||
|
||||
virtual bool ParseAttribute(int32_t aNamespaceID,
|
||||
nsIAtom* aAttribute,
|
||||
const nsAString& aValue,
|
||||
|
@ -43,15 +47,8 @@ public:
|
|||
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
|
||||
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
|
||||
|
||||
void GetAlign(nsAString& aAlign)
|
||||
{
|
||||
GetHTMLAttr(nsGkAtoms::align, aAlign);
|
||||
}
|
||||
void SetAlign(const nsAString& aAlign, ErrorResult& aRv)
|
||||
{
|
||||
SetHTMLAttr(nsGkAtoms::align, aAlign, aRv);
|
||||
}
|
||||
|
||||
// The XPCOM versions of GetAlign and SetAlign are fine for us for
|
||||
// use from WebIDL.
|
||||
|
||||
protected:
|
||||
virtual JSObject* WrapNode(JSContext *aCx,
|
||||
|
|
|
@ -35,13 +35,49 @@ NS_IMPL_ADDREF_INHERITED(HTMLLabelElement, Element)
|
|||
NS_IMPL_RELEASE_INHERITED(HTMLLabelElement, Element)
|
||||
|
||||
// QueryInterface implementation for HTMLLabelElement
|
||||
NS_INTERFACE_MAP_BEGIN(HTMLLabelElement)
|
||||
NS_INTERFACE_TABLE_HEAD(HTMLLabelElement)
|
||||
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLFormElement)
|
||||
NS_INTERFACE_TABLE_INHERITED1(HTMLLabelElement,
|
||||
nsIDOMHTMLLabelElement)
|
||||
NS_INTERFACE_TABLE_TO_MAP_SEGUE
|
||||
NS_ELEMENT_INTERFACE_MAP_END
|
||||
|
||||
|
||||
// nsIDOMHTMLLabelElement
|
||||
|
||||
NS_IMPL_ELEMENT_CLONE(HTMLLabelElement)
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLLabelElement::GetForm(nsIDOMHTMLFormElement** aForm)
|
||||
{
|
||||
return nsGenericHTMLFormElement::GetForm(aForm);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLLabelElement::GetControl(nsIDOMHTMLElement** aElement)
|
||||
{
|
||||
nsCOMPtr<nsIDOMHTMLElement> element = do_QueryInterface(GetLabeledElement());
|
||||
element.forget(aElement);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLLabelElement::SetHtmlFor(const nsAString& aHtmlFor)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetHtmlFor(aHtmlFor, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLLabelElement::GetHtmlFor(nsAString& aHtmlFor)
|
||||
{
|
||||
nsString htmlFor;
|
||||
GetHtmlFor(htmlFor);
|
||||
aHtmlFor = htmlFor;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
HTMLLabelElement::Focus(ErrorResult& aError)
|
||||
{
|
||||
|
|
|
@ -11,12 +11,13 @@
|
|||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsGenericHTMLElement.h"
|
||||
#include "nsIDOMHTMLLabelElement.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class HTMLLabelElement MOZ_FINAL : public nsGenericHTMLFormElement,
|
||||
public nsIDOMHTMLElement
|
||||
public nsIDOMHTMLLabelElement
|
||||
{
|
||||
public:
|
||||
HTMLLabelElement(already_AddRefed<nsINodeInfo> aNodeInfo)
|
||||
|
@ -37,6 +38,9 @@ public:
|
|||
// nsIDOMElement
|
||||
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
|
||||
|
||||
// nsIDOMHTMLLabelElement
|
||||
NS_DECL_NSIDOMHTMLLABELELEMENT
|
||||
|
||||
// nsIDOMHTMLElement
|
||||
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
||||
|
||||
|
|
|
@ -25,13 +25,30 @@ NS_IMPL_RELEASE_INHERITED(HTMLLegendElement, Element)
|
|||
|
||||
|
||||
// QueryInterface implementation for HTMLLegendElement
|
||||
NS_INTERFACE_MAP_BEGIN(HTMLLegendElement)
|
||||
NS_INTERFACE_TABLE_HEAD(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,6 +7,7 @@
|
|||
#define mozilla_dom_HTMLLegendElement_h
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsIDOMHTMLLegendElement.h"
|
||||
#include "nsGenericHTMLElement.h"
|
||||
#include "mozilla/dom/HTMLFormElement.h"
|
||||
|
||||
|
@ -14,7 +15,7 @@ namespace mozilla {
|
|||
namespace dom {
|
||||
|
||||
class HTMLLegendElement MOZ_FINAL : public nsGenericHTMLElement,
|
||||
public nsIDOMHTMLElement
|
||||
public nsIDOMHTMLLegendElement
|
||||
{
|
||||
public:
|
||||
HTMLLegendElement(already_AddRefed<nsINodeInfo> aNodeInfo)
|
||||
|
@ -34,6 +35,9 @@ public:
|
|||
// nsIDOMElement
|
||||
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
|
||||
|
||||
// nsIDOMHTMLLegendElement
|
||||
NS_DECL_NSIDOMHTMLLEGENDELEMENT
|
||||
|
||||
// nsIDOMHTMLElement
|
||||
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
||||
|
||||
|
@ -82,11 +86,7 @@ public:
|
|||
|
||||
already_AddRefed<HTMLFormElement> GetForm();
|
||||
|
||||
void GetAlign(nsAString& aAlign)
|
||||
{
|
||||
GetHTMLAttr(nsGkAtoms::align, aAlign);
|
||||
}
|
||||
|
||||
// The XPCOM GetAlign is OK for us
|
||||
void SetAlign(const nsAString& aAlign, ErrorResult& aError)
|
||||
{
|
||||
SetHTMLAttr(nsGkAtoms::align, aAlign, aError);
|
||||
|
|
|
@ -29,8 +29,11 @@ NS_IMPL_ADDREF_INHERITED(HTMLMeterElement, Element)
|
|||
NS_IMPL_RELEASE_INHERITED(HTMLMeterElement, Element)
|
||||
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN(HTMLMeterElement)
|
||||
NS_INTERFACE_TABLE_HEAD(HTMLMeterElement)
|
||||
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
|
||||
NS_INTERFACE_TABLE_INHERITED1(HTMLMeterElement,
|
||||
nsIDOMHTMLMeterElement)
|
||||
NS_INTERFACE_TABLE_TO_MAP_SEGUE
|
||||
NS_ELEMENT_INTERFACE_MAP_END
|
||||
|
||||
NS_IMPL_ELEMENT_CLONE(HTMLMeterElement)
|
||||
|
@ -220,6 +223,88 @@ HTMLMeterElement::Optimum() const
|
|||
return std::min(optimum, max);
|
||||
}
|
||||
|
||||
/*
|
||||
* XPCOM methods
|
||||
*/
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLMeterElement::GetMin(double* aValue)
|
||||
{
|
||||
*aValue = Min();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLMeterElement::SetMin(double aValue)
|
||||
{
|
||||
return SetDoubleAttr(nsGkAtoms::min, aValue);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLMeterElement::GetMax(double* aValue)
|
||||
{
|
||||
*aValue = Max();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLMeterElement::SetMax(double aValue)
|
||||
{
|
||||
return SetDoubleAttr(nsGkAtoms::max, aValue);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLMeterElement::GetValue(double* aValue)
|
||||
{
|
||||
*aValue = Value();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLMeterElement::SetValue(double aValue)
|
||||
{
|
||||
return SetDoubleAttr(nsGkAtoms::value, aValue);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLMeterElement::GetLow(double* aValue)
|
||||
{
|
||||
*aValue = Low();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLMeterElement::SetLow(double aValue)
|
||||
{
|
||||
return SetDoubleAttr(nsGkAtoms::low, aValue);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLMeterElement::GetHigh(double* aValue)
|
||||
{
|
||||
*aValue = High();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLMeterElement::SetHigh(double aValue)
|
||||
{
|
||||
return SetDoubleAttr(nsGkAtoms::high, aValue);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLMeterElement::GetOptimum(double* aValue)
|
||||
{
|
||||
*aValue = Optimum();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLMeterElement::SetOptimum(double aValue)
|
||||
{
|
||||
return SetDoubleAttr(nsGkAtoms::optimum, aValue);
|
||||
}
|
||||
|
||||
nsEventStates
|
||||
HTMLMeterElement::GetOptimumState() const
|
||||
{
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#define mozilla_dom_HTMLMeterElement_h
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsIDOMHTMLMeterElement.h"
|
||||
#include "nsGenericHTMLElement.h"
|
||||
#include "nsAttrValue.h"
|
||||
#include "nsAttrValueInlines.h"
|
||||
|
@ -18,7 +19,7 @@ namespace mozilla {
|
|||
namespace dom {
|
||||
|
||||
class HTMLMeterElement MOZ_FINAL : public nsGenericHTMLElement,
|
||||
public nsIDOMHTMLElement
|
||||
public nsIDOMHTMLMeterElement
|
||||
{
|
||||
public:
|
||||
HTMLMeterElement(already_AddRefed<nsINodeInfo> aNodeInfo);
|
||||
|
@ -36,6 +37,9 @@ public:
|
|||
/* nsIDOMHTMLElement */
|
||||
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
||||
|
||||
/* nsIDOMHTMLMeterElement */
|
||||
NS_DECL_NSIDOMHTMLMETERELEMENT
|
||||
|
||||
virtual nsEventStates IntrinsicState() const MOZ_OVERRIDE;
|
||||
|
||||
nsresult Clone(nsINodeInfo* aNodeInfo, nsINode** aResult) const MOZ_OVERRIDE;
|
||||
|
@ -51,42 +55,42 @@ public:
|
|||
double Value() const;
|
||||
void SetValue(double aValue, ErrorResult& aRv)
|
||||
{
|
||||
aRv = SetDoubleAttr(nsGkAtoms::value, aValue);
|
||||
aRv = SetValue(aValue);
|
||||
}
|
||||
|
||||
/* @return the minimum value */
|
||||
double Min() const;
|
||||
void SetMin(double aValue, ErrorResult& aRv)
|
||||
{
|
||||
aRv = SetDoubleAttr(nsGkAtoms::min, aValue);
|
||||
aRv = SetMin(aValue);
|
||||
}
|
||||
|
||||
/* @return the maximum value */
|
||||
double Max() const;
|
||||
void SetMax(double aValue, ErrorResult& aRv)
|
||||
{
|
||||
aRv = SetDoubleAttr(nsGkAtoms::max, aValue);
|
||||
aRv = SetMax(aValue);
|
||||
}
|
||||
|
||||
/* @return the low value */
|
||||
double Low() const;
|
||||
void SetLow(double aValue, ErrorResult& aRv)
|
||||
{
|
||||
aRv = SetDoubleAttr(nsGkAtoms::low, aValue);
|
||||
aRv = SetLow(aValue);
|
||||
}
|
||||
|
||||
/* @return the high value */
|
||||
double High() const;
|
||||
void SetHigh(double aValue, ErrorResult& aRv)
|
||||
{
|
||||
aRv = SetDoubleAttr(nsGkAtoms::high, aValue);
|
||||
aRv = SetHigh(aValue);
|
||||
}
|
||||
|
||||
/* @return the optimum value */
|
||||
double Optimum() const;
|
||||
void SetOptimum(double aValue, ErrorResult& aRv)
|
||||
{
|
||||
aRv = SetDoubleAttr(nsGkAtoms::optimum, aValue);
|
||||
aRv = SetOptimum(aValue);
|
||||
}
|
||||
|
||||
protected:
|
||||
|
|
|
@ -26,13 +26,20 @@ NS_IMPL_ADDREF_INHERITED(HTMLModElement, Element)
|
|||
NS_IMPL_RELEASE_INHERITED(HTMLModElement, Element)
|
||||
|
||||
// QueryInterface implementation for HTMLModElement
|
||||
NS_INTERFACE_MAP_BEGIN(HTMLModElement)
|
||||
NS_INTERFACE_TABLE_HEAD(HTMLModElement)
|
||||
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
|
||||
NS_INTERFACE_TABLE_INHERITED1(HTMLModElement,
|
||||
nsIDOMHTMLModElement)
|
||||
NS_INTERFACE_TABLE_TO_MAP_SEGUE
|
||||
NS_ELEMENT_INTERFACE_MAP_END
|
||||
|
||||
|
||||
NS_IMPL_ELEMENT_CLONE(HTMLModElement)
|
||||
|
||||
|
||||
NS_IMPL_URI_ATTR(HTMLModElement, Cite, cite)
|
||||
NS_IMPL_STRING_ATTR(HTMLModElement, DateTime, datetime)
|
||||
|
||||
JSObject*
|
||||
HTMLModElement::WrapNode(JSContext* aCx, JS::Handle<JSObject*> aScope)
|
||||
{
|
||||
|
|
|
@ -8,13 +8,14 @@
|
|||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsGenericHTMLElement.h"
|
||||
#include "nsIDOMHTMLModElement.h"
|
||||
#include "nsGkAtoms.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class HTMLModElement MOZ_FINAL : public nsGenericHTMLElement,
|
||||
public nsIDOMHTMLElement
|
||||
public nsIDOMHTMLModElement
|
||||
{
|
||||
public:
|
||||
HTMLModElement(already_AddRefed<nsINodeInfo> aNodeInfo);
|
||||
|
@ -32,6 +33,9 @@ public:
|
|||
// nsIDOMHTMLElement
|
||||
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
||||
|
||||
// nsIDOMHTMLModElement
|
||||
NS_DECL_NSIDOMHTMLMODELEMENT
|
||||
|
||||
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
|
||||
|
||||
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
|
||||
|
@ -44,10 +48,7 @@ public:
|
|||
{
|
||||
SetHTMLAttr(nsGkAtoms::cite, aCite, aRv);
|
||||
}
|
||||
void GetDateTime(nsAString& aDateTime)
|
||||
{
|
||||
GetHTMLAttr(nsGkAtoms::datetime, aDateTime);
|
||||
}
|
||||
// XPCOM GetDateTime is fine.
|
||||
void SetDateTime(const nsAString& aDateTime, ErrorResult& aRv)
|
||||
{
|
||||
SetHTMLAttr(nsGkAtoms::datetime, aDateTime, aRv);
|
||||
|
|
|
@ -53,7 +53,8 @@ NS_IMPL_RELEASE_INHERITED(HTMLOutputElement, Element)
|
|||
|
||||
NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLOutputElement)
|
||||
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLFormElement)
|
||||
NS_INTERFACE_TABLE_INHERITED2(HTMLOutputElement,
|
||||
NS_INTERFACE_TABLE_INHERITED3(HTMLOutputElement,
|
||||
nsIDOMHTMLOutputElement,
|
||||
nsIMutationObserver,
|
||||
nsIConstraintValidation)
|
||||
NS_INTERFACE_TABLE_TO_MAP_SEGUE
|
||||
|
@ -61,12 +62,20 @@ NS_ELEMENT_INTERFACE_MAP_END
|
|||
|
||||
NS_IMPL_ELEMENT_CLONE(HTMLOutputElement)
|
||||
|
||||
void
|
||||
|
||||
NS_IMPL_STRING_ATTR(HTMLOutputElement, Name, name)
|
||||
|
||||
// nsIConstraintValidation
|
||||
NS_IMPL_NSICONSTRAINTVALIDATION_EXCEPT_SETCUSTOMVALIDITY(HTMLOutputElement)
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLOutputElement::SetCustomValidity(const nsAString& aError)
|
||||
{
|
||||
nsIConstraintValidation::SetCustomValidity(aError);
|
||||
|
||||
UpdateState(true);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -140,20 +149,49 @@ HTMLOutputElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
|
|||
return rv;
|
||||
}
|
||||
|
||||
void
|
||||
HTMLOutputElement::SetValue(const nsAString& aValue, ErrorResult& aRv)
|
||||
NS_IMETHODIMP
|
||||
HTMLOutputElement::GetForm(nsIDOMHTMLFormElement** aForm)
|
||||
{
|
||||
mValueModeFlag = eModeValue;
|
||||
aRv = nsContentUtils::SetNodeTextContent(this, aValue, true);
|
||||
return nsGenericHTMLFormElement::GetForm(aForm);
|
||||
}
|
||||
|
||||
void
|
||||
HTMLOutputElement::SetDefaultValue(const nsAString& aDefaultValue, ErrorResult& aRv)
|
||||
NS_IMETHODIMP
|
||||
HTMLOutputElement::GetType(nsAString& aType)
|
||||
{
|
||||
aType.AssignLiteral("output");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLOutputElement::GetValue(nsAString& aValue)
|
||||
{
|
||||
nsContentUtils::GetNodeTextContent(this, true, aValue);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLOutputElement::SetValue(const nsAString& aValue)
|
||||
{
|
||||
mValueModeFlag = eModeValue;
|
||||
return nsContentUtils::SetNodeTextContent(this, aValue, true);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLOutputElement::GetDefaultValue(nsAString& aDefaultValue)
|
||||
{
|
||||
aDefaultValue = mDefaultValue;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLOutputElement::SetDefaultValue(const nsAString& aDefaultValue)
|
||||
{
|
||||
mDefaultValue = aDefaultValue;
|
||||
if (mValueModeFlag == eModeDefault) {
|
||||
aRv = nsContentUtils::SetNodeTextContent(this, mDefaultValue, true);
|
||||
return nsContentUtils::SetNodeTextContent(this, mDefaultValue, true);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsDOMSettableTokenList*
|
||||
|
@ -165,6 +203,13 @@ HTMLOutputElement::HtmlFor()
|
|||
return mTokenList;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLOutputElement::GetHtmlFor(nsISupports** aResult)
|
||||
{
|
||||
NS_ADDREF(*aResult = HtmlFor());
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void HTMLOutputElement::DescendantsChanged()
|
||||
{
|
||||
if (mValueModeFlag == eModeDefault) {
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsGenericHTMLElement.h"
|
||||
#include "nsIDOMHTMLOutputElement.h"
|
||||
#include "nsStubMutationObserver.h"
|
||||
#include "nsIConstraintValidation.h"
|
||||
|
||||
|
@ -15,7 +16,7 @@ namespace mozilla {
|
|||
namespace dom {
|
||||
|
||||
class HTMLOutputElement MOZ_FINAL : public nsGenericHTMLFormElement,
|
||||
public nsIDOMHTMLElement,
|
||||
public nsIDOMHTMLOutputElement,
|
||||
public nsStubMutationObserver,
|
||||
public nsIConstraintValidation
|
||||
{
|
||||
|
@ -37,6 +38,9 @@ public:
|
|||
// nsIDOMHTMLElement
|
||||
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
||||
|
||||
// nsIDOMHTMLOutputElement
|
||||
NS_DECL_NSIDOMHTMLOUTPUTELEMENT
|
||||
|
||||
// nsIFormControl
|
||||
NS_IMETHOD_(uint32_t) GetType() const { return NS_FORM_OUTPUT; }
|
||||
NS_IMETHOD Reset() MOZ_OVERRIDE;
|
||||
|
@ -75,40 +79,31 @@ public:
|
|||
// WebIDL
|
||||
nsDOMSettableTokenList* HtmlFor();
|
||||
// nsGenericHTMLFormElement::GetForm is fine.
|
||||
void GetName(nsAString& aName)
|
||||
{
|
||||
GetHTMLAttr(nsGkAtoms::name, aName);
|
||||
}
|
||||
|
||||
using nsGenericHTMLFormElement::GetForm;
|
||||
// XPCOM GetName is fine.
|
||||
void SetName(const nsAString& aName, ErrorResult& aRv)
|
||||
{
|
||||
SetHTMLAttr(nsGkAtoms::name, aName, aRv);
|
||||
}
|
||||
|
||||
void GetType(nsAString& aType)
|
||||
// XPCOM GetType is fine.
|
||||
// XPCOM GetDefaultValue is fine.
|
||||
void SetDefaultValue(const nsAString& aDefaultValue, ErrorResult& aRv)
|
||||
{
|
||||
aType.AssignLiteral("output");
|
||||
aRv = SetDefaultValue(aDefaultValue);
|
||||
}
|
||||
|
||||
void GetDefaultValue(nsAString& aDefaultValue)
|
||||
// XPCOM GetValue is fine.
|
||||
void SetValue(const nsAString& aValue, ErrorResult& aRv)
|
||||
{
|
||||
aDefaultValue = mDefaultValue;
|
||||
aRv = SetValue(aValue);
|
||||
}
|
||||
|
||||
void SetDefaultValue(const nsAString& aDefaultValue, ErrorResult& aRv);
|
||||
|
||||
void GetValue(nsAString& aValue)
|
||||
{
|
||||
nsContentUtils::GetNodeTextContent(this, true, aValue);
|
||||
}
|
||||
|
||||
void SetValue(const nsAString& aValue, ErrorResult& aRv);
|
||||
|
||||
// nsIConstraintValidation::WillValidate is fine.
|
||||
// nsIConstraintValidation::Validity() is fine.
|
||||
// nsIConstraintValidation::GetValidationMessage() is fine.
|
||||
// nsIConstraintValidation::CheckValidity() is fine.
|
||||
void SetCustomValidity(const nsAString& aError);
|
||||
using nsIConstraintValidation::CheckValidity;
|
||||
// nsIConstraintValidation::SetCustomValidity() is fine.
|
||||
|
||||
protected:
|
||||
enum ValueModeFlag {
|
||||
|
|
|
@ -31,8 +31,11 @@ NS_IMPL_ADDREF_INHERITED(HTMLProgressElement, Element)
|
|||
NS_IMPL_RELEASE_INHERITED(HTMLProgressElement, Element)
|
||||
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN(HTMLProgressElement)
|
||||
NS_INTERFACE_TABLE_HEAD(HTMLProgressElement)
|
||||
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
|
||||
NS_INTERFACE_TABLE_INHERITED1(HTMLProgressElement,
|
||||
nsIDOMHTMLProgressElement)
|
||||
NS_INTERFACE_TABLE_TO_MAP_SEGUE
|
||||
NS_ELEMENT_INTERFACE_MAP_END
|
||||
|
||||
NS_IMPL_ELEMENT_CLONE(HTMLProgressElement)
|
||||
|
@ -64,6 +67,13 @@ HTMLProgressElement::ParseAttribute(int32_t aNamespaceID, nsIAtom* aAttribute,
|
|||
aValue, aResult);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLProgressElement::GetValue(double* aValue)
|
||||
{
|
||||
*aValue = Value();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
double
|
||||
HTMLProgressElement::Value() const
|
||||
{
|
||||
|
@ -76,6 +86,21 @@ HTMLProgressElement::Value() const
|
|||
return std::min(attrValue->GetDoubleValue(), Max());
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLProgressElement::SetValue(double aValue)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetValue(aValue, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLProgressElement::GetMax(double* aValue)
|
||||
{
|
||||
*aValue = Max();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
double
|
||||
HTMLProgressElement::Max() const
|
||||
{
|
||||
|
@ -88,6 +113,21 @@ HTMLProgressElement::Max() const
|
|||
return attrMax->GetDoubleValue();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLProgressElement::SetMax(double aValue)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetMax(aValue, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLProgressElement::GetPosition(double* aPosition)
|
||||
{
|
||||
*aPosition = Position();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
double
|
||||
HTMLProgressElement::Position() const
|
||||
{
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#define mozilla_dom_HTMLProgressElement_h
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsIDOMHTMLProgressElement.h"
|
||||
#include "nsGenericHTMLElement.h"
|
||||
#include "nsAttrValue.h"
|
||||
#include "nsAttrValueInlines.h"
|
||||
|
@ -17,7 +18,7 @@ namespace mozilla {
|
|||
namespace dom {
|
||||
|
||||
class HTMLProgressElement MOZ_FINAL : public nsGenericHTMLElement,
|
||||
public nsIDOMHTMLElement
|
||||
public nsIDOMHTMLProgressElement
|
||||
{
|
||||
public:
|
||||
HTMLProgressElement(already_AddRefed<nsINodeInfo> aNodeInfo);
|
||||
|
@ -35,6 +36,9 @@ public:
|
|||
// nsIDOMHTMLElement
|
||||
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
||||
|
||||
// nsIDOMHTMLProgressElement
|
||||
NS_DECL_NSIDOMHTMLPROGRESSELEMENT
|
||||
|
||||
nsEventStates IntrinsicState() const MOZ_OVERRIDE;
|
||||
|
||||
nsresult Clone(nsINodeInfo* aNodeInfo, nsINode** aResult) const MOZ_OVERRIDE;
|
||||
|
|
|
@ -34,7 +34,8 @@ NS_IMPL_RELEASE_INHERITED(HTMLSharedElement, Element)
|
|||
// QueryInterface implementation for HTMLSharedElement
|
||||
NS_INTERFACE_MAP_BEGIN(HTMLSharedElement)
|
||||
NS_HTML_CONTENT_INTERFACES_AMBIGUOUS(nsGenericHTMLElement,
|
||||
nsIDOMHTMLBaseElement)
|
||||
nsIDOMHTMLParamElement)
|
||||
NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLParamElement, param)
|
||||
NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLBaseElement, base)
|
||||
NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLDirectoryElement, dir)
|
||||
NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLQuoteElement, q)
|
||||
|
@ -46,6 +47,15 @@ NS_ELEMENT_INTERFACE_MAP_END
|
|||
|
||||
NS_IMPL_ELEMENT_CLONE(HTMLSharedElement)
|
||||
|
||||
// nsIDOMHTMLParamElement
|
||||
NS_IMPL_STRING_ATTR(HTMLSharedElement, Name, name)
|
||||
NS_IMPL_STRING_ATTR(HTMLSharedElement, Type, type)
|
||||
NS_IMPL_STRING_ATTR(HTMLSharedElement, Value, value)
|
||||
NS_IMPL_STRING_ATTR(HTMLSharedElement, ValueType, valuetype)
|
||||
|
||||
// nsIDOMHTMLDirectoryElement
|
||||
NS_IMPL_BOOL_ATTR(HTMLSharedElement, Compact, compact)
|
||||
|
||||
// nsIDOMHTMLQuoteElement
|
||||
NS_IMPL_URI_ATTR(HTMLSharedElement, Cite, cite)
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#ifndef mozilla_dom_HTMLSharedElement_h
|
||||
#define mozilla_dom_HTMLSharedElement_h
|
||||
|
||||
#include "nsIDOMHTMLParamElement.h"
|
||||
#include "nsIDOMHTMLBaseElement.h"
|
||||
#include "nsIDOMHTMLDirectoryElement.h"
|
||||
#include "nsIDOMHTMLQuoteElement.h"
|
||||
|
@ -22,6 +23,7 @@ namespace mozilla {
|
|||
namespace dom {
|
||||
|
||||
class HTMLSharedElement MOZ_FINAL : public nsGenericHTMLElement,
|
||||
public nsIDOMHTMLParamElement,
|
||||
public nsIDOMHTMLBaseElement,
|
||||
public nsIDOMHTMLDirectoryElement,
|
||||
public nsIDOMHTMLQuoteElement,
|
||||
|
@ -47,9 +49,15 @@ public:
|
|||
// nsIDOMHTMLElement
|
||||
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
||||
|
||||
// nsIDOMHTMLParamElement
|
||||
NS_DECL_NSIDOMHTMLPARAMELEMENT
|
||||
|
||||
// nsIDOMHTMLBaseElement
|
||||
NS_DECL_NSIDOMHTMLBASEELEMENT
|
||||
|
||||
// nsIDOMHTMLDirectoryElement
|
||||
NS_DECL_NSIDOMHTMLDIRECTORYELEMENT
|
||||
|
||||
// nsIDOMHTMLQuoteElement
|
||||
NS_DECL_NSIDOMHTMLQUOTEELEMENT
|
||||
|
||||
|
@ -90,7 +98,7 @@ public:
|
|||
|
||||
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE
|
||||
{
|
||||
return static_cast<nsIDOMHTMLBaseElement*>(this);
|
||||
return static_cast<nsIDOMHTMLParamElement*>(this);
|
||||
}
|
||||
|
||||
// WebIDL API
|
||||
|
|
|
@ -32,6 +32,7 @@ NS_INTERFACE_MAP_BEGIN(HTMLSharedListElement)
|
|||
NS_HTML_CONTENT_INTERFACES_AMBIGUOUS(nsGenericHTMLElement,
|
||||
nsIDOMHTMLOListElement)
|
||||
NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLOListElement, ol)
|
||||
NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLDListElement, dl)
|
||||
NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLUListElement, ul)
|
||||
NS_ELEMENT_INTERFACE_MAP_END
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "mozilla/Util.h"
|
||||
|
||||
#include "nsIDOMHTMLOListElement.h"
|
||||
#include "nsIDOMHTMLDListElement.h"
|
||||
#include "nsIDOMHTMLUListElement.h"
|
||||
#include "nsGenericHTMLElement.h"
|
||||
|
||||
|
@ -17,6 +18,7 @@ namespace dom {
|
|||
|
||||
class HTMLSharedListElement MOZ_FINAL : public nsGenericHTMLElement,
|
||||
public nsIDOMHTMLOListElement,
|
||||
public nsIDOMHTMLDListElement,
|
||||
public nsIDOMHTMLUListElement
|
||||
{
|
||||
public:
|
||||
|
@ -41,6 +43,9 @@ public:
|
|||
// nsIDOMHTMLOListElement
|
||||
NS_DECL_NSIDOMHTMLOLISTELEMENT
|
||||
|
||||
// nsIDOMHTMLDListElement
|
||||
// fully declared by NS_DECL_NSIDOMHTMLOLISTELEMENT
|
||||
|
||||
// nsIDOMHTMLUListElement
|
||||
// fully declared by NS_DECL_NSIDOMHTMLOLISTELEMENT
|
||||
|
||||
|
|
|
@ -34,8 +34,11 @@ NS_IMPL_ADDREF_INHERITED(HTMLTableCellElement, Element)
|
|||
NS_IMPL_RELEASE_INHERITED(HTMLTableCellElement, Element)
|
||||
|
||||
// QueryInterface implementation for HTMLTableCellElement
|
||||
NS_INTERFACE_MAP_BEGIN(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
|
||||
|
||||
|
||||
|
@ -101,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)
|
||||
{
|
||||
|
@ -117,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)
|
||||
{
|
||||
|
@ -202,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);
|
||||
|
|
|
@ -34,12 +34,115 @@ NS_IMPL_ADDREF_INHERITED(HTMLTableColElement, Element)
|
|||
NS_IMPL_RELEASE_INHERITED(HTMLTableColElement, Element)
|
||||
|
||||
// QueryInterface implementation for HTMLTableColElement
|
||||
NS_INTERFACE_MAP_BEGIN(HTMLTableColElement)
|
||||
NS_INTERFACE_TABLE_HEAD(HTMLTableColElement)
|
||||
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
|
||||
NS_INTERFACE_TABLE_INHERITED1(HTMLTableColElement,
|
||||
nsIDOMHTMLTableColElement)
|
||||
NS_INTERFACE_TABLE_TO_MAP_SEGUE
|
||||
NS_ELEMENT_INTERFACE_MAP_END
|
||||
|
||||
NS_IMPL_ELEMENT_CLONE(HTMLTableColElement)
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableColElement::SetSpan(int32_t aSpan)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetSpan(aSpan, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableColElement::GetSpan(int32_t* aSpan)
|
||||
{
|
||||
*aSpan = Span();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableColElement::SetAlign(const nsAString& aAlign)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetAlign(aAlign, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableColElement::GetAlign(nsAString& aAlign)
|
||||
{
|
||||
nsString align;
|
||||
GetAlign(align);
|
||||
aAlign = align;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableColElement::SetVAlign(const nsAString& aVAlign)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetVAlign(aVAlign, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableColElement::GetVAlign(nsAString& aVAlign)
|
||||
{
|
||||
nsString vAlign;
|
||||
GetVAlign(vAlign);
|
||||
aVAlign = vAlign;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableColElement::SetCh(const nsAString& aCh)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetCh(aCh, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableColElement::GetCh(nsAString& aCh)
|
||||
{
|
||||
nsString ch;
|
||||
GetCh(ch);
|
||||
aCh = ch;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableColElement::SetChOff(const nsAString& aChOff)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetChOff(aChOff, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableColElement::GetChOff(nsAString& aChOff)
|
||||
{
|
||||
nsString chOff;
|
||||
GetChOff(chOff);
|
||||
aChOff = chOff;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableColElement::SetWidth(const nsAString& aWidth)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetWidth(aWidth, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableColElement::GetWidth(nsAString& aWidth)
|
||||
{
|
||||
nsString width;
|
||||
GetWidth(width);
|
||||
aWidth = width;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
bool
|
||||
HTMLTableColElement::ParseAttribute(int32_t aNamespaceID,
|
||||
nsIAtom* aAttribute,
|
||||
|
|
|
@ -7,12 +7,13 @@
|
|||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsGenericHTMLElement.h"
|
||||
#include "nsIDOMHTMLTableColElement.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class HTMLTableColElement MOZ_FINAL : public nsGenericHTMLElement,
|
||||
public nsIDOMHTMLElement
|
||||
public nsIDOMHTMLTableColElement
|
||||
{
|
||||
public:
|
||||
HTMLTableColElement(already_AddRefed<nsINodeInfo> aNodeInfo)
|
||||
|
@ -33,6 +34,9 @@ public:
|
|||
// nsIDOMHTMLElement
|
||||
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
||||
|
||||
// nsIDOMHTMLTableColElement
|
||||
NS_DECL_NSIDOMHTMLTABLECOLELEMENT
|
||||
|
||||
uint32_t Span() const
|
||||
{
|
||||
return GetIntAttr(nsGkAtoms::span, 1);
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "mozilla/Util.h"
|
||||
|
||||
#include "mozilla/dom/HTMLTableElement.h"
|
||||
#include "nsIDOMHTMLTableSectionElement.h"
|
||||
#include "nsAttrValueInlines.h"
|
||||
#include "nsRuleData.h"
|
||||
#include "nsHTMLStyleSheet.h"
|
||||
|
@ -343,6 +344,219 @@ NS_IMPL_ELEMENT_CLONE(HTMLTableElement)
|
|||
// in fact, they are integers or they are meaningless. so we store them
|
||||
// here as ints.
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableElement::SetAlign(const nsAString& aAlign)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetAlign(aAlign, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableElement::GetAlign(nsAString& aAlign)
|
||||
{
|
||||
nsString align;
|
||||
GetAlign(align);
|
||||
aAlign = align;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableElement::SetBgColor(const nsAString& aBgColor)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetBgColor(aBgColor, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableElement::GetBgColor(nsAString& aBgColor)
|
||||
{
|
||||
nsString bgColor;
|
||||
GetBgColor(bgColor);
|
||||
aBgColor = bgColor;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableElement::SetBorder(const nsAString& aBorder)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetBorder(aBorder, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableElement::GetBorder(nsAString& aBorder)
|
||||
{
|
||||
nsString border;
|
||||
GetBorder(border);
|
||||
aBorder = border;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableElement::SetCellPadding(const nsAString& aCellPadding)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetCellPadding(aCellPadding, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableElement::GetCellPadding(nsAString& aCellPadding)
|
||||
{
|
||||
nsString cellPadding;
|
||||
GetCellPadding(cellPadding);
|
||||
aCellPadding = cellPadding;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableElement::SetCellSpacing(const nsAString& aCellSpacing)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetCellSpacing(aCellSpacing, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableElement::GetCellSpacing(nsAString& aCellSpacing)
|
||||
{
|
||||
nsString cellSpacing;
|
||||
GetCellSpacing(cellSpacing);
|
||||
aCellSpacing = cellSpacing;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableElement::SetFrame(const nsAString& aFrame)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetFrame(aFrame, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableElement::GetFrame(nsAString& aFrame)
|
||||
{
|
||||
nsString frame;
|
||||
GetFrame(frame);
|
||||
aFrame = frame;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableElement::SetRules(const nsAString& aRules)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetRules(aRules, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableElement::GetRules(nsAString& aRules)
|
||||
{
|
||||
nsString rules;
|
||||
GetRules(rules);
|
||||
aRules = rules;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableElement::SetSummary(const nsAString& aSummary)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetSummary(aSummary, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableElement::GetSummary(nsAString& aSummary)
|
||||
{
|
||||
nsString summary;
|
||||
GetSummary(summary);
|
||||
aSummary = summary;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableElement::SetWidth(const nsAString& aWidth)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetWidth(aWidth, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableElement::GetWidth(nsAString& aWidth)
|
||||
{
|
||||
nsString width;
|
||||
GetWidth(width);
|
||||
aWidth = width;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableElement::GetCaption(nsIDOMHTMLTableCaptionElement** aValue)
|
||||
{
|
||||
nsCOMPtr<nsIDOMHTMLTableCaptionElement> caption = GetCaption();
|
||||
caption.forget(aValue);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableElement::SetCaption(nsIDOMHTMLTableCaptionElement* aValue)
|
||||
{
|
||||
HTMLTableCaptionElement* caption =
|
||||
static_cast<HTMLTableCaptionElement*>(aValue);
|
||||
SetCaption(caption);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableElement::GetTHead(nsIDOMHTMLTableSectionElement** aValue)
|
||||
{
|
||||
NS_IF_ADDREF(*aValue = GetTHead());
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableElement::SetTHead(nsIDOMHTMLTableSectionElement* aValue)
|
||||
{
|
||||
HTMLTableSectionElement* section =
|
||||
static_cast<HTMLTableSectionElement*>(aValue);
|
||||
ErrorResult rv;
|
||||
SetTHead(section, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableElement::GetTFoot(nsIDOMHTMLTableSectionElement** aValue)
|
||||
{
|
||||
NS_IF_ADDREF(*aValue = GetTFoot());
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableElement::SetTFoot(nsIDOMHTMLTableSectionElement* aValue)
|
||||
{
|
||||
HTMLTableSectionElement* section =
|
||||
static_cast<HTMLTableSectionElement*>(aValue);
|
||||
ErrorResult rv;
|
||||
SetTFoot(section, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableElement::GetRows(nsIDOMHTMLCollection** aValue)
|
||||
{
|
||||
NS_ADDREF(*aValue = Rows());
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsIHTMLCollection*
|
||||
HTMLTableElement::Rows()
|
||||
{
|
||||
|
@ -353,6 +567,13 @@ HTMLTableElement::Rows()
|
|||
return mRows;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableElement::GetTBodies(nsIDOMHTMLCollection** aValue)
|
||||
{
|
||||
NS_ADDREF(*aValue = TBodies());
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsIHTMLCollection*
|
||||
HTMLTableElement::TBodies()
|
||||
{
|
||||
|
@ -389,7 +610,14 @@ HTMLTableElement::CreateTHead()
|
|||
return head.forget();
|
||||
}
|
||||
|
||||
void
|
||||
NS_IMETHODIMP
|
||||
HTMLTableElement::CreateTHead(nsIDOMHTMLElement** aValue)
|
||||
{
|
||||
nsRefPtr<nsGenericHTMLElement> thead = CreateTHead();
|
||||
return thead ? CallQueryInterface(thead, aValue) : NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableElement::DeleteTHead()
|
||||
{
|
||||
HTMLTableSectionElement* tHead = GetTHead();
|
||||
|
@ -398,6 +626,8 @@ HTMLTableElement::DeleteTHead()
|
|||
nsINode::RemoveChild(*tHead, rv);
|
||||
MOZ_ASSERT(!rv.Failed());
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
already_AddRefed<nsGenericHTMLElement>
|
||||
|
@ -420,7 +650,14 @@ HTMLTableElement::CreateTFoot()
|
|||
return foot.forget();
|
||||
}
|
||||
|
||||
void
|
||||
NS_IMETHODIMP
|
||||
HTMLTableElement::CreateTFoot(nsIDOMHTMLElement** aValue)
|
||||
{
|
||||
nsRefPtr<nsGenericHTMLElement> tfoot = CreateTFoot();
|
||||
return tfoot ? CallQueryInterface(tfoot, aValue) : NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableElement::DeleteTFoot()
|
||||
{
|
||||
HTMLTableSectionElement* tFoot = GetTFoot();
|
||||
|
@ -429,6 +666,8 @@ HTMLTableElement::DeleteTFoot()
|
|||
nsINode::RemoveChild(*tFoot, rv);
|
||||
MOZ_ASSERT(!rv.Failed());
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
already_AddRefed<nsGenericHTMLElement>
|
||||
|
@ -451,7 +690,14 @@ HTMLTableElement::CreateCaption()
|
|||
return caption.forget();
|
||||
}
|
||||
|
||||
void
|
||||
NS_IMETHODIMP
|
||||
HTMLTableElement::CreateCaption(nsIDOMHTMLElement** aValue)
|
||||
{
|
||||
nsRefPtr<nsGenericHTMLElement> caption = CreateCaption();
|
||||
return caption ? CallQueryInterface(caption, aValue) : NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableElement::DeleteCaption()
|
||||
{
|
||||
HTMLTableCaptionElement* caption = GetCaption();
|
||||
|
@ -460,6 +706,8 @@ HTMLTableElement::DeleteCaption()
|
|||
nsINode::RemoveChild(*caption, rv);
|
||||
MOZ_ASSERT(!rv.Failed());
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
already_AddRefed<nsGenericHTMLElement>
|
||||
|
@ -495,7 +743,7 @@ already_AddRefed<nsGenericHTMLElement>
|
|||
HTMLTableElement::InsertRow(int32_t aIndex, ErrorResult& aError)
|
||||
{
|
||||
/* get the ref row at aIndex
|
||||
if there is one,
|
||||
if there is one,
|
||||
get its parent
|
||||
insert the new row just before the ref row
|
||||
else
|
||||
|
@ -600,6 +848,14 @@ HTMLTableElement::InsertRow(int32_t aIndex, ErrorResult& aError)
|
|||
return newRow.forget();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableElement::InsertRow(int32_t aIndex, nsIDOMHTMLElement** aValue)
|
||||
{
|
||||
ErrorResult rv;
|
||||
nsRefPtr<nsGenericHTMLElement> newRow = InsertRow(aIndex, rv);
|
||||
return rv.Failed() ? rv.ErrorCode() : CallQueryInterface(newRow, aValue);
|
||||
}
|
||||
|
||||
void
|
||||
HTMLTableElement::DeleteRow(int32_t aIndex, ErrorResult& aError)
|
||||
{
|
||||
|
@ -630,6 +886,14 @@ HTMLTableElement::DeleteRow(int32_t aIndex, ErrorResult& aError)
|
|||
row->RemoveFromParent();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableElement::DeleteRow(int32_t aValue)
|
||||
{
|
||||
ErrorResult rv;
|
||||
DeleteRow(aValue, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
static const nsAttrValue::EnumTable kFrameTable[] = {
|
||||
{ "void", NS_STYLE_TABLE_FRAME_NONE },
|
||||
{ "above", NS_STYLE_TABLE_FRAME_ABOVE },
|
||||
|
|
|
@ -39,6 +39,9 @@ public:
|
|||
// nsIDOMHTMLElement
|
||||
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
||||
|
||||
// nsIDOMHTMLTableElement
|
||||
NS_DECL_NSIDOMHTMLTABLEELEMENT
|
||||
|
||||
HTMLTableCaptionElement* GetCaption() const
|
||||
{
|
||||
return static_cast<HTMLTableCaptionElement*>(GetChild(nsGkAtoms::caption));
|
||||
|
@ -51,13 +54,8 @@ public:
|
|||
nsINode::AppendChild(*aCaption, rv);
|
||||
}
|
||||
}
|
||||
|
||||
void DeleteTFoot();
|
||||
|
||||
already_AddRefed<nsGenericHTMLElement> CreateCaption();
|
||||
|
||||
void DeleteCaption();
|
||||
|
||||
HTMLTableSectionElement* GetTHead() const
|
||||
{
|
||||
return static_cast<HTMLTableSectionElement*>(GetChild(nsGkAtoms::thead));
|
||||
|
@ -76,8 +74,6 @@ public:
|
|||
}
|
||||
already_AddRefed<nsGenericHTMLElement> CreateTHead();
|
||||
|
||||
void DeleteTHead();
|
||||
|
||||
HTMLTableSectionElement* GetTFoot() const
|
||||
{
|
||||
return static_cast<HTMLTableSectionElement*>(GetChild(nsGkAtoms::tfoot));
|
||||
|
|
|
@ -35,8 +35,11 @@ NS_IMPL_ADDREF_INHERITED(HTMLTableRowElement, Element)
|
|||
NS_IMPL_RELEASE_INHERITED(HTMLTableRowElement, Element)
|
||||
|
||||
// QueryInterface implementation for HTMLTableRowElement
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(HTMLTableRowElement)
|
||||
NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLTableRowElement)
|
||||
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
|
||||
NS_INTERFACE_TABLE_INHERITED1(HTMLTableRowElement,
|
||||
nsIDOMHTMLTableRowElement)
|
||||
NS_INTERFACE_TABLE_TO_MAP_SEGUE
|
||||
NS_ELEMENT_INTERFACE_MAP_END
|
||||
|
||||
|
||||
|
@ -44,16 +47,12 @@ NS_IMPL_ELEMENT_CLONE(HTMLTableRowElement)
|
|||
|
||||
|
||||
// protected method
|
||||
HTMLTableSectionElement*
|
||||
already_AddRefed<nsIDOMHTMLTableSectionElement>
|
||||
HTMLTableRowElement::GetSection() const
|
||||
{
|
||||
nsIContent* parent = GetParent();
|
||||
if (parent->IsHTML() && (parent->Tag() == nsGkAtoms::thead ||
|
||||
parent->Tag() == nsGkAtoms::tbody ||
|
||||
parent->Tag() == nsGkAtoms::tfoot)) {
|
||||
return static_cast<HTMLTableSectionElement*>(parent);
|
||||
}
|
||||
return nullptr;
|
||||
nsCOMPtr<nsIDOMHTMLTableSectionElement> section =
|
||||
do_QueryInterface(GetParent());
|
||||
return section.forget();
|
||||
}
|
||||
|
||||
// protected method
|
||||
|
@ -95,15 +94,25 @@ HTMLTableRowElement::RowIndex() const
|
|||
return -1;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableRowElement::GetRowIndex(int32_t* aValue)
|
||||
{
|
||||
*aValue = RowIndex();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
int32_t
|
||||
HTMLTableRowElement::SectionRowIndex() const
|
||||
{
|
||||
HTMLTableSectionElement* section = GetSection();
|
||||
nsCOMPtr<nsIDOMHTMLTableSectionElement> section = GetSection();
|
||||
if (!section) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIHTMLCollection> coll = section->Rows();
|
||||
nsCOMPtr<nsIDOMHTMLCollection> rows;
|
||||
section->GetRows(getter_AddRefs(rows));
|
||||
|
||||
nsCOMPtr<nsIHTMLCollection> coll = do_QueryInterface(rows);
|
||||
uint32_t numRows = coll->Length();
|
||||
for (uint32_t i = 0; i < numRows; i++) {
|
||||
if (coll->GetElementAt(i) == this) {
|
||||
|
@ -114,6 +123,13 @@ HTMLTableRowElement::SectionRowIndex() const
|
|||
return -1;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableRowElement::GetSectionRowIndex(int32_t* aValue)
|
||||
{
|
||||
*aValue = SectionRowIndex();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
static bool
|
||||
IsCell(nsIContent *aContent, int32_t aNamespaceID,
|
||||
nsIAtom* aAtom, void *aData)
|
||||
|
@ -141,6 +157,13 @@ HTMLTableRowElement::Cells()
|
|||
return mCells;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableRowElement::GetCells(nsIDOMHTMLCollection** aValue)
|
||||
{
|
||||
NS_ADDREF(*aValue = Cells());
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
already_AddRefed<nsGenericHTMLElement>
|
||||
HTMLTableRowElement::InsertCell(int32_t aIndex,
|
||||
ErrorResult& aError)
|
||||
|
@ -188,6 +211,14 @@ HTMLTableRowElement::InsertCell(int32_t aIndex,
|
|||
return cell.forget();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableRowElement::InsertCell(int32_t aIndex, nsIDOMHTMLElement** aValue)
|
||||
{
|
||||
ErrorResult rv;
|
||||
nsRefPtr<nsGenericHTMLElement> cell = InsertCell(aIndex, rv);
|
||||
return rv.Failed() ? rv.ErrorCode() : CallQueryInterface(cell, aValue);
|
||||
}
|
||||
|
||||
void
|
||||
HTMLTableRowElement::DeleteCell(int32_t aValue, ErrorResult& aError)
|
||||
{
|
||||
|
@ -220,6 +251,99 @@ HTMLTableRowElement::DeleteCell(int32_t aValue, ErrorResult& aError)
|
|||
nsINode::RemoveChild(*cell, aError);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableRowElement::DeleteCell(int32_t aValue)
|
||||
{
|
||||
ErrorResult rv;
|
||||
DeleteCell(aValue, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableRowElement::SetAlign(const nsAString& aAlign)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetAlign(aAlign, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableRowElement::GetAlign(nsAString& aAlign)
|
||||
{
|
||||
nsString align;
|
||||
GetAlign(align);
|
||||
aAlign = align;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableRowElement::SetVAlign(const nsAString& aVAlign)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetVAlign(aVAlign, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableRowElement::GetVAlign(nsAString& aVAlign)
|
||||
{
|
||||
nsString vAlign;
|
||||
GetVAlign(vAlign);
|
||||
aVAlign = vAlign;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableRowElement::SetCh(const nsAString& aCh)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetCh(aCh, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableRowElement::GetCh(nsAString& aCh)
|
||||
{
|
||||
nsString ch;
|
||||
GetCh(ch);
|
||||
aCh = ch;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableRowElement::SetChOff(const nsAString& aChOff)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetChOff(aChOff, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableRowElement::GetChOff(nsAString& aChOff)
|
||||
{
|
||||
nsString chOff;
|
||||
GetChOff(chOff);
|
||||
aChOff = chOff;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableRowElement::SetBgColor(const nsAString& aBgColor)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetBgColor(aBgColor, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableRowElement::GetBgColor(nsAString& aBgColor)
|
||||
{
|
||||
nsString bgColor;
|
||||
GetBgColor(bgColor);
|
||||
aBgColor = bgColor;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
bool
|
||||
HTMLTableRowElement::ParseAttribute(int32_t aNamespaceID,
|
||||
nsIAtom* aAttribute,
|
||||
|
|
|
@ -7,17 +7,17 @@
|
|||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsGenericHTMLElement.h"
|
||||
#include "nsIDOMHTMLTableRowElement.h"
|
||||
|
||||
class nsIDOMHTMLTableElement;
|
||||
class nsIDOMHTMLTableSectionElement;
|
||||
class nsContentList;
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class HTMLTableSectionElement;
|
||||
|
||||
class HTMLTableRowElement MOZ_FINAL : public nsGenericHTMLElement,
|
||||
public nsIDOMHTMLElement
|
||||
public nsIDOMHTMLTableRowElement
|
||||
{
|
||||
public:
|
||||
HTMLTableRowElement(already_AddRefed<nsINodeInfo> aNodeInfo)
|
||||
|
@ -39,6 +39,9 @@ public:
|
|||
// nsIDOMHTMLElement
|
||||
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
||||
|
||||
// nsIDOMHTMLTableRowElement
|
||||
NS_DECL_NSIDOMHTMLTABLEROWELEMENT
|
||||
|
||||
int32_t RowIndex() const;
|
||||
int32_t SectionRowIndex() const;
|
||||
nsIHTMLCollection* Cells();
|
||||
|
@ -105,7 +108,7 @@ protected:
|
|||
virtual JSObject* WrapNode(JSContext *aCx,
|
||||
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
|
||||
|
||||
HTMLTableSectionElement* GetSection() const;
|
||||
already_AddRefed<nsIDOMHTMLTableSectionElement> GetSection() const;
|
||||
HTMLTableElement* GetTable() const;
|
||||
nsRefPtr<nsContentList> mCells;
|
||||
};
|
||||
|
|
|
@ -35,13 +35,84 @@ NS_IMPL_ADDREF_INHERITED(HTMLTableSectionElement, Element)
|
|||
NS_IMPL_RELEASE_INHERITED(HTMLTableSectionElement, Element)
|
||||
|
||||
// QueryInterface implementation for HTMLTableSectionElement
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(HTMLTableSectionElement)
|
||||
NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLTableSectionElement)
|
||||
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
|
||||
NS_INTERFACE_TABLE_INHERITED1(HTMLTableSectionElement,
|
||||
nsIDOMHTMLTableSectionElement)
|
||||
NS_INTERFACE_TABLE_TO_MAP_SEGUE
|
||||
NS_ELEMENT_INTERFACE_MAP_END
|
||||
|
||||
|
||||
NS_IMPL_ELEMENT_CLONE(HTMLTableSectionElement)
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableSectionElement::SetAlign(const nsAString& aAlign)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetAlign(aAlign, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableSectionElement::GetAlign(nsAString& aAlign)
|
||||
{
|
||||
nsString align;
|
||||
GetAlign(align);
|
||||
aAlign = align;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableSectionElement::SetVAlign(const nsAString& aVAlign)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetVAlign(aVAlign, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableSectionElement::GetVAlign(nsAString& aVAlign)
|
||||
{
|
||||
nsString vAlign;
|
||||
GetVAlign(vAlign);
|
||||
aVAlign = vAlign;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableSectionElement::SetCh(const nsAString& aCh)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetCh(aCh, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableSectionElement::GetCh(nsAString& aCh)
|
||||
{
|
||||
nsString ch;
|
||||
GetCh(ch);
|
||||
aCh = ch;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableSectionElement::SetChOff(const nsAString& aChOff)
|
||||
{
|
||||
ErrorResult rv;
|
||||
SetChOff(aChOff, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableSectionElement::GetChOff(nsAString& aChOff)
|
||||
{
|
||||
nsString chOff;
|
||||
GetChOff(chOff);
|
||||
aChOff = chOff;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsIHTMLCollection*
|
||||
HTMLTableSectionElement::Rows()
|
||||
{
|
||||
|
@ -56,6 +127,13 @@ HTMLTableSectionElement::Rows()
|
|||
return mRows;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableSectionElement::GetRows(nsIDOMHTMLCollection** aValue)
|
||||
{
|
||||
NS_ADDREF(*aValue = Rows());
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
already_AddRefed<nsGenericHTMLElement>
|
||||
HTMLTableSectionElement::InsertRow(int32_t aIndex, ErrorResult& aError)
|
||||
{
|
||||
|
@ -94,6 +172,15 @@ HTMLTableSectionElement::InsertRow(int32_t aIndex, ErrorResult& aError)
|
|||
return rowContent.forget();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableSectionElement::InsertRow(int32_t aIndex,
|
||||
nsIDOMHTMLElement** aValue)
|
||||
{
|
||||
ErrorResult rv;
|
||||
nsRefPtr<nsGenericHTMLElement> row = InsertRow(aIndex, rv);
|
||||
return rv.Failed() ? rv.ErrorCode() : CallQueryInterface(row, aValue);
|
||||
}
|
||||
|
||||
void
|
||||
HTMLTableSectionElement::DeleteRow(int32_t aValue, ErrorResult& aError)
|
||||
{
|
||||
|
@ -126,6 +213,14 @@ HTMLTableSectionElement::DeleteRow(int32_t aValue, ErrorResult& aError)
|
|||
nsINode::RemoveChild(*row, aError);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLTableSectionElement::DeleteRow(int32_t aValue)
|
||||
{
|
||||
ErrorResult rv;
|
||||
DeleteRow(aValue, rv);
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
bool
|
||||
HTMLTableSectionElement::ParseAttribute(int32_t aNamespaceID,
|
||||
nsIAtom* aAttribute,
|
||||
|
@ -160,7 +255,7 @@ HTMLTableSectionElement::ParseAttribute(int32_t aNamespaceID,
|
|||
aResult);
|
||||
}
|
||||
|
||||
static
|
||||
static
|
||||
void MapAttributesIntoRule(const nsMappedAttributes* aAttributes, nsRuleData* aData)
|
||||
{
|
||||
if (aData->mSIDs & NS_STYLE_INHERIT_BIT(Position)) {
|
||||
|
@ -199,7 +294,7 @@ NS_IMETHODIMP_(bool)
|
|||
HTMLTableSectionElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
||||
{
|
||||
static const MappedAttributeEntry attributes[] = {
|
||||
{ &nsGkAtoms::align },
|
||||
{ &nsGkAtoms::align },
|
||||
{ &nsGkAtoms::valign },
|
||||
{ &nsGkAtoms::height },
|
||||
{ nullptr }
|
||||
|
|
|
@ -7,13 +7,14 @@
|
|||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsGenericHTMLElement.h"
|
||||
#include "nsIDOMHTMLTableSectionElement.h"
|
||||
#include "nsContentList.h" // For ctor.
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class HTMLTableSectionElement MOZ_FINAL : public nsGenericHTMLElement,
|
||||
public nsIDOMHTMLElement
|
||||
public nsIDOMHTMLTableSectionElement
|
||||
{
|
||||
public:
|
||||
HTMLTableSectionElement(already_AddRefed<nsINodeInfo> aNodeInfo)
|
||||
|
@ -33,6 +34,9 @@ public:
|
|||
// nsIDOMHTMLElement
|
||||
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
||||
|
||||
// nsIDOMHTMLTableSectionElement
|
||||
NS_DECL_NSIDOMHTMLTABLESECTIONELEMENT
|
||||
|
||||
nsIHTMLCollection* Rows();
|
||||
already_AddRefed<nsGenericHTMLElement>
|
||||
InsertRow(int32_t aIndex, ErrorResult& aError);
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsDocument.h"
|
||||
#include "mozilla/dom/HTMLUnknownElement.h"
|
||||
#include "HTMLUnknownElement.h"
|
||||
#include "mozilla/dom/HTMLElementBinding.h"
|
||||
|
||||
NS_IMPL_NS_NEW_HTML_ELEMENT(Unknown)
|
||||
|
@ -35,8 +35,11 @@ HTMLUnknownElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aScope)
|
|||
}
|
||||
|
||||
// QueryInterface implementation for HTMLUnknownElement
|
||||
NS_INTERFACE_MAP_BEGIN(HTMLUnknownElement)
|
||||
NS_INTERFACE_TABLE_HEAD(HTMLUnknownElement)
|
||||
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
|
||||
NS_INTERFACE_TABLE_INHERITED1(HTMLUnknownElement,
|
||||
nsIDOMHTMLUnknownElement)
|
||||
NS_INTERFACE_TABLE_TO_MAP_SEGUE
|
||||
NS_ELEMENT_INTERFACE_MAP_END
|
||||
|
||||
NS_IMPL_ELEMENT_CLONE(HTMLUnknownElement)
|
||||
|
|
|
@ -2,17 +2,18 @@
|
|||
/* 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_HTMLUnknownElement_h
|
||||
#define mozilla_dom_HTMLUnknownElement_h
|
||||
#ifndef HTMLUnknownElement_h___
|
||||
#define HTMLUnknownElement_h___
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsGenericHTMLElement.h"
|
||||
#include "nsIDOMHTMLUnknownElement.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class HTMLUnknownElement MOZ_FINAL : public nsGenericHTMLElement
|
||||
, public nsIDOMHTMLElement
|
||||
, public nsIDOMHTMLUnknownElement
|
||||
{
|
||||
public:
|
||||
HTMLUnknownElement(already_AddRefed<nsINodeInfo> aNodeInfo)
|
||||
|
@ -47,4 +48,4 @@ protected:
|
|||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
#endif /* mozilla_dom_HTMLUnknownElement_h */
|
||||
#endif /* HTMLUnknownElement_h___ */
|
||||
|
|
|
@ -244,9 +244,13 @@ for (var tag of allTags) {
|
|||
if (classInfoString != 'HTMLUnknownElement') {
|
||||
is(node instanceof HTMLUnknownElement, false,
|
||||
tagName(tag) + " is an instance of HTMLUnknownElement");
|
||||
is(node instanceof SpecialPowers.Ci.nsIDOMHTMLUnknownElement, false,
|
||||
tagName(tag) + " is an instance of nsIDOMHTMLUnknownElement");
|
||||
} else {
|
||||
is(node instanceof HTMLUnknownElement, true,
|
||||
tagName(tag) + " is an instance of HTMLUnknownElement");
|
||||
is(node instanceof SpecialPowers.Ci.nsIDOMHTMLUnknownElement, true,
|
||||
tagName(tag) + " is an instance of nsIDOMHTMLUnknownElement");
|
||||
}
|
||||
|
||||
// Check that each node QIs to all the things we expect it to QI to
|
||||
|
|
|
@ -211,37 +211,6 @@ NS_INTERFACE_MAP_END
|
|||
NS_IMPL_CYCLE_COLLECTING_ADDREF(nsXBLDocGlobalObject)
|
||||
NS_IMPL_CYCLE_COLLECTING_RELEASE(nsXBLDocGlobalObject)
|
||||
|
||||
void
|
||||
XBL_ProtoErrorReporter(JSContext *cx,
|
||||
const char *message,
|
||||
JSErrorReport *report)
|
||||
{
|
||||
// Make an nsIScriptError and populate it with information from
|
||||
// this error.
|
||||
nsCOMPtr<nsIScriptError>
|
||||
errorObject(do_CreateInstance("@mozilla.org/scripterror;1"));
|
||||
nsCOMPtr<nsIConsoleService>
|
||||
consoleService(do_GetService("@mozilla.org/consoleservice;1"));
|
||||
|
||||
if (errorObject && consoleService) {
|
||||
uint32_t column = report->uctokenptr - report->uclinebuf;
|
||||
|
||||
const PRUnichar* ucmessage =
|
||||
static_cast<const PRUnichar*>(report->ucmessage);
|
||||
const PRUnichar* uclinebuf =
|
||||
static_cast<const PRUnichar*>(report->uclinebuf);
|
||||
|
||||
errorObject->Init
|
||||
(ucmessage ? nsDependentString(ucmessage) : EmptyString(),
|
||||
NS_ConvertUTF8toUTF16(report->filename),
|
||||
uclinebuf ? nsDependentString(uclinebuf) : EmptyString(),
|
||||
report->lineno, column, report->flags,
|
||||
"xbl javascript"
|
||||
);
|
||||
consoleService->LogMessage(errorObject);
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
//
|
||||
// nsIScriptGlobalObject methods
|
||||
|
@ -280,10 +249,7 @@ nsXBLDocGlobalObject::EnsureScriptEnvironment()
|
|||
|
||||
AutoPushJSContext cx(mScriptContext->GetNativeContext());
|
||||
|
||||
// nsJSEnvironment set the error reporter to NS_ScriptErrorReporter so
|
||||
// we must apparently override that with our own (although it isn't clear
|
||||
// why - see bug 339647)
|
||||
JS_SetErrorReporter(cx, XBL_ProtoErrorReporter);
|
||||
JS_SetErrorReporter(cx, xpc::SystemErrorReporter);
|
||||
|
||||
JS::CompartmentOptions options;
|
||||
options.setZone(JS::SystemZone);
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<script>
|
||||
|
||||
var plug = navigator.plugins[0];
|
||||
var mime = plug[0];
|
||||
// This shouldn't leak.
|
||||
mime.expando = true;
|
||||
|
||||
</script>
|
||||
</head>
|
||||
</html>
|
|
@ -40,4 +40,5 @@ load 706283-1.html
|
|||
load 708405-1.html
|
||||
load 745495.html
|
||||
load 844559.html
|
||||
load 886213.html
|
||||
load 886213.html
|
||||
load 898906.html
|
||||
|
|
|
@ -3695,6 +3695,11 @@ OldBindingConstructorEnabled(const nsGlobalNameStruct *aStruct,
|
|||
}
|
||||
}
|
||||
|
||||
// Don't expose CSSFontFeatureValuesRule unless the pref is enabled
|
||||
if (aStruct->mDOMClassInfoID == eDOMClassInfo_CSSFontFeatureValuesRule_id) {
|
||||
return nsCSSFontFeatureValuesRule::PrefEnabled();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include "nsIDOMHTMLFrameElement.h"
|
||||
#include "nsIDOMHTMLInputElement.h"
|
||||
#include "nsIDOMHTMLMapElement.h"
|
||||
#include "nsIDOMHTMLLegendElement.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIDOMRange.h"
|
||||
#include "nsIHTMLDocument.h"
|
||||
|
|
|
@ -219,7 +219,7 @@ nsMimeTypeArray::EnsureMimeTypes()
|
|||
NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(nsMimeType, AddRef)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(nsMimeType, Release)
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_0(nsMimeType)
|
||||
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_1(nsMimeType, mPluginElement)
|
||||
|
||||
nsMimeType::nsMimeType(nsWeakPtr aWindow, nsPluginElement* aPluginElement,
|
||||
uint32_t aPluginTagMimeIndex, const nsAString& aType)
|
||||
|
|
|
@ -12,9 +12,9 @@
|
|||
#include "nsTArray.h"
|
||||
#include "nsWeakReference.h"
|
||||
#include "nsWrapperCache.h"
|
||||
#include "nsPluginArray.h"
|
||||
|
||||
class nsPIDOMWindow;
|
||||
class nsPluginElement;
|
||||
class nsMimeType;
|
||||
|
||||
class nsMimeTypeArray MOZ_FINAL : public nsISupports,
|
||||
|
@ -73,11 +73,6 @@ public:
|
|||
virtual JSObject* WrapObject(JSContext* aCx,
|
||||
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
|
||||
|
||||
void Invalidate()
|
||||
{
|
||||
mPluginElement = nullptr;
|
||||
}
|
||||
|
||||
const nsString& Type() const
|
||||
{
|
||||
return mType;
|
||||
|
@ -92,8 +87,11 @@ public:
|
|||
protected:
|
||||
nsWeakPtr mWindow;
|
||||
|
||||
// Weak pointer to the active plugin, if any.
|
||||
nsPluginElement *mPluginElement;
|
||||
// Strong reference to the active plugin, if any. Note that this
|
||||
// creates an explicit reference cycle through the plugin element's
|
||||
// mimetype array. We rely on the cycle collector to break this
|
||||
// cycle.
|
||||
nsRefPtr<nsPluginElement> mPluginElement;
|
||||
uint32_t mPluginTagMimeIndex;
|
||||
nsString mType;
|
||||
};
|
||||
|
|
|
@ -282,16 +282,7 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsPluginElement)
|
|||
NS_INTERFACE_MAP_ENTRY(nsISupports)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(nsPluginElement)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WRAPPER
|
||||
// Invalidate before we unlink mMimeTypes
|
||||
tmp->Invalidate();
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mMimeTypes)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(nsPluginElement)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_WRAPPERCACHE(nsPluginElement)
|
||||
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_1(nsPluginElement, mMimeTypes)
|
||||
|
||||
nsPluginElement::nsPluginElement(nsWeakPtr aWindow,
|
||||
nsPluginTag* aPluginTag)
|
||||
|
@ -301,11 +292,6 @@ nsPluginElement::nsPluginElement(nsWeakPtr aWindow,
|
|||
SetIsDOMBinding();
|
||||
}
|
||||
|
||||
nsPluginElement::~nsPluginElement()
|
||||
{
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
nsPIDOMWindow*
|
||||
nsPluginElement::GetParentObject() const
|
||||
{
|
||||
|
@ -425,11 +411,3 @@ nsPluginElement::EnsureMimeTypes()
|
|||
mMimeTypes.AppendElement(new nsMimeType(mWindow, this, i, type));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
nsPluginElement::Invalidate()
|
||||
{
|
||||
for (uint32_t i = 0; i < mMimeTypes.Length(); ++i) {
|
||||
mMimeTypes[i]->Invalidate();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -74,7 +74,6 @@ public:
|
|||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(nsPluginElement)
|
||||
|
||||
nsPluginElement(nsWeakPtr aWindow, nsPluginTag* aPluginTag);
|
||||
virtual ~nsPluginElement();
|
||||
|
||||
nsPIDOMWindow* GetParentObject() const;
|
||||
virtual JSObject* WrapObject(JSContext* aCx,
|
||||
|
@ -102,7 +101,6 @@ public:
|
|||
|
||||
protected:
|
||||
void EnsureMimeTypes();
|
||||
void Invalidate();
|
||||
|
||||
nsWeakPtr mWindow;
|
||||
nsRefPtr<nsPluginTag> mPluginTag;
|
||||
|
|
|
@ -1670,8 +1670,11 @@ class CGCreateInterfaceObjectsMethod(CGAbstractMethod):
|
|||
def definition_body(self):
|
||||
protoChain = self.descriptor.prototypeChain
|
||||
if len(protoChain) == 1:
|
||||
getParentProto = "aCx, JS_GetObjectPrototype(aCx, aGlobal)"
|
||||
parentProtoType = "Rooted"
|
||||
if self.descriptor.interface.getExtendedAttribute("ArrayClass"):
|
||||
getParentProto = "aCx, JS_GetArrayPrototype(aCx, aGlobal)"
|
||||
else:
|
||||
getParentProto = "aCx, JS_GetObjectPrototype(aCx, aGlobal)"
|
||||
else:
|
||||
parentProtoName = self.descriptor.prototypeChain[-2]
|
||||
getParentProto = ("%s::GetProtoObject(aCx, aGlobal)" %
|
||||
|
|
|
@ -913,16 +913,30 @@ class IDLInterface(IDLObjectWithScope):
|
|||
elif not newMethod in self.namedConstructors:
|
||||
raise WebIDLError("NamedConstructor conflicts with a NamedConstructor of a different interface",
|
||||
[method.location, newMethod.location])
|
||||
elif (identifier == "ArrayClass"):
|
||||
if not attr.noArguments():
|
||||
raise WebIDLError("[ArrayClass] must take no arguments",
|
||||
[attr.location])
|
||||
if self.parent:
|
||||
raise WebIDLError("[ArrayClass] must not be specified on "
|
||||
"an interface with inherited interfaces",
|
||||
[attr.location, self.location])
|
||||
elif (identifier == "PrefControlled" or
|
||||
identifier == "Pref" or
|
||||
identifier == "NeedNewResolve" or
|
||||
identifier == "JSImplementation" or
|
||||
identifier == "HeaderFile" or
|
||||
identifier == "NavigatorProperty" or
|
||||
identifier == "OverrideBuiltins" or
|
||||
identifier == "ChromeOnly"):
|
||||
# Known attributes that we don't need to do anything with here
|
||||
pass
|
||||
# Known extended attributes that do not take values
|
||||
if not attr.noArguments():
|
||||
raise WebIDLError("[%s] must take no arguments" % identifier,
|
||||
[attr.location])
|
||||
elif (identifier == "Pref" or
|
||||
identifier == "JSImplementation" or
|
||||
identifier == "HeaderFile" or
|
||||
identifier == "NavigatorProperty"):
|
||||
# Known extended attributes that take a string value
|
||||
if not attr.hasValue():
|
||||
raise WebIDLError("[%s] must have a value" % identifier,
|
||||
[attr.location])
|
||||
else:
|
||||
raise WebIDLError("Unknown extended attribute %s on interface" % identifier,
|
||||
[attr.location])
|
||||
|
|
|
@ -374,3 +374,32 @@ def WebIDLTest(parser, harness):
|
|||
threw = True
|
||||
harness.ok(threw,
|
||||
"Should not allow unknown extended attributes on interfaces")
|
||||
|
||||
parser = parser.reset()
|
||||
threw = False
|
||||
try:
|
||||
parser.parse("""
|
||||
interface B {};
|
||||
[ArrayClass]
|
||||
interface A : B {
|
||||
};
|
||||
""")
|
||||
results = parser.finish()
|
||||
except:
|
||||
threw = True
|
||||
harness.ok(threw,
|
||||
"Should not allow [ArrayClass] on interfaces with parents")
|
||||
|
||||
parser = parser.reset()
|
||||
threw = False
|
||||
try:
|
||||
parser.parse("""
|
||||
[ArrayClass]
|
||||
interface A {
|
||||
};
|
||||
""")
|
||||
results = parser.finish()
|
||||
except:
|
||||
threw = True
|
||||
harness.ok(not threw,
|
||||
"Should allow [ArrayClass] on interfaces without parents")
|
||||
|
|
|
@ -73,6 +73,7 @@ interface nsIDOMRect;
|
|||
interface nsIDOMCSSStyleRule;
|
||||
interface nsIDOMCSSStyleRuleCollection;
|
||||
interface nsIDOMHTMLTableCaptionElement;
|
||||
interface nsIDOMHTMLTableSectionElement;
|
||||
|
||||
// Range
|
||||
interface nsIDOMRange;
|
||||
|
|
|
@ -16,45 +16,61 @@ XPIDL_SOURCES += [
|
|||
'nsIDOMHTMLByteRanges.idl',
|
||||
'nsIDOMHTMLCanvasElement.idl',
|
||||
'nsIDOMHTMLCollection.idl',
|
||||
'nsIDOMHTMLDListElement.idl',
|
||||
'nsIDOMHTMLDataListElement.idl',
|
||||
'nsIDOMHTMLDirectoryElement.idl',
|
||||
'nsIDOMHTMLDivElement.idl',
|
||||
'nsIDOMHTMLDocument.idl',
|
||||
'nsIDOMHTMLElement.idl',
|
||||
'nsIDOMHTMLEmbedElement.idl',
|
||||
'nsIDOMHTMLFieldSetElement.idl',
|
||||
'nsIDOMHTMLFontElement.idl',
|
||||
'nsIDOMHTMLFormElement.idl',
|
||||
'nsIDOMHTMLFrameElement.idl',
|
||||
'nsIDOMHTMLFrameSetElement.idl',
|
||||
'nsIDOMHTMLHRElement.idl',
|
||||
'nsIDOMHTMLHeadElement.idl',
|
||||
'nsIDOMHTMLHeadingElement.idl',
|
||||
'nsIDOMHTMLHtmlElement.idl',
|
||||
'nsIDOMHTMLIFrameElement.idl',
|
||||
'nsIDOMHTMLImageElement.idl',
|
||||
'nsIDOMHTMLInputElement.idl',
|
||||
'nsIDOMHTMLLIElement.idl',
|
||||
'nsIDOMHTMLLabelElement.idl',
|
||||
'nsIDOMHTMLLegendElement.idl',
|
||||
'nsIDOMHTMLLinkElement.idl',
|
||||
'nsIDOMHTMLMapElement.idl',
|
||||
'nsIDOMHTMLMediaElement.idl',
|
||||
'nsIDOMHTMLMenuElement.idl',
|
||||
'nsIDOMHTMLMenuItemElement.idl',
|
||||
'nsIDOMHTMLMetaElement.idl',
|
||||
'nsIDOMHTMLMeterElement.idl',
|
||||
'nsIDOMHTMLModElement.idl',
|
||||
'nsIDOMHTMLOListElement.idl',
|
||||
'nsIDOMHTMLObjectElement.idl',
|
||||
'nsIDOMHTMLOptGroupElement.idl',
|
||||
'nsIDOMHTMLOptionElement.idl',
|
||||
'nsIDOMHTMLOptionsCollection.idl',
|
||||
'nsIDOMHTMLOutputElement.idl',
|
||||
'nsIDOMHTMLParagraphElement.idl',
|
||||
'nsIDOMHTMLParamElement.idl',
|
||||
'nsIDOMHTMLPreElement.idl',
|
||||
'nsIDOMHTMLProgressElement.idl',
|
||||
'nsIDOMHTMLQuoteElement.idl',
|
||||
'nsIDOMHTMLScriptElement.idl',
|
||||
'nsIDOMHTMLSelectElement.idl',
|
||||
'nsIDOMHTMLSourceElement.idl',
|
||||
'nsIDOMHTMLStyleElement.idl',
|
||||
'nsIDOMHTMLTableCaptionElem.idl',
|
||||
'nsIDOMHTMLTableCellElement.idl',
|
||||
'nsIDOMHTMLTableColElement.idl',
|
||||
'nsIDOMHTMLTableElement.idl',
|
||||
'nsIDOMHTMLTableRowElement.idl',
|
||||
'nsIDOMHTMLTableSectionElement.idl',
|
||||
'nsIDOMHTMLTextAreaElement.idl',
|
||||
'nsIDOMHTMLTitleElement.idl',
|
||||
'nsIDOMHTMLUListElement.idl',
|
||||
'nsIDOMHTMLUnknownElement.idl',
|
||||
'nsIDOMHTMLVideoElement.idl',
|
||||
'nsIDOMMediaError.idl',
|
||||
'nsIDOMMozBrowserFrame.idl',
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
/* -*- 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 nsIDOMHTMLDListElement interface is the interface to a [X]HTML
|
||||
* dl 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(edd9338b-f0d5-4825-97d6-6a49862309cc)]
|
||||
interface nsIDOMHTMLDListElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute boolean compact;
|
||||
};
|
|
@ -0,0 +1,25 @@
|
|||
/* -*- 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 nsIDOMHTMLDataListElement interface is the interface to a HTML
|
||||
* <datalist> element.
|
||||
*
|
||||
* For more information on this interface, please see
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/#the-datalist-element
|
||||
*
|
||||
* @status UNDER_DEVELOPMENT
|
||||
*/
|
||||
|
||||
interface nsIDOMHTMLCollection;
|
||||
|
||||
[scriptable, uuid(528e6a6b-f957-42e1-8d1b-eeeb2fd0b128)]
|
||||
interface nsIDOMHTMLDataListElement : nsIDOMHTMLElement
|
||||
{
|
||||
readonly attribute nsIDOMHTMLCollection options;
|
||||
};
|
||||
|
|
@ -16,8 +16,8 @@
|
|||
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||
*/
|
||||
|
||||
// Exists so that | element instanceof Ci.nsIDOMHTMLDirectoryElement | works.
|
||||
[scriptable, uuid(cf50373e-e004-4cec-bc65-be9250d9e4c8)]
|
||||
interface nsIDOMHTMLDirectoryElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute boolean compact;
|
||||
};
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
/* -*- 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 nsIDOMHTMLFontElement interface is the interface to a [X]HTML
|
||||
* font 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(e4d86aad-f245-4901-877e-0ae233c5fd37)]
|
||||
interface nsIDOMHTMLFontElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString color;
|
||||
attribute DOMString face;
|
||||
attribute DOMString size;
|
||||
};
|
|
@ -0,0 +1,23 @@
|
|||
/* -*- 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 nsIDOMHTMLHeadingElement interface is the interface to a
|
||||
* [X]HTML h1, h2, h3, ... 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(e601aadf-e9e7-4605-a6f9-2cd2006723de)]
|
||||
interface nsIDOMHTMLHeadingElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString align;
|
||||
};
|
|
@ -0,0 +1,25 @@
|
|||
/* -*- 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 nsIDOMHTMLLabelElement interface is the interface to a [X]HTML
|
||||
* label 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(cbffa708-f51e-4c74-9644-19f9d417aac5)]
|
||||
interface nsIDOMHTMLLabelElement : nsIDOMHTMLElement
|
||||
{
|
||||
readonly attribute nsIDOMHTMLFormElement form;
|
||||
attribute DOMString htmlFor;
|
||||
readonly attribute nsIDOMHTMLElement control;
|
||||
};
|
|
@ -0,0 +1,24 @@
|
|||
/* -*- 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;
|
||||
};
|
|
@ -0,0 +1,30 @@
|
|||
/* -*- 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 nsIDOMHTMLMeterElement interface is the interface to a HTML
|
||||
* <meter> element.
|
||||
*
|
||||
* For more information on this interface, please see
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#the-meter-element
|
||||
*/
|
||||
|
||||
[scriptable, uuid(6b1fc313-a7c1-4064-ba24-b72e099b05fa)]
|
||||
interface nsIDOMHTMLMeterElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute double value;
|
||||
attribute double min;
|
||||
attribute double max;
|
||||
attribute double low;
|
||||
attribute double high;
|
||||
attribute double optimum;
|
||||
|
||||
/**
|
||||
* The labels attribute will be done with bug 556743.
|
||||
*/
|
||||
//readonly attribute NodeList labels;
|
||||
};
|
|
@ -0,0 +1,24 @@
|
|||
/* -*- 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 nsIDOMHTMLModElement interface is the interface to a [X]HTML
|
||||
* ins and del 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(8a1bdf64-19f3-401b-aaea-8c6a5ef1c66f)]
|
||||
interface nsIDOMHTMLModElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString cite;
|
||||
attribute DOMString dateTime;
|
||||
};
|
|
@ -0,0 +1,43 @@
|
|||
/* -*- 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 nsIDOMHTMLOutputElement interface is the interface to a HTML
|
||||
* <output> element.
|
||||
*
|
||||
* For more information on this interface, please see
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/#the-output-element
|
||||
*
|
||||
* @status UNDER_DEVELOPMENT
|
||||
*/
|
||||
|
||||
interface nsIDOMValidityState;
|
||||
|
||||
[scriptable, uuid(c4bff576-90b5-44b0-8278-bf4e3010b09a)]
|
||||
interface nsIDOMHTMLOutputElement : nsIDOMHTMLElement
|
||||
{
|
||||
// DOMSettableTokenList
|
||||
readonly attribute nsISupports htmlFor;
|
||||
readonly attribute nsIDOMHTMLFormElement form;
|
||||
attribute DOMString name;
|
||||
|
||||
readonly attribute DOMString type;
|
||||
attribute DOMString defaultValue;
|
||||
attribute DOMString value;
|
||||
|
||||
readonly attribute boolean willValidate;
|
||||
readonly attribute nsIDOMValidityState validity;
|
||||
readonly attribute DOMString validationMessage;
|
||||
boolean checkValidity();
|
||||
void setCustomValidity(in DOMString error);
|
||||
|
||||
/**
|
||||
* The labels IDL attribute will be added with bug 556743.
|
||||
*/
|
||||
//readonly attribute nsIDOMNodeList labels;
|
||||
};
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
/* -*- 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 nsIDOMHTMLParamElement interface is the interface to a [X]HTML
|
||||
* param 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(f85e1b05-6dc4-442d-bea8-7cf551f9bc9f)]
|
||||
interface nsIDOMHTMLParamElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString name;
|
||||
attribute DOMString type;
|
||||
attribute DOMString value;
|
||||
attribute DOMString valueType;
|
||||
};
|
|
@ -0,0 +1,29 @@
|
|||
/* -*- 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 nsIDOMHTMLProgressElement interface is the interface to a HTML
|
||||
* <progress> element.
|
||||
*
|
||||
* For more information on this interface, please see
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/#the-progress-element
|
||||
*
|
||||
* @status UNDER_DEVELOPMENT
|
||||
*/
|
||||
|
||||
[scriptable, uuid(4b4bec16-c65f-4a08-97d1-dff624efdca4)]
|
||||
interface nsIDOMHTMLProgressElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute double value;
|
||||
attribute double max;
|
||||
readonly attribute double position;
|
||||
/**
|
||||
* The labels attribute will be done with bug 567740.
|
||||
*/
|
||||
//readonly attribute NodeList labels;
|
||||
};
|
||||
|
|
@ -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;
|
||||
};
|
|
@ -0,0 +1,28 @@
|
|||
/* -*- 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 nsIDOMHTMLTableColElement interface is the interface to a
|
||||
* [X]HTML col 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(cd5a5a33-7101-4d32-987c-337c004fce1a)]
|
||||
interface nsIDOMHTMLTableColElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString align;
|
||||
attribute DOMString ch;
|
||||
attribute DOMString chOff;
|
||||
attribute long span;
|
||||
attribute DOMString vAlign;
|
||||
attribute DOMString width;
|
||||
};
|
|
@ -19,4 +19,39 @@
|
|||
[scriptable, uuid(1a7bf1f1-5d6c-4200-9ceb-455874322315)]
|
||||
interface nsIDOMHTMLTableElement : nsIDOMHTMLElement
|
||||
{
|
||||
// Modified in DOM Level 2:
|
||||
attribute nsIDOMHTMLTableCaptionElement caption;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
// Modified in DOM Level 2:
|
||||
attribute nsIDOMHTMLTableSectionElement tHead;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
// Modified in DOM Level 2:
|
||||
attribute nsIDOMHTMLTableSectionElement tFoot;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
readonly attribute nsIDOMHTMLCollection rows;
|
||||
readonly attribute nsIDOMHTMLCollection tBodies;
|
||||
attribute DOMString align;
|
||||
attribute DOMString bgColor;
|
||||
attribute DOMString border;
|
||||
attribute DOMString cellPadding;
|
||||
attribute DOMString cellSpacing;
|
||||
attribute DOMString frame;
|
||||
attribute DOMString rules;
|
||||
attribute DOMString summary;
|
||||
attribute DOMString width;
|
||||
nsIDOMHTMLElement createTHead();
|
||||
void deleteTHead();
|
||||
nsIDOMHTMLElement createTFoot();
|
||||
void deleteTFoot();
|
||||
nsIDOMHTMLElement createCaption();
|
||||
void deleteCaption();
|
||||
// Modified in DOM Level 2:
|
||||
nsIDOMHTMLElement insertRow(in long index)
|
||||
raises(DOMException);
|
||||
// Modified in DOM Level 2:
|
||||
void deleteRow(in long index)
|
||||
raises(DOMException);
|
||||
};
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
/* -*- 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 nsIDOMHTMLTableRowElement interface is the interface to a
|
||||
* [X]HTML tr 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(02094366-0d3d-47e3-949c-89113a9bcc15)]
|
||||
interface nsIDOMHTMLTableRowElement : nsIDOMHTMLElement
|
||||
{
|
||||
// Modified in DOM Level 2:
|
||||
readonly attribute long rowIndex;
|
||||
// Modified in DOM Level 2:
|
||||
readonly attribute long sectionRowIndex;
|
||||
// Modified in DOM Level 2:
|
||||
readonly attribute nsIDOMHTMLCollection cells;
|
||||
attribute DOMString align;
|
||||
attribute DOMString bgColor;
|
||||
attribute DOMString ch;
|
||||
attribute DOMString chOff;
|
||||
attribute DOMString vAlign;
|
||||
// Modified in DOM Level 2:
|
||||
nsIDOMHTMLElement insertCell(in long index)
|
||||
raises(DOMException);
|
||||
// Modified in DOM Level 2:
|
||||
void deleteCell(in long index)
|
||||
raises(DOMException);
|
||||
};
|
|
@ -0,0 +1,33 @@
|
|||
/* -*- 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 nsIDOMHTMLTableSectionElement interface is the interface to a
|
||||
* [X]HTML thead, tbody, and tfoot 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, builtinclass, uuid(7b91cf4c-5194-4122-bc29-7bbd18ba0020)]
|
||||
interface nsIDOMHTMLTableSectionElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString align;
|
||||
attribute DOMString ch;
|
||||
attribute DOMString chOff;
|
||||
attribute DOMString vAlign;
|
||||
readonly attribute nsIDOMHTMLCollection rows;
|
||||
// Modified in DOM Level 2:
|
||||
nsIDOMHTMLElement insertRow(in long index)
|
||||
raises(DOMException);
|
||||
// Modified in DOM Level 2:
|
||||
void deleteRow(in long index)
|
||||
raises(DOMException);
|
||||
};
|
|
@ -0,0 +1,17 @@
|
|||
/* -*- 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 nsIDOMHTMLUnknownElement interface is the interface to an unknown HTML
|
||||
* element.
|
||||
*
|
||||
* @see <http://www.whatwg.org/html/#htmlunknownelement>
|
||||
*/
|
||||
[scriptable, uuid(aa044a2d-4e9b-4fc5-8ad2-666da9062b36)]
|
||||
interface nsIDOMHTMLUnknownElement : nsIDOMHTMLElement
|
||||
{
|
||||
};
|
|
@ -17,6 +17,5 @@ interface HTMLHeadingElement : HTMLElement {
|
|||
|
||||
// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
|
||||
partial interface HTMLHeadingElement {
|
||||
[SetterThrows]
|
||||
attribute DOMString align;
|
||||
};
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
|
||||
interface HTMLLabelElement : HTMLElement {
|
||||
readonly attribute HTMLFormElement? form;
|
||||
[SetterThrows]
|
||||
attribute DOMString htmlFor;
|
||||
readonly attribute HTMLElement? control;
|
||||
};
|
||||
|
|
|
@ -19,6 +19,5 @@ interface HTMLLegendElement : HTMLElement {
|
|||
|
||||
// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
|
||||
partial interface HTMLLegendElement {
|
||||
[SetterThrows]
|
||||
attribute DOMString align;
|
||||
};
|
||||
|
|
|
@ -12,19 +12,13 @@
|
|||
*/
|
||||
|
||||
interface HTMLTableColElement : HTMLElement {
|
||||
[SetterThrows]
|
||||
attribute unsigned long span;
|
||||
};
|
||||
|
||||
partial interface HTMLTableColElement {
|
||||
[SetterThrows]
|
||||
attribute DOMString align;
|
||||
[SetterThrows]
|
||||
attribute DOMString ch;
|
||||
[SetterThrows]
|
||||
attribute DOMString chOff;
|
||||
[SetterThrows]
|
||||
attribute DOMString vAlign;
|
||||
[SetterThrows]
|
||||
attribute DOMString width;
|
||||
};
|
||||
|
|
|
@ -74,6 +74,11 @@ CopyableCanvasLayer::UpdateSurface(gfxASurface* aDestSurface, Layer* aMaskLayer)
|
|||
}
|
||||
|
||||
if (mGLContext) {
|
||||
if (aDestSurface && aDestSurface->GetType() != gfxASurface::SurfaceTypeImage) {
|
||||
MOZ_ASSERT(false, "Destination surface must be ImageSurface type.");
|
||||
return;
|
||||
}
|
||||
|
||||
nsRefPtr<gfxImageSurface> readSurf;
|
||||
nsRefPtr<gfxImageSurface> resultSurf;
|
||||
|
||||
|
@ -88,9 +93,9 @@ CopyableCanvasLayer::UpdateSurface(gfxASurface* aDestSurface, Layer* aMaskLayer)
|
|||
? gfxASurface::ImageFormatRGB24
|
||||
: gfxASurface::ImageFormatARGB32;
|
||||
|
||||
bool needsTempSurface = !aDestSurface ||
|
||||
!(resultSurf = aDestSurface->GetAsImageSurface());
|
||||
if (needsTempSurface) {
|
||||
if (aDestSurface) {
|
||||
resultSurf = static_cast<gfxImageSurface*>(aDestSurface);
|
||||
} else {
|
||||
resultSurf = GetTempSurface(readSize, format);
|
||||
}
|
||||
MOZ_ASSERT(resultSurf);
|
||||
|
@ -151,7 +156,7 @@ CopyableCanvasLayer::UpdateSurface(gfxASurface* aDestSurface, Layer* aMaskLayer)
|
|||
}
|
||||
|
||||
// stick our surface into mSurface, so that the Paint() path is the same
|
||||
if (needsTempSurface) {
|
||||
if (!aDestSurface) {
|
||||
mSurface = resultSurf;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ CanvasClient2D::Update(gfx::IntSize aSize, ClientCanvasLayer* aLayer)
|
|||
: gfxASurface::CONTENT_COLOR_ALPHA;
|
||||
mDeprecatedTextureClient->EnsureAllocated(aSize, contentType);
|
||||
|
||||
gfxASurface* surface = mDeprecatedTextureClient->LockSurface();
|
||||
gfxASurface* surface = mDeprecatedTextureClient->LockImageSurface();
|
||||
aLayer->UpdateSurface(surface);
|
||||
mDeprecatedTextureClient->Unlock();
|
||||
}
|
||||
|
|
|
@ -247,6 +247,11 @@ nsBMPDecoder::WriteInternal(const char* aBuffer, uint32_t aCount)
|
|||
return;
|
||||
}
|
||||
|
||||
if (mBIH.height == INT_MIN) {
|
||||
PostDataError();
|
||||
return;
|
||||
}
|
||||
|
||||
uint32_t real_height = GetHeight();
|
||||
|
||||
// Post our size to the superclass
|
||||
|
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 60 B |
|
@ -70,6 +70,8 @@ MOCHITEST_FILES = imgutils.js \
|
|||
short_header.gif \
|
||||
test_short_gif_header.html \
|
||||
test_ImageContentLoaded.html \
|
||||
INT32_MIN.bmp \
|
||||
test_bug865919.html \
|
||||
$(NULL)
|
||||
|
||||
# Tests disabled due to intermittent orange
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=865919
|
||||
-->
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Test for Bug 865919</title>
|
||||
<script type="application/javascript" src="/MochiKit/MochiKit.js"></script>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript">
|
||||
"use strict";
|
||||
|
||||
/* Test for Bug 865919:
|
||||
* BMP with height of INT32_MIN should fail to decode.
|
||||
*/
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
var req = new XMLHttpRequest();
|
||||
req.onload = function() { CallbackAssert(true, 'Request for file succeeded.'); };
|
||||
req.onerror = function() { CallbackAssert(false, 'Request for file failed! Failed to test non-existent file.'); };
|
||||
req.open('GET', 'INT32_MIN.bmp');
|
||||
req.send(null);
|
||||
|
||||
var outstandingCallbacks = 2;
|
||||
|
||||
function CallbackAssert(assertVal, failText) {
|
||||
ok(assertVal, failText);
|
||||
|
||||
outstandingCallbacks--;
|
||||
ok(outstandingCallbacks >= 0, '`outstandingCallbacks` should be non-negative.');
|
||||
if (outstandingCallbacks)
|
||||
return;
|
||||
|
||||
// No outstanding callbacks remain, so we're done.
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<div id='content'>
|
||||
<img src='INT32_MIN.bmp'
|
||||
onerror='CallbackAssert(true, "Got expected onerror for INT32_MIN.bmp")'
|
||||
onload='CallbackAssert(false, "Got unexpected onload for INT32_MIN.bmp")'>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -747,14 +747,18 @@ EXPAND_MKSHLIB_ARGS += --symbol-order $(SYMBOL_ORDER)
|
|||
endif
|
||||
EXPAND_MKSHLIB = $(EXPAND_LIBS_EXEC) $(EXPAND_MKSHLIB_ARGS) -- $(MKSHLIB)
|
||||
|
||||
ifdef STDCXX_COMPAT
|
||||
ifneq (,$(MOZ_LIBSTDCXX_TARGET_VERSION)$(MOZ_LIBSTDCXX_HOST_VERSION))
|
||||
ifneq ($(OS_ARCH),Darwin)
|
||||
CHECK_STDCXX = objdump -p $(1) | grep -e 'GLIBCXX_3\.4\.\(9\|[1-9][0-9]\)' > /dev/null && echo "TEST-UNEXPECTED-FAIL | | We don't want these libstdc++ symbols to be used:" && objdump -T $(1) | grep -e 'GLIBCXX_3\.4\.\(9\|[1-9][0-9]\)' && exit 1 || exit 0
|
||||
endif
|
||||
|
||||
ifdef MOZ_LIBSTDCXX_TARGET_VERSION
|
||||
EXTRA_LIBS += $(call EXPAND_LIBNAME_PATH,stdc++compat,$(DEPTH)/build/unix/stdc++compat)
|
||||
endif
|
||||
ifdef MOZ_LIBSTDCXX_HOST_VERSION
|
||||
HOST_EXTRA_LIBS += $(call EXPAND_LIBNAME_PATH,host_stdc++compat,$(DEPTH)/build/unix/stdc++compat)
|
||||
endif
|
||||
endif
|
||||
|
||||
# autoconf.mk sets OBJ_SUFFIX to an error to avoid use before including
|
||||
# this file
|
||||
|
|
|
@ -2413,8 +2413,6 @@ AutoFlushInhibitor::~AutoFlushInhibitor()
|
|||
IonSpewCont(IonSpew_CacheFlush, "{");
|
||||
}
|
||||
|
||||
int js::ion::LabelBase::id_count = 0;
|
||||
|
||||
void
|
||||
ion::PurgeCaches(JSScript *script, Zone *zone)
|
||||
{
|
||||
|
|
|
@ -4403,10 +4403,6 @@ class LGuardThreadLocalObject : public LCallInstructionHelper<0, 2, 1>
|
|||
setTemp(0, temp1);
|
||||
}
|
||||
|
||||
bool isCall() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
const LAllocation *forkJoinSlice() {
|
||||
return getOperand(0);
|
||||
}
|
||||
|
@ -4852,7 +4848,7 @@ class LAsmJSCall MOZ_FINAL : public LInstruction
|
|||
|
||||
bool isCall() const {
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
||||
// LInstruction interface
|
||||
size_t numDefs() const {
|
||||
|
|
|
@ -61,13 +61,14 @@ class LAllocation : public TempObject
|
|||
{
|
||||
uintptr_t bits_;
|
||||
|
||||
protected:
|
||||
static const uintptr_t TAG_BIT = 1;
|
||||
static const uintptr_t TAG_SHIFT = 0;
|
||||
static const uintptr_t TAG_MASK = 1 << TAG_SHIFT;
|
||||
static const uintptr_t KIND_BITS = 4;
|
||||
static const uintptr_t KIND_SHIFT = TAG_SHIFT + TAG_BIT;
|
||||
static const uintptr_t KIND_MASK = (1 << KIND_BITS) - 1;
|
||||
|
||||
protected:
|
||||
static const uintptr_t DATA_BITS = (sizeof(uint32_t) * 8) - KIND_BITS - TAG_BIT;
|
||||
static const uintptr_t DATA_SHIFT = KIND_SHIFT + KIND_BITS;
|
||||
static const uintptr_t DATA_MASK = (1 << DATA_BITS) - 1;
|
||||
|
|
|
@ -402,7 +402,7 @@ LiveRangeAllocator<VREG>::init()
|
|||
if (!RegisterAllocator::init())
|
||||
return false;
|
||||
|
||||
liveIn = lir->mir()->allocate<BitSet*>(graph.numBlockIds());
|
||||
liveIn = mir->allocate<BitSet*>(graph.numBlockIds());
|
||||
if (!liveIn)
|
||||
return false;
|
||||
|
||||
|
@ -416,7 +416,7 @@ LiveRangeAllocator<VREG>::init()
|
|||
|
||||
fixedIntervalsUnion = new LiveInterval(0);
|
||||
|
||||
if (!vregs.init(lir->mir(), graph.numVirtualRegisters()))
|
||||
if (!vregs.init(mir, graph.numVirtualRegisters()))
|
||||
return false;
|
||||
|
||||
// Build virtual register objects
|
||||
|
|
|
@ -539,7 +539,6 @@ class LiveRangeAllocator : public RegisterAllocator
|
|||
// Allocation state
|
||||
StackSlotAllocator stackSlotAllocator;
|
||||
|
||||
public:
|
||||
LiveRangeAllocator(MIRGenerator *mir, LIRGenerator *lir, LIRGraph &graph, bool forLSRA)
|
||||
: RegisterAllocator(mir, lir, graph),
|
||||
liveIn(NULL),
|
||||
|
@ -550,7 +549,6 @@ class LiveRangeAllocator : public RegisterAllocator
|
|||
|
||||
bool buildLivenessInfo();
|
||||
|
||||
protected:
|
||||
bool init();
|
||||
|
||||
bool addFixedRangeAtHead(AnyRegister reg, CodePosition from, CodePosition to) {
|
||||
|
|
|
@ -159,7 +159,7 @@ MDefinition::valueHash() const
|
|||
}
|
||||
|
||||
bool
|
||||
MDefinition::congruentIfOperandsEqual(MDefinition * const &ins) const
|
||||
MDefinition::congruentIfOperandsEqual(MDefinition *ins) const
|
||||
{
|
||||
if (numOperands() != ins->numOperands())
|
||||
return false;
|
||||
|
@ -393,7 +393,7 @@ MConstant::valueHash() const
|
|||
return (HashNumber)JSVAL_TO_IMPL(value_).asBits;
|
||||
}
|
||||
bool
|
||||
MConstant::congruentTo(MDefinition * const &ins) const
|
||||
MConstant::congruentTo(MDefinition *ins) const
|
||||
{
|
||||
if (!ins->isConstant())
|
||||
return false;
|
||||
|
@ -494,7 +494,7 @@ MParameter::valueHash() const
|
|||
}
|
||||
|
||||
bool
|
||||
MParameter::congruentTo(MDefinition * const &ins) const
|
||||
MParameter::congruentTo(MDefinition *ins) const
|
||||
{
|
||||
if (!ins->isParameter())
|
||||
return false;
|
||||
|
@ -647,7 +647,7 @@ MPhi::foldsTo(bool useValueNumbers)
|
|||
}
|
||||
|
||||
bool
|
||||
MPhi::congruentTo(MDefinition *const &ins) const
|
||||
MPhi::congruentTo(MDefinition *ins) const
|
||||
{
|
||||
if (!ins->isPhi())
|
||||
return false;
|
||||
|
|
104
js/src/ion/MIR.h
104
js/src/ion/MIR.h
|
@ -368,10 +368,10 @@ class MDefinition : public MNode
|
|||
}
|
||||
|
||||
virtual HashNumber valueHash() const;
|
||||
virtual bool congruentTo(MDefinition* const &ins) const {
|
||||
virtual bool congruentTo(MDefinition *ins) const {
|
||||
return false;
|
||||
}
|
||||
bool congruentIfOperandsEqual(MDefinition * const &ins) const;
|
||||
bool congruentIfOperandsEqual(MDefinition *ins) const;
|
||||
virtual MDefinition *foldsTo(bool useValueNumbers);
|
||||
virtual void analyzeEdgeCasesForward();
|
||||
virtual void analyzeEdgeCasesBackward();
|
||||
|
@ -712,7 +712,7 @@ class MBinaryInstruction : public MAryInstruction<2>
|
|||
replaceOperand(1, temp);
|
||||
}
|
||||
|
||||
bool congruentTo(MDefinition *const &ins) const
|
||||
bool congruentTo(MDefinition *ins) const
|
||||
{
|
||||
if (op() != ins->op())
|
||||
return false;
|
||||
|
@ -772,7 +772,7 @@ class MTernaryInstruction : public MAryInstruction<3>
|
|||
return op() ^ first->valueNumber() ^ second->valueNumber() ^ third->valueNumber();
|
||||
}
|
||||
|
||||
bool congruentTo(MDefinition *const &ins) const
|
||||
bool congruentTo(MDefinition *ins) const
|
||||
{
|
||||
if (op() != ins->op())
|
||||
return false;
|
||||
|
@ -821,7 +821,7 @@ class MQuaternaryInstruction : public MAryInstruction<4>
|
|||
third->valueNumber() ^ fourth->valueNumber();
|
||||
}
|
||||
|
||||
bool congruentTo(MDefinition *const &ins) const
|
||||
bool congruentTo(MDefinition *ins) const
|
||||
{
|
||||
if (op() != ins->op())
|
||||
return false;
|
||||
|
@ -935,7 +935,7 @@ class MConstant : public MNullaryInstruction
|
|||
void printOpcode(FILE *fp) const;
|
||||
|
||||
HashNumber valueHash() const;
|
||||
bool congruentTo(MDefinition * const &ins) const;
|
||||
bool congruentTo(MDefinition *ins) const;
|
||||
|
||||
AliasSet getAliasSet() const {
|
||||
return AliasSet::None();
|
||||
|
@ -969,7 +969,7 @@ class MParameter : public MNullaryInstruction
|
|||
void printOpcode(FILE *fp) const;
|
||||
|
||||
HashNumber valueHash() const;
|
||||
bool congruentTo(MDefinition * const &ins) const;
|
||||
bool congruentTo(MDefinition *ins) const;
|
||||
};
|
||||
|
||||
class MCallee : public MNullaryInstruction
|
||||
|
@ -984,7 +984,7 @@ class MCallee : public MNullaryInstruction
|
|||
public:
|
||||
INSTRUCTION_HEADER(Callee)
|
||||
|
||||
bool congruentTo(MDefinition * const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
|
||||
|
@ -2033,7 +2033,7 @@ class MCompare
|
|||
void printOpcode(FILE *fp) const;
|
||||
|
||||
protected:
|
||||
bool congruentTo(MDefinition *const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
if (!MBinaryInstruction::congruentTo(ins))
|
||||
return false;
|
||||
return compareType() == ins->toCompare()->compareType() &&
|
||||
|
@ -2069,7 +2069,7 @@ class MBox : public MUnaryInstruction
|
|||
return new MBox(ins);
|
||||
}
|
||||
|
||||
bool congruentTo(MDefinition *const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -2148,7 +2148,7 @@ class MUnbox : public MUnaryInstruction, public BoxInputsPolicy
|
|||
bool fallible() const {
|
||||
return mode() != Infallible;
|
||||
}
|
||||
bool congruentTo(MDefinition *const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
if (!ins->isUnbox() || ins->toUnbox()->mode() != mode())
|
||||
return false;
|
||||
return congruentIfOperandsEqual(ins);
|
||||
|
@ -2566,7 +2566,7 @@ class MToDouble
|
|||
}
|
||||
|
||||
MDefinition *foldsTo(bool useValueNumbers);
|
||||
bool congruentTo(MDefinition *const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
if (!ins->isToDouble() || ins->toToDouble()->conversion() != conversion())
|
||||
return false;
|
||||
return congruentIfOperandsEqual(ins);
|
||||
|
@ -2598,7 +2598,7 @@ class MAsmJSUnsignedToDouble
|
|||
}
|
||||
|
||||
MDefinition *foldsTo(bool useValueNumbers);
|
||||
bool congruentTo(MDefinition *const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -2640,7 +2640,7 @@ class MToInt32 : public MUnaryInstruction
|
|||
canBeNegativeZero_ = negativeZero;
|
||||
}
|
||||
|
||||
bool congruentTo(MDefinition *const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
|
||||
|
@ -2672,7 +2672,7 @@ class MTruncateToInt32 : public MUnaryInstruction
|
|||
|
||||
MDefinition *foldsTo(bool useValueNumbers);
|
||||
|
||||
bool congruentTo(MDefinition *const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -2702,7 +2702,7 @@ class MToString : public MUnaryInstruction
|
|||
|
||||
MDefinition *foldsTo(bool useValueNumbers);
|
||||
|
||||
bool congruentTo(MDefinition *const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -2735,7 +2735,7 @@ class MBitNot
|
|||
MDefinition *foldsTo(bool useValueNumbers);
|
||||
void infer();
|
||||
|
||||
bool congruentTo(MDefinition *const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -2831,7 +2831,7 @@ class MBinaryBitwiseInstruction
|
|||
virtual MDefinition *foldIfEqual() = 0;
|
||||
virtual void infer(BaselineInspector *inspector, jsbytecode *pc);
|
||||
|
||||
bool congruentTo(MDefinition *const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -3045,7 +3045,7 @@ class MBinaryArithInstruction
|
|||
setResultType(MIRType_Int32);
|
||||
}
|
||||
|
||||
bool congruentTo(MDefinition *const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
return MBinaryInstruction::congruentTo(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -3094,7 +3094,7 @@ class MMinMax
|
|||
TypePolicy *typePolicy() {
|
||||
return this;
|
||||
}
|
||||
bool congruentTo(MDefinition *const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
if (!ins->isMinMax())
|
||||
return false;
|
||||
if (isMax() != ins->toMinMax()->isMax())
|
||||
|
@ -3141,7 +3141,7 @@ class MAbs
|
|||
TypePolicy *typePolicy() {
|
||||
return this;
|
||||
}
|
||||
bool congruentTo(MDefinition *const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
bool fallible() const;
|
||||
|
@ -3179,7 +3179,7 @@ class MSqrt
|
|||
TypePolicy *typePolicy() {
|
||||
return this;
|
||||
}
|
||||
bool congruentTo(MDefinition *const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
|
||||
|
@ -3218,7 +3218,7 @@ class MAtan2
|
|||
return this;
|
||||
}
|
||||
|
||||
bool congruentTo(MDefinition *const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
|
||||
|
@ -3256,7 +3256,7 @@ class MPow
|
|||
MDefinition *power() const {
|
||||
return rhs();
|
||||
}
|
||||
bool congruentTo(MDefinition *const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
TypePolicy *typePolicy() {
|
||||
|
@ -3287,7 +3287,7 @@ class MPowHalf
|
|||
static MPowHalf *New(MDefinition *input) {
|
||||
return new MPowHalf(input);
|
||||
}
|
||||
bool congruentTo(MDefinition *const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
TypePolicy *typePolicy() {
|
||||
|
@ -3375,7 +3375,7 @@ class MMathFunction
|
|||
TypePolicy *typePolicy() {
|
||||
return this;
|
||||
}
|
||||
bool congruentTo(MDefinition *const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
if (!ins->isMathFunction())
|
||||
return false;
|
||||
if (ins->toMathFunction()->function() != function())
|
||||
|
@ -3669,7 +3669,7 @@ class MConcat
|
|||
TypePolicy *typePolicy() {
|
||||
return this;
|
||||
}
|
||||
bool congruentTo(MDefinition *const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -3712,7 +3712,7 @@ class MConcatPar
|
|||
TypePolicy *typePolicy() {
|
||||
return this;
|
||||
}
|
||||
bool congruentTo(MDefinition *const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -3862,7 +3862,7 @@ class MPhi MOZ_FINAL : public MDefinition, public InlineForwardListNode<MPhi>
|
|||
|
||||
MDefinition *foldsTo(bool useValueNumbers);
|
||||
|
||||
bool congruentTo(MDefinition * const &ins) const;
|
||||
bool congruentTo(MDefinition *ins) const;
|
||||
|
||||
bool isIterator() const {
|
||||
return isIterator_;
|
||||
|
@ -4298,7 +4298,7 @@ class MSlots
|
|||
MDefinition *object() const {
|
||||
return getOperand(0);
|
||||
}
|
||||
bool congruentTo(MDefinition *const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -4331,7 +4331,7 @@ class MElements
|
|||
MDefinition *object() const {
|
||||
return getOperand(0);
|
||||
}
|
||||
bool congruentTo(MDefinition *const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -4368,7 +4368,7 @@ class MConstantElements : public MNullaryInstruction
|
|||
return (HashNumber)(size_t) value_;
|
||||
}
|
||||
|
||||
bool congruentTo(MDefinition * const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
return ins->isConstantElements() && ins->toConstantElements()->value() == value();
|
||||
}
|
||||
|
||||
|
@ -4399,7 +4399,7 @@ class MConvertElementsToDoubles
|
|||
MDefinition *elements() const {
|
||||
return getOperand(0);
|
||||
}
|
||||
bool congruentTo(MDefinition *const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -4445,7 +4445,7 @@ class MMaybeToDoubleElement
|
|||
MDefinition *value() const {
|
||||
return getOperand(1);
|
||||
}
|
||||
bool congruentTo(MDefinition *const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -4474,7 +4474,7 @@ class MInitializedLength
|
|||
MDefinition *elements() const {
|
||||
return getOperand(0);
|
||||
}
|
||||
bool congruentTo(MDefinition *const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -4527,7 +4527,7 @@ class MArrayLength
|
|||
MDefinition *elements() const {
|
||||
return getOperand(0);
|
||||
}
|
||||
bool congruentTo(MDefinition *const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -4560,7 +4560,7 @@ class MTypedArrayLength
|
|||
MDefinition *object() const {
|
||||
return getOperand(0);
|
||||
}
|
||||
bool congruentTo(MDefinition *const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -4595,7 +4595,7 @@ class MTypedArrayElements
|
|||
MDefinition *object() const {
|
||||
return getOperand(0);
|
||||
}
|
||||
bool congruentTo(MDefinition *const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -4698,7 +4698,7 @@ class MBoundsCheck
|
|||
void setMaximum(int32_t n) {
|
||||
maximum_ = n;
|
||||
}
|
||||
bool congruentTo(MDefinition * const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
if (!ins->isBoundsCheck())
|
||||
return false;
|
||||
MBoundsCheck *other = ins->toBoundsCheck();
|
||||
|
@ -5461,7 +5461,7 @@ class MClampToUint8
|
|||
TypePolicy *typePolicy() {
|
||||
return this;
|
||||
}
|
||||
bool congruentTo(MDefinition *const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -5501,7 +5501,7 @@ class MLoadFixedSlot
|
|||
size_t slot() const {
|
||||
return slot_;
|
||||
}
|
||||
bool congruentTo(MDefinition * const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
if (!ins->isLoadFixedSlot())
|
||||
return false;
|
||||
if (slot() != ins->toLoadFixedSlot()->slot())
|
||||
|
@ -5692,7 +5692,7 @@ class MGetPropertyCache
|
|||
}
|
||||
TypePolicy *typePolicy() { return this; }
|
||||
|
||||
bool congruentTo(MDefinition * const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
if (!idempotent_)
|
||||
return false;
|
||||
if (!ins->isGetPropertyCache())
|
||||
|
@ -5749,7 +5749,7 @@ class MGetPropertyPolymorphic
|
|||
return new MGetPropertyPolymorphic(obj, name);
|
||||
}
|
||||
|
||||
bool congruentTo(MDefinition *const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
if (!ins->isGetPropertyPolymorphic())
|
||||
return false;
|
||||
if (name() != ins->toGetPropertyPolymorphic()->name())
|
||||
|
@ -6265,7 +6265,7 @@ class MGuardShape
|
|||
BailoutKind bailoutKind() const {
|
||||
return bailoutKind_;
|
||||
}
|
||||
bool congruentTo(MDefinition * const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
if (!ins->isGuardShape())
|
||||
return false;
|
||||
if (shape() != ins->toGuardShape()->shape())
|
||||
|
@ -6317,7 +6317,7 @@ class MGuardObjectType
|
|||
bool bailOnEquality() const {
|
||||
return bailOnEquality_;
|
||||
}
|
||||
bool congruentTo(MDefinition * const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
if (!ins->isGuardObjectType())
|
||||
return false;
|
||||
if (typeObject() != ins->toGuardObjectType()->typeObject())
|
||||
|
@ -6362,7 +6362,7 @@ class MGuardClass
|
|||
const Class *getClass() const {
|
||||
return class_;
|
||||
}
|
||||
bool congruentTo(MDefinition * const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
if (!ins->isGuardClass())
|
||||
return false;
|
||||
if (getClass() != ins->toGuardClass()->getClass())
|
||||
|
@ -6407,7 +6407,7 @@ class MLoadSlot
|
|||
return slot_;
|
||||
}
|
||||
|
||||
bool congruentTo(MDefinition * const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
if (!ins->isLoadSlot())
|
||||
return false;
|
||||
if (slot() != ins->toLoadSlot()->slot())
|
||||
|
@ -7040,7 +7040,7 @@ class MGetDOMProperty
|
|||
return this;
|
||||
}
|
||||
|
||||
bool congruentTo(MDefinition *const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
if (!isDomPure())
|
||||
return false;
|
||||
|
||||
|
@ -7097,7 +7097,7 @@ class MStringLength
|
|||
MDefinition *string() const {
|
||||
return getOperand(0);
|
||||
}
|
||||
bool congruentTo(MDefinition *const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -7405,7 +7405,7 @@ class MArgumentsLength : public MNullaryInstruction
|
|||
return new MArgumentsLength();
|
||||
}
|
||||
|
||||
bool congruentTo(MDefinition *const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -7440,7 +7440,7 @@ class MGetArgument
|
|||
TypePolicy *typePolicy() {
|
||||
return this;
|
||||
}
|
||||
bool congruentTo(MDefinition *const &ins) const {
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -7620,7 +7620,7 @@ class MTypeBarrier
|
|||
return this;
|
||||
}
|
||||
|
||||
bool congruentTo(MDefinition * const &def) const {
|
||||
bool congruentTo(MDefinition *def) const {
|
||||
return false;
|
||||
}
|
||||
BailoutKind bailoutKind() const {
|
||||
|
|
|
@ -453,7 +453,7 @@ const CodePosition CodePosition::MIN(0);
|
|||
bool
|
||||
RegisterAllocator::init()
|
||||
{
|
||||
if (!insData.init(lir->mir(), graph.numInstructions()))
|
||||
if (!insData.init(mir, graph.numInstructions()))
|
||||
return false;
|
||||
|
||||
for (size_t i = 0; i < graph.numBlocks(); i++) {
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче