зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1539265 - Add isMarkerPseudoElement function to layout/utils.js. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D25105 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
8e985aa314
Коммит
addac983bb
|
@ -18,6 +18,7 @@ loader.lazyRequireGetter(this, "isAfterPseudoElement", "devtools/shared/layout/u
|
|||
loader.lazyRequireGetter(this, "isAnonymous", "devtools/shared/layout/utils", true);
|
||||
loader.lazyRequireGetter(this, "isBeforePseudoElement", "devtools/shared/layout/utils", true);
|
||||
loader.lazyRequireGetter(this, "isDirectShadowHostChild", "devtools/shared/layout/utils", true);
|
||||
loader.lazyRequireGetter(this, "isMarkerPseudoElement", "devtools/shared/layout/utils", true);
|
||||
loader.lazyRequireGetter(this, "isNativeAnonymous", "devtools/shared/layout/utils", true);
|
||||
loader.lazyRequireGetter(this, "isShadowAnonymous", "devtools/shared/layout/utils", true);
|
||||
loader.lazyRequireGetter(this, "isShadowHost", "devtools/shared/layout/utils", true);
|
||||
|
@ -127,6 +128,7 @@ const NodeActor = protocol.ActorClassWithSpec(nodeSpec, {
|
|||
|
||||
attrs: this.writeAttrs(),
|
||||
customElementLocation: this.getCustomElementLocation(),
|
||||
isMarkerPseudoElement: isMarkerPseudoElement(this.rawNode),
|
||||
isBeforePseudoElement: isBeforePseudoElement(this.rawNode),
|
||||
isAfterPseudoElement: isAfterPseudoElement(this.rawNode),
|
||||
isAnonymous: isAnonymous(this.rawNode),
|
||||
|
|
|
@ -267,6 +267,9 @@ class NodeFront extends FrontClassWithSpec(nodeSpec) {
|
|||
return this._form.hasEventListeners;
|
||||
}
|
||||
|
||||
get isMarkerPseudoElement() {
|
||||
return this._form.isMarkerPseudoElement;
|
||||
}
|
||||
get isBeforePseudoElement() {
|
||||
return this._form.isBeforePseudoElement;
|
||||
}
|
||||
|
|
|
@ -649,6 +649,17 @@ function isDirectShadowHostChild(node) {
|
|||
}
|
||||
exports.isDirectShadowHostChild = isDirectShadowHostChild;
|
||||
|
||||
/**
|
||||
* Determine whether a node is a ::marker pseudo.
|
||||
*
|
||||
* @param {DOMNode} node
|
||||
* @return {Boolean}
|
||||
*/
|
||||
function isMarkerPseudoElement(node) {
|
||||
return node.nodeName === "_moz_generated_content_marker";
|
||||
}
|
||||
exports.isMarkerPseudoElement = isMarkerPseudoElement;
|
||||
|
||||
/**
|
||||
* Determine whether a node is a ::before pseudo.
|
||||
*
|
||||
|
|
Загрузка…
Ссылка в новой задаче