merge mozilla-inbound to mozilla-central

This commit is contained in:
Carsten "Tomcat" Book 2013-08-08 13:13:05 +02:00
commit f0bfac3d0e
423 changed files with 2751 additions and 3562 deletions

View File

@ -14,7 +14,6 @@
#include "States.h"
#include "nsGUIEvent.h"
#include "nsILink.h"
#include "nsINameSpaceManager.h"
#include "nsIURI.h"

View File

@ -15,7 +15,6 @@
#include "nsGenericHTMLElement.h"
#include "nsIDocument.h"
#include "nsIImageLoadingContent.h"
#include "nsILink.h"
#include "nsIPresShell.h"
#include "nsIServiceManager.h"
#include "nsIDOMHTMLImageElement.h"

View File

@ -9,7 +9,7 @@ searchbar {
-moz-binding: url("chrome://browser/content/search/search.xml#searchbar");
}
browser[remote="true"] {
.browserStack > browser[remote="true"] {
-moz-binding: url("chrome://global/content/bindings/remote-browser.xml#remote-browser");
}

View File

@ -2645,6 +2645,7 @@
} catch (e) {
let url = this.mCurrentBrowser.currentURI.spec;
this._updateBrowserRemoteness(this.mCurrentBrowser, this._shouldBrowserBeRemote(url));
throw e;
}
#endif
]]>
@ -2669,6 +2670,7 @@
} catch (e) {
let url = this.mCurrentBrowser.currentURI.spec;
this._updateBrowserRemoteness(this.mCurrentBrowser, this._shouldBrowserBeRemote(url));
throw e;
}
#endif
]]>
@ -2926,12 +2928,6 @@
<![CDATA[
let browserStack = document.getAnonymousElementByAttribute(this, "anonid", "browserStack");
this.mCurrentBrowser = document.getAnonymousElementByAttribute(this, "anonid", "initialBrowser");
if (Services.prefs.getBoolPref("browser.tabs.remote")) {
browserStack.removeChild(this.mCurrentBrowser);
this.mCurrentBrowser.setAttribute("remote", true);
browserStack.appendChild(this.mCurrentBrowser);
this.tabContainer.firstChild.setAttribute("remote", "true");
}
this.mCurrentTab = this.tabContainer.firstChild;
document.addEventListener("keypress", this, false);

View File

@ -19,8 +19,7 @@ from mozbuild.backend.configenvironment import ConfigEnvironment
from mozbuild.backend.recursivemake import RecursiveMakeBackend
from mozbuild.frontend.emitter import TreeMetadataEmitter
from mozbuild.frontend.reader import BuildReader
from Preprocessor import Preprocessor
from mozbuild.mozinfo import write_mozinfo
log_manager = LoggingManager()
@ -87,6 +86,11 @@ def config_status(topobjdir = '.', topsrcdir = '.',
env = ConfigEnvironment(topsrcdir, topobjdir, defines=defines,
non_global_defines=non_global_defines, substs=substs)
# mozinfo.json only needs written if configure changes and configure always
# passes this environment variable.
if 'WRITE_MOZINFO' in os.environ:
write_mozinfo(os.path.join(topobjdir, 'mozinfo.json'), env, os.environ)
reader = BuildReader(env)
emitter = TreeMetadataEmitter(env)
backend = RecursiveMakeBackend(env)

View File

@ -518,9 +518,18 @@ class Automation(object):
# Only 2 GB RAM or less available? Use custom ASan options to reduce
# the amount of resources required to do the tests. Standard options
# will otherwise lead to OOM conditions on the current test slaves.
#
# If we have more than 2 GB or RAM but still less than 4 GB, we need
# another set of options to prevent OOM in some memory-intensive
# tests.
if totalMemory <= 1024 * 1024 * 2:
self.log.info("INFO | automation.py | ASan running in low-memory configuration")
env["ASAN_OPTIONS"] = "quarantine_size=50331648:redzone=64"
elif totalMemory <= 1024 * 1024 * 4:
self.log.info("INFO | automation.py | ASan running in mid-memory configuration")
env["ASAN_OPTIONS"] = "quarantine_size=100663296:redzone=64"
else:
self.log.info("INFO | automation.py | ASan running in default memory configuration")
except OSError,err:
self.log.info("Failed determine available memory, disabling ASan low-memory configuration: %s", err.strerror)
except:

View File

@ -432,17 +432,17 @@ nsScriptSecurityManager::ContentSecurityPolicyPermitsJSAction(JSContext *cx)
NS_ASSERTION(ssm, "Failed to get security manager service");
if (!ssm)
return JS_FALSE;
return false;
nsresult rv;
nsIPrincipal* subjectPrincipal = ssm->GetSubjectPrincipal(cx, &rv);
NS_ASSERTION(NS_SUCCEEDED(rv), "CSP: Failed to get nsIPrincipal from js context");
if (NS_FAILED(rv))
return JS_FALSE; // Not just absence of principal, but failure.
return false; // Not just absence of principal, but failure.
if (!subjectPrincipal)
return JS_TRUE;
return true;
nsCOMPtr<nsIContentSecurityPolicy> csp;
rv = subjectPrincipal->GetCsp(getter_AddRefs(csp));
@ -450,7 +450,7 @@ nsScriptSecurityManager::ContentSecurityPolicyPermitsJSAction(JSContext *cx)
// don't do anything unless there's a CSP
if (!csp)
return JS_TRUE;
return true;
bool evalOK = true;
bool reportViolation = false;
@ -459,7 +459,7 @@ nsScriptSecurityManager::ContentSecurityPolicyPermitsJSAction(JSContext *cx)
if (NS_FAILED(rv))
{
NS_WARNING("CSP: failed to get allowsEval");
return JS_TRUE; // fail open to not break sites.
return true; // fail open to not break sites.
}
if (reportViolation) {
@ -494,7 +494,7 @@ nsScriptSecurityManager::CheckObjectAccess(JSContext *cx, JS::Handle<JSObject*>
NS_WARN_IF_FALSE(ssm, "Failed to get security manager service");
if (!ssm)
return JS_FALSE;
return false;
// Get the object being accessed. We protect these cases:
// 1. The Function.prototype.caller property's value, which might lead
@ -515,9 +515,9 @@ nsScriptSecurityManager::CheckObjectAccess(JSContext *cx, JS::Handle<JSObject*>
(int32_t)nsIXPCSecurityManager::ACCESS_GET_PROPERTY);
if (NS_FAILED(rv))
return JS_FALSE; // Security check failed (XXX was an error reported?)
return false; // Security check failed (XXX was an error reported?)
return JS_TRUE;
return true;
}
NS_IMETHODIMP

View File

@ -1,204 +0,0 @@
#!/usr/bin/env python
import unittest
import json, os, sys, time, tempfile
from StringIO import StringIO
import mozunit
from writemozinfo import build_dict, write_json
class TestBuildDict(unittest.TestCase):
def testMissing(self):
"""
Test that missing required values raises.
"""
self.assertRaises(Exception, build_dict, {'OS_TARGET':'foo'})
self.assertRaises(Exception, build_dict, {'TARGET_CPU':'foo'})
self.assertRaises(Exception, build_dict, {'MOZ_WIDGET_TOOLKIT':'foo'})
def testWin(self):
d = build_dict({'OS_TARGET':'WINNT',
'TARGET_CPU':'i386',
'MOZ_WIDGET_TOOLKIT':'windows'})
self.assertEqual('win', d['os'])
self.assertEqual('x86', d['processor'])
self.assertEqual('windows', d['toolkit'])
self.assertEqual(32, d['bits'])
def testLinux(self):
d = build_dict({'OS_TARGET':'Linux',
'TARGET_CPU':'i386',
'MOZ_WIDGET_TOOLKIT':'gtk2'})
self.assertEqual('linux', d['os'])
self.assertEqual('x86', d['processor'])
self.assertEqual('gtk2', d['toolkit'])
self.assertEqual(32, d['bits'])
d = build_dict({'OS_TARGET':'Linux',
'TARGET_CPU':'x86_64',
'MOZ_WIDGET_TOOLKIT':'gtk2'})
self.assertEqual('linux', d['os'])
self.assertEqual('x86_64', d['processor'])
self.assertEqual('gtk2', d['toolkit'])
self.assertEqual(64, d['bits'])
def testMac(self):
d = build_dict({'OS_TARGET':'Darwin',
'TARGET_CPU':'i386',
'MOZ_WIDGET_TOOLKIT':'cocoa'})
self.assertEqual('mac', d['os'])
self.assertEqual('x86', d['processor'])
self.assertEqual('cocoa', d['toolkit'])
self.assertEqual(32, d['bits'])
d = build_dict({'OS_TARGET':'Darwin',
'TARGET_CPU':'x86_64',
'MOZ_WIDGET_TOOLKIT':'cocoa'})
self.assertEqual('mac', d['os'])
self.assertEqual('x86_64', d['processor'])
self.assertEqual('cocoa', d['toolkit'])
self.assertEqual(64, d['bits'])
def testMacUniversal(self):
d = build_dict({'OS_TARGET':'Darwin',
'TARGET_CPU':'i386',
'MOZ_WIDGET_TOOLKIT':'cocoa',
'UNIVERSAL_BINARY': '1'})
self.assertEqual('mac', d['os'])
self.assertEqual('universal-x86-x86_64', d['processor'])
self.assertEqual('cocoa', d['toolkit'])
self.assertFalse('bits' in d)
d = build_dict({'OS_TARGET':'Darwin',
'TARGET_CPU':'x86_64',
'MOZ_WIDGET_TOOLKIT':'cocoa',
'UNIVERSAL_BINARY': '1'})
self.assertEqual('mac', d['os'])
self.assertEqual('universal-x86-x86_64', d['processor'])
self.assertEqual('cocoa', d['toolkit'])
self.assertFalse('bits' in d)
def testAndroid(self):
d = build_dict({'OS_TARGET':'Android',
'TARGET_CPU':'arm',
'MOZ_WIDGET_TOOLKIT':'android'})
self.assertEqual('android', d['os'])
self.assertEqual('arm', d['processor'])
self.assertEqual('android', d['toolkit'])
self.assertEqual(32, d['bits'])
def testX86(self):
"""
Test that various i?86 values => x86.
"""
d = build_dict({'OS_TARGET':'WINNT',
'TARGET_CPU':'i486',
'MOZ_WIDGET_TOOLKIT':'windows'})
self.assertEqual('x86', d['processor'])
d = build_dict({'OS_TARGET':'WINNT',
'TARGET_CPU':'i686',
'MOZ_WIDGET_TOOLKIT':'windows'})
self.assertEqual('x86', d['processor'])
def testARM(self):
"""
Test that all arm CPU architectures => arm.
"""
d = build_dict({'OS_TARGET':'Linux',
'TARGET_CPU':'arm',
'MOZ_WIDGET_TOOLKIT':'gtk2'})
self.assertEqual('arm', d['processor'])
d = build_dict({'OS_TARGET':'Linux',
'TARGET_CPU':'armv7',
'MOZ_WIDGET_TOOLKIT':'gtk2'})
self.assertEqual('arm', d['processor'])
def testUnknown(self):
"""
Test that unknown values pass through okay.
"""
d = build_dict({'OS_TARGET':'RandOS',
'TARGET_CPU':'cptwo',
'MOZ_WIDGET_TOOLKIT':'foobar'})
self.assertEqual("randos", d["os"])
self.assertEqual("cptwo", d["processor"])
self.assertEqual("foobar", d["toolkit"])
# unknown CPUs should not get a bits value
self.assertFalse("bits" in d)
def testDebug(self):
"""
Test that debug values are properly detected.
"""
d = build_dict({'OS_TARGET':'Linux',
'TARGET_CPU':'i386',
'MOZ_WIDGET_TOOLKIT':'gtk2'})
self.assertEqual(False, d['debug'])
d = build_dict({'OS_TARGET':'Linux',
'TARGET_CPU':'i386',
'MOZ_WIDGET_TOOLKIT':'gtk2',
'MOZ_DEBUG':'1'})
self.assertEqual(True, d['debug'])
def testCrashreporter(self):
"""
Test that crashreporter values are properly detected.
"""
d = build_dict({'OS_TARGET':'Linux',
'TARGET_CPU':'i386',
'MOZ_WIDGET_TOOLKIT':'gtk2'})
self.assertEqual(False, d['crashreporter'])
d = build_dict({'OS_TARGET':'Linux',
'TARGET_CPU':'i386',
'MOZ_WIDGET_TOOLKIT':'gtk2',
'MOZ_CRASHREPORTER':'1'})
self.assertEqual(True, d['crashreporter'])
class TestWriteJson(unittest.TestCase):
"""
Test the write_json function.
"""
def setUp(self):
fd, self.f = tempfile.mkstemp()
os.close(fd)
def tearDown(self):
os.unlink(self.f)
def testBasic(self):
"""
Test that writing to a file produces correct output.
"""
write_json(self.f, env={'OS_TARGET':'WINNT',
'TARGET_CPU':'i386',
'TOPSRCDIR':'/tmp',
'MOZCONFIG':'foo',
'MOZ_WIDGET_TOOLKIT':'windows'})
with open(self.f) as f:
d = json.load(f)
self.assertEqual('win', d['os'])
self.assertEqual('x86', d['processor'])
self.assertEqual('windows', d['toolkit'])
self.assertEqual('/tmp', d['topsrcdir'])
self.assertEqual(os.path.normpath('/tmp/foo'), d['mozconfig'])
self.assertEqual(32, d['bits'])
def testFileObj(self):
"""
Test that writing to a file-like object produces correct output.
"""
s = StringIO()
write_json(s, env={'OS_TARGET':'WINNT',
'TARGET_CPU':'i386',
'MOZ_WIDGET_TOOLKIT':'windows'})
d = json.loads(s.getvalue())
self.assertEqual('win', d['os'])
self.assertEqual('x86', d['processor'])
self.assertEqual('windows', d['toolkit'])
self.assertEqual(32, d['bits'])
if __name__ == '__main__':
mozunit.main()

View File

@ -9054,7 +9054,9 @@ xpcom/xpcom-private.h
AC_SUBST(STLPORT_LIBS)
export WRITE_MOZINFO=1
AC_OUTPUT([mozilla-config.h])
unset WRITE_MOZINFO
# Hack around an Apple bug that affects the egrep that comes with OS X 10.7.
# "env ARCHPREFERENCE=i386,x86_64 arch egrep" first tries to use the 32-bit
@ -9201,24 +9203,6 @@ dnl so that regeneration via dependencies works correctly
fi
fi
# Generate a JSON config file for unittest harnesses etc to read
# build configuration details from in a standardized way.
OS_TARGET=${OS_TARGET} \
TARGET_CPU=${TARGET_CPU} \
MOZ_DEBUG=${MOZ_DEBUG} \
MOZ_WIDGET_TOOLKIT=${MOZ_WIDGET_TOOLKIT} \
UNIVERSAL_BINARY=${UNIVERSAL_BINARY} \
MOZ_CRASHREPORTER=${MOZ_CRASHREPORTER} \
MOZ_APP_NAME=${MOZ_APP_NAME} \
TOPSRCDIR=${_topsrcdir} \
MOZ_ASAN=${MOZ_ASAN} \
$PYTHON ${_topsrcdir}/config/writemozinfo.py ./mozinfo.json.tmp
if cmp -s ./mozinfo.json.tmp ./mozinfo.json; then
rm ./mozinfo.json.tmp
else
mv -f ./mozinfo.json.tmp ./mozinfo.json
fi
# Run jemalloc configure script
if test -z "$MOZ_NATIVE_JEMALLOC" -a "$MOZ_MEMORY" && test -n "$MOZ_JEMALLOC3" -o -n "$MOZ_REPLACE_MALLOC"; then

View File

@ -95,8 +95,12 @@ void SetDirectionFromNewTextNode(nsIContent* aTextNode);
/**
* When a text node is removed from a document, find any ancestors whose
* directionality it determined and redetermine their directionality
*
* @param aTextNode the text node
* @param aNullParent whether the the parent is also being removed
* (passed from UnbindFromTree)
*/
void ResetDirectionSetByTextNode(nsTextNode* aTextNode);
void ResetDirectionSetByTextNode(nsTextNode* aTextNode, bool aNullParent);
/**
* Set the directionality of an element according to the directionality of the

View File

@ -133,6 +133,8 @@ public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ELEMENT_IID)
NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr);
/**
* Method to get the full state of this element. See nsEventStates.h for
* the possible bits that could be set here.

View File

@ -172,12 +172,6 @@ public:
NS_DECL_SIZEOF_EXCLUDING_THIS
/**
* Called during QueryInterface to give the binding manager a chance to
* get an interface for this element.
*/
nsresult PostQueryInterface(REFNSIID aIID, void** aInstancePtr);
// nsINode interface methods
virtual uint32_t GetChildCount() const MOZ_OVERRIDE;
virtual nsIContent *GetChildAt(uint32_t aIndex) const MOZ_OVERRIDE;
@ -402,16 +396,4 @@ protected:
rv = FragmentOrElement::QueryInterface(aIID, aInstancePtr); \
NS_INTERFACE_TABLE_TO_MAP_SEGUE
#define NS_ELEMENT_INTERFACE_MAP_END \
{ \
return PostQueryInterface(aIID, aInstancePtr); \
} \
\
NS_ADDREF(foundInterface); \
\
*aInstancePtr = foundInterface; \
\
return NS_OK; \
}
#endif /* FragmentOrElement_h___ */

View File

@ -80,11 +80,14 @@ class nsCopySupport
* responsible for removing the content during a cut operation if true is
* returned.
*
* aClipboardType specifies which clipboard to use, from nsIClipboard.
*
* If the event is cancelled or an error occurs, false will be returned.
*/
static bool FireClipboardEvent(int32_t aType,
nsIPresShell* aPresShell,
nsISelection* aSelection);
int32_t aClipboardType,
nsIPresShell* aPresShell,
nsISelection* aSelection);
};
#endif

View File

@ -502,7 +502,7 @@ private:
nsINode* oldTextNode = static_cast<Element*>(aData);
Element* rootNode = aEntry->GetKey();
nsINode* newTextNode = nullptr;
if (rootNode->HasDirAuto()) {
if (oldTextNode && rootNode->HasDirAuto()) {
newTextNode = WalkDescendantsSetDirectionFromText(rootNode, true,
oldTextNode);
}
@ -529,6 +529,11 @@ public:
mElements.EnumerateEntries(SetNodeDirection, &aDir);
}
void ClearAutoDirection()
{
mElements.EnumerateEntries(ResetNodeDirection, nullptr);
}
void ResetAutoDirection(nsINode* aTextNode)
{
mElements.EnumerateEntries(ResetNodeDirection, aTextNode);
@ -565,6 +570,13 @@ public:
GetDirectionalityMap(aTextNode)->UpdateAutoDirection(aDir);
}
static void ClearTextNodeDirection(nsINode* aTextNode)
{
MOZ_ASSERT(aTextNode->HasTextNodeDirectionalityMap(),
"Map missing in ResetTextNodeDirection");
GetDirectionalityMap(aTextNode)->ClearAutoDirection();
}
static void ResetTextNodeDirection(nsINode* aTextNode)
{
MOZ_ASSERT(aTextNode->HasTextNodeDirectionalityMap(),
@ -871,7 +883,7 @@ SetDirectionFromNewTextNode(nsIContent* aTextNode)
}
void
ResetDirectionSetByTextNode(nsTextNode* aTextNode)
ResetDirectionSetByTextNode(nsTextNode* aTextNode, bool aNullParent)
{
if (!NodeAffectsDirAutoAncestor(aTextNode)) {
nsTextNodeDirectionalityMap::EnsureMapIsClearFor(aTextNode);
@ -880,7 +892,11 @@ ResetDirectionSetByTextNode(nsTextNode* aTextNode)
Directionality dir = GetDirectionFromText(aTextNode->GetText());
if (dir != eDir_NotSet && aTextNode->HasTextNodeDirectionalityMap()) {
nsTextNodeDirectionalityMap::ResetTextNodeDirection(aTextNode);
if (aNullParent) {
nsTextNodeDirectionalityMap::ClearTextNodeDirection(aTextNode);
} else {
nsTextNodeDirectionalityMap::ResetTextNodeDirection(aTextNode);
}
}
}

View File

@ -127,11 +127,27 @@
#include "nsXBLService.h"
#include "nsContentCID.h"
#include "nsITextControlElement.h"
#include "nsISupportsImpl.h"
#include "mozilla/dom/DocumentFragment.h"
using namespace mozilla;
using namespace mozilla::dom;
NS_IMETHODIMP
Element::QueryInterface(REFNSIID aIID, void** aInstancePtr)
{
NS_ASSERTION(aInstancePtr,
"QueryInterface requires a non-NULL destination!");
nsresult rv = FragmentOrElement::QueryInterface(aIID, aInstancePtr);
if (NS_SUCCEEDED(rv)) {
return NS_OK;
}
// Give the binding manager a chance to get an interface for this element.
return OwnerDoc()->BindingManager()->GetBindingImplementation(this, aIID,
aInstancePtr);
}
nsEventStates
Element::IntrinsicState() const
{

View File

@ -106,7 +106,6 @@
#include "nsIXULDocument.h"
#endif /* MOZ_XUL */
#include "nsCycleCollectionParticipant.h"
#include "nsCCUncollectableMarker.h"
#include "mozAutoDocUpdate.h"
@ -1750,13 +1749,6 @@ NS_IMPL_CYCLE_COLLECTING_ADDREF(FragmentOrElement)
NS_IMPL_CYCLE_COLLECTING_RELEASE_WITH_LAST_RELEASE(FragmentOrElement,
nsNodeUtils::LastRelease(this))
nsresult
FragmentOrElement::PostQueryInterface(REFNSIID aIID, void** aInstancePtr)
{
return OwnerDoc()->BindingManager()->GetBindingImplementation(this, aIID,
aInstancePtr);
}
//----------------------------------------------------------------------
nsresult

View File

@ -52,6 +52,9 @@
#include "imgIRequest.h"
#include "nsDOMDataTransfer.h"
#include "mozilla/dom/Element.h"
#include "mozilla/dom/HTMLAreaElement.h"
using mozilla::dom::HTMLAreaElement;
class MOZ_STACK_CLASS DragDataProducer
{
@ -505,10 +508,11 @@ DragDataProducer::Produce(nsDOMDataTransfer* aDataTransfer,
if (area) {
// use the alt text (or, if missing, the href) as the title
area->GetAttribute(NS_LITERAL_STRING("alt"), mTitleString);
HTMLAreaElement* areaElem = static_cast<HTMLAreaElement*>(area.get());
areaElem->GetAttribute(NS_LITERAL_STRING("alt"), mTitleString);
if (mTitleString.IsEmpty()) {
// this can be a relative link
area->GetAttribute(NS_LITERAL_STRING("href"), mTitleString);
areaElem->GetAttribute(NS_LITERAL_STRING("href"), mTitleString);
}
// we'll generate HTML like <a href="absurl">alt text</a>

View File

@ -4960,7 +4960,7 @@ nsContentUtils::SetDataTransferInEvent(nsDragEvent* aDragEvent)
// means, for instance calling the drag service directly, or a drag
// from another application. In either case, a new dataTransfer should
// be created that reflects the data.
initialDataTransfer = new nsDOMDataTransfer(aDragEvent->message, true);
initialDataTransfer = new nsDOMDataTransfer(aDragEvent->message, true, -1);
NS_ENSURE_TRUE(initialDataTransfer, NS_ERROR_OUT_OF_MEMORY);

View File

@ -573,7 +573,7 @@ nsCopySupport::CanCopy(nsIDocument* aDocument)
}
bool
nsCopySupport::FireClipboardEvent(int32_t aType, nsIPresShell* aPresShell, nsISelection* aSelection)
nsCopySupport::FireClipboardEvent(int32_t aType, int32_t aClipboardType, nsIPresShell* aPresShell, nsISelection* aSelection)
{
NS_ASSERTION(aType == NS_CUT || aType == NS_COPY || aType == NS_PASTE,
"Invalid clipboard event type");
@ -633,7 +633,7 @@ nsCopySupport::FireClipboardEvent(int32_t aType, nsIPresShell* aPresShell, nsISe
bool doDefault = true;
nsRefPtr<nsDOMDataTransfer> clipboardData;
if (Preferences::GetBool("dom.event.clipboardevents.enabled", true)) {
clipboardData = new nsDOMDataTransfer(aType, aType == NS_PASTE);
clipboardData = new nsDOMDataTransfer(aType, aType == NS_PASTE, aClipboardType);
nsEventStatus status = nsEventStatus_eIgnore;
nsClipboardEvent evt(true, aType);
@ -675,7 +675,7 @@ nsCopySupport::FireClipboardEvent(int32_t aType, nsIPresShell* aPresShell, nsISe
return false;
}
// call the copy code
rv = HTMLCopy(sel, doc, nsIClipboard::kGlobalClipboard);
rv = HTMLCopy(sel, doc, aClipboardType);
if (NS_FAILED(rv)) {
return false;
}
@ -692,7 +692,7 @@ nsCopySupport::FireClipboardEvent(int32_t aType, nsIPresShell* aPresShell, nsISe
NS_ENSURE_TRUE(transferable, false);
// put the transferable on the clipboard
rv = clipboard->SetData(transferable, nullptr, nsIClipboard::kGlobalClipboard);
rv = clipboard->SetData(transferable, nullptr, aClipboardType);
if (NS_FAILED(rv)) {
return false;
}

View File

@ -112,7 +112,6 @@
#include "nsHTMLDocument.h"
#include "nsIDOMHTMLFormElement.h"
#include "nsIRequest.h"
#include "nsILink.h"
#include "nsHostObjectProtocolHandler.h"
#include "nsCharsetAlias.h"
@ -149,6 +148,7 @@
#include "nsObjectLoadingContent.h"
#include "nsHtml5TreeOpExecutor.h"
#include "nsIDOMElementReplaceEvent.h"
#include "mozilla/dom/HTMLLinkElement.h"
#include "mozilla/dom/HTMLMediaElement.h"
#ifdef MOZ_WEBRTC
#include "IPeerConnection.h"
@ -194,6 +194,7 @@
#include "mozilla/dom/DocumentFragment.h"
#include "mozilla/dom/WebComponentsBinding.h"
#include "mozilla/dom/HTMLBodyElement.h"
#include "mozilla/dom/HTMLInputElement.h"
#include "mozilla/dom/NodeFilterBinding.h"
#include "mozilla/dom/UndoManager.h"
#include "nsFrame.h"
@ -7590,7 +7591,7 @@ nsDocument::Sanitize()
for (uint32_t i = 0; i < length; ++i) {
NS_ASSERTION(nodes->Item(i), "null item in node list!");
nsCOMPtr<nsIDOMHTMLInputElement> input = do_QueryInterface(nodes->Item(i));
nsRefPtr<HTMLInputElement> input = HTMLInputElement::FromContentOrNull(nodes->Item(i));
if (!input)
continue;
@ -7606,8 +7607,7 @@ nsDocument::Sanitize()
}
if (resetValue) {
nsCOMPtr<nsIFormControl> fc = do_QueryInterface(input);
fc->Reset();
input->Reset();
}
}
@ -7622,7 +7622,8 @@ nsDocument::Sanitize()
if (!form)
continue;
form->GetAttribute(NS_LITERAL_STRING("autocomplete"), value);
nodes->Item(i)->AsElement()->GetAttr(kNameSpaceID_None,
nsGkAtoms::autocomplete, value);
if (value.LowerCaseEqualsLiteral("off"))
form->Reset();
}
@ -8066,15 +8067,12 @@ nsDocument::OnPageShow(bool aPersisted,
if (aPersisted && root) {
// Send out notifications that our <link> elements are attached.
nsRefPtr<nsContentList> links = NS_GetContentList(root,
kNameSpaceID_Unknown,
kNameSpaceID_XHTML,
NS_LITERAL_STRING("link"));
uint32_t linkCount = links->Length(true);
for (uint32_t i = 0; i < linkCount; ++i) {
nsCOMPtr<nsILink> link = do_QueryInterface(links->Item(i, false));
if (link) {
link->LinkAdded();
}
static_cast<HTMLLinkElement*>(links->Item(i, false))->LinkAdded();
}
}
@ -8130,15 +8128,12 @@ nsDocument::OnPageHide(bool aPersisted,
Element* root = GetRootElement();
if (aPersisted && root) {
nsRefPtr<nsContentList> links = NS_GetContentList(root,
kNameSpaceID_Unknown,
kNameSpaceID_XHTML,
NS_LITERAL_STRING("link"));
uint32_t linkCount = links->Length(true);
for (uint32_t i = 0; i < linkCount; ++i) {
nsCOMPtr<nsILink> link = do_QueryInterface(links->Item(i, false));
if (link) {
link->LinkRemoved();
}
static_cast<HTMLLinkElement*>(links->Item(i, false))->LinkRemoved();
}
}

View File

@ -1479,10 +1479,10 @@ nsObjectLoadingContent::UpdateObjectParameters(bool aJavaURI)
}
if (domapplet || domobject) {
if (domapplet) {
parent = domapplet;
parent = do_QueryInterface(domapplet);
}
else {
parent = domobject;
parent = do_QueryInterface(domobject);
}
nsCOMPtr<nsIDOMNode> mydomNode = do_QueryInterface(mydomElement);
if (parent == mydomNode) {

View File

@ -147,7 +147,7 @@ nsTextNode::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
void nsTextNode::UnbindFromTree(bool aDeep, bool aNullParent)
{
ResetDirectionSetByTextNode(this);
ResetDirectionSetByTextNode(this, aNullParent);
nsGenericDOMDataNode::UnbindFromTree(aDeep, aNullParent);
}

View File

@ -755,6 +755,7 @@ void CanvasRenderingContext2D::Demote()
RefPtr<SourceSurface> snapshot = mTarget->Snapshot();
RefPtr<DrawTarget> oldTarget = mTarget;
mTarget = nullptr;
mResetLayer = true;
mForceSoftware = true;
// Recreate target, now demoted to software only
@ -3039,6 +3040,24 @@ CanvasRenderingContext2D::DrawImage(const HTMLImageOrCanvasOrVideoElement& image
RedrawUser(gfxRect(dx, dy, dw, dh));
}
#ifdef USE_SKIA_GPU
static bool
IsStandardCompositeOp(CompositionOp op)
{
return (op == OP_SOURCE ||
op == OP_ATOP ||
op == OP_IN ||
op == OP_OUT ||
op == OP_OVER ||
op == OP_DEST_IN ||
op == OP_DEST_OUT ||
op == OP_DEST_OVER ||
op == OP_DEST_ATOP ||
op == OP_ADD ||
op == OP_XOR);
}
#endif
void
CanvasRenderingContext2D::SetGlobalCompositeOperation(const nsAString& op,
ErrorResult& error)
@ -3078,6 +3097,12 @@ CanvasRenderingContext2D::SetGlobalCompositeOperation(const nsAString& op,
// XXX ERRMSG we need to report an error to developers here! (bug 329026)
else return;
#ifdef USE_SKIA_GPU
if (!IsStandardCompositeOp(comp_op)) {
Demote();
}
#endif
#undef CANVAS_OP_TO_GFX_OP
CurrentState().op = comp_op;
}
@ -3122,6 +3147,12 @@ CanvasRenderingContext2D::GetGlobalCompositeOperation(nsAString& op,
error.Throw(NS_ERROR_FAILURE);
}
#ifdef USE_SKIA_GPU
if (!IsStandardCompositeOp(comp_op)) {
Demote();
}
#endif
#undef CANVAS_OP_TO_GFX_OP
}

View File

@ -89,9 +89,6 @@ MOCHITEST_FILES = \
test_windingRuleUndefined.html \
$(NULL)
ifneq ($(MOZ_WIDGET_TOOLKIT), android)
ifneq ($(MOZ_WIDGET_TOOLKIT), gonk)
# SkiaGL on Android/Gonk does not implement these composite ops yet
MOCHITEST_FILES += \
@ -123,9 +120,6 @@ MOCHITEST_FILES += \
test_2d.composite.solid.soft-light.html \
$(NULL)
endif
endif
ifneq (1_Linux,$(MOZ_SUITE)_$(OS_ARCH))
# This test fails in Suite on Linux for some reason, disable it there
MOCHITEST_FILES += test_2d.composite.uncovered.image.destination-atop.html

View File

@ -7,6 +7,7 @@
#include "nsContentUtils.h"
#include "nsClientRect.h"
#include "nsDOMDataTransfer.h"
#include "nsIClipboard.h"
nsDOMClipboardEvent::nsDOMClipboardEvent(mozilla::dom::EventTarget* aOwner,
nsPresContext* aPresContext,
@ -68,7 +69,7 @@ nsDOMClipboardEvent::Constructor(const mozilla::dom::GlobalObject& aGlobal,
// Always create a clipboardData for the copy event. If this is changed to
// support other types of events, make sure that read/write privileges are
// checked properly within nsDOMDataTransfer.
clipboardData = new nsDOMDataTransfer(NS_COPY, false);
clipboardData = new nsDOMDataTransfer(NS_COPY, false, -1);
clipboardData->SetData(aParam.mDataType, aParam.mData);
}
}
@ -93,10 +94,10 @@ nsDOMClipboardEvent::GetClipboardData()
if (!event->clipboardData) {
if (mEventIsInternal) {
event->clipboardData = new nsDOMDataTransfer(NS_COPY, false);
event->clipboardData = new nsDOMDataTransfer(NS_COPY, false, -1);
} else {
event->clipboardData =
new nsDOMDataTransfer(event->message, event->message == NS_PASTE);
new nsDOMDataTransfer(event->message, event->message == NS_PASTE, nsIClipboard::kGlobalClipboard);
}
}

View File

@ -63,7 +63,7 @@ const char nsDOMDataTransfer::sEffects[8][9] = {
"none", "copy", "move", "copyMove", "link", "copyLink", "linkMove", "all"
};
nsDOMDataTransfer::nsDOMDataTransfer(uint32_t aEventType, bool aIsExternal)
nsDOMDataTransfer::nsDOMDataTransfer(uint32_t aEventType, bool aIsExternal, int32_t aClipboardType)
: mEventType(aEventType),
mDropEffect(nsIDragService::DRAGDROP_ACTION_NONE),
mEffectAllowed(nsIDragService::DRAGDROP_ACTION_UNINITIALIZED),
@ -72,6 +72,7 @@ nsDOMDataTransfer::nsDOMDataTransfer(uint32_t aEventType, bool aIsExternal)
mIsExternal(aIsExternal),
mUserCancelled(false),
mIsCrossDomainSubFrameDrop(false),
mClipboardType(aClipboardType),
mDragImageX(0),
mDragImageY(0)
{
@ -98,6 +99,7 @@ nsDOMDataTransfer::nsDOMDataTransfer(uint32_t aEventType,
bool aIsExternal,
bool aUserCancelled,
bool aIsCrossDomainSubFrameDrop,
int32_t aClipboardType,
nsTArray<nsTArray<TransferItem> >& aItems,
nsIDOMElement* aDragImage,
uint32_t aDragImageX,
@ -110,6 +112,7 @@ nsDOMDataTransfer::nsDOMDataTransfer(uint32_t aEventType,
mIsExternal(aIsExternal),
mUserCancelled(aUserCancelled),
mIsCrossDomainSubFrameDrop(aIsCrossDomainSubFrameDrop),
mClipboardType(aClipboardType),
mItems(aItems),
mDragImage(aDragImage),
mDragImageX(aDragImageX),
@ -653,7 +656,7 @@ nsDOMDataTransfer::Clone(uint32_t aEventType, bool aUserCancelled,
nsDOMDataTransfer* newDataTransfer =
new nsDOMDataTransfer(aEventType, mEffectAllowed, mCursorState,
mIsExternal, aUserCancelled, aIsCrossDomainSubFrameDrop,
mItems, mDragImage, mDragImageX, mDragImageY);
mClipboardType, mItems, mDragImage, mDragImageX, mDragImageY);
NS_ENSURE_TRUE(newDataTransfer, NS_ERROR_OUT_OF_MEMORY);
*aNewDataTransfer = newDataTransfer;
@ -979,7 +982,7 @@ nsDOMDataTransfer::CacheExternalClipboardFormats()
// data will only be retrieved when needed.
nsCOMPtr<nsIClipboard> clipboard = do_GetService("@mozilla.org/widget/clipboard;1");
if (!clipboard) {
if (!clipboard || mClipboardType < 0) {
return;
}
@ -994,8 +997,7 @@ nsDOMDataTransfer::CacheExternalClipboardFormats()
for (uint32_t f = 0; f < mozilla::ArrayLength(formats); ++f) {
// check each format one at a time
bool supported;
clipboard->HasDataMatchingFlavors(&(formats[f]), 1,
nsIClipboard::kGlobalClipboard, &supported);
clipboard->HasDataMatchingFlavors(&(formats[f]), 1, mClipboardType, &supported);
// if the format is supported, add an item to the array with null as
// the data. When retrieved, GetRealData will read the data.
if (supported) {
@ -1036,11 +1038,11 @@ nsDOMDataTransfer::FillInExternalData(TransferItem& aItem, uint32_t aIndex)
MOZ_ASSERT(aIndex == 0, "index in clipboard must be 0");
nsCOMPtr<nsIClipboard> clipboard = do_GetService("@mozilla.org/widget/clipboard;1");
if (!clipboard) {
if (!clipboard || mClipboardType < 0) {
return;
}
clipboard->GetData(trans, nsIClipboard::kGlobalClipboard);
clipboard->GetData(trans, mClipboardType);
} else {
nsCOMPtr<nsIDragSession> dragSession = nsContentUtils::GetDragSession();
if (!dragSession) {

View File

@ -58,6 +58,7 @@ protected:
bool aIsExternal,
bool aUserCancelled,
bool aIsCrossDomainSubFrameDrop,
int32_t aClipboardType,
nsTArray<nsTArray<TransferItem> >& aItems,
nsIDOMElement* aDragImage,
uint32_t aDragImageX,
@ -82,8 +83,10 @@ public:
// paste or a drag that was started without using a data transfer. The
// latter will occur when an external drag occurs, that is, a drag where the
// source is another application, or a drag is started by calling the drag
// service directly.
nsDOMDataTransfer(uint32_t aEventType, bool aIsExternal);
// service directly. For clipboard operations, aClipboardType indicates
// which clipboard to use, from nsIClipboard, or -1 for non-clipboard operations,
// or if access to the system clipboard should not be allowed.
nsDOMDataTransfer(uint32_t aEventType, bool aIsExternal, int32_t aClipboardType);
void GetDragTarget(nsIDOMElement** aDragTarget)
{
@ -178,6 +181,10 @@ protected:
// data should be prevented
bool mIsCrossDomainSubFrameDrop;
// Indicates which clipboard type to use for clipboard operations. Ignored for
// drag and drop.
int32_t mClipboardType;
// array of items, each containing an array of format->data pairs
nsTArray<nsTArray<TransferItem> > mItems;

View File

@ -54,61 +54,27 @@ class nsEventTargetChainItem
private:
nsEventTargetChainItem(EventTarget* aTarget,
nsEventTargetChainItem* aChild = nullptr);
// This is the ETCI recycle pool, which is used to avoid some malloc/free
// churn. It's implemented as a linked list.
static nsEventTargetChainItem* sEtciRecyclePool;
static uint32_t sNumRecycledEtcis;
static const uint32_t kMaxNumRecycledEtcis = 128;
public:
static nsEventTargetChainItem* Create(EventTarget* aTarget,
nsEventTargetChainItem()
: mChild(nullptr), mParent(nullptr), mFlags(0), mItemFlags(0)
{
}
static nsEventTargetChainItem* Create(nsTArray<nsEventTargetChainItem>& aPool,
EventTarget* aTarget,
nsEventTargetChainItem* aChild = nullptr)
{
// Allocate from the ETCI recycle pool if possible.
void* place = nullptr;
if (sNumRecycledEtcis > 0) {
MOZ_ASSERT(sEtciRecyclePool);
place = sEtciRecyclePool;
sEtciRecyclePool = sEtciRecyclePool->mNext;
--sNumRecycledEtcis;
} else {
place = malloc(sizeof(nsEventTargetChainItem));
}
return place
? ::new (place) nsEventTargetChainItem(aTarget, aChild)
: nullptr;
return new (aPool.AppendElement()) nsEventTargetChainItem(aTarget, aChild);
}
static void Destroy(nsEventTargetChainItem* aItem)
{
// ::Destroy deletes ancestor chain.
nsEventTargetChainItem* item = aItem;
if (item->mChild) {
item->mChild->mParent = nullptr;
item->mChild = nullptr;
}
// Put destroyed ETCIs into the recycle pool if it's not already full.
while (item) {
nsEventTargetChainItem* parent = item->mParent;
item->~nsEventTargetChainItem();
if (sNumRecycledEtcis < kMaxNumRecycledEtcis) {
item->mNext = sEtciRecyclePool;
sEtciRecyclePool = item;
++sNumRecycledEtcis;
} else {
free(item);
}
item = parent;
}
}
static void ShutdownRecyclePool()
{
while (sEtciRecyclePool) {
nsEventTargetChainItem* tmp = sEtciRecyclePool;
sEtciRecyclePool = sEtciRecyclePool->mNext;
free(tmp);
// nsEventTargetChainItem objects are deleted when the pool goes out of
// the scope.
if (aItem->mChild) {
aItem->mChild->mParent = nullptr;
aItem->mChild = nullptr;
}
}
@ -233,21 +199,9 @@ public:
nsresult PostHandleEvent(nsEventChainPostVisitor& aVisitor,
nsCxPusher* aPusher);
static uint32_t MaxEtciCount() { return sMaxEtciCount; }
static void ResetMaxEtciCount()
{
MOZ_ASSERT(!sCurrentEtciCount, "Wrong time to call ResetMaxEtciCount()!");
sMaxEtciCount = 0;
}
nsCOMPtr<EventTarget> mTarget;
nsEventTargetChainItem* mChild;
union {
nsEventTargetChainItem* mParent;
// This is used only when recycling ETCIs.
nsEventTargetChainItem* mNext;
};
nsEventTargetChainItem* mParent;
uint16_t mFlags;
uint16_t mItemFlags;
nsCOMPtr<nsISupports> mItemData;
@ -255,14 +209,8 @@ public:
nsCOMPtr<EventTarget> mNewTarget;
// Cache mTarget's event listener manager.
nsRefPtr<nsEventListenerManager> mManager;
static uint32_t sMaxEtciCount;
static uint32_t sCurrentEtciCount;
};
nsEventTargetChainItem* nsEventTargetChainItem::sEtciRecyclePool = nullptr;
uint32_t nsEventTargetChainItem::sNumRecycledEtcis = 0;
nsEventTargetChainItem::nsEventTargetChainItem(EventTarget* aTarget,
nsEventTargetChainItem* aChild)
: mTarget(aTarget), mChild(aChild), mParent(nullptr), mFlags(0), mItemFlags(0)
@ -405,13 +353,9 @@ nsEventTargetChainItem::HandleEventTargetChain(
return NS_OK;
}
void NS_ShutdownEventTargetChainItemRecyclePool()
{
nsEventTargetChainItem::ShutdownRecyclePool();
}
nsEventTargetChainItem*
EventTargetChainItemForChromeTarget(nsINode* aNode,
EventTargetChainItemForChromeTarget(nsTArray<nsEventTargetChainItem>& aPool,
nsINode* aNode,
nsEventTargetChainItem* aChild = nullptr)
{
if (!aNode->IsInDoc()) {
@ -422,9 +366,9 @@ EventTargetChainItemForChromeTarget(nsINode* aNode,
NS_ENSURE_TRUE(piTarget, nullptr);
nsEventTargetChainItem* etci =
nsEventTargetChainItem::Create(piTarget->GetTargetForEventTargetChain(),
nsEventTargetChainItem::Create(aPool,
piTarget->GetTargetForEventTargetChain(),
aChild);
NS_ENSURE_TRUE(etci, nullptr);
if (!etci->IsValid()) {
nsEventTargetChainItem::Destroy(etci);
return nullptr;
@ -522,10 +466,12 @@ nsEventDispatcher::Dispatch(nsISupports* aTarget,
// event dispatching is finished.
nsRefPtr<nsPresContext> kungFuDeathGrip(aPresContext);
// Try to limit malloc/free churn by using an array as a pool.
nsTArray<nsEventTargetChainItem> pool(128);
// Create the event target chain item for the event target.
nsEventTargetChainItem* targetEtci =
nsEventTargetChainItem::Create(target->GetTargetForEventTargetChain());
NS_ENSURE_TRUE(targetEtci, NS_ERROR_OUT_OF_MEMORY);
nsEventTargetChainItem::Create(pool, target->GetTargetForEventTargetChain());
if (!targetEtci->IsValid()) {
nsEventTargetChainItem::Destroy(targetEtci);
return NS_ERROR_FAILURE;
@ -571,7 +517,7 @@ nsEventDispatcher::Dispatch(nsISupports* aTarget,
if (!preVisitor.mCanHandle && preVisitor.mAutomaticChromeDispatch && content) {
// Event target couldn't handle the event. Try to propagate to chrome.
nsEventTargetChainItem::Destroy(targetEtci);
targetEtci = EventTargetChainItemForChromeTarget(content);
targetEtci = EventTargetChainItemForChromeTarget(pool, content);
NS_ENSURE_STATE(targetEtci);
targetEtci->PreHandleEvent(preVisitor);
}
@ -584,11 +530,7 @@ nsEventDispatcher::Dispatch(nsISupports* aTarget,
while (preVisitor.mParentTarget) {
EventTarget* parentTarget = preVisitor.mParentTarget;
nsEventTargetChainItem* parentEtci =
nsEventTargetChainItem::Create(preVisitor.mParentTarget, topEtci);
if (!parentEtci) {
rv = NS_ERROR_OUT_OF_MEMORY;
break;
}
nsEventTargetChainItem::Create(pool, preVisitor.mParentTarget, topEtci);
if (!parentEtci->IsValid()) {
rv = NS_ERROR_FAILURE;
break;
@ -613,7 +555,8 @@ nsEventDispatcher::Dispatch(nsISupports* aTarget,
// propagate to chrome.
nsCOMPtr<nsINode> disabledTarget = do_QueryInterface(parentTarget);
if (disabledTarget) {
parentEtci = EventTargetChainItemForChromeTarget(disabledTarget,
parentEtci = EventTargetChainItemForChromeTarget(pool,
disabledTarget,
topEtci);
if (parentEtci) {
parentEtci->PreHandleEvent(preVisitor);

View File

@ -2028,7 +2028,7 @@ nsEventStateManager::GenerateDragGesture(nsPresContext* aPresContext,
}
nsRefPtr<nsDOMDataTransfer> dataTransfer =
new nsDOMDataTransfer(NS_DRAGDROP_START, false);
new nsDOMDataTransfer(NS_DRAGDROP_START, false, -1);
if (!dataTransfer)
return;

View File

@ -29,15 +29,6 @@ public:
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMNode
NS_FORWARD_NSIDOMNODE_TO_NSINODE
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
// nsIDOMHTMLMediaElement
using HTMLMediaElement::GetPaused;
NS_FORWARD_NSIDOMHTMLMEDIAELEMENT(HTMLMediaElement::)

View File

@ -54,15 +54,6 @@ public:
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMNode
NS_FORWARD_NSIDOMNODE_TO_NSINODE
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
// nsIDOMHTMLCanvasElement
NS_DECL_NSIDOMHTMLCANVASELEMENT
@ -224,8 +215,6 @@ public:
nsresult GetContext(const nsAString& aContextId, nsISupports** aContext);
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
protected:
virtual JSObject* WrapNode(JSContext* aCx,
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;

View File

@ -28,15 +28,6 @@ public:
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMNode
NS_FORWARD_NSIDOMNODE_TO_NSINODE
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
// nsIDOMHTMLMediaElement
using HTMLMediaElement::GetPaused;
NS_FORWARD_NSIDOMHTMLMEDIAELEMENT(HTMLMediaElement::)
@ -62,8 +53,6 @@ public:
virtual nsresult SetAcceptHeader(nsIHttpChannel* aChannel);
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
// WebIDL
uint32_t Width() const

View File

@ -22,7 +22,6 @@ EXPORTS += [
'nsIFormControl.h',
'nsIFormProcessor.h',
'nsIHTMLCollection.h',
'nsILink.h',
'nsIRadioGroupContainer.h',
'nsIRadioVisitor.h',
'nsITextControlElement.h',

View File

@ -1,52 +0,0 @@
/* -*- Mode: C++; 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/. */
#ifndef nsILink_h___
#define nsILink_h___
#include "nsISupports.h"
#include "nsILinkHandler.h" // definition of nsLinkState
class nsIURI;
// IID for the nsILink interface
#define NS_ILINK_IID \
{ 0x6f374a11, 0x212d, 0x47d6, \
{ 0x94, 0xd1, 0xe6, 0x7c, 0x23, 0x4d, 0x34, 0x99 } }
/**
* This interface allows SelectorMatches to get the canonical
* URL pointed to by an element representing a link and allows
* it to store the visited state of a link element in the link.
* It is needed for performance reasons (to prevent copying of
* strings and excessive calls to history).
*/
class nsILink : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ILINK_IID)
/**
* SetLinkState/GetHrefURI were moved to nsIContent.
* @see nsIContent
*/
/**
* Dispatch a LinkAdded event to the chrome event handler for this document.
* This is used to notify the chrome listeners when restoring a page
* presentation. Currently, this only applies to HTML <link> elements.
*/
NS_IMETHOD LinkAdded() = 0;
/**
* Dispatch a LinkRemoved event to the chrome event handler for this
* document. This is used to notify the chrome listeners when saving a page
* presentation (since the document is not torn down). Currently, this only
* applies to HTML <link> elements.
*/
NS_IMETHOD LinkRemoved() = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsILink, NS_ILINK_IID)
#endif /* nsILink_h___ */

View File

@ -40,19 +40,8 @@ HTMLAnchorElement::~HTMLAnchorElement()
{
}
NS_IMPL_ADDREF_INHERITED(HTMLAnchorElement, Element)
NS_IMPL_RELEASE_INHERITED(HTMLAnchorElement, Element)
// QueryInterface implementation for HTMLAnchorElement
NS_INTERFACE_TABLE_HEAD(HTMLAnchorElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
NS_INTERFACE_TABLE_INHERITED3(HTMLAnchorElement,
nsIDOMHTMLAnchorElement,
nsILink,
Link)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
NS_ELEMENT_INTERFACE_MAP_END
NS_IMPL_ISUPPORTS_INHERITED2(HTMLAnchorElement, nsGenericHTMLElement,
nsIDOMHTMLAnchorElement, Link)
NS_IMPL_ELEMENT_CLONE(HTMLAnchorElement)

View File

@ -11,14 +11,12 @@
#include "mozilla/dom/Link.h"
#include "nsGenericHTMLElement.h"
#include "nsIDOMHTMLAnchorElement.h"
#include "nsILink.h"
namespace mozilla {
namespace dom {
class HTMLAnchorElement MOZ_FINAL : public nsGenericHTMLElement,
public nsIDOMHTMLAnchorElement,
public nsILink,
public Link
{
public:
@ -35,15 +33,6 @@ public:
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMNode
NS_FORWARD_NSIDOMNODE_TO_NSINODE
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
virtual int32_t TabIndexDefault() MOZ_OVERRIDE;
virtual bool Draggable() const MOZ_OVERRIDE;
@ -53,10 +42,6 @@ public:
// DOM memory reporter participant
NS_DECL_SIZEOF_EXCLUDING_THIS
// nsILink
NS_IMETHOD LinkAdded() MOZ_OVERRIDE { return NS_OK; }
NS_IMETHOD LinkRemoved() MOZ_OVERRIDE { return NS_OK; }
virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
nsIContent* aBindingParent,
bool aCompileEventHandlers) MOZ_OVERRIDE;
@ -89,8 +74,6 @@ public:
virtual nsEventStates IntrinsicState() const MOZ_OVERRIDE;
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
virtual void OnDNSPrefetchDeferred();
virtual void OnDNSPrefetchRequested();
virtual bool HasDeferredDNSPrefetchRequest();

View File

@ -25,19 +25,8 @@ HTMLAreaElement::~HTMLAreaElement()
{
}
NS_IMPL_ADDREF_INHERITED(HTMLAreaElement, Element)
NS_IMPL_RELEASE_INHERITED(HTMLAreaElement, Element)
// QueryInterface implementation for HTMLAreaElement
NS_INTERFACE_TABLE_HEAD(HTMLAreaElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
NS_INTERFACE_TABLE_INHERITED3(HTMLAreaElement,
nsIDOMHTMLAreaElement,
nsILink,
Link)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
NS_ELEMENT_INTERFACE_MAP_END
NS_IMPL_ISUPPORTS_INHERITED2(HTMLAreaElement, nsGenericHTMLElement,
nsIDOMHTMLAreaElement, Link)
NS_IMPL_ELEMENT_CLONE(HTMLAreaElement)

View File

@ -12,7 +12,6 @@
#include "nsGenericHTMLElement.h"
#include "nsGkAtoms.h"
#include "nsIDOMHTMLAreaElement.h"
#include "nsILink.h"
#include "nsIURL.h"
class nsIDocument;
@ -22,7 +21,6 @@ namespace dom {
class HTMLAreaElement MOZ_FINAL : public nsGenericHTMLElement,
public nsIDOMHTMLAreaElement,
public nsILink,
public Link
{
public:
@ -35,24 +33,11 @@ public:
// DOM memory reporter participant
NS_DECL_SIZEOF_EXCLUDING_THIS
// nsIDOMNode
NS_FORWARD_NSIDOMNODE_TO_NSINODE
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
virtual int32_t TabIndexDefault() MOZ_OVERRIDE;
// nsIDOMHTMLAreaElement
NS_DECL_NSIDOMHTMLAREAELEMENT
// nsILink
NS_IMETHOD LinkAdded() MOZ_OVERRIDE { return NS_OK; }
NS_IMETHOD LinkRemoved() MOZ_OVERRIDE { return NS_OK; }
virtual nsresult PreHandleEvent(nsEventChainPreVisitor& aVisitor) MOZ_OVERRIDE;
virtual nsresult PostHandleEvent(nsEventChainPostVisitor& aVisitor) MOZ_OVERRIDE;
virtual bool IsLink(nsIURI** aURI) const MOZ_OVERRIDE;
@ -79,8 +64,6 @@ public:
virtual nsEventStates IntrinsicState() const MOZ_OVERRIDE;
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
// WebIDL
// The XPCOM GetAlt is OK for us

View File

@ -30,16 +30,9 @@ NS_IMPL_NS_NEW_HTML_ELEMENT(Audio)
namespace mozilla {
namespace dom {
NS_IMPL_ADDREF_INHERITED(HTMLAudioElement, HTMLMediaElement)
NS_IMPL_RELEASE_INHERITED(HTMLAudioElement, HTMLMediaElement)
NS_INTERFACE_TABLE_HEAD(HTMLAudioElement)
NS_HTML_CONTENT_INTERFACES(HTMLMediaElement)
NS_INTERFACE_TABLE_INHERITED4(HTMLAudioElement, nsIDOMHTMLMediaElement,
nsIDOMHTMLAudioElement, nsITimerCallback,
nsIAudioChannelAgentCallback)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
NS_ELEMENT_INTERFACE_MAP_END
NS_IMPL_ISUPPORTS_INHERITED4(HTMLAudioElement, HTMLMediaElement,
nsIDOMHTMLMediaElement, nsIDOMHTMLAudioElement,
nsITimerCallback, nsIAudioChannelAgentCallback)
NS_IMPL_ELEMENT_CLONE(HTMLAudioElement)

View File

@ -27,17 +27,8 @@ HTMLBRElement::~HTMLBRElement()
{
}
NS_IMPL_ADDREF_INHERITED(HTMLBRElement, Element)
NS_IMPL_RELEASE_INHERITED(HTMLBRElement, Element)
// QueryInterface implementation for HTMLBRElement
NS_INTERFACE_TABLE_HEAD(HTMLBRElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
NS_INTERFACE_TABLE_INHERITED1(HTMLBRElement, nsIDOMHTMLBRElement)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
NS_ELEMENT_INTERFACE_MAP_END
NS_IMPL_ISUPPORTS_INHERITED1(HTMLBRElement, nsGenericHTMLElement,
nsIDOMHTMLBRElement)
NS_IMPL_ELEMENT_CLONE(HTMLBRElement)

View File

@ -24,15 +24,6 @@ public:
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMNode
NS_FORWARD_NSIDOMNODE_TO_NSINODE
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
// nsIDOMHTMLBRElement
NS_DECL_NSIDOMHTMLBRELEMENT
@ -43,7 +34,6 @@ public:
NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const MOZ_OVERRIDE;
virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const MOZ_OVERRIDE;
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
bool Clear()
{

View File

@ -199,15 +199,8 @@ HTMLBodyElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aScope)
return HTMLBodyElementBinding::Wrap(aCx, aScope, this);
}
NS_IMPL_ADDREF_INHERITED(HTMLBodyElement, Element)
NS_IMPL_RELEASE_INHERITED(HTMLBodyElement, Element)
// QueryInterface implementation for HTMLBodyElement
NS_INTERFACE_TABLE_HEAD(HTMLBodyElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
NS_INTERFACE_TABLE_INHERITED1(HTMLBodyElement, nsIDOMHTMLBodyElement)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
NS_ELEMENT_INTERFACE_MAP_END
NS_IMPL_ISUPPORTS_INHERITED1(HTMLBodyElement, nsGenericHTMLElement,
nsIDOMHTMLBodyElement)
NS_IMPL_ELEMENT_CLONE(HTMLBodyElement)

View File

@ -49,15 +49,6 @@ public:
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMNode
NS_FORWARD_NSIDOMNODE_TO_NSINODE
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
// nsIDOMHTMLBodyElement
NS_DECL_NSIDOMHTMLBODYELEMENT
@ -141,7 +132,6 @@ public:
NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const MOZ_OVERRIDE;
virtual already_AddRefed<nsIEditor> GetAssociatedEditor() MOZ_OVERRIDE;
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
virtual bool IsEventAttributeName(nsIAtom* aName) MOZ_OVERRIDE;

View File

@ -83,12 +83,10 @@ NS_IMPL_RELEASE_INHERITED(HTMLButtonElement, Element)
// QueryInterface implementation for HTMLButtonElement
NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLButtonElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLFormElementWithState)
NS_INTERFACE_TABLE_INHERITED2(HTMLButtonElement,
nsIDOMHTMLButtonElement,
nsIConstraintValidation)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
NS_ELEMENT_INTERFACE_MAP_END
NS_INTERFACE_TABLE_TAIL_INHERITING(nsGenericHTMLFormElementWithState)
// nsIConstraintValidation
NS_IMPL_NSICONSTRAINTVALIDATION(HTMLButtonElement)

View File

@ -31,17 +31,10 @@ public:
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMNode
NS_FORWARD_NSIDOMNODE_TO_NSINODE
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
virtual int32_t TabIndexDefault() MOZ_OVERRIDE;
NS_IMPL_FROMCONTENT_HTML_WITH_TAG(HTMLButtonElement, button)
// nsIDOMHTMLButtonElement
NS_DECL_NSIDOMHTMLBUTTONELEMENT
@ -59,7 +52,6 @@ public:
// nsINode
virtual nsresult Clone(nsINodeInfo* aNodeInfo, nsINode** aResult) const MOZ_OVERRIDE;
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
virtual JSObject* WrapNode(JSContext* aCx,
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;

View File

@ -164,12 +164,10 @@ NS_IMPL_ADDREF_INHERITED(HTMLCanvasElement, Element)
NS_IMPL_RELEASE_INHERITED(HTMLCanvasElement, Element)
NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLCanvasElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
NS_INTERFACE_TABLE_INHERITED2(HTMLCanvasElement,
nsIDOMHTMLCanvasElement,
nsICanvasElementExternal)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
NS_ELEMENT_INTERFACE_MAP_END
NS_INTERFACE_TABLE_TAIL_INHERITING(nsGenericHTMLElement)
NS_IMPL_ELEMENT_CLONE(HTMLCanvasElement)

View File

@ -21,13 +21,6 @@ HTMLDataElement::~HTMLDataElement()
{
}
NS_IMPL_ADDREF_INHERITED(HTMLDataElement, Element)
NS_IMPL_RELEASE_INHERITED(HTMLDataElement, Element)
NS_INTERFACE_MAP_BEGIN(HTMLDataElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
NS_ELEMENT_INTERFACE_MAP_END
NS_IMPL_ELEMENT_CLONE(HTMLDataElement)
JSObject*

View File

@ -14,25 +14,12 @@
namespace mozilla {
namespace dom {
class HTMLDataElement MOZ_FINAL : public nsGenericHTMLElement,
public nsIDOMHTMLElement
class HTMLDataElement MOZ_FINAL : public nsGenericHTMLElement
{
public:
HTMLDataElement(already_AddRefed<nsINodeInfo> aNodeInfo);
virtual ~HTMLDataElement();
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMNode
NS_FORWARD_NSIDOMNODE_TO_NSINODE
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
// HTMLDataElement WebIDL
void GetValue(nsAString& aValue)
{
@ -47,7 +34,6 @@ public:
virtual void GetItemValueText(nsAString& text) MOZ_OVERRIDE;
virtual void SetItemValueText(const nsAString& text) MOZ_OVERRIDE;
virtual nsresult Clone(nsINodeInfo* aNodeInfo, nsINode** aResult) const MOZ_OVERRIDE;
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
protected:
virtual JSObject* WrapNode(JSContext* aCx,

View File

@ -28,8 +28,7 @@ NS_IMPL_ADDREF_INHERITED(HTMLDataListElement, Element)
NS_IMPL_RELEASE_INHERITED(HTMLDataListElement, Element)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(HTMLDataListElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
NS_ELEMENT_INTERFACE_MAP_END
NS_INTERFACE_MAP_END_INHERITING(nsGenericHTMLElement)
NS_IMPL_ELEMENT_CLONE(HTMLDataListElement)

View File

@ -12,8 +12,7 @@
namespace mozilla {
namespace dom {
class HTMLDataListElement MOZ_FINAL : public nsGenericHTMLElement,
public nsIDOMHTMLElement
class HTMLDataListElement MOZ_FINAL : public nsGenericHTMLElement
{
public:
HTMLDataListElement(already_AddRefed<nsINodeInfo> aNodeInfo)
@ -25,15 +24,6 @@ public:
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMNode
NS_FORWARD_NSIDOMNODE_TO_NSINODE
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
nsContentList* Options()
{
if (!mOptions) {
@ -52,8 +42,6 @@ public:
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(HTMLDataListElement,
nsGenericHTMLElement)
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
protected:
virtual JSObject* WrapNode(JSContext *aCx,
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;

View File

@ -20,15 +20,8 @@ HTMLDivElement::~HTMLDivElement()
{
}
NS_IMPL_ADDREF_INHERITED(HTMLDivElement, Element)
NS_IMPL_RELEASE_INHERITED(HTMLDivElement, Element)
// QueryInterface implementation for HTMLDivElement
NS_INTERFACE_TABLE_HEAD(HTMLDivElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
NS_INTERFACE_TABLE_INHERITED1(HTMLDivElement, nsIDOMHTMLDivElement)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
NS_ELEMENT_INTERFACE_MAP_END
NS_IMPL_ISUPPORTS_INHERITED1(HTMLDivElement, nsGenericHTMLElement,
nsIDOMHTMLDivElement)
NS_IMPL_ELEMENT_CLONE(HTMLDivElement)

View File

@ -25,15 +25,6 @@ public:
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMNode
NS_FORWARD_NSIDOMNODE_TO_NSINODE
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
// nsIDOMHTMLDivElement
NS_IMETHOD GetAlign(nsAString& aAlign) MOZ_OVERRIDE
{
@ -66,8 +57,6 @@ public:
virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const MOZ_OVERRIDE;
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
protected:
virtual JSObject* WrapNode(JSContext *aCx,
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;

View File

@ -10,33 +10,19 @@
namespace mozilla {
namespace dom {
class HTMLElement MOZ_FINAL : public nsGenericHTMLElement,
public nsIDOMHTMLElement
class HTMLElement MOZ_FINAL : public nsGenericHTMLElement
{
public:
HTMLElement(already_AddRefed<nsINodeInfo> aNodeInfo);
virtual ~HTMLElement();
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMNode
NS_FORWARD_NSIDOMNODE_TO_NSINODE
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
using nsGenericHTMLElement::GetInnerHTML;
virtual void GetInnerHTML(nsAString& aInnerHTML,
mozilla::ErrorResult& aError) MOZ_OVERRIDE;
virtual nsresult Clone(nsINodeInfo* aNodeInfo,
nsINode** aResult) const MOZ_OVERRIDE;
virtual nsIDOMNode* AsDOMNode() { return this; }
protected:
virtual JSObject* WrapNode(JSContext *aCx,
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
@ -51,13 +37,6 @@ HTMLElement::~HTMLElement()
{
}
NS_IMPL_ADDREF_INHERITED(HTMLElement, Element)
NS_IMPL_RELEASE_INHERITED(HTMLElement, Element)
NS_INTERFACE_MAP_BEGIN(HTMLElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
NS_ELEMENT_INTERFACE_MAP_END
NS_IMPL_ELEMENT_CLONE(HTMLElement)
void

View File

@ -43,12 +43,10 @@ NS_IMPL_RELEASE_INHERITED(HTMLFieldSetElement, Element)
// QueryInterface implementation for HTMLFieldSetElement
NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLFieldSetElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLFormElement)
NS_INTERFACE_TABLE_INHERITED2(HTMLFieldSetElement,
nsIDOMHTMLFieldSetElement,
nsIConstraintValidation)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
NS_ELEMENT_INTERFACE_MAP_END
NS_INTERFACE_TABLE_TAIL_INHERITING(nsGenericHTMLFormElement)
NS_IMPL_ELEMENT_CLONE(HTMLFieldSetElement)

View File

@ -34,15 +34,6 @@ public:
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMNode
NS_FORWARD_NSIDOMNODE_TO_NSINODE
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
// nsIDOMHTMLFieldSetElement
NS_DECL_NSIDOMHTMLFIELDSETELEMENT
@ -61,7 +52,6 @@ public:
NS_IMETHOD SubmitNamesValues(nsFormSubmission* aFormSubmission) MOZ_OVERRIDE;
virtual bool IsDisabledForEvents(uint32_t aMessage) MOZ_OVERRIDE;
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
const nsIContent* GetFirstLegend() const { return mFirstLegend; }

View File

@ -27,15 +27,6 @@ HTMLFontElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aScope)
return HTMLFontElementBinding::Wrap(aCx, aScope, this);
}
NS_IMPL_ADDREF_INHERITED(HTMLFontElement, Element)
NS_IMPL_RELEASE_INHERITED(HTMLFontElement, Element)
// QueryInterface implementation for HTMLFontElement
NS_INTERFACE_MAP_BEGIN(HTMLFontElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
NS_ELEMENT_INTERFACE_MAP_END
NS_IMPL_ELEMENT_CLONE(HTMLFontElement)
bool

View File

@ -11,8 +11,7 @@
namespace mozilla {
namespace dom {
class HTMLFontElement MOZ_FINAL : public nsGenericHTMLElement,
public nsIDOMHTMLElement
class HTMLFontElement MOZ_FINAL : public nsGenericHTMLElement
{
public:
HTMLFontElement(already_AddRefed<nsINodeInfo> aNodeInfo)
@ -21,18 +20,6 @@ public:
}
virtual ~HTMLFontElement();
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMNode
NS_FORWARD_NSIDOMNODE_TO_NSINODE
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
void GetColor(nsString& aColor)
{
GetHTMLAttr(nsGkAtoms::color, aColor);
@ -65,7 +52,6 @@ public:
NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const MOZ_OVERRIDE;
virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const MOZ_OVERRIDE;
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
protected:
virtual JSObject* WrapNode(JSContext *aCx,

View File

@ -328,14 +328,12 @@ NS_IMPL_RELEASE_INHERITED(HTMLFormElement, Element)
// QueryInterface implementation for HTMLFormElement
NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLFormElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
NS_INTERFACE_TABLE_INHERITED4(HTMLFormElement,
nsIDOMHTMLFormElement,
nsIForm,
nsIWebProgressListener,
nsIRadioGroupContainer)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
NS_ELEMENT_INTERFACE_MAP_END
NS_INTERFACE_TABLE_TAIL_INHERITING(nsGenericHTMLElement)
// nsIDOMHTMLFormElement
@ -1860,12 +1858,11 @@ HTMLFormElement::CheckFormValidity(nsIMutableArray* aInvalidElements) const
// Hold a reference to the elements so they can't be deleted while calling
// the invalid events.
for (uint32_t i = 0; i < len; ++i) {
static_cast<nsGenericHTMLElement*>(sortedControls[i])->AddRef();
sortedControls[i]->AddRef();
}
for (uint32_t i = 0; i < len; ++i) {
nsCOMPtr<nsIConstraintValidation> cvElmt =
do_QueryInterface((nsGenericHTMLElement*)sortedControls[i]);
nsCOMPtr<nsIConstraintValidation> cvElmt = do_QueryObject(sortedControls[i]);
if (cvElmt && cvElmt->IsCandidateForConstraintValidation() &&
!cvElmt->IsValid()) {
ret = false;
@ -1878,7 +1875,7 @@ HTMLFormElement::CheckFormValidity(nsIMutableArray* aInvalidElements) const
// Add all unhandled invalid controls to aInvalidElements if the caller
// requested them.
if (defaultAction && aInvalidElements) {
aInvalidElements->AppendElement((nsGenericHTMLElement*)sortedControls[i],
aInvalidElements->AppendElement(ToSupports(sortedControls[i]),
false);
}
}

View File

@ -52,15 +52,6 @@ public:
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMNode
NS_FORWARD_NSIDOMNODE_TO_NSINODE
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
// nsIDOMHTMLFormElement
NS_DECL_NSIDOMHTMLFORMELEMENT
@ -282,8 +273,6 @@ public:
*/
bool CheckValidFormSubmission();
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
/**
* Walk over the form elements and call SubmitNamesValues() on them to get
* their data pumped into the FormSubmitter.

View File

@ -25,17 +25,8 @@ HTMLFrameElement::~HTMLFrameElement()
}
NS_IMPL_ADDREF_INHERITED(HTMLFrameElement, Element)
NS_IMPL_RELEASE_INHERITED(HTMLFrameElement, Element)
// QueryInterface implementation for HTMLFrameElement
NS_INTERFACE_TABLE_HEAD(HTMLFrameElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLFrameElement)
NS_INTERFACE_TABLE_INHERITED1(HTMLFrameElement, nsIDOMHTMLFrameElement)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
NS_ELEMENT_INTERFACE_MAP_END
NS_IMPL_ISUPPORTS_INHERITED1(HTMLFrameElement, nsGenericHTMLFrameElement,
nsIDOMHTMLFrameElement)
NS_IMPL_ELEMENT_CLONE(HTMLFrameElement)

View File

@ -29,15 +29,6 @@ public:
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMNode
NS_FORWARD_NSIDOMNODE_TO_NSINODE
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
// nsIDOMHTMLFrameElement
NS_DECL_NSIDOMHTMLFRAMEELEMENT
@ -49,7 +40,6 @@ public:
NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const MOZ_OVERRIDE;
nsMapRuleToAttributesFunc GetAttributeMappingFunction() const MOZ_OVERRIDE;
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
// WebIDL API
// The XPCOM GetFrameBorder is OK for us

View File

@ -23,17 +23,8 @@ HTMLFrameSetElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aScope)
return HTMLFrameSetElementBinding::Wrap(aCx, aScope, this);
}
NS_IMPL_ADDREF_INHERITED(HTMLFrameSetElement, Element)
NS_IMPL_RELEASE_INHERITED(HTMLFrameSetElement, Element)
// QueryInterface implementation for HTMLFrameSetElement
NS_INTERFACE_TABLE_HEAD(HTMLFrameSetElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
NS_INTERFACE_TABLE_INHERITED1(HTMLFrameSetElement,
nsIDOMHTMLFrameSetElement)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
NS_ELEMENT_INTERFACE_MAP_END
NS_IMPL_ISUPPORTS_INHERITED1(HTMLFrameSetElement, nsGenericHTMLElement,
nsIDOMHTMLFrameSetElement)
NS_IMPL_ELEMENT_CLONE(HTMLFrameSetElement)

View File

@ -60,15 +60,6 @@ public:
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMNode
NS_FORWARD_NSIDOMNODE_TO_NSINODE
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
// nsIDOMHTMLFrameSetElement
NS_DECL_NSIDOMHTMLFRAMESETELEMENT
@ -148,7 +139,6 @@ public:
int32_t aModType) const MOZ_OVERRIDE;
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
protected:
virtual JSObject* WrapNode(JSContext *aCx,

View File

@ -20,17 +20,8 @@ HTMLHRElement::~HTMLHRElement()
{
}
NS_IMPL_ADDREF_INHERITED(HTMLHRElement, Element)
NS_IMPL_RELEASE_INHERITED(HTMLHRElement, Element)
// QueryInterface implementation for HTMLHRElement
NS_INTERFACE_TABLE_HEAD(HTMLHRElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
NS_INTERFACE_TABLE_INHERITED1(HTMLHRElement,
nsIDOMHTMLHRElement)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
NS_ELEMENT_INTERFACE_MAP_END
NS_IMPL_ISUPPORTS_INHERITED1(HTMLHRElement, nsGenericHTMLElement,
nsIDOMHTMLHRElement)
NS_IMPL_ELEMENT_CLONE(HTMLHRElement)

View File

@ -26,15 +26,6 @@ public:
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMNode
NS_FORWARD_NSIDOMNODE_TO_NSINODE
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
// nsIDOMHTMLHRElement
NS_DECL_NSIDOMHTMLHRELEMENT
@ -45,7 +36,6 @@ public:
NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const MOZ_OVERRIDE;
virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const MOZ_OVERRIDE;
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
// WebIDL API
void SetAlign(const nsAString& aAlign, ErrorResult& aError)

View File

@ -22,17 +22,8 @@ HTMLHeadingElement::~HTMLHeadingElement()
{
}
NS_IMPL_ADDREF_INHERITED(HTMLHeadingElement, Element)
NS_IMPL_RELEASE_INHERITED(HTMLHeadingElement, Element)
// QueryInterface implementation for 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
NS_IMPL_ISUPPORTS_INHERITED1(HTMLHeadingElement, nsGenericHTMLElement,
nsIDOMHTMLHeadingElement)
NS_IMPL_ELEMENT_CLONE(HTMLHeadingElement)

View File

@ -26,15 +26,6 @@ public:
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMNode
NS_FORWARD_NSIDOMNODE_TO_NSINODE
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
// nsIDOMHTMLHeadingElement
NS_DECL_NSIDOMHTMLHEADINGELEMENT
@ -45,7 +36,6 @@ public:
NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const MOZ_OVERRIDE;
nsMapRuleToAttributesFunc GetAttributeMappingFunction() const MOZ_OVERRIDE;
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
// The XPCOM versions of GetAlign and SetAlign are fine for us for
// use from WebIDL.

View File

@ -29,16 +29,8 @@ HTMLIFrameElement::~HTMLIFrameElement()
{
}
NS_IMPL_ADDREF_INHERITED(HTMLIFrameElement, Element)
NS_IMPL_RELEASE_INHERITED(HTMLIFrameElement, Element)
// QueryInterface implementation for HTMLIFrameElement
NS_INTERFACE_TABLE_HEAD(HTMLIFrameElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLFrameElement)
NS_INTERFACE_TABLE_INHERITED1(HTMLIFrameElement,
nsIDOMHTMLIFrameElement)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
NS_ELEMENT_INTERFACE_MAP_END
NS_IMPL_ISUPPORTS_INHERITED1(HTMLIFrameElement, nsGenericHTMLFrameElement,
nsIDOMHTMLIFrameElement)
NS_IMPL_ELEMENT_CLONE(HTMLIFrameElement)

View File

@ -26,15 +26,6 @@ public:
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMNode
NS_FORWARD_NSIDOMNODE_TO_NSINODE
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
// nsIDOMHTMLIFrameElement
NS_DECL_NSIDOMHTMLIFRAMEELEMENT
@ -47,7 +38,6 @@ public:
virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const MOZ_OVERRIDE;
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
nsresult SetAttr(int32_t aNameSpaceID, nsIAtom* aName,
const nsAString& aValue, bool aNotify)

View File

@ -66,14 +66,12 @@ NS_IMPL_RELEASE_INHERITED(HTMLImageElement, Element)
// QueryInterface implementation for HTMLImageElement
NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLImageElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
NS_INTERFACE_TABLE_INHERITED4(HTMLImageElement,
nsIDOMHTMLImageElement,
nsIImageLoadingContent,
imgIOnloadBlocker,
imgINotificationObserver)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
NS_ELEMENT_INTERFACE_MAP_END
NS_INTERFACE_TABLE_TAIL_INHERITING(nsGenericHTMLElement)
NS_IMPL_ELEMENT_CLONE(HTMLImageElement)

View File

@ -31,15 +31,6 @@ public:
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMNode
NS_FORWARD_NSIDOMNODE_TO_NSINODE
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
virtual bool Draggable() const MOZ_OVERRIDE;
// nsIDOMHTMLImageElement
@ -86,7 +77,6 @@ public:
nsresult CopyInnerTo(Element* aDest);
void MaybeLoadImage();
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
bool IsMap()
{

View File

@ -854,7 +854,6 @@ NS_IMPL_RELEASE_INHERITED(HTMLInputElement, Element)
// QueryInterface implementation for HTMLInputElement
NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLInputElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLFormElementWithState)
NS_INTERFACE_TABLE_INHERITED8(HTMLInputElement,
nsIDOMHTMLInputElement,
nsITextControlElement,
@ -864,8 +863,7 @@ NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLInputElement)
imgIOnloadBlocker,
nsIDOMNSEditableElement,
nsIConstraintValidation)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
NS_ELEMENT_INTERFACE_MAP_END
NS_INTERFACE_TABLE_TAIL_INHERITING(nsGenericHTMLFormElementWithState)
// nsIConstraintValidation
NS_IMPL_NSICONSTRAINTVALIDATION_EXCEPT_SETCUSTOMVALIDITY(HTMLInputElement)
@ -3119,7 +3117,8 @@ HTMLInputElement::PostHandleEvent(nsEventChainPostVisitor& aVisitor)
nsCOMPtr<nsIContent> radioContent =
do_QueryInterface(selectedRadioButton);
if (radioContent) {
rv = selectedRadioButton->Focus();
nsCOMPtr<nsIDOMHTMLElement> elem = do_QueryInterface(selectedRadioButton);
rv = elem->Focus();
if (NS_SUCCEEDED(rv)) {
nsEventStatus status = nsEventStatus_eIgnore;
nsMouseEvent event(aVisitor.mEvent->mFlags.mIsTrusted,

View File

@ -101,15 +101,8 @@ public:
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMNode
NS_FORWARD_NSIDOMNODE_TO_NSINODE
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
virtual int32_t TabIndexDefault() MOZ_OVERRIDE;
using nsGenericHTMLElement::Focus;
virtual void Focus(ErrorResult& aError) MOZ_OVERRIDE;
// nsIDOMHTMLInputElement
@ -233,8 +226,6 @@ public:
void MaybeLoadImage();
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
// nsIConstraintValidation
bool IsTooLong();
bool IsValueMissing() const;

View File

@ -21,16 +21,8 @@ HTMLLIElement::~HTMLLIElement()
{
}
NS_IMPL_ADDREF_INHERITED(HTMLLIElement, Element)
NS_IMPL_RELEASE_INHERITED(HTMLLIElement, Element)
// QueryInterface implementation for nsHTMLLIElement
NS_INTERFACE_TABLE_HEAD(HTMLLIElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
NS_INTERFACE_TABLE_INHERITED1(HTMLLIElement, nsIDOMHTMLLIElement)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
NS_ELEMENT_INTERFACE_MAP_END
NS_IMPL_ISUPPORTS_INHERITED1(HTMLLIElement, nsGenericHTMLElement,
nsIDOMHTMLLIElement)
NS_IMPL_ELEMENT_CLONE(HTMLLIElement)

View File

@ -27,15 +27,6 @@ public:
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMNode
NS_FORWARD_NSIDOMNODE_TO_NSINODE
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
// nsIDOMHTMLLIElement
NS_DECL_NSIDOMHTMLLIELEMENT
@ -46,7 +37,6 @@ public:
NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const MOZ_OVERRIDE;
virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const MOZ_OVERRIDE;
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
// WebIDL API
void GetType(nsString& aType)

View File

@ -30,18 +30,8 @@ HTMLLabelElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aScope)
// nsISupports
NS_IMPL_ADDREF_INHERITED(HTMLLabelElement, Element)
NS_IMPL_RELEASE_INHERITED(HTMLLabelElement, Element)
// QueryInterface implementation for 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
NS_IMPL_ISUPPORTS_INHERITED1(HTMLLabelElement, nsGenericHTMLFormElement,
nsIDOMHTMLLabelElement)
// nsIDOMHTMLLabelElement
@ -56,7 +46,7 @@ HTMLLabelElement::GetForm(nsIDOMHTMLFormElement** aForm)
NS_IMETHODIMP
HTMLLabelElement::GetControl(nsIDOMHTMLElement** aElement)
{
nsCOMPtr<nsIDOMHTMLElement> element = do_QueryInterface(GetLabeledElement());
nsCOMPtr<nsIDOMHTMLElement> element = do_QueryObject(GetLabeledElement());
element.forget(aElement);
return NS_OK;
}
@ -84,7 +74,7 @@ HTMLLabelElement::Focus(ErrorResult& aError)
// retarget the focus method at the for content
nsIFocusManager* fm = nsFocusManager::GetFocusManager();
if (fm) {
nsCOMPtr<nsIDOMElement> elem = do_QueryInterface(GetLabeledElement());
nsCOMPtr<nsIDOMElement> elem = do_QueryObject(GetLabeledElement());
if (elem)
fm->SetFocus(elem, 0);
}

View File

@ -32,18 +32,9 @@ public:
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMNode
NS_FORWARD_NSIDOMNODE_TO_NSINODE
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
// nsIDOMHTMLLabelElement
NS_DECL_NSIDOMHTMLLABELELEMENT
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
using nsGenericHTMLFormElement::GetForm;
void GetHtmlFor(nsString& aHtmlFor)
{
@ -58,6 +49,7 @@ public:
return GetLabeledElement();
}
using nsGenericHTMLElement::Focus;
virtual void Focus(mozilla::ErrorResult& aError) MOZ_OVERRIDE;
// nsIFormControl
@ -73,8 +65,6 @@ public:
bool aIsTrustedEvent) MOZ_OVERRIDE;
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
nsGenericHTMLElement* GetLabeledElement() const;
protected:
virtual JSObject* WrapNode(JSContext *aCx,

View File

@ -19,17 +19,6 @@ HTMLLegendElement::~HTMLLegendElement()
{
}
NS_IMPL_ADDREF_INHERITED(HTMLLegendElement, Element)
NS_IMPL_RELEASE_INHERITED(HTMLLegendElement, Element)
// QueryInterface implementation for HTMLLegendElement
NS_INTERFACE_MAP_BEGIN(HTMLLegendElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
NS_ELEMENT_INTERFACE_MAP_END
NS_IMPL_ELEMENT_CLONE(HTMLLegendElement)
// this contains center, because IE4 does

View File

@ -13,8 +13,7 @@
namespace mozilla {
namespace dom {
class HTMLLegendElement MOZ_FINAL : public nsGenericHTMLElement,
public nsIDOMHTMLElement
class HTMLLegendElement MOZ_FINAL : public nsGenericHTMLElement
{
public:
HTMLLegendElement(already_AddRefed<nsINodeInfo> aNodeInfo)
@ -25,18 +24,7 @@ public:
NS_IMPL_FROMCONTENT_HTML_WITH_TAG(HTMLLegendElement, legend)
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMNode
NS_FORWARD_NSIDOMNODE_TO_NSINODE
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
using nsGenericHTMLElement::Focus;
virtual void Focus(ErrorResult& aError) MOZ_OVERRIDE;
virtual void PerformAccesskey(bool aKeyCausesActivation,
@ -74,8 +62,6 @@ public:
return fieldsetControl ? fieldsetControl->GetFormElement() : nullptr;
}
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
/**
* WebIDL Interface
*/

View File

@ -15,7 +15,6 @@
#include "nsIDocument.h"
#include "nsIDOMEvent.h"
#include "nsIDOMStyleSheet.h"
#include "nsILink.h"
#include "nsIStyleSheet.h"
#include "nsIStyleSheetLinkingElement.h"
#include "nsIURL.h"
@ -58,15 +57,12 @@ NS_IMPL_RELEASE_INHERITED(HTMLLinkElement, Element)
// QueryInterface implementation for HTMLLinkElement
NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLLinkElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
NS_INTERFACE_TABLE_INHERITED5(HTMLLinkElement,
NS_INTERFACE_TABLE_INHERITED4(HTMLLinkElement,
nsIDOMHTMLLinkElement,
nsIDOMLinkStyle,
nsILink,
nsIStyleSheetLinkingElement,
Link)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
NS_ELEMENT_INTERFACE_MAP_END
NS_INTERFACE_TABLE_TAIL_INHERITING(nsGenericHTMLElement)
NS_IMPL_ELEMENT_CLONE(HTMLLinkElement)
@ -149,18 +145,16 @@ HTMLLinkElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
return rv;
}
NS_IMETHODIMP
void
HTMLLinkElement::LinkAdded()
{
CreateAndDispatchEvent(OwnerDoc(), NS_LITERAL_STRING("DOMLinkAdded"));
return NS_OK;
}
NS_IMETHODIMP
void
HTMLLinkElement::LinkRemoved()
{
CreateAndDispatchEvent(OwnerDoc(), NS_LITERAL_STRING("DOMLinkRemoved"));
return NS_OK;
}
void

View File

@ -10,7 +10,6 @@
#include "mozilla/dom/Link.h"
#include "nsGenericHTMLElement.h"
#include "nsIDOMHTMLLinkElement.h"
#include "nsILink.h"
#include "nsStyleLinkElement.h"
namespace mozilla {
@ -18,7 +17,6 @@ namespace dom {
class HTMLLinkElement MOZ_FINAL : public nsGenericHTMLElement,
public nsIDOMHTMLLinkElement,
public nsILink,
public nsStyleLinkElement,
public Link
{
@ -33,24 +31,14 @@ public:
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(HTMLLinkElement,
nsGenericHTMLElement)
// nsIDOMNode
NS_FORWARD_NSIDOMNODE_TO_NSINODE
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
// nsIDOMHTMLLinkElement
NS_DECL_NSIDOMHTMLLINKELEMENT
// DOM memory reporter participant
NS_DECL_SIZEOF_EXCLUDING_THIS
// nsILink
NS_IMETHOD LinkAdded() MOZ_OVERRIDE;
NS_IMETHOD LinkRemoved() MOZ_OVERRIDE;
void LinkAdded();
void LinkRemoved();
// nsIDOMEventTarget
virtual nsresult PreHandleEvent(nsEventChainPreVisitor& aVisitor) MOZ_OVERRIDE;
@ -58,7 +46,6 @@ public:
// nsINode
virtual nsresult Clone(nsINodeInfo* aNodeInfo, nsINode** aResult) const MOZ_OVERRIDE;
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
virtual JSObject* WrapNode(JSContext* aCx,
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;

View File

@ -33,10 +33,8 @@ NS_IMPL_RELEASE_INHERITED(HTMLMapElement, Element)
// QueryInterface implementation for HTMLMapElement
NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLMapElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
NS_INTERFACE_TABLE_INHERITED1(HTMLMapElement, nsIDOMHTMLMapElement)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
NS_ELEMENT_INTERFACE_MAP_END
NS_INTERFACE_TABLE_TAIL_INHERITING(nsGenericHTMLElement)
NS_IMPL_ELEMENT_CLONE(HTMLMapElement)

View File

@ -26,15 +26,6 @@ public:
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMNode
NS_FORWARD_NSIDOMNODE_TO_NSINODE
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
// nsIDOMHTMLMapElement
NS_DECL_NSIDOMHTMLMAPELEMENT
@ -43,8 +34,6 @@ public:
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED_NO_UNLINK(HTMLMapElement,
nsGenericHTMLElement)
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
// XPCOM GetName is fine.
void SetName(const nsAString& aName, ErrorResult& aError)
{

View File

@ -50,19 +50,8 @@ HTMLMenuElement::~HTMLMenuElement()
{
}
NS_IMPL_ADDREF_INHERITED(HTMLMenuElement, Element)
NS_IMPL_RELEASE_INHERITED(HTMLMenuElement, Element)
// QueryInterface implementation for HTMLMenuElement
NS_INTERFACE_TABLE_HEAD(HTMLMenuElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
NS_INTERFACE_TABLE_INHERITED2(HTMLMenuElement,
nsIDOMHTMLMenuElement,
nsIHTMLMenu)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
NS_ELEMENT_INTERFACE_MAP_END
NS_IMPL_ISUPPORTS_INHERITED2(HTMLMenuElement, nsGenericHTMLElement,
nsIDOMHTMLMenuElement, nsIHTMLMenu)
NS_IMPL_ELEMENT_CLONE(HTMLMenuElement)

View File

@ -27,15 +27,6 @@ public:
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMNode
NS_FORWARD_NSIDOMNODE_TO_NSINODE
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
// nsIDOMHTMLMenuElement
NS_DECL_NSIDOMHTMLMENUELEMENT
@ -49,8 +40,6 @@ public:
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
uint8_t GetType() const { return mType; }
// WebIDL

View File

@ -169,17 +169,8 @@ HTMLMenuItemElement::~HTMLMenuItemElement()
}
NS_IMPL_ADDREF_INHERITED(HTMLMenuItemElement, Element)
NS_IMPL_RELEASE_INHERITED(HTMLMenuItemElement, Element)
// QueryInterface implementation for HTMLMenuItemElement
NS_INTERFACE_TABLE_HEAD(HTMLMenuItemElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
NS_INTERFACE_TABLE_INHERITED1(HTMLMenuItemElement,
nsIDOMHTMLMenuItemElement)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
NS_ELEMENT_INTERFACE_MAP_END
NS_IMPL_ISUPPORTS_INHERITED1(HTMLMenuItemElement, nsGenericHTMLElement,
nsIDOMHTMLMenuItemElement)
//NS_IMPL_ELEMENT_CLONE(HTMLMenuItemElement)
nsresult

View File

@ -30,15 +30,6 @@ public:
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMNode
NS_FORWARD_NSIDOMNODE_TO_NSINODE
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
// nsIDOMHTMLMenuItemElement
NS_DECL_NSIDOMHTMLMENUITEMELEMENT
@ -58,8 +49,6 @@ public:
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
uint8_t GetType() const { return mType; }
/**

View File

@ -24,17 +24,8 @@ HTMLMetaElement::~HTMLMetaElement()
}
NS_IMPL_ADDREF_INHERITED(HTMLMetaElement, Element)
NS_IMPL_RELEASE_INHERITED(HTMLMetaElement, Element)
// QueryInterface implementation for HTMLMetaElement
NS_INTERFACE_TABLE_HEAD(HTMLMetaElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
NS_INTERFACE_TABLE_INHERITED1(HTMLMetaElement, nsIDOMHTMLMetaElement)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
NS_ELEMENT_INTERFACE_MAP_END
NS_IMPL_ISUPPORTS_INHERITED1(HTMLMetaElement, nsGenericHTMLElement,
nsIDOMHTMLMetaElement)
NS_IMPL_ELEMENT_CLONE(HTMLMetaElement)

View File

@ -23,15 +23,6 @@ public:
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMNode
NS_FORWARD_NSIDOMNODE_TO_NSINODE
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
// nsIDOMHTMLMetaElement
NS_DECL_NSIDOMHTMLMETAELEMENT
@ -44,8 +35,6 @@ public:
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
// XPCOM GetName is fine.
void SetName(const nsAString& aName, ErrorResult& aRv)
{

View File

@ -25,17 +25,8 @@ HTMLMeterElement::~HTMLMeterElement()
{
}
NS_IMPL_ADDREF_INHERITED(HTMLMeterElement, Element)
NS_IMPL_RELEASE_INHERITED(HTMLMeterElement, Element)
NS_INTERFACE_MAP_BEGIN(HTMLMeterElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
NS_ELEMENT_INTERFACE_MAP_END
NS_IMPL_ELEMENT_CLONE(HTMLMeterElement)
nsEventStates
HTMLMeterElement::IntrinsicState() const
{

View File

@ -17,25 +17,12 @@
namespace mozilla {
namespace dom {
class HTMLMeterElement MOZ_FINAL : public nsGenericHTMLElement,
public nsIDOMHTMLElement
class HTMLMeterElement MOZ_FINAL : public nsGenericHTMLElement
{
public:
HTMLMeterElement(already_AddRefed<nsINodeInfo> aNodeInfo);
virtual ~HTMLMeterElement();
/* nsISupports */
NS_DECL_ISUPPORTS_INHERITED
/* nsIDOMNode */
NS_FORWARD_NSIDOMNODE_TO_NSINODE
/* nsIDOMElement */
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
/* nsIDOMHTMLElement */
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
virtual nsEventStates IntrinsicState() const MOZ_OVERRIDE;
nsresult Clone(nsINodeInfo* aNodeInfo, nsINode** aResult) const MOZ_OVERRIDE;
@ -43,8 +30,6 @@ public:
bool ParseAttribute(int32_t aNamespaceID, nsIAtom* aAttribute,
const nsAString& aValue, nsAttrValue& aResult) MOZ_OVERRIDE;
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
// WebIDL
/* @return the value */

View File

@ -21,16 +21,6 @@ HTMLModElement::~HTMLModElement()
{
}
NS_IMPL_ADDREF_INHERITED(HTMLModElement, Element)
NS_IMPL_RELEASE_INHERITED(HTMLModElement, Element)
// QueryInterface implementation for HTMLModElement
NS_INTERFACE_MAP_BEGIN(HTMLModElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
NS_ELEMENT_INTERFACE_MAP_END
NS_IMPL_ELEMENT_CLONE(HTMLModElement)
JSObject*

View File

@ -13,29 +13,14 @@
namespace mozilla {
namespace dom {
class HTMLModElement MOZ_FINAL : public nsGenericHTMLElement,
public nsIDOMHTMLElement
class HTMLModElement MOZ_FINAL : public nsGenericHTMLElement
{
public:
HTMLModElement(already_AddRefed<nsINodeInfo> aNodeInfo);
virtual ~HTMLModElement();
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMNode
NS_FORWARD_NSIDOMNODE_TO_NSINODE
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
void GetCite(nsString& aCite)
{
GetHTMLURIAttr(nsGkAtoms::cite, aCite);

View File

@ -80,7 +80,6 @@ NS_IMPL_ADDREF_INHERITED(HTMLObjectElement, Element)
NS_IMPL_RELEASE_INHERITED(HTMLObjectElement, Element)
NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLObjectElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLFormElement)
NS_INTERFACE_TABLE_INHERITED10(HTMLObjectElement,
nsIDOMHTMLObjectElement,
imgINotificationObserver,
@ -92,8 +91,7 @@ NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLObjectElement)
imgIOnloadBlocker,
nsIChannelEventSink,
nsIConstraintValidation)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
NS_ELEMENT_INTERFACE_MAP_END
NS_INTERFACE_TABLE_TAIL_INHERITING(nsGenericHTMLFormElement)
NS_IMPL_ELEMENT_CLONE(HTMLObjectElement)

View File

@ -29,15 +29,6 @@ public:
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMNode
NS_FORWARD_NSIDOMNODE_TO_NSINODE
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
virtual int32_t TabIndexDefault() MOZ_OVERRIDE;
// nsIDOMHTMLObjectElement
@ -92,8 +83,6 @@ public:
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(HTMLObjectElement,
nsGenericHTMLFormElement)
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
// Web IDL binding methods
// XPCOM GetData is ok; note that it's a URI attribute with a weird base URI
void SetData(const nsAString& aValue, ErrorResult& aRv)

View File

@ -37,19 +37,8 @@ HTMLOptGroupElement::~HTMLOptGroupElement()
}
NS_IMPL_ADDREF_INHERITED(HTMLOptGroupElement, Element)
NS_IMPL_RELEASE_INHERITED(HTMLOptGroupElement, Element)
// QueryInterface implementation for HTMLOptGroupElement
NS_INTERFACE_TABLE_HEAD(HTMLOptGroupElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
NS_INTERFACE_TABLE_INHERITED1(HTMLOptGroupElement,
nsIDOMHTMLOptGroupElement)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
NS_ELEMENT_INTERFACE_MAP_END
NS_IMPL_ISUPPORTS_INHERITED1(HTMLOptGroupElement, nsGenericHTMLElement,
nsIDOMHTMLOptGroupElement)
NS_IMPL_ELEMENT_CLONE(HTMLOptGroupElement)

View File

@ -25,15 +25,6 @@ public:
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMNode
NS_FORWARD_NSIDOMNODE_TO_NSINODE
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
// nsIDOMHTMLOptGroupElement
NS_DECL_NSIDOMHTMLOPTGROUPELEMENT

View File

@ -51,21 +51,8 @@ HTMLOptionElement::~HTMLOptionElement()
{
}
// ISupports
NS_IMPL_ADDREF_INHERITED(HTMLOptionElement, Element)
NS_IMPL_RELEASE_INHERITED(HTMLOptionElement, Element)
// QueryInterface implementation for HTMLOptionElement
NS_INTERFACE_TABLE_HEAD(HTMLOptionElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
NS_INTERFACE_TABLE_INHERITED1(HTMLOptionElement,
nsIDOMHTMLOptionElement)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
NS_ELEMENT_INTERFACE_MAP_END
NS_IMPL_ISUPPORTS_INHERITED1(HTMLOptionElement, nsGenericHTMLElement,
nsIDOMHTMLOptionElement)
NS_IMPL_ELEMENT_CLONE(HTMLOptionElement)

View File

@ -36,15 +36,6 @@ public:
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMNode
NS_FORWARD_NSIDOMNODE_TO_NSINODE
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
// nsIDOMHTMLOptionElement
using mozilla::dom::Element::SetText;
using mozilla::dom::Element::GetText;
@ -75,8 +66,6 @@ public:
nsresult CopyInnerTo(mozilla::dom::Element* aDest);
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
virtual bool IsDisabled() const MOZ_OVERRIDE {
return HasAttr(kNameSpaceID_None, nsGkAtoms::disabled);
}

View File

@ -168,17 +168,20 @@ HTMLOptionsCollection::SetOption(uint32_t aIndex,
nsCOMPtr<nsIDOMNode> ret;
if (index == mElements.Length()) {
rv = mSelect->AppendChild(aOption, getter_AddRefs(ret));
nsCOMPtr<nsIDOMNode> node = do_QueryInterface(aOption);
rv = mSelect->AppendChild(node, getter_AddRefs(ret));
} else {
// Find the option they're talking about and replace it
// hold a strong reference to follow COM rules.
nsCOMPtr<nsIDOMHTMLOptionElement> refChild = ItemAsOption(index);
nsRefPtr<HTMLOptionElement> refChild = ItemAsOption(index);
NS_ENSURE_TRUE(refChild, NS_ERROR_UNEXPECTED);
nsCOMPtr<nsIDOMNode> parent;
refChild->GetParentNode(getter_AddRefs(parent));
nsCOMPtr<nsINode> parent = refChild->GetParent();
if (parent) {
rv = parent->ReplaceChild(aOption, refChild, getter_AddRefs(ret));
nsCOMPtr<nsINode> node = do_QueryInterface(aOption);
ErrorResult res;
parent->ReplaceChild(*node, *refChild, res);
rv = res.ErrorCode();
}
}
@ -346,7 +349,8 @@ HTMLOptionsCollection::Add(nsIDOMHTMLOptionElement* aOption,
return NS_ERROR_NOT_INITIALIZED;
}
return mSelect->Add(aOption, aBefore);
nsCOMPtr<nsIDOMHTMLElement> elem = do_QueryInterface(aOption);
return mSelect->Add(elem, aBefore);
}
void

Some files were not shown because too many files have changed in this diff Show More