зеркало из https://github.com/mozilla/gecko-dev.git
Merge inbound to mozilla-central. a=merge
This commit is contained in:
Коммит
af897e281a
|
@ -2452,8 +2452,7 @@ Accessible* Accessible::CurrentItem() const {
|
|||
dom::Document* DOMDoc = mContent->OwnerDoc();
|
||||
dom::Element* activeDescendantElm = DOMDoc->GetElementById(id);
|
||||
if (activeDescendantElm) {
|
||||
if (nsContentUtils::ContentIsDescendantOf(mContent,
|
||||
activeDescendantElm)) {
|
||||
if (mContent->IsInclusiveDescendantOf(activeDescendantElm)) {
|
||||
// Don't want a cyclical descendant relationship. That would be bad.
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
@ -1938,7 +1938,7 @@ void DocAccessible::DoARIAOwnsRelocation(Accessible* aOwner) {
|
|||
// Make an attempt to create an accessible if it wasn't created yet.
|
||||
if (!child) {
|
||||
// An owned child cannot be an ancestor of the owner.
|
||||
if (nsContentUtils::ContentIsDescendantOf(aOwner->Elm(), childEl)) {
|
||||
if (aOwner->Elm()->IsInclusiveDescendantOf(childEl)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -1530,12 +1530,12 @@ bool HyperTextAccessible::SelectionBoundsAt(int32_t aSelectionNum,
|
|||
endOffset = tempOffset;
|
||||
}
|
||||
|
||||
if (!nsContentUtils::ContentIsDescendantOf(startNode, mContent))
|
||||
if (!startNode->IsInclusiveDescendantOf(mContent))
|
||||
*aStartOffset = 0;
|
||||
else
|
||||
*aStartOffset = DOMPointToOffset(startNode, startOffset);
|
||||
|
||||
if (!nsContentUtils::ContentIsDescendantOf(endNode, mContent))
|
||||
if (!endNode->IsInclusiveDescendantOf(mContent))
|
||||
*aEndOffset = CharacterCount();
|
||||
else
|
||||
*aEndOffset = DOMPointToOffset(endNode, endOffset, true);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
This is the PDF.js project output, https://github.com/mozilla/pdf.js
|
||||
|
||||
Current extension version is: 2.3.13
|
||||
Current extension version is: 2.3.27
|
||||
|
||||
Taken from upstream commit: 28326165
|
||||
Taken from upstream commit: 13ebfec9
|
||||
|
|
|
@ -123,8 +123,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
"use strict";
|
||||
|
||||
|
||||
var pdfjsVersion = '2.3.13';
|
||||
var pdfjsBuild = '28326165';
|
||||
var pdfjsVersion = '2.3.27';
|
||||
var pdfjsBuild = '13ebfec9';
|
||||
|
||||
var pdfjsSharedUtil = __w_pdfjs_require__(1);
|
||||
|
||||
|
@ -1304,7 +1304,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
|
|||
|
||||
return worker.messageHandler.sendWithPromise('GetDocRequest', {
|
||||
docId,
|
||||
apiVersion: '2.3.13',
|
||||
apiVersion: '2.3.27',
|
||||
source: {
|
||||
data: source.data,
|
||||
url: source.url,
|
||||
|
@ -2620,6 +2620,8 @@ class WorkerTransport {
|
|||
|
||||
if (intentState.displayReadyCapability) {
|
||||
intentState.displayReadyCapability.reject(new Error(data.error));
|
||||
} else if (intentState.opListReadCapability) {
|
||||
intentState.opListReadCapability.reject(new Error(data.error));
|
||||
} else {
|
||||
throw new Error(data.error);
|
||||
}
|
||||
|
@ -3098,9 +3100,9 @@ const InternalRenderTask = function InternalRenderTaskClosure() {
|
|||
return InternalRenderTask;
|
||||
}();
|
||||
|
||||
const version = '2.3.13';
|
||||
const version = '2.3.27';
|
||||
exports.version = version;
|
||||
const build = '28326165';
|
||||
const build = '13ebfec9';
|
||||
exports.build = build;
|
||||
|
||||
/***/ }),
|
||||
|
@ -4903,15 +4905,20 @@ var CanvasGraphics = function CanvasGraphicsClosure() {
|
|||
consumePath = typeof consumePath !== 'undefined' ? consumePath : true;
|
||||
var ctx = this.ctx;
|
||||
var strokeColor = this.current.strokeColor;
|
||||
ctx.lineWidth = Math.max(this.getSinglePixelWidth() * MIN_WIDTH_FACTOR, this.current.lineWidth);
|
||||
ctx.globalAlpha = this.current.strokeAlpha;
|
||||
|
||||
if (strokeColor && strokeColor.hasOwnProperty('type') && strokeColor.type === 'Pattern') {
|
||||
ctx.save();
|
||||
let transform = ctx.mozCurrentTransform;
|
||||
|
||||
const scale = _util.Util.singularValueDecompose2dScale(transform)[0];
|
||||
|
||||
ctx.strokeStyle = strokeColor.getPattern(ctx, this);
|
||||
ctx.lineWidth = Math.max(this.getSinglePixelWidth() * MIN_WIDTH_FACTOR, this.current.lineWidth * scale);
|
||||
ctx.stroke();
|
||||
ctx.restore();
|
||||
} else {
|
||||
ctx.lineWidth = Math.max(this.getSinglePixelWidth() * MIN_WIDTH_FACTOR, this.current.lineWidth);
|
||||
ctx.stroke();
|
||||
}
|
||||
|
||||
|
@ -5908,17 +5915,32 @@ exports.TilingPattern = void 0;
|
|||
var _util = __w_pdfjs_require__(1);
|
||||
|
||||
var ShadingIRs = {};
|
||||
|
||||
function applyBoundingBox(ctx, bbox) {
|
||||
if (!bbox || typeof Path2D === 'undefined') {
|
||||
return;
|
||||
}
|
||||
|
||||
const width = bbox[2] - bbox[0];
|
||||
const height = bbox[3] - bbox[1];
|
||||
const region = new Path2D();
|
||||
region.rect(bbox[0], bbox[1], width, height);
|
||||
ctx.clip(region);
|
||||
}
|
||||
|
||||
ShadingIRs.RadialAxial = {
|
||||
fromIR: function RadialAxial_fromIR(raw) {
|
||||
var type = raw[1];
|
||||
var colorStops = raw[2];
|
||||
var p0 = raw[3];
|
||||
var p1 = raw[4];
|
||||
var r0 = raw[5];
|
||||
var r1 = raw[6];
|
||||
var bbox = raw[2];
|
||||
var colorStops = raw[3];
|
||||
var p0 = raw[4];
|
||||
var p1 = raw[5];
|
||||
var r0 = raw[6];
|
||||
var r1 = raw[7];
|
||||
return {
|
||||
type: 'Pattern',
|
||||
getPattern: function RadialAxial_getPattern(ctx) {
|
||||
applyBoundingBox(ctx, bbox);
|
||||
var grad;
|
||||
|
||||
if (type === 'axial') {
|
||||
|
@ -6146,10 +6168,12 @@ ShadingIRs.Mesh = {
|
|||
var figures = raw[4];
|
||||
var bounds = raw[5];
|
||||
var matrix = raw[6];
|
||||
var bbox = raw[7];
|
||||
var background = raw[8];
|
||||
return {
|
||||
type: 'Pattern',
|
||||
getPattern: function Mesh_getPattern(ctx, owner, shadingFill) {
|
||||
applyBoundingBox(ctx, bbox);
|
||||
var scale;
|
||||
|
||||
if (shadingFill) {
|
||||
|
@ -6390,18 +6414,14 @@ function makeReasonSerializable(reason) {
|
|||
return new _util.UnknownErrorException(reason.message, reason.toString());
|
||||
}
|
||||
|
||||
function resolveOrReject(capability, success, reason) {
|
||||
if (success) {
|
||||
function resolveOrReject(capability, data) {
|
||||
if (data.success) {
|
||||
capability.resolve();
|
||||
} else {
|
||||
capability.reject(reason);
|
||||
capability.reject(wrapReason(data.reason));
|
||||
}
|
||||
}
|
||||
|
||||
function finalize(promise) {
|
||||
return Promise.resolve(promise).catch(() => {});
|
||||
}
|
||||
|
||||
function MessageHandler(sourceName, targetName, comObj) {
|
||||
this.sourceName = sourceName;
|
||||
this.targetName = targetName;
|
||||
|
@ -6686,7 +6706,7 @@ MessageHandler.prototype = {
|
|||
|
||||
let deleteStreamController = () => {
|
||||
Promise.all([this.streamControllers[data.streamId].startCall, this.streamControllers[data.streamId].pullCall, this.streamControllers[data.streamId].cancelCall].map(function (capability) {
|
||||
return capability && finalize(capability.promise);
|
||||
return capability && capability.promise.catch(function () {});
|
||||
})).then(() => {
|
||||
delete this.streamControllers[data.streamId];
|
||||
});
|
||||
|
@ -6694,11 +6714,11 @@ MessageHandler.prototype = {
|
|||
|
||||
switch (data.stream) {
|
||||
case 'start_complete':
|
||||
resolveOrReject(this.streamControllers[data.streamId].startCall, data.success, wrapReason(data.reason));
|
||||
resolveOrReject(this.streamControllers[data.streamId].startCall, data);
|
||||
break;
|
||||
|
||||
case 'pull_complete':
|
||||
resolveOrReject(this.streamControllers[data.streamId].pullCall, data.success, wrapReason(data.reason));
|
||||
resolveOrReject(this.streamControllers[data.streamId].pullCall, data);
|
||||
break;
|
||||
|
||||
case 'pull':
|
||||
|
@ -6757,7 +6777,7 @@ MessageHandler.prototype = {
|
|||
break;
|
||||
|
||||
case 'cancel_complete':
|
||||
resolveOrReject(this.streamControllers[data.streamId].cancelCall, data.success, wrapReason(data.reason));
|
||||
resolveOrReject(this.streamControllers[data.streamId].cancelCall, data);
|
||||
deleteStreamController();
|
||||
break;
|
||||
|
||||
|
|
|
@ -123,8 +123,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
"use strict";
|
||||
|
||||
|
||||
const pdfjsVersion = '2.3.13';
|
||||
const pdfjsBuild = '28326165';
|
||||
const pdfjsVersion = '2.3.27';
|
||||
const pdfjsBuild = '13ebfec9';
|
||||
|
||||
const pdfjsCoreWorker = __w_pdfjs_require__(1);
|
||||
|
||||
|
@ -240,7 +240,7 @@ var WorkerMessageHandler = {
|
|||
var WorkerTasks = [];
|
||||
const verbosity = (0, _util.getVerbosityLevel)();
|
||||
let apiVersion = docParams.apiVersion;
|
||||
let workerVersion = '2.3.13';
|
||||
let workerVersion = '2.3.27';
|
||||
|
||||
if (apiVersion !== workerVersion) {
|
||||
throw new Error(`The API version "${apiVersion}" does not match ` + `the Worker version "${workerVersion}".`);
|
||||
|
@ -37943,6 +37943,14 @@ Shadings.RadialAxial = function RadialAxialClosure() {
|
|||
var cs = dict.get('ColorSpace', 'CS');
|
||||
cs = _colorspace.ColorSpace.parse(cs, xref, res, pdfFunctionFactory);
|
||||
this.cs = cs;
|
||||
const bbox = dict.getArray('BBox');
|
||||
|
||||
if (Array.isArray(bbox) && bbox.length === 4) {
|
||||
this.bbox = _util.Util.normalizeRect(bbox);
|
||||
} else {
|
||||
this.bbox = null;
|
||||
}
|
||||
|
||||
var t0 = 0.0,
|
||||
t1 = 1.0;
|
||||
|
||||
|
@ -38058,7 +38066,7 @@ Shadings.RadialAxial = function RadialAxialClosure() {
|
|||
}
|
||||
}
|
||||
|
||||
return ['RadialAxial', type, this.colorStops, p0, p1, r0, r1];
|
||||
return ['RadialAxial', type, this.bbox, this.colorStops, p0, p1, r0, r1];
|
||||
}
|
||||
};
|
||||
return RadialAxial;
|
||||
|
@ -38675,7 +38683,14 @@ Shadings.Mesh = function MeshClosure() {
|
|||
this.matrix = matrix;
|
||||
this.shadingType = dict.get('ShadingType');
|
||||
this.type = 'Pattern';
|
||||
this.bbox = dict.getArray('BBox');
|
||||
const bbox = dict.getArray('BBox');
|
||||
|
||||
if (Array.isArray(bbox) && bbox.length === 4) {
|
||||
this.bbox = _util.Util.normalizeRect(bbox);
|
||||
} else {
|
||||
this.bbox = null;
|
||||
}
|
||||
|
||||
var cs = dict.get('ColorSpace', 'CS');
|
||||
cs = _colorspace.ColorSpace.parse(cs, xref, res, pdfFunctionFactory);
|
||||
this.cs = cs;
|
||||
|
@ -44571,18 +44586,14 @@ function makeReasonSerializable(reason) {
|
|||
return new _util.UnknownErrorException(reason.message, reason.toString());
|
||||
}
|
||||
|
||||
function resolveOrReject(capability, success, reason) {
|
||||
if (success) {
|
||||
function resolveOrReject(capability, data) {
|
||||
if (data.success) {
|
||||
capability.resolve();
|
||||
} else {
|
||||
capability.reject(reason);
|
||||
capability.reject(wrapReason(data.reason));
|
||||
}
|
||||
}
|
||||
|
||||
function finalize(promise) {
|
||||
return Promise.resolve(promise).catch(() => {});
|
||||
}
|
||||
|
||||
function MessageHandler(sourceName, targetName, comObj) {
|
||||
this.sourceName = sourceName;
|
||||
this.targetName = targetName;
|
||||
|
@ -44867,7 +44878,7 @@ MessageHandler.prototype = {
|
|||
|
||||
let deleteStreamController = () => {
|
||||
Promise.all([this.streamControllers[data.streamId].startCall, this.streamControllers[data.streamId].pullCall, this.streamControllers[data.streamId].cancelCall].map(function (capability) {
|
||||
return capability && finalize(capability.promise);
|
||||
return capability && capability.promise.catch(function () {});
|
||||
})).then(() => {
|
||||
delete this.streamControllers[data.streamId];
|
||||
});
|
||||
|
@ -44875,11 +44886,11 @@ MessageHandler.prototype = {
|
|||
|
||||
switch (data.stream) {
|
||||
case 'start_complete':
|
||||
resolveOrReject(this.streamControllers[data.streamId].startCall, data.success, wrapReason(data.reason));
|
||||
resolveOrReject(this.streamControllers[data.streamId].startCall, data);
|
||||
break;
|
||||
|
||||
case 'pull_complete':
|
||||
resolveOrReject(this.streamControllers[data.streamId].pullCall, data.success, wrapReason(data.reason));
|
||||
resolveOrReject(this.streamControllers[data.streamId].pullCall, data);
|
||||
break;
|
||||
|
||||
case 'pull':
|
||||
|
@ -44938,7 +44949,7 @@ MessageHandler.prototype = {
|
|||
break;
|
||||
|
||||
case 'cancel_complete':
|
||||
resolveOrReject(this.streamControllers[data.streamId].cancelCall, data.success, wrapReason(data.reason));
|
||||
resolveOrReject(this.streamControllers[data.streamId].cancelCall, data);
|
||||
deleteStreamController();
|
||||
break;
|
||||
|
||||
|
|
|
@ -9634,7 +9634,8 @@ class PDFPageView {
|
|||
this.eventBus.dispatch('pagerendered', {
|
||||
source: this,
|
||||
pageNumber: this.id,
|
||||
cssTransform: true
|
||||
cssTransform: true,
|
||||
timestamp: performance.now()
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
@ -9655,7 +9656,8 @@ class PDFPageView {
|
|||
this.eventBus.dispatch('pagerendered', {
|
||||
source: this,
|
||||
pageNumber: this.id,
|
||||
cssTransform: true
|
||||
cssTransform: true,
|
||||
timestamp: performance.now()
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
@ -9861,7 +9863,8 @@ class PDFPageView {
|
|||
this.eventBus.dispatch('pagerendered', {
|
||||
source: this,
|
||||
pageNumber: this.id,
|
||||
cssTransform: false
|
||||
cssTransform: false,
|
||||
timestamp: performance.now()
|
||||
});
|
||||
|
||||
if (error) {
|
||||
|
|
|
@ -20,7 +20,7 @@ origin:
|
|||
|
||||
# Human-readable identifier for this version/release
|
||||
# Generally "version NNN", "tag SSS", "bookmark SSS"
|
||||
release: version 2.3.13
|
||||
release: version 2.3.27
|
||||
|
||||
# The package's license, where possible using the mnemonic from
|
||||
# https://spdx.org/licenses/
|
||||
|
|
|
@ -4,11 +4,6 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
// We have to keep using Promise.jsm here, because DOM Promises
|
||||
// start freezing during panel iframes destruction.
|
||||
// More info in bug 1454373 comment 15.
|
||||
const Promise = require("promise");
|
||||
|
||||
/**
|
||||
* Returns a deferred object, with a resolve and reject property.
|
||||
* https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules/Promise.jsm/Deferred
|
||||
|
|
|
@ -9328,8 +9328,7 @@ nsINode* Document::AdoptNode(nsINode& aAdoptedNode, ErrorResult& rv) {
|
|||
do {
|
||||
if (nsPIDOMWindowOuter* win = doc->GetWindow()) {
|
||||
nsCOMPtr<nsINode> node = win->GetFrameElementInternal();
|
||||
if (node &&
|
||||
nsContentUtils::ContentIsDescendantOf(node, adoptedNode)) {
|
||||
if (node && node->IsInclusiveDescendantOf(adoptedNode)) {
|
||||
rv.Throw(NS_ERROR_DOM_HIERARCHY_REQUEST_ERR);
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ void NodeIterator::NodePointer::AdjustAfterRemoval(
|
|||
if (!mNode || mNode == aRoot) return;
|
||||
|
||||
// check if ancestor was removed
|
||||
if (!nsContentUtils::ContentIsDescendantOf(mNode, aChild)) return;
|
||||
if (!mNode->IsInclusiveDescendantOf(aChild)) return;
|
||||
|
||||
if (mBeforeNode) {
|
||||
// Try the next sibling
|
||||
|
|
|
@ -273,7 +273,7 @@ bool IsValidSelectionPoint(nsFrameSelection* aFrameSel, nsINode* aNode) {
|
|||
}
|
||||
|
||||
limiter = aFrameSel->GetAncestorLimiter();
|
||||
return !limiter || nsContentUtils::ContentIsDescendantOf(aNode, limiter);
|
||||
return !limiter || aNode->IsInclusiveDescendantOf(limiter);
|
||||
}
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -3134,10 +3134,10 @@ Element* Selection::GetCommonEditingHostForAllRanges() {
|
|||
if (editingHost == foundEditingHost) {
|
||||
continue;
|
||||
}
|
||||
if (nsContentUtils::ContentIsDescendantOf(foundEditingHost, editingHost)) {
|
||||
if (foundEditingHost->IsInclusiveDescendantOf(editingHost)) {
|
||||
continue;
|
||||
}
|
||||
if (nsContentUtils::ContentIsDescendantOf(editingHost, foundEditingHost)) {
|
||||
if (editingHost->IsInclusiveDescendantOf(foundEditingHost)) {
|
||||
editingHost = foundEditingHost;
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -2182,20 +2182,6 @@ nsINode* nsContentUtils::GetCrossDocParentNode(nsINode* aChild) {
|
|||
return parentDoc ? parentDoc->FindContentForSubDocument(doc) : nullptr;
|
||||
}
|
||||
|
||||
// static
|
||||
bool nsContentUtils::ContentIsDescendantOf(const nsINode* aPossibleDescendant,
|
||||
const nsINode* aPossibleAncestor) {
|
||||
MOZ_ASSERT(aPossibleDescendant, "The possible descendant is null!");
|
||||
MOZ_ASSERT(aPossibleAncestor, "The possible ancestor is null!");
|
||||
|
||||
do {
|
||||
if (aPossibleDescendant == aPossibleAncestor) return true;
|
||||
aPossibleDescendant = aPossibleDescendant->GetParentNode();
|
||||
} while (aPossibleDescendant);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool nsContentUtils::ContentIsHostIncludingDescendantOf(
|
||||
const nsINode* aPossibleDescendant, const nsINode* aPossibleAncestor) {
|
||||
MOZ_ASSERT(aPossibleDescendant, "The possible descendant is null!");
|
||||
|
|
|
@ -336,26 +336,10 @@ class nsContentUtils {
|
|||
static nsINode* GetCrossDocParentNode(nsINode* aChild);
|
||||
|
||||
/**
|
||||
* Do not ever pass null pointers to this method. If one of your
|
||||
* nsIContents is null, you have to decide for yourself what
|
||||
* "IsDescendantOf" really means.
|
||||
*
|
||||
* @param aPossibleDescendant node to test for being a descendant of
|
||||
* aPossibleAncestor
|
||||
* @param aPossibleAncestor node to test for being an ancestor of
|
||||
* aPossibleDescendant
|
||||
* @return true if aPossibleDescendant is a descendant of
|
||||
* aPossibleAncestor (or is aPossibleAncestor). false
|
||||
* otherwise.
|
||||
*/
|
||||
static bool ContentIsDescendantOf(const nsINode* aPossibleDescendant,
|
||||
const nsINode* aPossibleAncestor);
|
||||
|
||||
/**
|
||||
* Similar to ContentIsDescendantOf, except will treat an HTMLTemplateElement
|
||||
* or ShadowRoot as an ancestor of things in the corresponding
|
||||
* DocumentFragment. See the concept of "host-including inclusive ancestor" in
|
||||
* the DOM specification.
|
||||
* Similar to nsINode::IsInclusiveDescendantOf, except will treat an
|
||||
* HTMLTemplateElement or ShadowRoot as an ancestor of things in the
|
||||
* corresponding DocumentFragment. See the concept of "host-including
|
||||
* inclusive ancestor" in the DOM specification.
|
||||
*/
|
||||
static bool ContentIsHostIncludingDescendantOf(
|
||||
const nsINode* aPossibleDescendant, const nsINode* aPossibleAncestor);
|
||||
|
@ -368,9 +352,9 @@ class nsContentUtils {
|
|||
const nsINode* aPossibleDescendant, const nsINode* aPossibleAncestor);
|
||||
|
||||
/**
|
||||
* Similar to ContentIsDescendantOf except it crosses document boundaries,
|
||||
* this function uses ancestor/descendant relations in the composed document
|
||||
* (see shadow DOM spec).
|
||||
* Similar to nsINode::IsInclusiveDescendantOf except it crosses document
|
||||
* boundaries, this function uses ancestor/descendant relations in the
|
||||
* composed document (see shadow DOM spec).
|
||||
*/
|
||||
static bool ContentIsCrossDocDescendantOf(nsINode* aPossibleDescendant,
|
||||
nsINode* aPossibleAncestor);
|
||||
|
|
|
@ -2713,11 +2713,11 @@ nsresult nsFocusManager::DetermineElementToMoveFocus(
|
|||
// The common case here is the urlbar where focus is on the anonymous
|
||||
// input inside the textbox, but the retargetdocumentfocus attribute
|
||||
// refers to the textbox. The Contains check will return false and the
|
||||
// ContentIsDescendantOf check will return true in this case.
|
||||
if (retargetElement && (retargetElement == startContent ||
|
||||
(!retargetElement->Contains(startContent) &&
|
||||
nsContentUtils::ContentIsDescendantOf(
|
||||
startContent, retargetElement)))) {
|
||||
// IsInclusiveDescendantOf check will return true in this case.
|
||||
if (retargetElement &&
|
||||
(retargetElement == startContent ||
|
||||
(!retargetElement->Contains(startContent) &&
|
||||
startContent->IsInclusiveDescendantOf(retargetElement)))) {
|
||||
startContent = rootContent;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -117,6 +117,20 @@
|
|||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
||||
bool nsINode::IsInclusiveDescendantOf(const nsINode* aNode) const {
|
||||
MOZ_ASSERT(aNode, "The node is nullptr.");
|
||||
|
||||
const nsINode* node = this;
|
||||
do {
|
||||
if (node == aNode) {
|
||||
return true;
|
||||
}
|
||||
node = node->GetParentNode();
|
||||
} while (node);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
nsINode::nsSlots::nsSlots() : mWeakReference(nullptr) {}
|
||||
|
||||
nsINode::nsSlots::~nsSlots() {
|
||||
|
@ -2462,7 +2476,7 @@ bool nsINode::Contains(const nsINode* aOther) const {
|
|||
return false;
|
||||
}
|
||||
|
||||
return nsContentUtils::ContentIsDescendantOf(other, this);
|
||||
return other->IsInclusiveDescendantOf(this);
|
||||
}
|
||||
|
||||
uint32_t nsINode::Length() const {
|
||||
|
@ -2540,7 +2554,7 @@ inline static Element* FindMatchingElementWithId(
|
|||
continue;
|
||||
}
|
||||
|
||||
if (!nsContentUtils::ContentIsDescendantOf(element, &aRoot)) {
|
||||
if (!element->IsInclusiveDescendantOf(&aRoot)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -417,6 +417,13 @@ class nsINode : public mozilla::dom::EventTarget {
|
|||
return NodeType() == DOCUMENT_FRAGMENT_NODE;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://dom.spec.whatwg.org/#concept-tree-inclusive-descendant
|
||||
*
|
||||
* @param aNode must not be nullptr.
|
||||
*/
|
||||
bool IsInclusiveDescendantOf(const nsINode* aNode) const;
|
||||
|
||||
/**
|
||||
* Return this node as a document fragment. Asserts IsDocumentFragment().
|
||||
*
|
||||
|
@ -1318,10 +1325,9 @@ class nsINode : public mozilla::dom::EventTarget {
|
|||
|
||||
nsIContent* GetNextNodeImpl(const nsINode* aRoot,
|
||||
const bool aSkipChildren) const {
|
||||
// Can't use nsContentUtils::ContentIsDescendantOf here, since we
|
||||
// can't include it here.
|
||||
#ifdef DEBUG
|
||||
if (aRoot) {
|
||||
// TODO: perhaps nsINode::IsInclusiveDescendantOf could be used instead.
|
||||
const nsINode* cur = this;
|
||||
for (; cur; cur = cur->GetParentNode())
|
||||
if (cur == aRoot) break;
|
||||
|
@ -1361,10 +1367,9 @@ class nsINode : public mozilla::dom::EventTarget {
|
|||
* null if there are no more nsIContents to traverse.
|
||||
*/
|
||||
nsIContent* GetPreviousContent(const nsINode* aRoot = nullptr) const {
|
||||
// Can't use nsContentUtils::ContentIsDescendantOf here, since we
|
||||
// can't include it here.
|
||||
#ifdef DEBUG
|
||||
if (aRoot) {
|
||||
// TODO: perhaps nsINode::IsInclusiveDescendantOf could be used instead.
|
||||
const nsINode* cur = this;
|
||||
for (; cur; cur = cur->GetParentNode())
|
||||
if (cur == aRoot) break;
|
||||
|
|
|
@ -687,8 +687,7 @@ void nsRange::ContentRemoved(nsIContent* aChild, nsIContent* aPreviousSibling) {
|
|||
newStart.InvalidateOffset();
|
||||
}
|
||||
} else {
|
||||
gravitateStart =
|
||||
Some(nsContentUtils::ContentIsDescendantOf(mStart.Container(), aChild));
|
||||
gravitateStart = Some(mStart.Container()->IsInclusiveDescendantOf(aChild));
|
||||
if (gravitateStart.value()) {
|
||||
newStart.SetAfterRef(container, aPreviousSibling);
|
||||
}
|
||||
|
@ -706,8 +705,7 @@ void nsRange::ContentRemoved(nsIContent* aChild, nsIContent* aPreviousSibling) {
|
|||
if (mStart.Container() == mEnd.Container() && gravitateStart.isSome()) {
|
||||
gravitateEnd = gravitateStart.value();
|
||||
} else {
|
||||
gravitateEnd =
|
||||
nsContentUtils::ContentIsDescendantOf(mEnd.Container(), aChild);
|
||||
gravitateEnd = mEnd.Container()->IsInclusiveDescendantOf(aChild);
|
||||
}
|
||||
if (gravitateEnd) {
|
||||
newEnd.SetAfterRef(container, aPreviousSibling);
|
||||
|
@ -777,7 +775,7 @@ int16_t nsRange::ComparePoint(const RawRangeBoundary& aPoint,
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (!nsContentUtils::ContentIsDescendantOf(aPoint.Container(), mRoot)) {
|
||||
if (!aPoint.Container()->IsInclusiveDescendantOf(mRoot)) {
|
||||
aRv.Throw(NS_ERROR_DOM_WRONG_DOCUMENT_ERR);
|
||||
return 0;
|
||||
}
|
||||
|
@ -872,10 +870,8 @@ void nsRange::DoSetRange(const RangeBoundaryBase<SPT, SRT>& aStartBoundary,
|
|||
MOZ_ASSERT(
|
||||
!aRootNode || (!aStartBoundary.IsSet() && !aEndBoundary.IsSet()) ||
|
||||
aNotInsertedYet ||
|
||||
(nsContentUtils::ContentIsDescendantOf(aStartBoundary.Container(),
|
||||
aRootNode) &&
|
||||
nsContentUtils::ContentIsDescendantOf(aEndBoundary.Container(),
|
||||
aRootNode) &&
|
||||
(aStartBoundary.Container()->IsInclusiveDescendantOf(aRootNode) &&
|
||||
aEndBoundary.Container()->IsInclusiveDescendantOf(aRootNode) &&
|
||||
aRootNode ==
|
||||
RangeUtils::ComputeRootNode(aStartBoundary.Container()) &&
|
||||
aRootNode == RangeUtils::ComputeRootNode(aEndBoundary.Container())),
|
||||
|
@ -1663,7 +1659,7 @@ nsresult nsRange::CutContents(DocumentFragment** aFragment) {
|
|||
|
||||
iter.Next();
|
||||
nsCOMPtr<nsINode> nextNode = iter.GetCurrentNode();
|
||||
while (nextNode && nsContentUtils::ContentIsDescendantOf(nextNode, node)) {
|
||||
while (nextNode && nextNode->IsInclusiveDescendantOf(node)) {
|
||||
iter.Next();
|
||||
nextNode = iter.GetCurrentNode();
|
||||
}
|
||||
|
|
|
@ -2874,7 +2874,7 @@ bool CanvasRenderingContext2D::DrawCustomFocusRing(
|
|||
|
||||
HTMLCanvasElement* canvas = GetCanvas();
|
||||
|
||||
if (!canvas || !nsContentUtils::ContentIsDescendantOf(&aElement, canvas)) {
|
||||
if (!canvas || !aElement.IsInclusiveDescendantOf(canvas)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -1308,8 +1308,8 @@ nsresult ContentEventHandler::OnQuerySelectedText(
|
|||
nsINode* const endNode = mFirstSelectedRawRange.GetEndContainer();
|
||||
|
||||
// Make sure the selection is within the root content range.
|
||||
if (!nsContentUtils::ContentIsDescendantOf(startNode, mRootContent) ||
|
||||
!nsContentUtils::ContentIsDescendantOf(endNode, mRootContent)) {
|
||||
if (!startNode->IsInclusiveDescendantOf(mRootContent) ||
|
||||
!endNode->IsInclusiveDescendantOf(mRootContent)) {
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
|
||||
|
@ -2522,8 +2522,7 @@ nsresult ContentEventHandler::OnQueryCharacterAtPoint(
|
|||
|
||||
nsIFrame* targetFrame = nsLayoutUtils::GetFrameForPoint(rootFrame, ptInRoot);
|
||||
if (!targetFrame || !targetFrame->GetContent() ||
|
||||
!nsContentUtils::ContentIsDescendantOf(targetFrame->GetContent(),
|
||||
mRootContent)) {
|
||||
!targetFrame->GetContent()->IsInclusiveDescendantOf(mRootContent)) {
|
||||
// There is no character at the point.
|
||||
aEvent->mSucceeded = true;
|
||||
return NS_OK;
|
||||
|
@ -2536,8 +2535,7 @@ nsresult ContentEventHandler::OnQueryCharacterAtPoint(
|
|||
nsIFrame::ContentOffsets tentativeCaretOffsets =
|
||||
targetFrame->GetContentOffsetsFromPoint(ptInTarget);
|
||||
if (!tentativeCaretOffsets.content ||
|
||||
!nsContentUtils::ContentIsDescendantOf(tentativeCaretOffsets.content,
|
||||
mRootContent)) {
|
||||
!tentativeCaretOffsets.content->IsInclusiveDescendantOf(mRootContent)) {
|
||||
// There is no character nor tentative caret point at the point.
|
||||
aEvent->mSucceeded = true;
|
||||
return NS_OK;
|
||||
|
|
|
@ -390,7 +390,7 @@ nsresult IMEStateManager::OnRemoveContent(nsPresContext* aPresContext,
|
|||
}
|
||||
|
||||
if (!sPresContext || !sContent ||
|
||||
!nsContentUtils::ContentIsDescendantOf(sContent, aContent)) {
|
||||
!sContent->IsInclusiveDescendantOf(aContent)) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -372,8 +372,7 @@ void PointerEventHandler::ReleaseIfCaptureByDescendant(nsIContent* aContent) {
|
|||
for (auto iter = sPointerCaptureList->Iter(); !iter.Done(); iter.Next()) {
|
||||
PointerCaptureInfo* data = iter.UserData();
|
||||
if (data && data->mPendingContent &&
|
||||
nsContentUtils::ContentIsDescendantOf(data->mPendingContent,
|
||||
aContent)) {
|
||||
data->mPendingContent->IsInclusiveDescendantOf(aContent)) {
|
||||
ReleasePointerCaptureById(iter.Key());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -930,7 +930,7 @@ TextComposition* TextCompositionArray::GetCompositionInContent(
|
|||
// There should be only one composition per content object.
|
||||
for (index_type i = Length(); i > 0; --i) {
|
||||
nsINode* node = ElementAt(i - 1)->GetEventTargetNode();
|
||||
if (node && nsContentUtils::ContentIsDescendantOf(node, aContent)) {
|
||||
if (node && node->IsInclusiveDescendantOf(aContent)) {
|
||||
return ElementAt(i - 1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -297,7 +297,7 @@ static void CollectOrphans(nsINode* aRemovalRoot,
|
|||
#endif
|
||||
if (node->HasFlag(MAYBE_ORPHAN_FORM_ELEMENT)) {
|
||||
node->UnsetFlags(MAYBE_ORPHAN_FORM_ELEMENT);
|
||||
if (!nsContentUtils::ContentIsDescendantOf(node, aRemovalRoot)) {
|
||||
if (!node->IsInclusiveDescendantOf(aRemovalRoot)) {
|
||||
node->ClearForm(true, false);
|
||||
|
||||
// When a form control loses its form owner, its state can change.
|
||||
|
@ -338,7 +338,7 @@ static void CollectOrphans(nsINode* aRemovalRoot,
|
|||
#endif
|
||||
if (node->HasFlag(MAYBE_ORPHAN_FORM_ELEMENT)) {
|
||||
node->UnsetFlags(MAYBE_ORPHAN_FORM_ELEMENT);
|
||||
if (!nsContentUtils::ContentIsDescendantOf(node, aRemovalRoot)) {
|
||||
if (!node->IsInclusiveDescendantOf(aRemovalRoot)) {
|
||||
node->ClearForm(true);
|
||||
|
||||
#ifdef DEBUG
|
||||
|
|
|
@ -40,7 +40,7 @@ void HTMLMetaElement::SetMetaReferrer(Document* aDocument) {
|
|||
GetContent(content);
|
||||
|
||||
Element* headElt = aDocument->GetHeadElement();
|
||||
if (headElt && nsContentUtils::ContentIsDescendantOf(this, headElt)) {
|
||||
if (headElt && IsInclusiveDescendantOf(headElt)) {
|
||||
content = nsContentUtils::TrimWhitespace<nsContentUtils::IsHTMLWhitespace>(
|
||||
content);
|
||||
aDocument->UpdateReferrerInfoFromMeta(content, false);
|
||||
|
@ -91,7 +91,7 @@ nsresult HTMLMetaElement::BindToTree(BindContext& aContext, nsINode& aParent) {
|
|||
// only accept <meta http-equiv="Content-Security-Policy" content=""> if it
|
||||
// appears in the <head> element.
|
||||
Element* headElt = doc.GetHeadElement();
|
||||
if (headElt && nsContentUtils::ContentIsDescendantOf(this, headElt)) {
|
||||
if (headElt && IsInclusiveDescendantOf(headElt)) {
|
||||
nsAutoString content;
|
||||
GetContent(content);
|
||||
content =
|
||||
|
|
|
@ -533,7 +533,7 @@ void HTMLSelectElement::Add(nsGenericHTMLElement& aElement,
|
|||
// Just in case we're not the parent, get the parent of the reference
|
||||
// element
|
||||
nsCOMPtr<nsINode> parent = aBefore->Element::GetParentNode();
|
||||
if (!parent || !nsContentUtils::ContentIsDescendantOf(parent, this)) {
|
||||
if (!parent || !parent->IsInclusiveDescendantOf(this)) {
|
||||
// NOT_FOUND_ERR: Raised if before is not a descendant of the SELECT
|
||||
// element.
|
||||
aError.Throw(NS_ERROR_DOM_NOT_FOUND_ERR);
|
||||
|
|
|
@ -510,7 +510,7 @@ HTMLFormElement* nsGenericHTMLElement::FindAncestorForm(
|
|||
// we're one of those inputs-in-a-table that have a hacked mForm pointer
|
||||
// and a subtree containing both us and the form got removed from the
|
||||
// DOM.
|
||||
if (nsContentUtils::ContentIsDescendantOf(aCurrentForm, prevContent)) {
|
||||
if (aCurrentForm->IsInclusiveDescendantOf(prevContent)) {
|
||||
return aCurrentForm;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -399,8 +399,7 @@ bool nsXBLWindowKeyHandler::IsHTMLEditableFieldFocused() {
|
|||
if (!activeEditingHost) {
|
||||
return false;
|
||||
}
|
||||
return nsContentUtils::ContentIsDescendantOf(focusedNode,
|
||||
activeEditingHost);
|
||||
return focusedNode->IsInclusiveDescendantOf(activeEditingHost);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
@ -3543,7 +3543,7 @@ bool EditorBase::IsDescendantOfRoot(nsINode* inNode) const {
|
|||
return false;
|
||||
}
|
||||
|
||||
return nsContentUtils::ContentIsDescendantOf(inNode, root);
|
||||
return inNode->IsInclusiveDescendantOf(root);
|
||||
}
|
||||
|
||||
bool EditorBase::IsDescendantOfEditorRoot(nsINode* aNode) const {
|
||||
|
@ -3555,7 +3555,7 @@ bool EditorBase::IsDescendantOfEditorRoot(nsINode* aNode) const {
|
|||
return false;
|
||||
}
|
||||
|
||||
return nsContentUtils::ContentIsDescendantOf(aNode, root);
|
||||
return aNode->IsInclusiveDescendantOf(root);
|
||||
}
|
||||
|
||||
bool EditorBase::IsContainer(nsINode* aNode) { return aNode ? true : false; }
|
||||
|
|
|
@ -199,7 +199,7 @@ void EditorEventListener::Disconnect() {
|
|||
nsIContent* focusedContent = fm->GetFocusedElement();
|
||||
mozilla::dom::Element* root = mEditorBase->GetRoot();
|
||||
if (focusedContent && root &&
|
||||
nsContentUtils::ContentIsDescendantOf(focusedContent, root)) {
|
||||
focusedContent->IsInclusiveDescendantOf(root)) {
|
||||
// Reset the Selection ancestor limiter and SelectionController state
|
||||
// that EditorBase::InitializeSelection set up.
|
||||
mEditorBase->FinalizeSelection();
|
||||
|
@ -1134,7 +1134,7 @@ bool EditorEventListener::ShouldHandleNativeKeyBindings(
|
|||
return false;
|
||||
}
|
||||
|
||||
return nsContentUtils::ContentIsDescendantOf(targetContent, editingHost);
|
||||
return targetContent->IsInclusiveDescendantOf(editingHost);
|
||||
}
|
||||
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -7131,7 +7131,7 @@ void HTMLEditRules::PromoteRange(nsRange& aRange,
|
|||
return;
|
||||
}
|
||||
// Make sure we don't go higher than our root element in the content tree
|
||||
if (!nsContentUtils::ContentIsDescendantOf(host, block)) {
|
||||
if (!host->IsInclusiveDescendantOf(block)) {
|
||||
HTMLEditorRef().IsEmptyNode(block, &bIsEmptyNode, true, false);
|
||||
}
|
||||
if (bIsEmptyNode) {
|
||||
|
|
|
@ -4894,8 +4894,8 @@ nsIContent* HTMLEditor::GetFocusedContent() {
|
|||
}
|
||||
|
||||
if (inDesignMode) {
|
||||
return OurWindowHasFocus() && nsContentUtils::ContentIsDescendantOf(
|
||||
focusedContent, document)
|
||||
return OurWindowHasFocus() &&
|
||||
focusedContent->IsInclusiveDescendantOf(document)
|
||||
? focusedContent.get()
|
||||
: nullptr;
|
||||
}
|
||||
|
@ -5019,7 +5019,7 @@ void HTMLEditor::NotifyEditingHostMaybeChanged() {
|
|||
|
||||
// Update selection ancestor limit if current editing host includes the
|
||||
// previous editing host.
|
||||
if (nsContentUtils::ContentIsDescendantOf(ancestorLimiter, editingHost)) {
|
||||
if (ancestorLimiter->IsInclusiveDescendantOf(editingHost)) {
|
||||
// Note that don't call HTMLEditor::InitializeSelectionAncestorLimit() here
|
||||
// because it may collapse selection to the first editable node.
|
||||
EditorBase::InitializeSelectionAncestorLimit(*editingHost);
|
||||
|
@ -5187,7 +5187,7 @@ bool HTMLEditor::IsAcceptableInputEvent(WidgetGUIEvent* aGUIEvent) {
|
|||
}
|
||||
// If the target element is neither the active editing host nor a descendant
|
||||
// of it, we may not be able to handle the event.
|
||||
if (!nsContentUtils::ContentIsDescendantOf(targetContent, editingHost)) {
|
||||
if (!targetContent->IsInclusiveDescendantOf(editingHost)) {
|
||||
return false;
|
||||
}
|
||||
// If the clicked element has an independent selection, we shouldn't
|
||||
|
|
|
@ -757,7 +757,7 @@ void mozInlineSpellWordUtil::BuildSoftText() {
|
|||
break;
|
||||
}
|
||||
// GetPreviousContent below expects mRootNode to be an ancestor of node.
|
||||
if (!nsContentUtils::ContentIsDescendantOf(node, mRootNode)) {
|
||||
if (!node->IsInclusiveDescendantOf(mRootNode)) {
|
||||
break;
|
||||
}
|
||||
node = node->GetPreviousContent(mRootNode);
|
||||
|
|
|
@ -4414,7 +4414,7 @@ void PresShell::ContentRemoved(nsIContent* aChild,
|
|||
// After removing aChild from tree we should save information about live
|
||||
// ancestor
|
||||
if (mPointerEventTarget &&
|
||||
nsContentUtils::ContentIsDescendantOf(mPointerEventTarget, aChild)) {
|
||||
mPointerEventTarget->IsInclusiveDescendantOf(aChild)) {
|
||||
mPointerEventTarget = aChild->GetParent();
|
||||
}
|
||||
|
||||
|
@ -7413,8 +7413,7 @@ nsIFrame* PresShell::EventHandler::ComputeRootFrameToHandleEventWithPopup(
|
|||
}
|
||||
|
||||
if (aCapturingContent && !*aIsCapturingContentIgnored &&
|
||||
nsContentUtils::ContentIsDescendantOf(aCapturingContent,
|
||||
popupFrame->GetContent())) {
|
||||
aCapturingContent->IsInclusiveDescendantOf(popupFrame->GetContent())) {
|
||||
return popupFrame;
|
||||
}
|
||||
|
||||
|
|
|
@ -821,7 +821,7 @@ bool nsCaret::IsMenuPopupHidingCaret() {
|
|||
nsMenuPopupFrame* popupFrame = static_cast<nsMenuPopupFrame*>(popups[i]);
|
||||
nsIContent* popupContent = popupFrame->GetContent();
|
||||
|
||||
if (nsContentUtils::ContentIsDescendantOf(caretContent, popupContent)) {
|
||||
if (caretContent->IsInclusiveDescendantOf(popupContent)) {
|
||||
// The caret is in this popup. There were no menu popups before this
|
||||
// popup, so don't hide the caret.
|
||||
return false;
|
||||
|
|
|
@ -157,8 +157,7 @@ void nsCounterList::SetScope(nsCounterNode* aNode) {
|
|||
nodeContent == startContent) &&
|
||||
// everything is inside the root (except the case above,
|
||||
// a second reset on the root)
|
||||
(!startContent ||
|
||||
nsContentUtils::ContentIsDescendantOf(nodeContent, startContent))) {
|
||||
(!startContent || nodeContent->IsInclusiveDescendantOf(startContent))) {
|
||||
aNode->mScopeStart = start;
|
||||
aNode->mScopePrev = prev;
|
||||
return;
|
||||
|
|
|
@ -144,8 +144,7 @@ void ScrollbarActivity::HandleEventForScrollbar(const nsAString& aType,
|
|||
nsIContent* aTarget,
|
||||
Element* aScrollbar,
|
||||
bool* aStoredHoverState) {
|
||||
if (!aTarget || !aScrollbar ||
|
||||
!nsContentUtils::ContentIsDescendantOf(aTarget, aScrollbar))
|
||||
if (!aTarget || !aScrollbar || !aTarget->IsInclusiveDescendantOf(aScrollbar))
|
||||
return;
|
||||
|
||||
if (aType.EqualsLiteral("mousedown")) {
|
||||
|
|
|
@ -861,8 +861,8 @@ bool TextOverflow::CanHaveOverflowMarkers(nsIFrame* aBlockFrame) {
|
|||
if (domSelection) {
|
||||
nsCOMPtr<nsIContent> content =
|
||||
nsIContent::FromNodeOrNull(domSelection->GetFocusNode());
|
||||
if (content && nsContentUtils::ContentIsDescendantOf(
|
||||
content, aBlockFrame->GetContent())) {
|
||||
if (content &&
|
||||
content->IsInclusiveDescendantOf(aBlockFrame->GetContent())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4190,8 +4190,7 @@ nsresult nsFrame::GetDataForTableSelection(
|
|||
|
||||
// If our content node is an ancestor of the limiting node,
|
||||
// we should stop the search right now.
|
||||
if (limiter && nsContentUtils::ContentIsDescendantOf(limiter, GetContent()))
|
||||
return NS_OK;
|
||||
if (limiter && limiter->IsInclusiveDescendantOf(GetContent())) return NS_OK;
|
||||
|
||||
// We don't initiate row/col selection from here now,
|
||||
// but we may in future
|
||||
|
|
|
@ -179,7 +179,7 @@ bool IsValidSelectionPoint(nsFrameSelection* aFrameSel, nsINode* aNode) {
|
|||
}
|
||||
|
||||
limiter = aFrameSel->GetAncestorLimiter();
|
||||
return !limiter || nsContentUtils::ContentIsDescendantOf(aNode, limiter);
|
||||
return !limiter || aNode->IsInclusiveDescendantOf(limiter);
|
||||
}
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -1276,9 +1276,8 @@ nsresult nsFrameSelection::TakeFocus(nsIContent* aNewFocus,
|
|||
if (htmlEditor) {
|
||||
nsINode* cellparent = GetCellParent(aNewFocus);
|
||||
nsCOMPtr<nsINode> editorHostNode = htmlEditor->GetActiveEditingHost();
|
||||
editableCell =
|
||||
cellparent && editorHostNode &&
|
||||
nsContentUtils::ContentIsDescendantOf(cellparent, editorHostNode);
|
||||
editableCell = cellparent && editorHostNode &&
|
||||
cellparent->IsInclusiveDescendantOf(editorHostNode);
|
||||
if (editableCell) {
|
||||
mCellParent = cellparent;
|
||||
#ifdef DEBUG_TABLE_SELECTION
|
||||
|
|
|
@ -18,7 +18,14 @@ function importJSM(jsm) {
|
|||
return SpecialPowers.wrap(obj);
|
||||
}
|
||||
|
||||
let CC = (typeof Components === "object"
|
||||
// When running in release builds, we get a fake Components object in
|
||||
// web contexts, so we need to check that the Components object is sane,
|
||||
// too, not just that it exists.
|
||||
let haveComponents =
|
||||
typeof Components === "object" &&
|
||||
typeof Components.Constructor === "function";
|
||||
|
||||
let CC = (haveComponents
|
||||
? Components
|
||||
: SpecialPowers.wrap(SpecialPowers.Components)).Constructor;
|
||||
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
[Element-getAnimations-dynamic-changes.tentative.html]
|
||||
disabled:
|
||||
if (os == "android") and not e10s: https://bugzilla.mozilla.org/show_bug.cgi?id=1499003
|
||||
[Only the startTimes of existing animations are preserved]
|
||||
expected:
|
||||
if (os == "android") and debug: PASS
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[letter-spacing-computed.html]
|
||||
[Property letter-spacing value 'normal' computes to '0px']
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
[tab-size-computed.html]
|
||||
[Property tab-size value '2.5' computes to '2.5']
|
||||
expected: FAIL
|
||||
|
||||
[Property tab-size value '10px' computes to '10px']
|
||||
expected: FAIL
|
||||
|
||||
[Property tab-size value '4' computes to '4']
|
||||
expected: FAIL
|
||||
|
||||
[Property tab-size value '0px' computes to '0px']
|
||||
expected: FAIL
|
||||
|
||||
[Property tab-size value 'calc(10px - 0.5em)' computes to '0px']
|
||||
expected: FAIL
|
||||
|
||||
[Property tab-size value '0' computes to '0']
|
||||
expected: FAIL
|
||||
|
||||
[Property tab-size value '16' computes to '16']
|
||||
expected: FAIL
|
||||
|
||||
[Property tab-size value 'calc(10px + 0.5em)' computes to '30px']
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[text-align-last-computed.html]
|
||||
[Property text-align-last value 'match-parent' computes to 'match-parent']
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
[text-indent-computed.html]
|
||||
[Property text-indent value '10px hanging' computes to '10px hanging']
|
||||
expected: FAIL
|
||||
|
||||
[Property text-indent value 'each-line hanging calc(10px + 0.5em)' computes to '30px hanging each-line']
|
||||
expected: FAIL
|
||||
|
||||
[Property text-indent value '20% each-line' computes to '20% each-line']
|
||||
expected: FAIL
|
||||
|
||||
[Property text-indent value 'calc(50% + 60px) hanging each-line' computes to 'calc(50% + 60px) hanging each-line']
|
||||
expected: FAIL
|
||||
|
|
@ -1,8 +1,7 @@
|
|||
[appearance-textarea-001.html]
|
||||
disabled:
|
||||
if debug and os == "win" and version == "6.1.7601": https://bugzilla.mozilla.org/show_bug.cgi?id=1560360
|
||||
if os == "win" and processor == "aarch64": https://bugzilla.mozilla.org/show_bug.cgi?id=1560360
|
||||
if debug and (os == "win") and (version == "6.1.7601"): https://bugzilla.mozilla.org/show_bug.cgi?id=1560360
|
||||
if (os == "win") and (processor == "aarch64"): https://bugzilla.mozilla.org/show_bug.cgi?id=1560360
|
||||
expected:
|
||||
if (os == "win") and debug and (processor == "x86_64"): FAIL
|
||||
if (os == "win") and not debug: FAIL
|
||||
if os == "win": FAIL
|
||||
if (os == "win") and debug and not webrender: FAIL
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
[scroll-behavior-default-css.html]
|
||||
disabled:
|
||||
if os == "android": https://bugzilla.mozilla.org/show_bug.cgi?id=1565072
|
||||
|
||||
[Smooth scrolling of an element with default scroll-behavior]
|
||||
expected:
|
||||
if (os == "android") and e10s: FAIL # Bug 1565072
|
|
@ -490,6 +490,9 @@
|
|||
[[["bold",""\]\] "foo{<i><b></b></i>}baz" queryCommandState("bold") after]
|
||||
expected: FAIL
|
||||
|
||||
[bold - HTML editing conformance tests]
|
||||
expected: FAIL
|
||||
|
||||
|
||||
[bold.html?1001-2000]
|
||||
[[["stylewithcss","false"\],["bold",""\]\] "foo[<span style=\\"font-weight: bold\\">bar</span>\]baz" queryCommandState("stylewithcss") before]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
prefs: [browser.tabs.remote.useCrossOriginOpenerPolicy:true]
|
||||
|
||||
disabled:
|
||||
if verify: intermittent timeouts in verify mode
|
||||
leak-threshold: [default:51200]
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
local: 70925079c98cacb0ecda0a7fe4f40af089f80056
|
||||
upstream: dcac708930b6e73bf3e7629908b6467e7644cff9
|
||||
local: 18589b83fcffad1794ee7f0e8c4e14fd87846b4a
|
||||
upstream: 8b045d6e3d77fffcfb4096697c9665225294efea
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
if (os == "android") and not debug: https://bugzilla.mozilla.org/show_bug.cgi?id=1560324
|
||||
if (os == "android") and not e10s: https://bugzilla.mozilla.org/show_bug.cgi?id=1499972
|
||||
[Service worker controlled navigation timing network fallback]
|
||||
disabled:
|
||||
if (os == "android"): Frequently failing on geckoview (Bug 1481427)
|
||||
disabled:
|
||||
if os == "android": Frequently failing on geckoview (Bug 1481427)
|
||||
|
||||
[Service worker controlled navigation timing redirect]
|
||||
disabled:
|
||||
if (os == "android"): Frequently failing on geckoview (Bug 1560324, Bug 1481553)
|
||||
if os == "android": Frequently failing on geckoview (Bug 1560324, Bug 1481553)
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
[SVGGeometryElement.isPointInStroke-01.svg]
|
||||
[SVGGeometryElement.prototype.isPointInStroke, non-finite argument.]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -2,3 +2,6 @@
|
|||
[measure entries' detail and start/end are customizable]
|
||||
expected: FAIL
|
||||
|
||||
[measure should throw a TypeError when passed an invalid argument combination]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -2,8 +2,3 @@
|
|||
disabled:
|
||||
if (os == "mac") and (version == "OS X 10.14"): new platform
|
||||
if (os == "android") and debug: https://bugzilla.mozilla.org/show_bug.cgi?id=1546756
|
||||
|
||||
[All data processed correctly]
|
||||
expected:
|
||||
if (os == "android") and debug: PASS
|
||||
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
lsan-allowed: [Alloc, Create, GetClientInfo, MakeUnique, NewPage, PLDHashTable::Add, Realloc, SetPropertyAsInterface, mozilla::BasePrincipal::CreateContentPrincipal, mozilla::SchedulerGroup::CreateEventTargetFor, mozilla::WeakPtr, mozilla::dom::WebSocket::ConstructorCommon, mozilla::dom::WebSocket::WebSocket, mozilla::extensions::ChannelWrapper::ChannelWrapper, mozilla::net::BaseWebSocketChannel::InitLoadInfo, mozilla::net::BaseWebSocketChannel::InitLoadInfoNative, mozilla::net::CookieSettings::Create, mozilla::net::LoadInfo::LoadInfo, mozilla::net::WebSocketChannelChild::AsyncOpen, mozilla::net::WebSocketEventService::GetOrCreate, mozilla::net::nsHttpTransaction::ParseHead, mozilla::net::nsStandardURL::TemplatedMutator, nsNodeSupportsWeakRefTearoff::GetWeakReference, nsSupportsWeakReference::GetWeakReference]
|
||||
lsan-allowed: [Alloc, Create, EnterJit, GetClientInfo, MakeUnique, NewPage, PLDHashTable::Add, Realloc, SetPropertyAsInterface, mozilla::BasePrincipal::CreateContentPrincipal, mozilla::SchedulerGroup::CreateEventTargetFor, mozilla::WeakPtr, mozilla::dom::WebSocket::ConstructorCommon, mozilla::dom::WebSocket::WebSocket, mozilla::extensions::ChannelWrapper::ChannelWrapper, mozilla::net::BaseWebSocketChannel::InitLoadInfo, mozilla::net::BaseWebSocketChannel::InitLoadInfoNative, mozilla::net::CookieSettings::Create, mozilla::net::LoadInfo::LoadInfo, mozilla::net::WebSocketChannelChild::AsyncOpen, mozilla::net::WebSocketEventService::GetOrCreate, mozilla::net::nsHttpTransaction::ParseHead, mozilla::net::nsStandardURL::TemplatedMutator, nsNodeSupportsWeakRefTearoff::GetWeakReference, nsSupportsWeakReference::GetWeakReference]
|
||||
leak-threshold: [default:102400, tab:51200]
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text: getComputedValue().hyphens</title>
|
||||
<link rel="help" href="https://www.w3.org/TR/css-text-3/#propdef-hyphens">
|
||||
<meta name="assert" content="hyphens computed value is specified keyword.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/computed-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
test_computed_value("hyphens", "none");
|
||||
test_computed_value("hyphens", "manual");
|
||||
test_computed_value("hyphens", "auto");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text: getComputedValue().letterSpacing</title>
|
||||
<link rel="help" href="https://www.w3.org/TR/css-text-3/#propdef-letter-spacing">
|
||||
<meta name="assert" content="letter-spacing computed value is an absolute length.">
|
||||
<meta name="assert" content="'normal' computes to zero.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/computed-testcommon.js"></script>
|
||||
<style>
|
||||
#target {
|
||||
font-size: 40px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
test_computed_value("letter-spacing", "normal", "0px");
|
||||
|
||||
test_computed_value("letter-spacing", "10px");
|
||||
test_computed_value("letter-spacing", "-20px");
|
||||
test_computed_value("letter-spacing", "calc(10px - 0.5em)", "-10px");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text: getComputedValue().lineBreak</title>
|
||||
<link rel="help" href="https://www.w3.org/TR/css-text-3/#propdef-line-break">
|
||||
<meta name="assert" content="line-break computed value is specified keyword.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/computed-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
test_computed_value("line-break", "auto");
|
||||
test_computed_value("line-break", "loose");
|
||||
test_computed_value("line-break", "normal");
|
||||
test_computed_value("line-break", "strict");
|
||||
test_computed_value("line-break", "anywhere");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text: getComputedValue().overflowWrap</title>
|
||||
<link rel="help" href="https://www.w3.org/TR/css-text-3/#propdef-overflow-wrap">
|
||||
<meta name="assert" content="overflow-wrap computed value is specified keyword.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/computed-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
test_computed_value("overflow-wrap", "normal");
|
||||
test_computed_value("overflow-wrap", "break-word");
|
||||
test_computed_value("overflow-wrap", "anywhere");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,31 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text: getComputedValue().tabSize</title>
|
||||
<link rel="help" href="https://www.w3.org/TR/css-text-3/#propdef-tab-size">
|
||||
<meta name="assert" content="tab-size computed value is the specified number or an absolute length.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/computed-testcommon.js"></script>
|
||||
<style>
|
||||
#target {
|
||||
font-size: 40px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
test_computed_value("tab-size", "0");
|
||||
test_computed_value("tab-size", "16");
|
||||
test_computed_value("tab-size", "4");
|
||||
test_computed_value("tab-size", "2.5");
|
||||
|
||||
test_computed_value("tab-size", "0px");
|
||||
test_computed_value("tab-size", "10px");
|
||||
test_computed_value("tab-size", "calc(10px + 0.5em)", "30px");
|
||||
test_computed_value("tab-size", "calc(10px - 0.5em)", "0px");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text: getComputedValue().textAlignLast</title>
|
||||
<link rel="help" href="https://www.w3.org/TR/css-text-3/#propdef-text-align-last">
|
||||
<meta name="assert" content="text-align-last computed value is specified keyword.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/computed-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
test_computed_value("text-align-last", "auto");
|
||||
test_computed_value("text-align-last", "start");
|
||||
test_computed_value("text-align-last", "end");
|
||||
test_computed_value("text-align-last", "left");
|
||||
test_computed_value("text-align-last", "right");
|
||||
test_computed_value("text-align-last", "center");
|
||||
test_computed_value("text-align-last", "justify");
|
||||
test_computed_value("text-align-last", "match-parent");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,33 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text: getComputedValue().textIndent</title>
|
||||
<link rel="help" href="https://www.w3.org/TR/css-text-3/#propdef-text-indent">
|
||||
<meta name="assert" content="text-indent computed value is computed <length-percentage> value, plus any specified keywords.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/computed-testcommon.js"></script>
|
||||
<style>
|
||||
#target {
|
||||
font-size: 40px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
test_computed_value("text-indent", "10px");
|
||||
test_computed_value("text-indent", "20%");
|
||||
test_computed_value("text-indent", "calc(50% + 60px)");
|
||||
test_computed_value("text-indent", "-30px");
|
||||
test_computed_value("text-indent", "-40%");
|
||||
test_computed_value("text-indent", "calc(10px - 0.5em)", "-10px");
|
||||
|
||||
test_computed_value("text-indent", "10px hanging");
|
||||
test_computed_value("text-indent", "20% each-line");
|
||||
test_computed_value("text-indent", "calc(50% + 60px) hanging each-line");
|
||||
test_computed_value("text-indent", "each-line hanging calc(10px + 0.5em)", "30px hanging each-line");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text: getComputedValue().textJustify</title>
|
||||
<link rel="help" href="https://www.w3.org/TR/css-text-3/#propdef-text-justify">
|
||||
<meta name="assert" content="text-justify computed value is specified keyword.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/computed-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
test_computed_value("text-justify", "auto");
|
||||
test_computed_value("text-justify", "none");
|
||||
test_computed_value("text-justify", "inter-word");
|
||||
test_computed_value("text-justify", "inter-character");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,29 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text: getComputedValue().textTransform</title>
|
||||
<link rel="help" href="https://www.w3.org/TR/css-text-3/#propdef-text-transform">
|
||||
<meta name="assert" content="text-transform computed value is specified keywords.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/computed-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
test_computed_value("text-transform", "none");
|
||||
|
||||
test_computed_value("text-transform", "capitalize");
|
||||
test_computed_value("text-transform", "uppercase");
|
||||
test_computed_value("text-transform", "lowercase");
|
||||
test_computed_value("text-transform", "full-width");
|
||||
test_computed_value("text-transform", "full-size-kana");
|
||||
|
||||
test_computed_value("text-transform", "capitalize full-width");
|
||||
test_computed_value("text-transform", "full-width full-size-kana");
|
||||
|
||||
test_computed_value("text-transform", "uppercase full-width full-size-kana");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text: getComputedValue().whiteSpace</title>
|
||||
<link rel="help" href="https://www.w3.org/TR/css-text-3/#propdef-white-space">
|
||||
<meta name="assert" content="white-space computed value is specified keyword.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/computed-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
test_computed_value("white-space", "normal");
|
||||
test_computed_value("white-space", "pre");
|
||||
test_computed_value("white-space", "nowrap");
|
||||
test_computed_value("white-space", "pre-wrap");
|
||||
test_computed_value("white-space", "break-spaces");
|
||||
test_computed_value("white-space", "pre-line");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text: getComputedValue().wordBreak</title>
|
||||
<link rel="help" href="https://www.w3.org/TR/css-text-3/#propdef-word-break">
|
||||
<meta name="assert" content="word-break computed value is specified keyword.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/computed-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
test_computed_value("word-break", "normal");
|
||||
test_computed_value("word-break", "keep-all");
|
||||
test_computed_value("word-break", "break-all");
|
||||
test_computed_value("word-break", "break-word");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text: getComputedValue().wordSpacing</title>
|
||||
<link rel="help" href="https://www.w3.org/TR/css-text-3/#propdef-word-spacing">
|
||||
<meta name="assert" content="word-spacing computed value is an absolute length.">
|
||||
<meta name="assert" content="'normal' computes to zero.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/computed-testcommon.js"></script>
|
||||
<style>
|
||||
#target {
|
||||
font-size: 40px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
test_computed_value("word-spacing", "normal", "0px");
|
||||
|
||||
test_computed_value("word-spacing", "10px");
|
||||
test_computed_value("word-spacing", "-20px");
|
||||
test_computed_value("word-spacing", "calc(10px - 0.5em)", "-10px");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text: getComputedValue().wordWrap</title>
|
||||
<link rel="help" href="https://www.w3.org/TR/css-text-3/#propdef-word-wrap">
|
||||
<meta name="assert" content="word-wrap computed value is specified keyword.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/computed-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
test_computed_value("word-wrap", "normal");
|
||||
test_computed_value("word-wrap", "break-word");
|
||||
test_computed_value("word-wrap", "anywhere");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -5,7 +5,13 @@
|
|||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/user-timing-helper.js"></script>
|
||||
<script>
|
||||
function cleanupPerformanceTimeline() {
|
||||
performance.clearMarks();
|
||||
performance.clearMeasures();
|
||||
}
|
||||
|
||||
async_test(function (t) {
|
||||
this.add_cleanup(cleanupPerformanceTimeline);
|
||||
let measureEntries = [];
|
||||
const timeStamp1 = 784.4;
|
||||
const timeStamp2 = 1234.5;
|
||||
|
@ -40,8 +46,6 @@
|
|||
}
|
||||
})
|
||||
);
|
||||
self.performance.clearMarks();
|
||||
self.performance.clearMeasures();
|
||||
observer.observe({ entryTypes: ["measure"] });
|
||||
self.performance.mark("mark1", { detail: { randomInfo: 3 }, startTime: timeStamp1 });
|
||||
self.performance.mark("mark2", { startTime: timeStamp2 });
|
||||
|
@ -80,10 +84,16 @@
|
|||
checkEntries(returnedEntries, expectedEntries);
|
||||
}, "measure entries' detail and start/end are customizable");
|
||||
|
||||
async_test(function (t) {
|
||||
assert_throws("SyntaxError", function() {
|
||||
test(function () {
|
||||
this.add_cleanup(cleanupPerformanceTimeline);
|
||||
assert_throws(new TypeError(), function() {
|
||||
self.performance.measure("wrongUsage1", {}, 12);
|
||||
});
|
||||
t.done();
|
||||
}, "measure should throw exception when passing option object and end at the same time");
|
||||
}, "measure should throw a TypeError when passed an options object and an end time");
|
||||
assert_throws(new TypeError(), function() {
|
||||
self.performance.measure("wrongUsage2", {'startTime': 2}, 12);
|
||||
}, "measure should throw a TypeError when passed an options object and an end time");
|
||||
assert_throws(new TypeError(), function() {
|
||||
self.performance.measure("wrongUsage3", {'startTime': 2}, 'mark1');
|
||||
}, "measure should throw a TypeError when passed an options object and an end mark");
|
||||
}, "measure should throw a TypeError when passed an invalid argument combination");
|
||||
</script>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Reference for WebVTT rendering, basic</title>
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
<style>
|
||||
html { overflow:hidden }
|
||||
body { margin:0 }
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<html class="reftest-wait">
|
||||
<title>WebVTT rendering, basic</title>
|
||||
<link rel="match" href="basic-ref.html">
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
<style>
|
||||
html { overflow:hidden }
|
||||
body { margin:0 }
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Reference for WebVTT rendering, line:0 should be top line</title>
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
<style>
|
||||
html { overflow:hidden }
|
||||
body { margin:0 }
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<html class="reftest-wait">
|
||||
<title>WebVTT rendering, line:0 should be top line</title>
|
||||
<link rel="match" href="line_0_is_top-ref.html">
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
<style>
|
||||
html { overflow:hidden }
|
||||
body { margin:0 }
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Reference for WebVTT rendering, ::cue(|c) should match</title>
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
<style>
|
||||
html { overflow:hidden }
|
||||
body { margin:0 }
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<html class="reftest-wait">
|
||||
<title>WebVTT rendering, ::cue(|c) should match</title>
|
||||
<link rel="match" href="class_namespace-ref.html">
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
<style>
|
||||
html { overflow:hidden }
|
||||
body { margin:0 }
|
||||
|
|
Загрузка…
Ссылка в новой задаче