Merge autoland to mozilla-central. a=merge

This commit is contained in:
Dorel Luca 2018-02-07 17:01:50 +02:00
commit cf40524253
65 changed files with 210 additions and 599 deletions

View File

@ -242,7 +242,6 @@ FirefoxProfileMigrator.prototype._getResourcesInternal = function(sourceProfileD
};
// If the 'datareporting' directory exists we migrate files from it.
let haveStateFile = false;
let dataReportingDir = this._getFileObject(sourceProfileDir, "datareporting");
if (dataReportingDir && dataReportingDir.isDirectory()) {
// Copy only specific files.
@ -255,29 +254,10 @@ FirefoxProfileMigrator.prototype._getResourcesInternal = function(sourceProfileD
if (file.isDirectory() || !toCopy.includes(file.leafName)) {
continue;
}
if (file.leafName == "state.json") {
haveStateFile = true;
}
file.copyTo(dest, "");
}
}
if (!haveStateFile) {
// Fall back to migrating the state file that contains the client id from healthreport/.
// We first moved the client id management from the FHR implementation to the datareporting
// service.
// Consequently, we try to migrate an existing FHR state file here as a fallback.
let healthReportDir = this._getFileObject(sourceProfileDir, "healthreport");
if (healthReportDir && healthReportDir.isDirectory()) {
let stateFile = this._getFileObject(healthReportDir, "state.json");
if (stateFile) {
let dest = createSubDir("healthreport");
stateFile.copyTo(dest, "");
}
}
}
aCallback(true);
},
};

View File

@ -141,29 +141,6 @@ add_task(async function test_migrate_files() {
});
});
add_task(async function test_fallback_fhr_state() {
let [srcDir, targetDir] = getTestDirs();
// Test that we fall back to migrating FHR state if the datareporting
// state file does not exist.
let stateContent = JSON.stringify({
clientId: "68d5474e-19dc-45c1-8e9a-81fca592707c",
});
let subDir = createSubDir(srcDir, "healthreport");
writeToFile(subDir, "state.json", stateContent);
// Perform migration.
let ok = await promiseTelemetryMigrator(srcDir, targetDir);
Assert.ok(ok, "callback should have been true");
checkDirectoryContains(targetDir, {
"healthreport": {
"state.json": stateContent,
},
});
});
add_task(async function test_datareporting_not_dir() {
let [srcDir, targetDir] = getTestDirs();

View File

@ -19,7 +19,8 @@
src="chrome://browser/content/utilityOverlay.js"/>
<script type="application/javascript"><![CDATA[
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
ChromeUtils.import("resource://gre/modules/PlacesUtils.jsm");
ChromeUtils.defineModuleGetter(window,
"PlacesUtils", "resource://gre/modules/PlacesUtils.jsm");
ChromeUtils.defineModuleGetter(window,
"PlacesUIUtils", "resource:///modules/PlacesUIUtils.jsm");
ChromeUtils.defineModuleGetter(window,

View File

@ -41,7 +41,7 @@ function test() {
function getElementByXPath(aTab, aQuery) {
let doc = aTab.linkedBrowser.contentDocument;
let xptype = Ci.nsIDOMXPathResult.FIRST_ORDERED_NODE_TYPE;
let xptype = doc.defaultView.XPathResult.FIRST_ORDERED_NODE_TYPE;
return doc.evaluate(aQuery, doc, null, xptype, null).singleNodeValue;
}

View File

@ -29,7 +29,7 @@ function queryElement(data) {
}
if (data.hasOwnProperty("xpath")) {
let xptype = Ci.nsIDOMXPathResult.FIRST_ORDERED_NODE_TYPE;
let xptype = doc.defaultView.XPathResult.FIRST_ORDERED_NODE_TYPE;
return doc.evaluate(data.xpath, doc, null, xptype, null).singleNodeValue;
}

View File

@ -223,7 +223,6 @@
@RESPATH@/components/dom_workers.xpt
@RESPATH@/components/dom_xbl.xpt
@RESPATH@/components/dom_xhr.xpt
@RESPATH@/components/dom_xpath.xpt
@RESPATH@/components/dom_xul.xpt
@RESPATH@/components/dom_presentation.xpt
@RESPATH@/components/downloads.xpt
@ -703,8 +702,6 @@
; svg
@RESPATH@/res/svg.css
@RESPATH@/components/dom_svg.xpt
@RESPATH@/components/dom_smil.xpt
; [Personal Security Manager]
;

View File

@ -1430,7 +1430,7 @@ module.exports = {
"numberValue": {
"!type": "number",
"!url": "https://developer.mozilla.org/en/docs/XPathResult",
"!doc": "Refer to nsIDOMXPathResult for more detail."
"!doc": "Refer to XPathResult for more detail."
},
"resultType": {
"!type": "number",
@ -1445,7 +1445,7 @@ module.exports = {
"snapshotLength": {
"!type": "number",
"!url": "https://developer.mozilla.org/en/docs/XPathResult",
"!doc": "Refer to nsIDOMXPathResult for more detail."
"!doc": "Refer to XPathResult for more detail."
},
"stringValue": {
"!type": "string",
@ -1473,7 +1473,7 @@ module.exports = {
"FIRST_ORDERED_NODE_TYPE": "number"
},
"!url": "https://developer.mozilla.org/en/docs/XPathResult",
"!doc": "Refer to nsIDOMXPathResult for more detail."
"!doc": "Refer to XPathResult for more detail."
},
"ClientRect": {
"!type": "fn()",

View File

@ -983,12 +983,9 @@ WebConsoleFrame.prototype = {
let attribute = !WORKERTYPES_PREFKEYS.includes(prefKey)
? "filter" : "workerType";
let xpath = ".//*[contains(@class, 'message') and " +
"@" + attribute + "='" + prefKey + "']";
let result = doc.evaluate(xpath, outputNode, null,
Ci.nsIDOMXPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
for (let i = 0; i < result.snapshotLength; i++) {
let node = result.snapshotItem(i);
let selector = "[" + attribute + "='" + prefKey + "'].message";
let result = outputNode.querySelectorAll(selector);
for (let node of result) {
if (state) {
node.classList.remove("filtered-by-type");
} else {

View File

@ -372,7 +372,7 @@ WebConsoleCommands._registerOriginal("$x", function (owner, xPath, context) {
context = context || doc;
let results = doc.evaluate(xPath, context, null,
Ci.nsIDOMXPathResult.ANY_TYPE, null);
owner.window.XPathResult.ANY_TYPE, null);
let node;
while ((node = results.iterateNext())) {
nodes.push(node);

View File

@ -1819,17 +1819,14 @@ nsDOMWindowUtils::GetIMEStatus(uint32_t *aState)
}
NS_IMETHODIMP
nsDOMWindowUtils::GetFocusedInputType(char** aType)
nsDOMWindowUtils::GetFocusedInputType(nsAString& aType)
{
NS_ENSURE_ARG_POINTER(aType);
nsCOMPtr<nsIWidget> widget = GetWidget();
if (!widget) {
return NS_ERROR_FAILURE;
}
InputContext context = widget->GetInputContext();
*aType = ToNewCString(context.mHTMLInputType);
aType = widget->GetInputContext().mHTMLInputType;
return NS_OK;
}

View File

@ -1811,7 +1811,6 @@ NS_INTERFACE_TABLE_HEAD(nsDocument)
NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIRadioGroupContainer)
NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIMutationObserver)
NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIApplicationCacheContainer)
NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIDOMXPathEvaluator)
NS_INTERFACE_TABLE_END
NS_INTERFACE_TABLE_TO_MAP_SEGUE_CYCLE_COLLECTION(nsDocument)
NS_INTERFACE_MAP_END
@ -1972,7 +1971,6 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INTERNAL(nsDocument)
#ifdef MOZ_OLD_STYLE
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mStyleAttrStyleSheet)
#endif
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mXPathEvaluator)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mLayoutHistoryState)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mOnloadBlocker)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mFirstBaseNodeWithHref)
@ -2065,7 +2063,6 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(nsDocument)
tmp->UnlinkOriginalDocumentIfStatic();
NS_IMPL_CYCLE_COLLECTION_UNLINK(mXPathEvaluator)
tmp->mCachedRootElement = nullptr; // Avoid a dangling pointer
NS_IMPL_CYCLE_COLLECTION_UNLINK(mDisplayDocument)
NS_IMPL_CYCLE_COLLECTION_UNLINK(mFirstBaseNodeWithHref)
@ -12162,15 +12159,6 @@ nsIDocument::Evaluate(JSContext* aCx, const nsAString& aExpression,
aType, aResult, rv);
}
NS_IMETHODIMP
nsDocument::Evaluate(const nsAString& aExpression, nsIDOMNode* aContextNode,
nsIDOMNode* aResolver, uint16_t aType,
nsISupports* aInResult, nsISupports** aResult)
{
return XPathEvaluator()->Evaluate(aExpression, aContextNode, aResolver, aType,
aInResult, aResult);
}
nsIDocument*
nsIDocument::GetTopLevelContentDocument()
{
@ -12514,9 +12502,9 @@ XPathEvaluator*
nsIDocument::XPathEvaluator()
{
if (!mXPathEvaluator) {
mXPathEvaluator = new dom::XPathEvaluator(this);
mXPathEvaluator.reset(new dom::XPathEvaluator(this));
}
return mXPathEvaluator;
return mXPathEvaluator.get();
}
already_AddRefed<nsIDocumentEncoder>

View File

@ -66,7 +66,6 @@
#include "nsDataHashtable.h"
#include "mozilla/TimeStamp.h"
#include "mozilla/Attributes.h"
#include "nsIDOMXPathEvaluator.h"
#include "jsfriendapi.h"
#include "mozilla/LinkedList.h"
#include "CustomElementRegistry.h"
@ -328,8 +327,7 @@ class nsDocument : public nsIDocument,
public nsIScriptObjectPrincipal,
public nsIRadioGroupContainer,
public nsIApplicationCacheContainer,
public nsStubMutationObserver,
public nsIDOMXPathEvaluator
public nsStubMutationObserver
{
friend class nsIDocument;
@ -660,8 +658,6 @@ public:
// nsIApplicationCacheContainer
NS_DECL_NSIAPPLICATIONCACHECONTAINER
NS_DECL_NSIDOMXPATHEVALUATOR
virtual nsresult Init();
virtual already_AddRefed<Element> CreateElem(const nsAString& aName,

View File

@ -3711,7 +3711,7 @@ protected:
uint32_t mInSyncOperationCount;
RefPtr<mozilla::dom::XPathEvaluator> mXPathEvaluator;
mozilla::UniquePtr<mozilla::dom::XPathEvaluator> mXPathEvaluator;
nsTArray<RefPtr<mozilla::dom::AnonymousContent>> mAnonymousContents;

View File

@ -6,7 +6,7 @@ Components.utils.importGlobalProperties(["NodeFilter"]);
const C_i = Components.interfaces;
const UNORDERED_TYPE = C_i.nsIDOMXPathResult.ANY_UNORDERED_NODE_TYPE;
const UNORDERED_TYPE = 8; // XPathResult.ANY_UNORDERED_NODE_TYPE
/**
* Determine if the data node has only ignorable white-space.
@ -179,7 +179,6 @@ function getParsedDocument(aPath) {
function processParsedDocument(doc) {
Assert.ok(doc.documentElement.localName != "parsererror");
Assert.ok(doc instanceof C_i.nsIDOMXPathEvaluator);
Assert.ok(doc instanceof C_i.nsIDOMDocument);
// Clean out whitespace.

View File

@ -34,6 +34,7 @@ class EventMessageAutoOverride;
// ExtendableEvent is a ServiceWorker event that is not
// autogenerated since it has some extra methods.
class ExtendableEvent;
class TimeEvent;
class WantsPopupControlCheck;
#define GENERATED_EVENT(EventClass_) class EventClass_;
#include "mozilla/dom/GeneratedEventList.h"
@ -109,6 +110,8 @@ public:
return nullptr;
}
virtual TimeEvent* AsTimeEvent() { return nullptr; }
// nsIDOMEvent Interface
NS_DECL_NSIDOMEVENT

View File

@ -1512,7 +1512,7 @@ interface nsIDOMWindowUtils : nsISupports {
/**
* Get the type of the currently focused html input, if any.
*/
readonly attribute string focusedInputType;
readonly attribute AString focusedInputType;
/**
* Find the view ID for a given element. This is the reverse of

View File

@ -1,15 +0,0 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# 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/.
with Files("**"):
BUG_COMPONENT = ("Core", "SVG")
XPIDL_SOURCES += [
'nsIDOMTimeEvent.idl',
]
XPIDL_MODULE = 'dom_smil'

View File

@ -1,20 +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/. */
#include "nsIDOMEvent.idl"
/**
* The SMIL TimeEvent interface.
*
* For more information please refer to:
* http://www.w3.org/TR/SMIL/smil-timing.html#Events-TimeEvent
* http://www.w3.org/TR/SVG/animate.html#InterfaceTimeEvent
*/
[builtinclass, uuid(b5e7fbac-f572-426c-9320-0ef7630f03c1)]
interface nsIDOMTimeEvent : nsIDOMEvent
{
readonly attribute long detail;
};

View File

@ -1,15 +0,0 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# 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/.
with Files("**"):
BUG_COMPONENT = ("Core", "SVG")
XPIDL_SOURCES += [
'nsIDOMSVGElement.idl',
]
XPIDL_MODULE = 'dom_svg'

View File

@ -1,17 +0,0 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsIDOMElement.idl"
[uuid(c63517c5-8bab-4cd1-8694-bccafc32a195)]
interface nsIDOMSVGElement : nsIDOMElement
{
// raises DOMException on setting
readonly attribute nsIDOMSVGElement ownerSVGElement;
readonly attribute nsIDOMSVGElement viewportElement;
[binaryname(SVGClassName)]
readonly attribute nsISupports className;
};

View File

@ -1,16 +0,0 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# 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/.
with Files("**"):
BUG_COMPONENT = ("Core", "XSLT")
XPIDL_SOURCES += [
'nsIDOMXPathEvaluator.idl',
'nsIDOMXPathResult.idl',
]
XPIDL_MODULE = 'dom_xpath'

View File

@ -1,24 +0,0 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* Corresponds to http://www.w3.org/TR/2002/WD-DOM-Level-3-XPath-20020208
*/
#include "domstubs.idl"
interface XPathException;
[uuid(92584002-d0e2-4b88-9af9-fa6ff59ee002)]
interface nsIDOMXPathEvaluator : nsISupports
{
nsISupports evaluate(in DOMString expression,
in nsIDOMNode contextNode,
in nsIDOMNode resolver,
in unsigned short type,
in nsISupports result)
raises(XPathException,
DOMException);
};

View File

@ -1,26 +0,0 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* Corresponds to http://www.w3.org/TR/2002/WD-DOM-Level-3-XPath-20020208
*/
#include "nsISupports.idl"
[uuid(75506f84-b504-11d5-a7f2-ca108ab8b6fc)]
interface nsIDOMXPathResult : nsISupports
{
// XPathResultType
const unsigned short ANY_TYPE = 0;
const unsigned short NUMBER_TYPE = 1;
const unsigned short STRING_TYPE = 2;
const unsigned short BOOLEAN_TYPE = 3;
const unsigned short UNORDERED_NODE_ITERATOR_TYPE = 4;
const unsigned short ORDERED_NODE_ITERATOR_TYPE = 5;
const unsigned short UNORDERED_NODE_SNAPSHOT_TYPE = 6;
const unsigned short ORDERED_NODE_SNAPSHOT_TYPE = 7;
const unsigned short ANY_UNORDERED_NODE_TYPE = 8;
const unsigned short FIRST_ORDERED_NODE_TYPE = 9;
};

View File

@ -22,15 +22,12 @@ interfaces = [
'sidebar',
'range',
'xbl',
'xpath',
'xul',
'security',
'storage',
'offline',
'geolocation',
'notification',
'svg',
'smil',
'push',
'payments',
]

View File

@ -38,19 +38,7 @@ TimeEvent::TimeEvent(EventTarget* aOwner,
NS_IMPL_CYCLE_COLLECTION_INHERITED(TimeEvent, Event,
mView)
NS_IMPL_ADDREF_INHERITED(TimeEvent, Event)
NS_IMPL_RELEASE_INHERITED(TimeEvent, Event)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(TimeEvent)
NS_INTERFACE_MAP_ENTRY(nsIDOMTimeEvent)
NS_INTERFACE_MAP_END_INHERITING(Event)
NS_IMETHODIMP
TimeEvent::GetDetail(int32_t* aDetail)
{
*aDetail = mDetail;
return NS_OK;
}
NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED_0(TimeEvent, Event)
void
TimeEvent::InitTimeEvent(const nsAString& aType, nsGlobalWindowInner* aView,

View File

@ -9,15 +9,13 @@
#include "mozilla/dom/Event.h"
#include "mozilla/dom/TimeEventBinding.h"
#include "nsIDOMTimeEvent.h"
class nsGlobalWindowInner;
namespace mozilla {
namespace dom {
class TimeEvent final : public Event,
public nsIDOMTimeEvent
class TimeEvent final : public Event
{
public:
TimeEvent(EventTarget* aOwner,
@ -28,12 +26,6 @@ public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(TimeEvent, Event)
// nsIDOMTimeEvent interface:
NS_DECL_NSIDOMTIMEEVENT
// Forward to base class
NS_FORWARD_TO_EVENT
virtual JSObject* WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override
{
return TimeEventBinding::Wrap(aCx, this, aGivenProto);
@ -53,6 +45,8 @@ public:
return mView;
}
TimeEvent* AsTimeEvent() final { return this; }
private:
~TimeEvent() {}

View File

@ -6,6 +6,7 @@
#include "mozilla/EventListenerManager.h"
#include "mozilla/dom/SVGAnimationElement.h"
#include "mozilla/dom/TimeEvent.h"
#include "nsSMILTimeValueSpec.h"
#include "nsSMILInterval.h"
#include "nsSMILTimeContainer.h"
@ -14,7 +15,6 @@
#include "nsSMILInstanceTime.h"
#include "nsSMILParserUtils.h"
#include "nsIDOMKeyEvent.h"
#include "nsIDOMTimeEvent.h"
#include "nsString.h"
#include <limits>
@ -372,14 +372,13 @@ nsSMILTimeValueSpec::HandleEvent(nsIDOMEvent* aEvent)
bool
nsSMILTimeValueSpec::CheckRepeatEventDetail(nsIDOMEvent *aEvent)
{
nsCOMPtr<nsIDOMTimeEvent> timeEvent = do_QueryInterface(aEvent);
TimeEvent* timeEvent = aEvent->InternalDOMEvent()->AsTimeEvent();
if (!timeEvent) {
NS_WARNING("Received a repeat event that was not a DOMTimeEvent");
return false;
}
int32_t detail;
timeEvent->GetDetail(&detail);
int32_t detail = timeEvent->Detail();
return detail > 0 && (uint32_t)detail == mParams.mRepeatIteration;
}

View File

@ -183,7 +183,7 @@ public:
nsISupports* GetParentObject() const {
auto svgElement = mList ? Element() : mSVGElement.get();
return static_cast<nsIDOMSVGElement*> (svgElement);
return static_cast<nsIDOMElement*>(svgElement);
}
JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;

View File

@ -41,7 +41,6 @@ nsSVGElement::StringInfo SVGAElement::sStringInfo[3] =
NS_INTERFACE_MAP_BEGIN(SVGAElement)
NS_INTERFACE_MAP_ENTRY(nsIDOMNode)
NS_INTERFACE_MAP_ENTRY(nsIDOMElement)
NS_INTERFACE_MAP_ENTRY(nsIDOMSVGElement)
NS_INTERFACE_MAP_ENTRY(Link)
NS_INTERFACE_MAP_END_INHERITING(SVGAElementBase)

View File

@ -89,7 +89,7 @@ public:
// SVGTests
virtual bool IsInChromeDoc() const override;
nsSVGElement* AsSVGElement() final { return this; }
protected:
// nsSVGElement overrides

View File

@ -16,7 +16,6 @@
#include "nsServiceManagerUtils.h"
#include "nsString.h"
#include "nsLiteralString.h"
#include "nsIDOMSVGElement.h"
#include "mozilla/dom/Element.h"
#include "nsSVGElement.h"
#include "mozilla/StyleSheet.h"

View File

@ -43,7 +43,7 @@ nsSVGElement::StringInfo SVGFEImageElement::sStringInfo[3] =
// nsISupports methods
NS_IMPL_ISUPPORTS_INHERITED(SVGFEImageElement, SVGFEImageElementBase,
nsIDOMNode, nsIDOMElement, nsIDOMSVGElement,
nsIDOMNode, nsIDOMElement,
imgINotificationObserver, nsIImageLoadingContent)
//----------------------------------------------------------------------

View File

@ -27,6 +27,7 @@ public:
NS_DECL_ISUPPORTS_INHERITED
bool IsInChromeDoc() const override;
nsSVGElement* AsSVGElement() final { return this; }
};
} // namespace dom

View File

@ -50,7 +50,6 @@ nsSVGElement::StringInfo SVGImageElement::sStringInfo[2] =
NS_IMPL_ISUPPORTS_INHERITED(SVGImageElement, SVGImageElementBase,
nsIDOMNode, nsIDOMElement,
nsIDOMSVGElement,
imgINotificationObserver,
nsIImageLoadingContent)

View File

@ -51,7 +51,6 @@ NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED(SVGMPathElement,
SVGMPathElementBase,
nsIDOMNode,
nsIDOMElement,
nsIDOMSVGElement,
nsIMutationObserver)
// Constructor

View File

@ -69,7 +69,7 @@ DOMSVGTranslatePoint::Copy()
nsISupports*
DOMSVGTranslatePoint::GetParentObject()
{
return static_cast<nsIDOMSVGElement*>(mElement);
return static_cast<nsIDOMElement*>(mElement);
}
void
@ -123,8 +123,7 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED(SVGSVGElement,
SVGSVGElementBase,
nsIDOMNode,
nsIDOMElement,
nsIDOMSVGElement)
nsIDOMElement)
SVGView::SVGView()
{

View File

@ -33,7 +33,6 @@ nsSVGElement::StringInfo SVGScriptElement::sStringInfo[2] =
NS_IMPL_ISUPPORTS_INHERITED(SVGScriptElement, SVGScriptElementBase,
nsIDOMNode, nsIDOMElement,
nsIDOMSVGElement,
nsIScriptLoaderObserver,
nsIScriptElement, nsIMutationObserver)

View File

@ -23,7 +23,7 @@ SVGSymbolElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
NS_IMPL_ISUPPORTS_INHERITED(SVGSymbolElement, SVGSymbolElementBase,
nsIDOMNode, nsIDOMElement,
nsIDOMSVGElement, mozilla::dom::SVGTests)
mozilla::dom::SVGTests)
//----------------------------------------------------------------------
// Implementation

View File

@ -30,28 +30,22 @@ SVGTests::SVGTests()
already_AddRefed<DOMSVGStringList>
SVGTests::RequiredFeatures()
{
nsCOMPtr<nsIDOMSVGElement> elem = do_QueryInterface(this);
nsSVGElement* element = static_cast<nsSVGElement*>(elem.get());
return DOMSVGStringList::GetDOMWrapper(
&mStringListAttributes[FEATURES], element, true, FEATURES);
&mStringListAttributes[FEATURES], AsSVGElement(), true, FEATURES);
}
already_AddRefed<DOMSVGStringList>
SVGTests::RequiredExtensions()
{
nsCOMPtr<nsIDOMSVGElement> elem = do_QueryInterface(this);
nsSVGElement* element = static_cast<nsSVGElement*>(elem.get());
return DOMSVGStringList::GetDOMWrapper(
&mStringListAttributes[EXTENSIONS], element, true, EXTENSIONS);
&mStringListAttributes[EXTENSIONS], AsSVGElement(), true, EXTENSIONS);
}
already_AddRefed<DOMSVGStringList>
SVGTests::SystemLanguage()
{
nsCOMPtr<nsIDOMSVGElement> elem = do_QueryInterface(this);
nsSVGElement* element = static_cast<nsSVGElement*>(elem.get());
return DOMSVGStringList::GetDOMWrapper(
&mStringListAttributes[LANGUAGE], element, true, LANGUAGE);
&mStringListAttributes[LANGUAGE], AsSVGElement(), true, LANGUAGE);
}
bool
@ -224,10 +218,7 @@ SVGTests::GetAttrValue(uint8_t aAttrEnum, nsAttrValue& aValue) const
void
SVGTests::MaybeInvalidate()
{
nsCOMPtr<nsIDOMSVGElement> elem = do_QueryInterface(this);
nsSVGElement* element = static_cast<nsSVGElement*>(elem.get());
nsIContent* parent = element->GetFlattenedTreeParent();
nsIContent* parent = AsSVGElement()->GetFlattenedTreeParent();
if (parent &&
parent->NodeInfo()->Equals(nsGkAtoms::svgSwitch, kNameSpaceID_SVG)) {

View File

@ -14,6 +14,7 @@
class nsAttrValue;
class nsAtom;
class nsStaticAtom;
class nsSVGElement;
namespace mozilla {
class DOMSVGStringList;
@ -96,6 +97,7 @@ public:
bool HasExtension(const nsAString& aExtension);
virtual bool IsInChromeDoc() const = 0;
virtual nsSVGElement* AsSVGElement() = 0;
protected:
virtual ~SVGTests() {}

View File

@ -23,7 +23,6 @@ SVGTitleElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
NS_IMPL_ISUPPORTS_INHERITED(SVGTitleElement, SVGTitleElementBase,
nsIDOMNode, nsIDOMElement,
nsIDOMSVGElement,
nsIMutationObserver)
//----------------------------------------------------------------------

View File

@ -110,15 +110,6 @@ nsSVGElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
return SVGElementBinding::Wrap(aCx, this, aGivenProto);
}
//----------------------------------------------------------------------
NS_IMETHODIMP
nsSVGElement::GetSVGClassName(nsISupports** aClassName)
{
*aClassName = ClassName().take();
return NS_OK;
}
//----------------------------------------------------------------------
// nsSVGElement methods
@ -247,8 +238,7 @@ nsSVGElement::Init()
// nsISupports methods
NS_IMPL_ISUPPORTS_INHERITED(nsSVGElement, nsSVGElementBase,
nsIDOMNode, nsIDOMElement,
nsIDOMSVGElement)
nsIDOMNode, nsIDOMElement)
//----------------------------------------------------------------------
// Implementation
@ -1099,14 +1089,6 @@ nsSVGElement::sMaskMap[] = {
//----------------------------------------------------------------------
// nsIDOMSVGElement methods
NS_IMETHODIMP
nsSVGElement::GetOwnerSVGElement(nsIDOMSVGElement * *aOwnerSVGElement)
{
NS_IF_ADDREF(*aOwnerSVGElement = GetOwnerSVGElement());
return NS_OK;
}
SVGSVGElement*
nsSVGElement::GetOwnerSVGElement()
@ -1127,14 +1109,6 @@ nsSVGElement::GetOwnerSVGElement()
return nullptr;
}
NS_IMETHODIMP
nsSVGElement::GetViewportElement(nsIDOMSVGElement * *aViewportElement)
{
nsSVGElement* elem = GetViewportElement();
NS_ADDREF(*aViewportElement = elem);
return NS_OK;
}
nsSVGElement*
nsSVGElement::GetViewportElement()
{
@ -2479,7 +2453,7 @@ nsSVGElement::WillChangeStringList(bool aIsConditionalProcessingAttribute,
{
nsAtom* name;
if (aIsConditionalProcessingAttribute) {
nsCOMPtr<SVGTests> tests(do_QueryInterface(static_cast<nsIDOMSVGElement*>(this)));
nsCOMPtr<SVGTests> tests(do_QueryInterface(static_cast<nsIDOMElement*>(this)));
name = tests->GetAttrName(aAttrEnum);
} else {
name = *GetStringListInfo().mStringListInfo[aAttrEnum].mName;

View File

@ -24,7 +24,7 @@
#include "nsISupportsImpl.h"
#include "nsStyledElement.h"
#include "nsSVGClass.h"
#include "nsIDOMSVGElement.h"
#include "nsIDOMElement.h"
#include "SVGContentUtils.h"
#include "gfxMatrix.h"
@ -70,7 +70,7 @@ struct nsSVGEnumMapping;
typedef nsStyledElement nsSVGElementBase;
class nsSVGElement : public nsSVGElementBase // nsIContent
, public nsIDOMSVGElement
, public nsIDOMElement
{
protected:
explicit nsSVGElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
@ -136,7 +136,7 @@ public:
static const MappedAttributeEntry sLightingEffectsMap[];
static const MappedAttributeEntry sMaskMap[];
NS_DECL_NSIDOMSVGELEMENT
NS_DECL_NSIDOMELEMENT
NS_IMPL_FROMCONTENT(nsSVGElement, kNameSpaceID_SVG)

View File

@ -189,7 +189,7 @@ public:
int32_t aNameSpaceID, nsAtom* aAttribute) const override;
virtual nsSVGString& GetResultImageName() override { return mStringAttributes[RESULT]; }
virtual void GetSourceImageNames(nsTArray<nsSVGStringInfo>& aSources) override;
NS_FORWARD_NSIDOMSVGELEMENT(nsSVGFELightingElementBase::)
NS_FORWARD_NSIDOMELEMENT(nsSVGFELightingElementBase::)
NS_IMETHOD_(bool) IsAttributeMapped(const nsAtom* aAttribute) const override;

View File

@ -91,4 +91,3 @@ Window implements LegacyQueryInterface;
XMLHttpRequest implements LegacyQueryInterface;
XMLHttpRequestUpload implements LegacyQueryInterface;
XMLSerializer implements LegacyQueryInterface;
XPathEvaluator implements LegacyQueryInterface;

View File

@ -6,7 +6,6 @@
[Constructor]
interface XPathEvaluator {
// Based on nsIDOMXPathEvaluator
[NewObject, Throws]
XPathExpression createExpression(DOMString expression,
optional XPathNSResolver? resolver = null);

View File

@ -66,8 +66,6 @@ private:
bool mIsCaseSensitive;
};
NS_IMPL_ISUPPORTS(XPathEvaluator, nsIDOMXPathEvaluator)
XPathEvaluator::XPathEvaluator(nsIDocument* aDocument)
: mDocument(do_GetWeakReference(aDocument))
{
@ -77,40 +75,6 @@ XPathEvaluator::~XPathEvaluator()
{
}
NS_IMETHODIMP
XPathEvaluator::Evaluate(const nsAString & aExpression,
nsIDOMNode *aContextNode,
nsIDOMNode *aResolver,
uint16_t aType,
nsISupports *aInResult,
nsISupports **aResult)
{
nsCOMPtr<nsINode> resolver = do_QueryInterface(aResolver);
ErrorResult rv;
nsAutoPtr<XPathExpression> expression(CreateExpression(aExpression,
resolver, rv));
if (rv.Failed()) {
return rv.StealNSResult();
}
nsCOMPtr<nsINode> node = do_QueryInterface(aContextNode);
if (!node) {
return NS_ERROR_FAILURE;
}
nsCOMPtr<nsIXPathResult> inResult = do_QueryInterface(aInResult);
RefPtr<XPathResult> result =
expression->Evaluate(*node, aType,
static_cast<XPathResult*>(inResult.get()), rv);
if (rv.Failed()) {
return rv.StealNSResult();
}
*aResult = ToSupports(result.forget().take());
return NS_OK;
}
XPathExpression*
XPathEvaluator::CreateExpression(const nsAString& aExpression,
XPathNSResolver* aResolver, ErrorResult& aRv)
@ -164,13 +128,11 @@ XPathEvaluator::WrapObject(JSContext* aCx,
return dom::XPathEvaluatorBinding::Wrap(aCx, this, aGivenProto, aReflector);
}
/* static */
already_AddRefed<XPathEvaluator>
/* static */ XPathEvaluator*
XPathEvaluator::Constructor(const GlobalObject& aGlobal,
ErrorResult& rv)
{
RefPtr<XPathEvaluator> newObj = new XPathEvaluator(nullptr);
return newObj.forget();
return new XPathEvaluator(nullptr);
}
already_AddRefed<XPathResult>

View File

@ -6,7 +6,7 @@
#ifndef mozilla_dom_XPathEvaluator_h
#define mozilla_dom_XPathEvaluator_h
#include "nsIDOMXPathEvaluator.h"
#include "mozilla/dom/NonRefcountedDOMObject.h"
#include "nsIWeakReference.h"
#include "nsAutoPtr.h"
#include "nsString.h"
@ -29,17 +29,11 @@ class XPathResult;
/**
* A class for evaluating an XPath expression string
*/
class XPathEvaluator final : public nsIDOMXPathEvaluator
class XPathEvaluator final : public NonRefcountedDOMObject
{
~XPathEvaluator();
public:
explicit XPathEvaluator(nsIDocument* aDocument = nullptr);
NS_DECL_ISUPPORTS
// nsIDOMXPathEvaluator interface
NS_DECL_NSIDOMXPATHEVALUATOR
~XPathEvaluator();
// WebIDL API
bool WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
@ -48,7 +42,7 @@ public:
nsCOMPtr<nsIDocument> doc = do_QueryReferent(mDocument);
return doc;
}
static already_AddRefed<XPathEvaluator>
static XPathEvaluator*
Constructor(const GlobalObject& aGlobal, ErrorResult& rv);
XPathExpression*
CreateExpression(const nsAString& aExpression,
@ -78,16 +72,6 @@ private:
RefPtr<txResultRecycler> mRecycler;
};
inline nsISupports*
ToSupports(XPathEvaluator* e)
{
return static_cast<nsIDOMXPathEvaluator*>(e);
}
/* d0a75e02-b5e7-11d5-a7f2-df109fb8a1fc */
#define TRANSFORMIIX_XPATH_EVALUATOR_CID \
{ 0xd0a75e02, 0xb5e7, 0x11d5, { 0xa7, 0xf2, 0xdf, 0x10, 0x9f, 0xb8, 0xa1, 0xfc } }
} // namespace dom
} // namespace mozilla

View File

@ -223,7 +223,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(HTMLEditor)
already_AddRefed<nsIPresentationService> NS_CreatePresentationService();
// Factory Constructor
NS_GENERIC_FACTORY_CONSTRUCTOR(XPathEvaluator)
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(txNodeSetAdaptor, Init)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDOMSerializer)
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(XMLHttpRequestMainThread, Init)
@ -593,7 +592,6 @@ NS_DEFINE_NAMED_CID(NS_PLUGINDOCLOADERFACTORY_CID);
NS_DEFINE_NAMED_CID(NS_PLUGINDOCUMENT_CID);
NS_DEFINE_NAMED_CID(NS_VIDEODOCUMENT_CID);
NS_DEFINE_NAMED_CID(NS_STYLESHEETSERVICE_CID);
NS_DEFINE_NAMED_CID(TRANSFORMIIX_XPATH_EVALUATOR_CID);
NS_DEFINE_NAMED_CID(TRANSFORMIIX_NODESET_CID);
NS_DEFINE_NAMED_CID(NS_XMLSERIALIZER_CID);
NS_DEFINE_NAMED_CID(NS_FORMDATA_CID);
@ -844,7 +842,6 @@ static const mozilla::Module::CIDEntry kLayoutCIDs[] = {
{ &kNS_PLUGINDOCUMENT_CID, false, nullptr, CreatePluginDocument },
{ &kNS_VIDEODOCUMENT_CID, false, nullptr, CreateVideoDocument },
{ &kNS_STYLESHEETSERVICE_CID, false, nullptr, nsStyleSheetServiceConstructor },
{ &kTRANSFORMIIX_XPATH_EVALUATOR_CID, false, nullptr, XPathEvaluatorConstructor },
{ &kTRANSFORMIIX_NODESET_CID, false, nullptr, txNodeSetAdaptorConstructor },
{ &kNS_XMLSERIALIZER_CID, false, nullptr, nsDOMSerializerConstructor },
{ &kNS_FORMDATA_CID, false, nullptr, FormDataConstructor },
@ -961,7 +958,6 @@ static const mozilla::Module::ContractIDEntry kLayoutContracts[] = {
{ NS_WINDOWCONTROLLER_CONTRACTID, &kNS_WINDOWCONTROLLER_CID },
{ PLUGIN_DLF_CONTRACTID, &kNS_PLUGINDOCLOADERFACTORY_CID },
{ NS_STYLESHEETSERVICE_CONTRACTID, &kNS_STYLESHEETSERVICE_CID },
{ NS_XPATH_EVALUATOR_CONTRACTID, &kTRANSFORMIIX_XPATH_EVALUATOR_CID },
{ TRANSFORMIIX_NODESET_CONTRACTID, &kTRANSFORMIIX_NODESET_CID },
{ NS_XMLSERIALIZER_CONTRACTID, &kNS_XMLSERIALIZER_CID },
{ NS_FORMDATA_CONTRACTID, &kNS_FORMDATA_CID },

View File

@ -24,6 +24,7 @@ MediaQueryList::MediaQueryList(nsIDocument* aDocument,
const nsAString& aMediaQueryList,
CallerType aCallerType)
: mDocument(aDocument)
, mMatches(false)
, mMatchesValid(false)
{
mMediaList =
@ -138,6 +139,8 @@ MediaQueryList::Disconnect()
void
MediaQueryList::RecomputeMatches()
{
mMatches = false;
if (!mDocument) {
return;
}

View File

@ -86,26 +86,6 @@ public class TestGeckoProfile {
assertEquals("Client ID from method matches ID written to disk", validClientId, clientIdFromProfile);
}
@Test
public void testGetClientIdMigrateFromFHR() throws Exception {
final File fhrClientIdFile = new File(profileDir, "healthreport/state.json");
final String fhrClientId = "905de1c0-0ea6-4a43-95f9-6170035f5a82";
assertFalse("client ID file does not exist", clientIdFile.exists());
assertTrue("Created FHR data directory", new File(profileDir, "healthreport").mkdirs());
writeClientIdToFile(fhrClientIdFile, fhrClientId);
assertEquals("Migrated Client ID equals FHR client ID", fhrClientId, profile.getClientId());
// Verify migration wrote to contemporary client ID file.
assertTrue("Client ID file created during migration", clientIdFile.exists());
assertEquals("Migrated client ID on disk equals value returned from method",
fhrClientId, readClientIdFromFile(clientIdFile));
assertTrue("Deleted FHR clientID file", fhrClientIdFile.delete());
assertEquals("Ensure method calls read from newly created client ID file & not FHR client ID file",
fhrClientId, profile.getClientId());
}
@Test
public void testGetClientIdInvalidIdOnDisk() throws Exception {
assertTrue("Created the parent dirs of the client ID file", clientIdFile.getParentFile().mkdirs());

View File

@ -44,7 +44,6 @@ public final class GeckoProfile {
// The path in the profile to the file containing the client ID.
private static final String CLIENT_ID_FILE_PATH = "datareporting/state.json";
private static final String FHR_CLIENT_ID_FILE_PATH = "healthreport/state.json";
// In the client ID file, the attribute title in the JSON object containing the client ID value.
private static final String CLIENT_ID_JSON_ATTR = "clientID";
@ -430,8 +429,8 @@ public final class GeckoProfile {
}
/**
* Retrieves the Gecko client ID from the filesystem. If the client ID does not exist, we attempt to migrate and
* persist it from FHR and, if that fails, we attempt to create a new one ourselves.
* Retrieves the Gecko client ID from the filesystem. If the client ID does not exist,
* we attempt to create a new one ourselves.
*
* This method assumes the client ID is located in a file at a hard-coded path within the profile. The format of
* this file is a JSONObject which at the bottom level contains a String -&gt; String mapping containing the client ID.
@ -454,17 +453,10 @@ public final class GeckoProfile {
return getValidClientIdFromDisk(CLIENT_ID_FILE_PATH);
} catch (final IOException e) {
// Avoid log spam: don't log the full Exception w/ the stack trace.
Log.d(LOGTAG, "Could not get client ID - attempting to migrate ID from FHR: " + e.getLocalizedMessage());
Log.d(LOGTAG, "Could not get client ID - creating a new one: " + e.getLocalizedMessage());
}
String clientIdToWrite;
try {
clientIdToWrite = getValidClientIdFromDisk(FHR_CLIENT_ID_FILE_PATH);
} catch (final IOException e) {
// Avoid log spam: don't log the full Exception w/ the stack trace.
Log.d(LOGTAG, "Could not migrate client ID from FHR - creating a new one: " + e.getLocalizedMessage());
clientIdToWrite = generateNewClientId();
}
String clientIdToWrite = generateNewClientId();
// There is a possibility Gecko is running and the Gecko telemetry implementation decided it's time to generate
// the client ID, writing client ID underneath us. Since it's highly unlikely (e.g. we run in onStart before

View File

@ -147,7 +147,6 @@
#endif
@BINPATH@/components/dom_xbl.xpt
@BINPATH@/components/dom_xhr.xpt
@BINPATH@/components/dom_xpath.xpt
@BINPATH@/components/dom_xul.xpt
@BINPATH@/components/dom_presentation.xpt
@BINPATH@/components/downloads.xpt
@ -480,8 +479,6 @@
; svg
@BINPATH@/res/svg.css
@BINPATH@/components/dom_svg.xpt
@BINPATH@/components/dom_smil.xpt
; [Personal Security Manager]
;

View File

@ -46,7 +46,7 @@ function queryElement(contentWindow, data) {
}
if (data.hasOwnProperty("xpath")) {
let xptype = Ci.nsIDOMXPathResult.FIRST_ORDERED_NODE_TYPE;
let xptype = XPathResult.FIRST_ORDERED_NODE_TYPE;
return doc.evaluate(data.xpath, doc, null, xptype, null).singleNodeValue;
}

View File

@ -7,20 +7,14 @@ package org.mozilla.gecko.tests;
import static org.mozilla.gecko.tests.helpers.AssertionHelper.*;
import android.util.Log;
import org.json.JSONException;
import org.json.JSONObject;
import org.mozilla.gecko.GeckoProfile;
import java.io.File;
import java.io.IOException;
import java.util.UUID;
public class testUnifiedTelemetryClientId extends JavascriptBridgeTest {
private static final String TEST_JS = "testUnifiedTelemetryClientId.js";
private static final String CLIENT_ID_PATH = "datareporting/state.json";
private static final String FHR_DIR_PATH = "healthreport/";
private static final String FHR_CLIENT_ID_PATH = FHR_DIR_PATH + "state.json";
private GeckoProfile profile;
private File profileDir;
@ -32,8 +26,6 @@ public class testUnifiedTelemetryClientId extends JavascriptBridgeTest {
profileDir = profile.getDir(); // Assumes getDir is tested.
filesToDeleteOnReset = new File[] {
getClientIdFile(),
getFHRClientIdFile(),
getFHRClientIdParentDir(),
};
}
@ -83,9 +75,6 @@ public class testUnifiedTelemetryClientId extends JavascriptBridgeTest {
deleteClientIDFiles();
testJsCreatesClientId(); // leaves cache filled.
deleteClientIDFiles();
testJavaMigratesFromHealthReport(); // leaves cache filled.
deleteClientIDFiles();
testJsMigratesFromHealthReport(); // leaves cache filled.
getJS().syncCall("endTest");
}
@ -144,70 +133,6 @@ public class testUnifiedTelemetryClientId extends JavascriptBridgeTest {
fAssertEquals("Same client ID retrieved from Java", clientIdFromJS, clientIdFromJavaAgain);
}
/**
* Scenario: Java migrates client ID from FHR client ID file.
* * FHR file already exists.
* * Fennec starts on fresh profile
* * Java code merges client ID to datareporting/state.json from healthreport/state.json
* * Js accesses client ID from the same file
* * Assert the client IDs are the same
*/
private void testJavaMigratesFromHealthReport() throws Exception {
Log.d(LOGTAG, "testJavaMigratesFromHealthReport: start");
fAssertFalse("Client id file does not exist yet", getClientIdFile().exists());
fAssertFalse("Health report file does not exist yet", getFHRClientIdFile().exists());
final String expectedClientId = UUID.randomUUID().toString();
createFHRClientIdFile(expectedClientId);
final String clientIdFromJava = getClientIdFromJava();
fAssertEquals("Health report client ID merged by Java", expectedClientId, clientIdFromJava);
resetJSCache();
final String clientIdFromJS = getClientIdFromJS();
fAssertEquals("Merged client ID read by JS", expectedClientId, clientIdFromJS);
final String clientIdFromJavaAgain = getClientIdFromJava();
final String clientIdFromJSCache = getClientIdFromJS();
resetJSCache();
final String clientIdFromJSFileAgain = getClientIdFromJS();
fAssertEquals("Same client ID retrieved from Java", expectedClientId, clientIdFromJavaAgain);
fAssertEquals("Same client ID retrieved from JS cache", expectedClientId, clientIdFromJSCache);
fAssertEquals("Same client ID retrieved from JS file", expectedClientId, clientIdFromJSFileAgain);
}
/**
* Scenario: JS merges client ID from FHR client ID file.
* * FHR file already exists.
* * Fennec starts on a fresh profile
* * Js merges the client ID to datareporting/state.json from healthreport/state.json
* * Java access the client ID from the same file
* * Assert the client IDs are the same
*/
private void testJsMigratesFromHealthReport() throws Exception {
Log.d(LOGTAG, "testJsMigratesFromHealthReport: start");
fAssertFalse("Client id file does not exist yet", getClientIdFile().exists());
fAssertFalse("Health report file does not exist yet", getFHRClientIdFile().exists());
final String expectedClientId = UUID.randomUUID().toString();
createFHRClientIdFile(expectedClientId);
resetJSCache();
final String clientIdFromJS = getClientIdFromJS();
fAssertEquals("Health report client ID merged by JS", expectedClientId, clientIdFromJS);
final String clientIdFromJava = getClientIdFromJava();
fAssertEquals("Merged client ID read by Java", expectedClientId, clientIdFromJava);
final String clientIdFromJavaAgain = getClientIdFromJava();
final String clientIdFromJSCache = getClientIdFromJS();
resetJSCache();
final String clientIdFromJSFileAgain = getClientIdFromJS();
fAssertEquals("Same client ID retrieved from Java", expectedClientId, clientIdFromJavaAgain);
fAssertEquals("Same client ID retrieved from JS cache", expectedClientId, clientIdFromJSCache);
fAssertEquals("Same client ID retrieved from JS file", expectedClientId, clientIdFromJSFileAgain);
}
private String getClientIdFromJava() throws IOException {
// This assumes implementation details: it assumes the client ID
// file is created when Java attempts to retrieve it if it does not exist.
@ -245,21 +170,4 @@ public class testUnifiedTelemetryClientId extends JavascriptBridgeTest {
private File getClientIdFile() {
return new File(profileDir, CLIENT_ID_PATH);
}
private File getFHRClientIdParentDir() {
return new File(profileDir, FHR_DIR_PATH);
}
private File getFHRClientIdFile() {
return new File(profileDir, FHR_CLIENT_ID_PATH);
}
private void createFHRClientIdFile(final String clientId) throws JSONException {
fAssertTrue("FHR directory created", getFHRClientIdParentDir().mkdirs());
final JSONObject obj = new JSONObject();
obj.put("clientID", clientId);
profile.writeFile(FHR_CLIENT_ID_PATH, obj.toString());
fAssertTrue("FHR client ID file exists after writing", getFHRClientIdFile().exists());
}
}

View File

@ -3965,11 +3965,16 @@ pref("intl.tsf.associate_imc_only_when_imm_ime_is_active", false);
// Whether creates native caret for ATOK or not.
pref("intl.tsf.hack.atok.create_native_caret", true);
// Whether use available composition string rect for result of
// ITfContextView::GetTextExt() even if the specified range is same as the
// ITextStoreACP::GetTextExt() even if the specified range is same as the
// range of composition string but some character rects of them are not
// available. Note that this is ignored if active ATOK is or older than 2016
// and create_native_caret is true.
pref("intl.tsf.hack.atok.do_not_return_no_layout_error_of_composition_string", true);
// Whether use available composition string rect for result of
// ITextStoreACP::GetTextExt() even if the specified range is same as or is in
// the range of composition string but some character rects of them are not
// available.
pref("intl.tsf.hack.japanist10.do_not_return_no_layout_error_of_composition_string", true);
// Whether use composition start position for the result of
// ITfContextView::GetTextExt() if the specified range is larger than
// composition start offset.

View File

@ -53,10 +53,9 @@ this.EXPORTED_SYMBOLS = [
"WebElement",
];
const {
FIRST_ORDERED_NODE_TYPE,
ORDERED_NODE_ITERATOR_TYPE,
} = Ci.nsIDOMXPathResult;
const ORDERED_NODE_ITERATOR_TYPE = 5;
const FIRST_ORDERED_NODE_TYPE = 9;
const ELEMENT_NODE = 1;
const DOCUMENT_NODE = 9;

View File

@ -25,10 +25,9 @@ this.EXPORTED_SYMBOLS = [
"WebElement",
];
const {
FIRST_ORDERED_NODE_TYPE,
ORDERED_NODE_ITERATOR_TYPE,
} = Ci.nsIDOMXPathResult;
const ORDERED_NODE_ITERATOR_TYPE = 5;
const FIRST_ORDERED_NODE_TYPE = 9;
const ELEMENT_NODE = 1;
const DOCUMENT_NODE = 9;

View File

@ -43,8 +43,7 @@ function isValidClientID(id) {
this.ClientID = Object.freeze({
/**
* This returns a promise resolving to the the stable client ID we use for
* data reporting (FHR & Telemetry). Previously exising FHR client IDs are
* migrated to this.
* data reporting (FHR & Telemetry).
*
* WARNING: This functionality is duplicated for Android (see GeckoProfile.getClientId
* for more). There are Java tests (TestGeckoProfile) to ensure the functionality is
@ -94,13 +93,12 @@ var ClientIDImpl = {
return this._loadClientIdTask;
},
/**
* Load the Client ID from the DataReporting Service state file.
* If no Client ID is found, we generate a new one.
*/
async _doLoadClientID() {
// As we want to correlate FHR and telemetry data (and move towards unifying the two),
// we first moved the ID management from the FHR implementation to the datareporting
// service, then to a common shared module.
// Consequently, we try to import an existing FHR ID, so we can keep using it.
// Try to load the client id from the DRS state file first.
// Try to load the client id from the DRS state file.
try {
let state = await CommonUtils.readJSON(gStateFilePath);
if (state && this.updateClientID(state.clientID)) {
@ -110,19 +108,7 @@ var ClientIDImpl = {
// fall through to next option
}
// If we dont have DRS state yet, try to import from the FHR state.
try {
let fhrStatePath = OS.Path.join(OS.Constants.Path.profileDir, "healthreport", "state.json");
let state = await CommonUtils.readJSON(fhrStatePath);
if (state && this.updateClientID(state.clientID)) {
this._saveClientID();
return this._clientID;
}
} catch (e) {
// fall through to next option
}
// We dont have an id from FHR yet, generate a new ID.
// We dont have an id from the DRS state file yet, generate a new ID.
this.updateClientID(CommonUtils.generateUUID());
this._saveClientIdTask = this._saveClientID();
@ -149,8 +135,7 @@ var ClientIDImpl = {
/**
* This returns a promise resolving to the the stable client ID we use for
* data reporting (FHR & Telemetry). Previously exising FHR client IDs are
* migrated to this.
* data reporting (FHR & Telemetry).
*
* @return {Promise<string>} The stable client ID.
*/

View File

@ -120,7 +120,7 @@ var FormDataInternal = {
* Resolves an XPath query generated by node.generateXPath.
*/
resolve(aDocument, aQuery) {
let xptype = Components.interfaces.nsIDOMXPathResult.FIRST_ORDERED_NODE_TYPE;
let xptype = aDocument.defaultView.XPathResult.FIRST_ORDERED_NODE_TYPE;
return aDocument.evaluate(aQuery, aDocument, this.resolveNS.bind(this), xptype, null).singleNodeValue;
},
@ -173,7 +173,7 @@ var FormDataInternal = {
this.restorableFormNodesXPath,
doc,
this.resolveNS.bind(this),
Ci.nsIDOMXPathResult.UNORDERED_NODE_ITERATOR_TYPE, null
doc.defaultView.XPathResult.UNORDERED_NODE_ITERATOR_TYPE, null
);
let node;

View File

@ -15,8 +15,6 @@ function run_test() {
add_task(async function() {
const drsPath = OS.Path.join(OS.Constants.Path.profileDir, "datareporting", "state.json");
const fhrDir = OS.Path.join(OS.Constants.Path.profileDir, "healthreport");
const fhrPath = OS.Path.join(fhrDir, "state.json");
const uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
const invalidIDs = [
[-1, "setIntPref"],
@ -28,58 +26,22 @@ add_task(async function() {
];
const PREF_CACHED_CLIENTID = "toolkit.telemetry.cachedClientID";
await OS.File.makeDir(fhrDir);
// Check that we are importing the FHR client ID.
let clientID = CommonUtils.generateUUID();
await CommonUtils.writeJSON({clientID}, fhrPath);
Assert.equal(clientID, await ClientID.getClientID());
// We should persist the ID in DRS now and not pick up a differing ID from FHR.
// If there is no DRS file, we should get a new client ID.
await ClientID._reset();
await CommonUtils.writeJSON({clientID: CommonUtils.generateUUID()}, fhrPath);
Assert.equal(clientID, await ClientID.getClientID());
// We should be guarded against broken FHR data.
for (let invalidID of invalidIDs) {
await ClientID._reset();
await OS.File.remove(drsPath);
await CommonUtils.writeJSON({clientID: invalidID}, fhrPath);
clientID = await ClientID.getClientID();
Assert.equal(typeof(clientID), "string");
Assert.ok(uuidRegex.test(clientID));
}
// We should be guarded against invalid FHR json.
await ClientID._reset();
await OS.File.remove(drsPath);
await OS.File.writeAtomic(fhrPath, "abcd", {encoding: "utf-8", tmpPath: fhrPath + ".tmp"});
clientID = await ClientID.getClientID();
let clientID = await ClientID.getClientID();
Assert.equal(typeof(clientID), "string");
Assert.ok(uuidRegex.test(clientID));
// We should be guarded against broken DRS data too and fall back to loading
// the FHR ID.
for (let invalidID of invalidIDs) {
await ClientID._reset();
clientID = CommonUtils.generateUUID();
await CommonUtils.writeJSON({clientID}, fhrPath);
await CommonUtils.writeJSON({clientID: invalidID}, drsPath);
Assert.equal(clientID, await ClientID.getClientID());
}
// We should be guarded against invalid DRS json too.
// We should be guarded against invalid DRS json.
await ClientID._reset();
await OS.File.remove(fhrPath);
await OS.File.writeAtomic(drsPath, "abcd", {encoding: "utf-8", tmpPath: drsPath + ".tmp"});
clientID = await ClientID.getClientID();
Assert.equal(typeof(clientID), "string");
Assert.ok(uuidRegex.test(clientID));
// If both the FHR and DSR data are broken, we should end up with a new client ID.
// If the DRS data is broken, we should end up with a new client ID.
for (let [invalidID, ] of invalidIDs) {
await ClientID._reset();
await CommonUtils.writeJSON({clientID: invalidID}, fhrPath);
await CommonUtils.writeJSON({clientID: invalidID}, drsPath);
clientID = await ClientID.getClientID();
Assert.equal(typeof(clientID), "string");

View File

@ -479,7 +479,6 @@ STUB(gtk_widget_set_parent_window)
STUB(gtk_widget_set_realized)
STUB(gtk_widget_set_redraw_on_allocate)
STUB(gtk_widget_set_sensitive)
STUB(gtk_widget_set_valign)
STUB(gtk_widget_set_window)
STUB(gtk_widget_show)
STUB(gtk_widget_show_all)
@ -603,6 +602,7 @@ STUB(gtk_widget_path_iter_add_class)
STUB(gtk_widget_path_get_object_type)
STUB(gtk_widget_path_new)
STUB(gtk_widget_path_unref)
STUB(gtk_widget_set_valign)
STUB(gtk_widget_set_visual)
STUB(gtk_app_chooser_dialog_new_for_content_type)
STUB(gtk_app_chooser_get_type)

View File

@ -1096,6 +1096,7 @@ public:
DECL_AND_IMPL_IS_TIP_ACTIVE(IsATOK2014Active)
DECL_AND_IMPL_IS_TIP_ACTIVE(IsATOK2015Active)
DECL_AND_IMPL_IS_TIP_ACTIVE(IsATOK2016Active)
DECL_AND_IMPL_IS_TIP_ACTIVE(IsJapanist10Active)
DECL_AND_IMPL_IS_TIP_ACTIVE(IsMSBopomofoActive)
DECL_AND_IMPL_IS_TIP_ACTIVE(IsMSChangJieActive)
@ -1247,8 +1248,15 @@ private:
// * ATOK Passport (confirmed with version 31.1.2)
// - {A38F2FD9-7199-45E1-841C-BE0313D8052F}
// * Japanist 10
// - {E6D66705-1EDA-4373-8D01-1D0CB2D054C7}
bool IsJapanist10ActiveInternal() const
{
// {E6D66705-1EDA-4373-8D01-1D0CB2D054C7}
static const GUID kGUID = {
0xE6D66705, 0x1EDA, 0x4373,
{ 0x8D, 0x01, 0x1D, 0x0C, 0xB2, 0xD0, 0x54, 0xC7 }
};
return mActiveTIPGUID == kGUID;
}
/****************************************************************************
* Traditional Chinese TIP
@ -1705,6 +1713,10 @@ public:
DECL_AND_IMPL_BOOL_PREF(
"intl.tsf.hack.atok.do_not_return_no_layout_error_of_composition_string",
DoNotReturnNoLayoutErrorToATOKOfCompositionString, true)
DECL_AND_IMPL_BOOL_PREF(
"intl.tsf.hack.japanist10."
"do_not_return_no_layout_error_of_composition_string",
DoNotReturnNoLayoutErrorToJapanist10OfCompositionString, true)
DECL_AND_IMPL_BOOL_PREF(
"intl.tsf.hack.ms_simplified_chinese.do_not_return_no_layout_error",
DoNotReturnNoLayoutErrorToMSSimplifiedTIP, true)
@ -3360,7 +3372,7 @@ TSFTextStore::SetSelectionInternal(const TS_SELECTION_ACP* pSelection,
// Perhaps, we can ignore the difference change because it must not be
// important for following edit.
if (selectionForTSF.EqualsExceptDirection(*pSelection)) {
MOZ_LOG(sTextStoreLog, LogLevel::Error,
MOZ_LOG(sTextStoreLog, LogLevel::Warning,
("0x%p TSFTextStore::SetSelectionInternal() Succeeded but "
"did nothing because the selection range isn't changing", this));
selectionForTSF.SetSelection(*pSelection);
@ -4253,8 +4265,20 @@ TSFTextStore::GetTextExt(TsViewCookie vcView,
MOZ_LOG(sTextStoreLog, LogLevel::Info,
("0x%p TSFTextStore::GetTextExt(vcView=%ld, "
"acpStart=%ld, acpEnd=%ld, prc=0x%p, pfClipped=0x%p), "
"IsHandlingComposition()=%s, "
"mContentForTSF={ MinOffsetOfLayoutChanged()=%u, "
"LatestCompositionStartOffset()=%d, LatestCompositionEndOffset()=%d }, "
"mComposition= { IsComposing()=%s, mStart=%d, EndOffset()=%d }, "
"mDeferNotifyingTSF=%s, mWaitingQueryLayout=%s",
this, vcView, acpStart, acpEnd, prc, pfClipped,
GetBoolName(IsHandlingComposition()),
mContentForTSF.MinOffsetOfLayoutChanged(),
mContentForTSF.HasOrHadComposition() ?
mContentForTSF.LatestCompositionStartOffset() : -1,
mContentForTSF.HasOrHadComposition() ?
mContentForTSF.LatestCompositionEndOffset() : -1,
GetBoolName(mComposition.IsComposing()),
mComposition.mStart, mComposition.EndOffset(),
GetBoolName(mDeferNotifyingTSF), GetBoolName(mWaitingQueryLayout)));
if (!IsReadLocked()) {
@ -4278,6 +4302,16 @@ TSFTextStore::GetTextExt(TsViewCookie vcView,
return E_INVALIDARG;
}
// According to MSDN, ITextStoreACP::GetTextExt() should return
// TS_E_INVALIDARG when acpStart and acpEnd are same (i.e., collapsed range).
// https://msdn.microsoft.com/en-us/library/windows/desktop/ms538435(v=vs.85).aspx
// > TS_E_INVALIDARG: The specified start and end character positions are
// > equal.
// However, some TIPs (including Microsoft's Chinese TIPs!) call this with
// collapsed range and if we return TS_E_INVALIDARG, they stops showing their
// owning window or shows it but odd position. So, we should just return
// error only when acpStart and/or acpEnd are really odd.
if (acpStart < 0 || acpEnd < acpStart) {
MOZ_LOG(sTextStoreLog, LogLevel::Error,
("0x%p TSFTextStore::GetTextExt() FAILED due to "
@ -4378,6 +4412,19 @@ TSFTextStore::GetTextExt(TsViewCookie vcView,
mContentForTSF.LatestCompositionEndOffset() == acpEnd) {
dontReturnNoLayoutError = true;
}
// Japanist 10 fails to handle TS_E_NOLAYOUT when it decides the position of
// candidate window. In such case, Japanist shows candidate window at
// top-left of the screen. So, we should return the nearest caret rect
// where we know.
else if (
TSFPrefs::DoNotReturnNoLayoutErrorToJapanist10OfCompositionString() &&
TSFStaticSink::IsJapanist10Active() &&
acpStart >= mContentForTSF.LatestCompositionStartOffset() &&
acpStart <= mContentForTSF.LatestCompositionEndOffset() &&
acpEnd >= mContentForTSF.LatestCompositionStartOffset() &&
acpEnd <= mContentForTSF.LatestCompositionEndOffset()) {
dontReturnNoLayoutError = true;
}
// Free ChangJie 2010 doesn't handle ITfContextView::GetTextExt() properly.
// Prehaps, it's due to the bug of TSF. We need to check if this is
// necessary on Windows 10 before disabling this on Windows 10.
@ -4414,6 +4461,7 @@ TSFTextStore::GetTextExt(TsViewCookie vcView,
this, mContentForTSF.MinOffsetOfLayoutChanged()));
return E_FAIL;
}
bool collapsed = acpStart == acpEnd;
// Note that even if all characters in the editor or the composition
// string was modified, 0 or start offset of the composition string is
// useful because it may return caret rect or old character's rect which
@ -4422,21 +4470,45 @@ TSFTextStore::GetTextExt(TsViewCookie vcView,
static_cast<int32_t>(mContentForTSF.MinOffsetOfLayoutChanged());
LONG lastUnmodifiedOffset = std::max(firstModifiedOffset - 1, 0);
if (mContentForTSF.IsLayoutChangedAt(acpStart)) {
// If TSF queries text rect in composition string, we should return
// rect at start of the composition even if its layout is changed.
if (acpStart >= mContentForTSF.LatestCompositionStartOffset()) {
acpStart = mContentForTSF.LatestCompositionStartOffset();
// If mContentForTSF has last composition string and current
// composition string, we can assume that ContentCacheInParent has
// cached rects of composition string at least length of current
// composition string. Otherwise, we can assume that rect for
// first character of composition string is stored since it was
// selection start or caret position.
LONG maxCachedOffset = mContentForTSF.LatestCompositionEndOffset();
if (mContentForTSF.WasLastComposition()) {
maxCachedOffset =
std::min(maxCachedOffset,
mContentForTSF.LastCompositionStringEndOffset());
}
acpStart = std::min(acpStart, maxCachedOffset);
}
// Otherwise, use first character's rect. Even if there is no
// characters, the query event will return caret rect instead.
// Otherwise, we don't know which character rects are cached. So, we
// need to use first unmodified character's rect in this case. Even
// if there is no character, the query event will return caret rect
// instead.
else {
acpStart = lastUnmodifiedOffset;
}
MOZ_ASSERT(acpStart <= acpEnd);
}
if (mContentForTSF.IsLayoutChangedAt(acpEnd)) {
// Use max larger offset of last unmodified offset or acpStart which
// may be the first character offset of the composition string.
// If TIP requests caret rect with collapsed range, we should keep
// collapsing the range.
if (collapsed) {
acpEnd = acpStart;
}
// Let's set acpEnd to larger offset of last unmodified offset or
// acpStart which may be the first character offset of the composition
// string. However, some TIPs may want to know the right edge of the
// range. Therefore, if acpEnd is in composition string and active TIP
// doesn't retrieve caret rect (i.e., the range isn't collapsed), we
// should keep using the original acpEnd. Otherwise, we should set
// acpEnd to larger value of acpStart and lastUnmodifiedOffset.
else if (mContentForTSF.IsLayoutChangedAt(acpEnd) &&
(acpEnd < mContentForTSF.LatestCompositionStartOffset() ||
acpEnd > mContentForTSF.LatestCompositionEndOffset())) {
acpEnd = std::max(acpStart, lastUnmodifiedOffset);
}
MOZ_LOG(sTextStoreLog, LogLevel::Debug,
@ -5919,6 +5991,9 @@ TSFTextStore::OnUpdateCompositionInternal()
return NS_OK;
}
// Update cached data now because all pending events have been handled now.
mContentForTSF.OnCompositionEventsHandled();
// If composition is completely finished both in TSF/TIP and the focused
// editor which may be in a remote process, we can clear the cache and don't
// have it until starting next composition.

View File

@ -785,6 +785,7 @@ protected:
{
mText.Truncate();
mLastCompositionString.Truncate();
mLastCompositionStart = -1;
mInitialized = false;
}
@ -795,8 +796,10 @@ protected:
mText = aText;
if (mComposition.IsComposing()) {
mLastCompositionString = mComposition.mString;
mLastCompositionStart = mComposition.mStart;
} else {
mLastCompositionString.Truncate();
mLastCompositionStart = -1;
}
mMinTextModifiedOffset = NOT_MODIFIED;
mLatestCompositionStartOffset = mLatestCompositionEndOffset = LONG_MAX;
@ -808,6 +811,23 @@ protected:
mMinTextModifiedOffset = NOT_MODIFIED;
}
// OnCompositionEventsHandled() is called when all pending composition
// events are handled in the focused content which may be in a remote
// process.
void OnCompositionEventsHandled()
{
if (!mInitialized) {
return;
}
if (mComposition.IsComposing()) {
mLastCompositionString = mComposition.mString;
mLastCompositionStart = mComposition.mStart;
} else {
mLastCompositionString.Truncate();
mLastCompositionStart = -1;
}
}
const nsDependentSubstring GetSelectedText() const;
const nsDependentSubstring GetSubstring(uint32_t aStart,
uint32_t aLength) const;
@ -846,6 +866,17 @@ protected:
MOZ_ASSERT(mInitialized);
return mLastCompositionString;
}
LONG LastCompositionStringEndOffset() const
{
MOZ_ASSERT(mInitialized);
MOZ_ASSERT(WasLastComposition());
return mLastCompositionStart + mLastCompositionString.Length();
}
bool WasLastComposition() const
{
MOZ_ASSERT(mInitialized);
return mLastCompositionStart >= 0;
}
uint32_t MinTextModifiedOffset() const
{
MOZ_ASSERT(mInitialized);
@ -900,6 +931,10 @@ protected:
TSFTextStore::Composition& mComposition;
TSFTextStore::Selection& mSelection;
// mLastCompositionStart stores the start offset of composition when
// mLastCompositionString is set.
LONG mLastCompositionStart;
// The latest composition's start and end offset. If composition hasn't
// been started since this instance is initialized, they are LONG_MAX.
LONG mLatestCompositionStartOffset;

View File

@ -58,17 +58,13 @@
#include "nsIDOMScrollAreaEvent.h"
#include "nsIDOMSerializer.h"
#include "nsIDOMSimpleGestureEvent.h"
#include "nsIDOMSVGElement.h"
#include "nsIDOMText.h"
#include "nsIDOMTimeEvent.h"
#include "nsIDOMTimeRanges.h"
#include "nsIDOMTransitionEvent.h"
#include "nsIDOMUIEvent.h"
#include "nsIDOMValidityState.h"
#include "nsIDOMWheelEvent.h"
#include "nsIDOMXMLDocument.h"
#include "nsIDOMXPathEvaluator.h"
#include "nsIDOMXPathResult.h"
#include "nsIDOMXULCommandEvent.h"
#include "nsIDOMXULElement.h"
#include "nsIFrameLoader.h"
@ -164,8 +160,6 @@
#include "mozilla/dom/XMLHttpRequestEventTargetBinding.h"
#include "mozilla/dom/XMLHttpRequestUploadBinding.h"
#include "mozilla/dom/XMLSerializerBinding.h"
#include "mozilla/dom/XPathEvaluatorBinding.h"
#include "mozilla/dom/XPathResultBinding.h"
#include "mozilla/dom/XULCommandEventBinding.h"
#include "mozilla/dom/XULDocumentBinding.h"
#include "mozilla/dom/XULElementBinding.h"
@ -280,9 +274,7 @@ const ComponentsInterfaceShimEntry kComponentsInterfaceShimMap[] =
DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIScrollBoxObject, ScrollBoxObject),
DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIDOMSerializer, XMLSerializer),
DEFINE_SHIM(SimpleGestureEvent),
DEFINE_SHIM(SVGElement),
DEFINE_SHIM(Text),
DEFINE_SHIM(TimeEvent),
DEFINE_SHIM(TimeRanges),
DEFINE_SHIM(TransitionEvent),
DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsITreeBoxObject, TreeBoxObject),
@ -293,8 +285,6 @@ const ComponentsInterfaceShimEntry kComponentsInterfaceShimMap[] =
DEFINE_SHIM(XMLDocument),
DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIXMLHttpRequestEventTarget, XMLHttpRequestEventTarget),
DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIXMLHttpRequestUpload, XMLHttpRequestUpload),
DEFINE_SHIM(XPathEvaluator),
DEFINE_SHIM(XPathResult),
DEFINE_SHIM(XULCommandEvent),
DEFINE_SHIM(XULElement),
DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsISelection, Selection),