Backed out 11 changesets (bug 1539265) for causing debugger failures CLOSED TREE

Backed out changeset 8206b880f9ec (bug 1539265)
Backed out changeset be9f5f73bdfe (bug 1539265)
Backed out changeset f78146b8aa17 (bug 1539265)
Backed out changeset 18fa7e971a0d (bug 1539265)
Backed out changeset 6eaf5bdd945c (bug 1539265)
Backed out changeset 3add7d4d4853 (bug 1539265)
Backed out changeset 8015aeb5279d (bug 1539265)
Backed out changeset 19c8e404ac5f (bug 1539265)
Backed out changeset 637a9d6af0f3 (bug 1539265)
Backed out changeset 72bbb4b28932 (bug 1539265)
Backed out changeset 931e98129878 (bug 1539265)
This commit is contained in:
arthur.iakab 2019-04-02 02:44:43 +03:00
Родитель 97cc18f3c6
Коммит cf3b3f1eb5
25 изменённых файлов: 93 добавлений и 442 удалений

Просмотреть файл

@ -93,8 +93,7 @@ function getElements(grip, mode) {
attributes,
nodeName,
isAfterPseudoElement,
isBeforePseudoElement,
isMarkerPseudoElement,
isBeforePseudoElement
} = grip.preview;
const nodeNameElement = span(
{
@ -103,19 +102,11 @@ function getElements(grip, mode) {
nodeName
);
let pseudoNodeName;
if (isAfterPseudoElement) {
pseudoNodeName = "after";
} else if (isBeforePseudoElement) {
pseudoNodeName = "before";
} else if (isMarkerPseudoElement) {
pseudoNodeName = "marker";
}
if (pseudoNodeName) {
if (isAfterPseudoElement || isBeforePseudoElement) {
return [
span(
{ className: "attrName" },
`::${pseudoNodeName}`
`::${isAfterPseudoElement ? "after" : "before"}`
)
];
}

Просмотреть файл

@ -248,19 +248,6 @@ stubs.set("NodeWithLongStringAttribute", {
}
});
stubs.set("MarkerPseudoElement", {
type: "object",
actor: "server1.conn1.child1/obj26",
preview: {
kind: "DOMNode",
nodeType: 1,
nodeName: "_moz_generated_content_marker",
attributes: {},
attributesLength: 0,
isMarkerPseudoElement: true
}
});
stubs.set("BeforePseudoElement", {
type: "object",
actor: "server1.conn1.child1/obj27",

Просмотреть файл

@ -465,35 +465,6 @@ describe("ElementNode - Element attribute cropping", () => {
});
});
describe("ElementNode - : Marker pseudo element", () => {
const stub = stubs.get("MarkerPseudoElement");
it("selects ElementNode Rep", () => {
expect(getRep(stub)).toBe(ElementNode.rep);
});
it("renders with expected text content", () => {
const renderedComponent = shallow(
ElementNode.rep({
object: stub
})
);
expect(renderedComponent.text()).toEqual("::marker");
});
it("renders with expected text content in tiny mode", () => {
const renderedComponent = shallow(
ElementNode.rep({
object: stub,
mode: MODE.TINY
})
);
expect(renderedComponent.text()).toEqual("::marker");
});
});
describe("ElementNode - : Before pseudo element", () => {
const stub = stubs.get("BeforePseudoElement");

Просмотреть файл

@ -428,12 +428,8 @@ HTMLBreadcrumbs.prototype = {
*/
prettyPrintNodeAsText: function(node) {
let text = node.isShadowRoot ? SHADOW_ROOT_TAGNAME : node.displayName;
if (node.isMarkerPseudoElement) {
text = "::marker";
} else if (node.isBeforePseudoElement) {
text = "::before";
} else if (node.isAfterPseudoElement) {
text = "::after";
if (node.isPseudoElement) {
text = node.isBeforePseudoElement ? "::before" : "::after";
}
if (node.id) {
@ -476,12 +472,8 @@ HTMLBreadcrumbs.prototype = {
pseudosLabel.className = "breadcrumbs-widget-item-pseudo-classes plain";
let tagText = node.isShadowRoot ? SHADOW_ROOT_TAGNAME : node.displayName;
if (node.isMarkerPseudoElement) {
tagText = "::marker";
} else if (node.isBeforePseudoElement) {
tagText = "::before";
} else if (node.isAfterPseudoElement) {
tagText = "::after";
if (node.isPseudoElement) {
tagText = node.isBeforePseudoElement ? "::before" : "::after";
}
let idText = node.id ? ("#" + node.id) : "";
let classesText = "";

Просмотреть файл

@ -2180,16 +2180,12 @@ MarkupView.prototype = {
nextSibling = target.parentNode.container.node;
}
if (nextSibling) {
while (
nextSibling.isMarkerPseudoElement || nextSibling.isBeforePseudoElement
) {
nextSibling = this.getContainer(nextSibling).elt.nextSibling.container.node;
}
if (nextSibling.isAfterPseudoElement) {
parent = target.parentNode.container.node.parentNode();
nextSibling = null;
}
if (nextSibling && nextSibling.isBeforePseudoElement) {
nextSibling = target.parentNode.parentNode.children[1].container.node;
}
if (nextSibling && nextSibling.isAfterPseudoElement) {
parent = target.parentNode.container.node.parentNode();
nextSibling = null;
}
if (parent.nodeType !== nodeConstants.ELEMENT_NODE) {

Просмотреть файл

@ -115,7 +115,6 @@ skip-if = (os == 'linux' && bits == 32 && debug) || (os == "win" && processor ==
[browser_markup_display_node_02.js]
[browser_markup_dragdrop_autoscroll_01.js]
[browser_markup_dragdrop_autoscroll_02.js]
[browser_markup_dragdrop_before_marker_pseudo.js]
[browser_markup_dragdrop_distance.js]
[browser_markup_dragdrop_draggable.js]
[browser_markup_dragdrop_dragRootNode.js]
@ -202,7 +201,6 @@ subsuite = clipboard
[browser_markup_shadowdom_delete.js]
[browser_markup_shadowdom_dynamic.js]
[browser_markup_shadowdom_hover.js]
[browser_markup_shadowdom_marker_and_before_pseudos.js]
[browser_markup_shadowdom_maxchildren.js]
[browser_markup_shadowdom_mutations_shadow.js]
[browser_markup_shadowdom_navigation.js]

Просмотреть файл

@ -14,9 +14,9 @@ add_task(async function() {
data:text/html;charset=utf-8,
<h1>foo</h1>
<span>bar</span>
<dl>
<dt></dt>
</dl>`);
<ul>
<li></li>
</ul>`);
const markup = inspector.markup;
const doc = markup.doc;
const win = doc.defaultView;
@ -25,7 +25,7 @@ add_task(async function() {
const bodyContainer = await getContainerForSelector("body", inspector);
const spanContainer = await getContainerForSelector("span", inspector);
const headerContainer = await getContainerForSelector("h1", inspector);
const listContainer = await getContainerForSelector("dl", inspector);
const listContainer = await getContainerForSelector("ul", inspector);
// Focus on the tree element.
rootElt.focus();
@ -71,7 +71,7 @@ add_task(async function() {
"Closed tree item should have aria-expanded unset");
info("Selecting and expanding list container");
await selectNode("dl", inspector);
await selectNode("ul", inspector);
EventUtils.synthesizeKey("VK_RIGHT", {}, win);
await waitForMultipleChildrenUpdates(inspector);
@ -80,7 +80,7 @@ add_task(async function() {
"Active descendant should not be set to list container tagLine");
is(listContainer.tagLine.getAttribute("aria-expanded"), "true",
"Open tree item should have aria-expanded set");
const listItemContainer = await getContainerForSelector("dt", inspector);
const listItemContainer = await getContainerForSelector("li", inspector);
is(listItemContainer.tagLine.getAttribute("aria-level"),
TOP_CONTAINER_LEVEL + 1,
"Grand child container tagLine should have nested level up to date");

Просмотреть файл

@ -1,62 +0,0 @@
/* vim: set ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
// Test drag and dropping a node before a ::marker pseudo.
const TEST_URL = URL_ROOT + "doc_markup_dragdrop.html";
add_task(async function() {
const {inspector} = await openInspectorForURL(TEST_URL);
info("Expand #list node");
const parentFront = await getNodeFront("#list", inspector);
await inspector.markup.expandNode(parentFront.parentNode());
await inspector.markup.expandNode(parentFront);
await waitForMultipleChildrenUpdates(inspector);
info("Scroll #list into view");
const parentContainer = await getContainerForNodeFront(parentFront, inspector);
parentContainer.elt.scrollIntoView(true);
info("Test placing an element before a ::marker psuedo");
await moveElementBeforeMarker("#last-list-child", parentFront, inspector);
const childNodes = await getChildrenOf(parentFront, inspector);
is(childNodes[0], "_moz_generated_content_marker",
"::marker is still the first child of #list");
is(childNodes[1], "last-list-child",
"#last-list-child is now the second child of #list");
is(childNodes[2], "first-list-child",
"#first-list-child is now the last child of #list");
});
async function moveElementBeforeMarker(selector, parentFront, inspector) {
info(`Placing ${selector} before its parent's ::marker`);
const container = await getContainerForSelector(selector, inspector);
const parentContainer = await getContainerForNodeFront(parentFront, inspector);
const offsetY = (parentContainer.tagLine.offsetTop +
parentContainer.tagLine.offsetHeight) - container.tagLine.offsetTop;
const onMutated = inspector.once("markupmutation");
const uiUpdate = inspector.once("inspector-updated");
await simulateNodeDragAndDrop(inspector, selector, 0, offsetY);
const mutations = await onMutated;
await uiUpdate;
is(mutations.length, 2, "2 mutations were received");
}
async function getChildrenOf(parentFront, {walker}) {
const {nodes} = await walker.children(parentFront);
return nodes.map(node => {
if (node.isMarkerPseudoElement) {
return node.displayName;
}
return node.id;
});
}

Просмотреть файл

@ -1,112 +0,0 @@
/* vim: set ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
requestLongerTimeout(1);
// Test a few static pages using webcomponents with ::marker and ::before
// pseudos and check that they are displayed as expected in the markup view.
const TEST_DATA = [
{
// Test that ::before on an empty shadow host is displayed when the host
// has a ::marker.
title: "::before after ::marker, empty node",
url: `data:text/html;charset=utf-8,
<style>
test-component { display: list-item; }
test-component::before { content: "before-host" }
</style>
<test-component></test-component>
<script>
'use strict';
customElements.define('test-component', class extends HTMLElement {
constructor() {
super();
let shadowRoot = this.attachShadow({mode: "#MODE#"});
}
});
</script>`,
tree: `
test-component
#shadow-root
::marker
::before`,
}, {
// Test ::before on a shadow host with content is displayed when the host
// has a ::marker.
title: "::before after ::marker, non-empty node",
url: `data:text/html;charset=utf-8,
<style>
test-component { display: list-item }
test-component::before { content: "before-host" }
</style>
<test-component>
<div class="light-dom"></div>
</test-component>
<script>
"use strict";
customElements.define("test-component", class extends HTMLElement {
constructor() {
super();
let shadowRoot = this.attachShadow({mode: "#MODE#"});
shadowRoot.innerHTML = "<slot>default content</slot>";
}
});
</script>`,
tree: `
test-component
#shadow-root
slot
div!slotted
::marker
::before
class="light-dom"`,
}, {
// Test just ::marker on a shadow host
title: "just ::marker, no ::before",
url: `data:text/html;charset=utf-8,
<style>
test-component { display: list-item }
</style>
<test-component></test-component>
<script>
"use strict";
customElements.define("test-component", class extends HTMLElement {
constructor() {
super();
let shadowRoot = this.attachShadow({mode: "#MODE#"});
}
});
</script>`,
tree: `
test-component
#shadow-root
::marker`,
},
];
for (const {url, tree, title} of TEST_DATA) {
// Test each configuration in both open and closed modes
add_task(async function() {
info(`Testing: [${title}] in OPEN mode`);
const {inspector, tab} = await openInspectorForURL(url.replace(/#MODE#/g, "open"));
await assertMarkupViewAsTree(tree, "test-component", inspector);
await removeTab(tab);
});
add_task(async function() {
info(`Testing: [${title}] in CLOSED mode`);
const {inspector, tab} = await openInspectorForURL(url.replace(/#MODE#/g, "closed"));
await assertMarkupViewAsTree(tree, "test-component", inspector);
await removeTab(tab);
});
}

Просмотреть файл

@ -25,12 +25,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=858038
<div slot="slot1" class="slotted2">slot1-2</div>
</test-component>
<ol>
<li id="list"><span id="first-list-child"
>List item start</span><span id="last-list-child"
>List item end</span></li>
</ol>
<script>
"use strict";
customElements.define("test-component", class extends HTMLElement {

Просмотреть файл

@ -16,13 +16,7 @@ function ReadOnlyEditor(container, node) {
if (node.isPseudoElement) {
this.tag.classList.add("theme-fg-color3");
if (node.isMarkerPseudoElement) {
this.tag.textContent = "::marker";
} else if (node.isBeforePseudoElement) {
this.tag.textContent = "::before";
} else if (node.isAfterPseudoElement) {
this.tag.textContent = "::after";
}
this.tag.textContent = node.isBeforePseudoElement ? "::before" : "::after";
} else if (node.nodeType == nodeConstants.DOCUMENT_TYPE_NODE) {
this.elt.classList.add("comment", "doctype");
this.tag.textContent = node.doctypeString;

Просмотреть файл

@ -21,7 +21,6 @@ add_task(async function() {
await testBottomLeft(inspector, view);
await testParagraph(inspector, view);
await testBody(inspector, view);
await testList(inspector, view);
});
async function testTopLeft(inspector, view) {
@ -32,7 +31,6 @@ async function testTopLeft(inspector, view) {
firstLineRulesNb: 2,
firstLetterRulesNb: 1,
selectionRulesNb: 1,
markerRulesNb: 0,
afterRulesNb: 1,
beforeRulesNb: 2,
}
@ -125,7 +123,6 @@ async function testTopRight(inspector, view) {
firstLineRulesNb: 1,
firstLetterRulesNb: 1,
selectionRulesNb: 0,
markerRulesNb: 0,
beforeRulesNb: 2,
afterRulesNb: 1,
});
@ -148,7 +145,6 @@ async function testBottomRight(inspector, view) {
firstLineRulesNb: 1,
firstLetterRulesNb: 1,
selectionRulesNb: 0,
markerRulesNb: 0,
beforeRulesNb: 3,
afterRulesNb: 1,
});
@ -160,7 +156,6 @@ async function testBottomLeft(inspector, view) {
firstLineRulesNb: 1,
firstLetterRulesNb: 1,
selectionRulesNb: 0,
markerRulesNb: 0,
beforeRulesNb: 2,
afterRulesNb: 1,
});
@ -173,7 +168,6 @@ async function testParagraph(inspector, view) {
firstLineRulesNb: 1,
firstLetterRulesNb: 1,
selectionRulesNb: 2,
markerRulesNb: 0,
beforeRulesNb: 0,
afterRulesNb: 0,
});
@ -203,20 +197,6 @@ async function testBody(inspector, view) {
is(gutters.length, 0, "There are no gutter headings");
}
async function testList(inspector, view) {
await assertPseudoElementRulesNumbers("#list", inspector, view, {
elementRulesNb: 4,
firstLineRulesNb: 1,
firstLetterRulesNb: 1,
selectionRulesNb: 0,
markerRulesNb: 1,
beforeRulesNb: 1,
afterRulesNb: 1,
});
assertGutters(view);
}
function convertTextPropsToString(textProps) {
return textProps.map(t => t.name + ": " + t.value).join("; ");
}
@ -238,8 +218,6 @@ async function assertPseudoElementRulesNumbers(selector, inspector, view, ruleNb
rule.pseudoElement === ":first-letter"),
selectionRules: elementStyle.rules.filter(rule =>
rule.pseudoElement === ":selection"),
markerRules: elementStyle.rules.filter(rule =>
rule.pseudoElement === ":marker"),
beforeRules: elementStyle.rules.filter(rule =>
rule.pseudoElement === ":before"),
afterRules: elementStyle.rules.filter(rule =>
@ -254,8 +232,6 @@ async function assertPseudoElementRulesNumbers(selector, inspector, view, ruleNb
selector + " has the correct number of :first-letter rules");
is(rules.selectionRules.length, ruleNbs.selectionRulesNb,
selector + " has the correct number of :selection rules");
is(rules.markerRules.length, ruleNbs.markerRulesNb,
selector + " has the correct number of :marker rules");
is(rules.beforeRules.length, ruleNbs.beforeRulesNb,
selector + " has the correct number of :before rules");
is(rules.afterRules.length, ruleNbs.afterRulesNb,

Просмотреть файл

@ -26,18 +26,4 @@ add_task(async function() {
is(afterElement.tagName, "_moz_generated_content_after",
"tag name is correct");
await selectNode(afterElement, inspector);
const listNode = await getNodeFront("#list", inspector);
const listChildren = await inspector.markup.walker.children(listNode);
is(listChildren.nodes.length, 4, "<li> has correct number of children");
const markerElement = listChildren.nodes[0];
is(markerElement.tagName, "_moz_generated_content_marker",
"tag name is correct");
await selectNode(markerElement, inspector);
const listBeforeElement = listChildren.nodes[1];
is(listBeforeElement.tagName, "_moz_generated_content_before",
"tag name is correct");
await selectNode(listBeforeElement, inspector);
});

Просмотреть файл

@ -106,10 +106,6 @@ p:first-letter {
left:0;
}
#list::marker {
color: purple;
}
</style>
</head>
<body>
@ -131,9 +127,5 @@ p:first-letter {
<p>Bottom Left<br />Position</p>
</div>
<ol>
<li id="list" class="box">List element</li>
</ol>
</body>
</html>

Просмотреть файл

@ -139,15 +139,10 @@ function getSelectorFromGrip(grip) {
nodeName,
isAfterPseudoElement,
isBeforePseudoElement,
isMarkerPseudoElement,
} = grip.preview;
if (isAfterPseudoElement) {
return "::after";
} else if (isBeforePseudoElement) {
return "::before";
} else if (isMarkerPseudoElement) {
return "::marker";
if (isAfterPseudoElement || isBeforePseudoElement) {
return `::${isAfterPseudoElement ? "after" : "before"}`;
}
let selector = nodeName;
@ -205,7 +200,6 @@ function translateNodeFrontToGrip(nodeFront) {
attributesLength: attributes.length,
isAfterPseudoElement: nodeFront.isAfterPseudoElement,
isBeforePseudoElement: nodeFront.isBeforePseudoElement,
isMarkerPseudoElement: nodeFront.isMarkerPseudoElement,
// All the grid containers are assumed to be in the DOM tree.
isConnected: true,
// nodeName is already lowerCased in Node grips

Просмотреть файл

@ -89,13 +89,13 @@ module.exports = __WEBPACK_EXTERNAL_MODULE_1__;
/***/ }),
/***/ 109:
/***/ 108:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _tree = __webpack_require__(110);
var _tree = __webpack_require__(109);
var _tree2 = _interopRequireDefault(_tree);
@ -109,7 +109,7 @@ module.exports = {
/***/ }),
/***/ 110:
/***/ 109:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@ -137,7 +137,7 @@ const { Component, createFactory } = _react2.default; /* This Source Code Form i
* 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/>. */
__webpack_require__(111);
__webpack_require__(110);
// depth
const AUTO_EXPAND_DEPTH = 0;
@ -1088,14 +1088,14 @@ exports.default = Tree;
/***/ }),
/***/ 111:
/***/ 110:
/***/ (function(module, exports) {
// removed by extract-text-webpack-plugin
/***/ }),
/***/ 114:
/***/ 113:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@ -1400,7 +1400,7 @@ module.exports = Grip;
/***/ }),
/***/ 115:
/***/ 114:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@ -1412,11 +1412,11 @@ module.exports = Grip;
const { maybeEscapePropertyName } = __webpack_require__(2);
const ArrayRep = __webpack_require__(38);
const GripArrayRep = __webpack_require__(191);
const GripMap = __webpack_require__(193);
const GripMapEntryRep = __webpack_require__(194);
const ErrorRep = __webpack_require__(190);
const BigIntRep = __webpack_require__(187);
const GripArrayRep = __webpack_require__(192);
const GripMap = __webpack_require__(194);
const GripMapEntryRep = __webpack_require__(195);
const ErrorRep = __webpack_require__(191);
const BigIntRep = __webpack_require__(188);
const { isLongString } = __webpack_require__(25);
const MAX_NUMERICAL_PROPERTIES = 100;
@ -2278,7 +2278,7 @@ module.exports = {
/***/ }),
/***/ 116:
/***/ 115:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@ -2387,7 +2387,7 @@ module.exports.default = reducer;
/***/ }),
/***/ 117:
/***/ 116:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@ -2397,9 +2397,9 @@ module.exports.default = reducer;
* 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/>. */
const client = __webpack_require__(196);
const loadProperties = __webpack_require__(195);
const node = __webpack_require__(115);
const client = __webpack_require__(197);
const loadProperties = __webpack_require__(196);
const node = __webpack_require__(114);
const { nodeIsError, nodeIsPrimitive } = node;
const selection = __webpack_require__(488);
@ -2439,7 +2439,7 @@ module.exports = {
/***/ }),
/***/ 187:
/***/ 188:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@ -2483,7 +2483,7 @@ module.exports = {
/***/ }),
/***/ 188:
/***/ 189:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@ -2648,7 +2648,7 @@ module.exports = {
/***/ }),
/***/ 189:
/***/ 190:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@ -2683,7 +2683,7 @@ module.exports = {
/***/ }),
/***/ 190:
/***/ 191:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@ -2697,7 +2697,7 @@ module.exports = {
const PropTypes = __webpack_require__(0);
// Utils
const { getGripType, isGrip, wrapRender } = __webpack_require__(2);
const { cleanFunctionName } = __webpack_require__(188);
const { cleanFunctionName } = __webpack_require__(189);
const { isLongString } = __webpack_require__(25);
const { MODE } = __webpack_require__(4);
@ -2910,7 +2910,7 @@ module.exports = {
/***/ }),
/***/ 191:
/***/ 192:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@ -2923,7 +2923,7 @@ module.exports = {
// Dependencies
const PropTypes = __webpack_require__(0);
const { lengthBubble } = __webpack_require__(192);
const { lengthBubble } = __webpack_require__(193);
const {
interleave,
getGripType,
@ -3142,7 +3142,7 @@ module.exports = {
/***/ }),
/***/ 192:
/***/ 193:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@ -3197,7 +3197,7 @@ module.exports = {
/***/ }),
/***/ 193:
/***/ 194:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@ -3209,7 +3209,7 @@ module.exports = {
// Dependencies
const { lengthBubble } = __webpack_require__(192);
const { lengthBubble } = __webpack_require__(193);
const PropTypes = __webpack_require__(0);
const {
interleave,
@ -3392,7 +3392,7 @@ module.exports = {
/***/ }),
/***/ 194:
/***/ 195:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@ -3466,7 +3466,7 @@ module.exports = {
/***/ }),
/***/ 195:
/***/ 196:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@ -3483,7 +3483,7 @@ const {
getPrototype,
enumSymbols,
getFullText
} = __webpack_require__(196);
} = __webpack_require__(197);
const {
getClosestGripNode,
@ -3500,7 +3500,7 @@ const {
nodeIsProxy,
nodeNeedsNumericalBuckets,
nodeIsLongString
} = __webpack_require__(115);
} = __webpack_require__(114);
function loadItemProperties(item, createObjectClient, createLongStringClient, loadedProperties) {
const gripItem = getClosestGripNode(item);
@ -3617,13 +3617,13 @@ module.exports = {
/***/ }),
/***/ 196:
/***/ 197:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
const { getValue, nodeHasFullText } = __webpack_require__(115); /* This Source Code Form is subject to the terms of the Mozilla Public
const { getValue, nodeHasFullText } = __webpack_require__(114); /* 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/>. */
@ -4188,26 +4188,26 @@ const Accessor = __webpack_require__(466);
// DOM types (grips)
const Accessible = __webpack_require__(467);
const Attribute = __webpack_require__(468);
const BigInt = __webpack_require__(187);
const BigInt = __webpack_require__(188);
const DateTime = __webpack_require__(469);
const Document = __webpack_require__(470);
const DocumentType = __webpack_require__(471);
const Event = __webpack_require__(472);
const Func = __webpack_require__(188);
const Func = __webpack_require__(189);
const PromiseRep = __webpack_require__(473);
const RegExp = __webpack_require__(474);
const StyleSheet = __webpack_require__(475);
const CommentNode = __webpack_require__(476);
const ElementNode = __webpack_require__(477);
const TextNode = __webpack_require__(478);
const ErrorRep = __webpack_require__(190);
const ErrorRep = __webpack_require__(191);
const Window = __webpack_require__(479);
const ObjectWithText = __webpack_require__(480);
const ObjectWithURL = __webpack_require__(481);
const GripArray = __webpack_require__(191);
const GripMap = __webpack_require__(193);
const GripMapEntry = __webpack_require__(194);
const Grip = __webpack_require__(114);
const GripArray = __webpack_require__(192);
const GripMap = __webpack_require__(194);
const GripMapEntry = __webpack_require__(195);
const Grip = __webpack_require__(113);
// List of all registered template.
// XXX there should be a way for extensions to register a new
@ -4780,7 +4780,7 @@ PropRep.propTypes = {
* @return {Array} Array of React elements.
*/
function PropRep(props) {
const Grip = __webpack_require__(114);
const Grip = __webpack_require__(113);
const { Rep } = __webpack_require__(24);
let { name, mode, equal, suppressQuotes } = props;
@ -5794,7 +5794,7 @@ const PropTypes = __webpack_require__(0);
const { isGrip, wrapRender } = __webpack_require__(2);
const { MODE } = __webpack_require__(4);
const { rep } = __webpack_require__(114);
const { rep } = __webpack_require__(113);
/**
* Renders DOM event objects.
@ -6136,7 +6136,7 @@ const {
wrapRender
} = __webpack_require__(2);
const { MODE } = __webpack_require__(4);
const nodeConstants = __webpack_require__(189);
const nodeConstants = __webpack_require__(190);
const dom = __webpack_require__(1);
const { span } = dom;
@ -6198,7 +6198,7 @@ const PropTypes = __webpack_require__(0);
const { isGrip, wrapRender } = __webpack_require__(2);
const { rep: StringRep, isLongString } = __webpack_require__(25);
const { MODE } = __webpack_require__(4);
const nodeConstants = __webpack_require__(189);
const nodeConstants = __webpack_require__(190);
const dom = __webpack_require__(1);
const { span } = dom;
@ -6282,23 +6282,14 @@ function getElements(grip, mode) {
attributes,
nodeName,
isAfterPseudoElement,
isBeforePseudoElement,
isMarkerPseudoElement
isBeforePseudoElement
} = grip.preview;
const nodeNameElement = span({
className: "tag-name"
}, nodeName);
let pseudoNodeName;
if (isAfterPseudoElement) {
pseudoNodeName = "after";
} else if (isBeforePseudoElement) {
pseudoNodeName = "before";
} else if (isMarkerPseudoElement) {
pseudoNodeName = "marker";
}
if (pseudoNodeName) {
return [span({ className: "attrName" }, `::${pseudoNodeName}`)];
if (isAfterPseudoElement || isBeforePseudoElement) {
return [span({ className: "attrName" }, `::${isAfterPseudoElement ? "after" : "before"}`)];
}
if (mode === MODE.TINY) {
@ -6680,8 +6671,8 @@ module.exports = {
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
const ObjectInspector = __webpack_require__(483);
const utils = __webpack_require__(117);
const reducer = __webpack_require__(116);
const utils = __webpack_require__(116);
const reducer = __webpack_require__(115);
module.exports = { ObjectInspector, utils, reducer };
@ -6693,7 +6684,7 @@ module.exports = { ObjectInspector, utils, reducer };
"use strict";
var _devtoolsComponents = __webpack_require__(109);
var _devtoolsComponents = __webpack_require__(108);
var _devtoolsComponents2 = _interopRequireDefault(_devtoolsComponents);
@ -6707,7 +6698,7 @@ const { Component, createFactory, createElement } = __webpack_require__(6);
const { connect } = __webpack_require__(484);
const actions = __webpack_require__(485);
const selectors = __webpack_require__(116);
const selectors = __webpack_require__(115);
const Tree = createFactory(_devtoolsComponents2.default.Tree);
__webpack_require__(486);
@ -6716,7 +6707,7 @@ const ObjectInspectorItem = createFactory(__webpack_require__(487));
const classnames = __webpack_require__(67);
const Utils = __webpack_require__(117);
const Utils = __webpack_require__(116);
const { renderRep, shouldRenderRootsInReps } = Utils;
const {
getChildrenWithEvaluations,
@ -7001,11 +6992,11 @@ module.exports = __WEBPACK_EXTERNAL_MODULE_484__;
"use strict";
const { loadItemProperties } = __webpack_require__(195); /* This Source Code Form is subject to the terms of the Mozilla Public
const { loadItemProperties } = __webpack_require__(196); /* 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/>. */
const { getLoadedProperties, getActors } = __webpack_require__(116);
const { getLoadedProperties, getActors } = __webpack_require__(115);
/**
* This action is responsible for expanding a given node, which also means that
@ -7148,7 +7139,7 @@ const isMacOS = appinfo.OS === "Darwin";
const classnames = __webpack_require__(67);
const { MODE } = __webpack_require__(4);
const Utils = __webpack_require__(117);
const Utils = __webpack_require__(116);
const {
getValue,

Просмотреть файл

@ -665,7 +665,7 @@ CssLogic.getSelectors = function(domRule) {
*
* @returns {Object}
* - {DOMNode} node The non-anonymous node
* - {string} pseudo One of ':marker', ':before', ':after', or null.
* - {string} pseudo One of ':before', ':after', or null.
*/
CssLogic.getBindingElementAndPseudo = getBindingElementAndPseudo;

Просмотреть файл

@ -12,7 +12,6 @@ const Services = require("Services");
const {
isAfterPseudoElement,
isBeforePseudoElement,
isMarkerPseudoElement,
isNativeAnonymous,
} = require("devtools/shared/layout/utils");
const Debugger = require("Debugger");
@ -390,7 +389,7 @@ class JQueryEventCollector extends MainEventCollector {
// If jQuery is not on the page, if this is an anonymous node or a pseudo
// element we need to return early.
if (!jQuery || isNativeAnonymous(node) || isMarkerPseudoElement(node) ||
if (!jQuery || isNativeAnonymous(node) ||
isBeforePseudoElement(node) || isAfterPseudoElement(node)) {
if (checkOnly) {
return false;

Просмотреть файл

@ -18,7 +18,6 @@ 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);
@ -128,7 +127,6 @@ 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),
@ -188,9 +186,7 @@ const NodeActor = protocol.ActorClassWithSpec(nodeSpec, {
get numChildren() {
// For pseudo elements, childNodes.length returns 1, but the walker
// will return 0.
if (isMarkerPseudoElement(this.rawNode) ||
isBeforePseudoElement(this.rawNode) || isAfterPseudoElement(this.rawNode)
) {
if (isBeforePseudoElement(this.rawNode) || isAfterPseudoElement(this.rawNode)) {
return 0;
}

Просмотреть файл

@ -60,14 +60,13 @@ function isInXULDocument(el) {
/**
* This DeepTreeWalker filter skips whitespace text nodes and anonymous
* content with the exception of ::marker, ::before, and ::after, plus anonymous
* content in XUL document (needed to show all elements in the browser toolbox).
* content with the exception of ::before and ::after and anonymous content
* in XUL document (needed to show all elements in the browser toolbox).
*/
function standardTreeWalkerFilter(node) {
// ::marker, ::before, and ::after are native anonymous content, but we always
// ::before and ::after are native anonymous content, but we always
// want to show them
if (node.nodeName === "_moz_generated_content_marker" ||
node.nodeName === "_moz_generated_content_before" ||
if (node.nodeName === "_moz_generated_content_before" ||
node.nodeName === "_moz_generated_content_after") {
return nodeFilterConstants.FILTER_ACCEPT;
}

Просмотреть файл

@ -17,7 +17,6 @@ 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, "isShadowHost", "devtools/shared/layout/utils", true);
loader.lazyRequireGetter(this, "isShadowRoot", "devtools/shared/layout/utils", true);
@ -88,7 +87,6 @@ const PSEUDO_SELECTORS = [
[":disabled", 0],
[":checked", 1],
["::selection", 0],
["::marker", 0],
];
const HELPER_SHEET = "data:text/css;charset=utf-8," + encodeURIComponent(`
@ -538,8 +536,7 @@ var WalkerActor = protocol.ActorClassWithSpec(walkerSpec, {
*/
inlineTextChild: function({ rawNode }) {
// Quick checks to prevent creating a new walker if possible.
if (isMarkerPseudoElement(rawNode) ||
isBeforePseudoElement(rawNode) ||
if (isBeforePseudoElement(rawNode) ||
isAfterPseudoElement(rawNode) ||
isShadowHost(rawNode) ||
rawNode.nodeType != Node.ELEMENT_NODE ||
@ -868,14 +865,10 @@ var WalkerActor = protocol.ActorClassWithSpec(walkerSpec, {
}
if (shadowHost) {
// Use anonymous walkers to fetch ::marker / ::before / ::after pseudo
// elements
// Use anonymous walkers to fetch ::before / ::after pseudo elements
const firstChildWalker = this.getDocumentWalker(node.rawNode);
const first = firstChildWalker.firstChild();
const hasMarker = first && first.nodeName === "_moz_generated_content_marker";
const maybeBeforeNode = hasMarker ? firstChildWalker.nextSibling() : first;
const hasBefore = maybeBeforeNode &&
maybeBeforeNode.nodeName === "_moz_generated_content_before";
const hasBefore = first && first.nodeName === "_moz_generated_content_before";
const lastChildWalker = this.getDocumentWalker(node.rawNode);
const last = lastChildWalker.lastChild();
@ -884,10 +877,8 @@ var WalkerActor = protocol.ActorClassWithSpec(walkerSpec, {
nodes = [
// #shadow-root
...(hideShadowRoot ? [] : [node.rawNode.openOrClosedShadowRoot]),
// ::marker
...(hasMarker ? [first] : []),
// ::before
...(hasBefore ? [maybeBeforeNode] : []),
...(hasBefore ? [first] : []),
// shadow host direct children
...nodes,
// native anonymous content for UA widgets

Просмотреть файл

@ -93,10 +93,7 @@ WalkerIndex.prototype = {
// For each element node, we get the tagname and all attributes names
// and values
const localName = node.localName;
if (localName === "_moz_generated_content_marker") {
this._addToIndex("tag", node, "::marker");
this._addToIndex("text", node, node.textContent.trim());
} else if (localName === "_moz_generated_content_before") {
if (localName === "_moz_generated_content_before") {
this._addToIndex("tag", node, "::before");
this._addToIndex("text", node, node.textContent.trim());
} else if (localName === "_moz_generated_content_after") {

Просмотреть файл

@ -267,9 +267,6 @@ class NodeFront extends FrontClassWithSpec(nodeSpec) {
return this._form.hasEventListeners;
}
get isMarkerPseudoElement() {
return this._form.isMarkerPseudoElement;
}
get isBeforePseudoElement() {
return this._form.isBeforePseudoElement;
}
@ -277,8 +274,7 @@ class NodeFront extends FrontClassWithSpec(nodeSpec) {
return this._form.isAfterPseudoElement;
}
get isPseudoElement() {
return this.isBeforePseudoElement || this.isAfterPseudoElement ||
this.isMarkerPseudoElement;
return this.isBeforePseudoElement || this.isAfterPseudoElement;
}
get isAnonymous() {
return this._form.isAnonymous;

Просмотреть файл

@ -456,22 +456,19 @@ exports.getCssPath = getCssPath;
exports.getXPath = getXPath;
/**
* Given a node, check to see if it is a ::marker, ::before, or ::after element.
* Given a node, check to see if it is a ::before or ::after element.
* If so, return the node that is accessible from within the document
* (the parent of the anonymous node), along with which pseudo element
* it was. Otherwise, return the node itself.
*
* @returns {Object}
* - {DOMNode} node The non-anonymous node
* - {string} pseudo One of ':marker', ':before', ':after', or null.
* - {string} pseudo One of ':before', ':after', or null.
*/
function getBindingElementAndPseudo(node) {
let bindingElement = node;
let pseudo = null;
if (node.nodeName == "_moz_generated_content_marker") {
bindingElement = node.parentNode;
pseudo = ":marker";
} else if (node.nodeName == "_moz_generated_content_before") {
if (node.nodeName == "_moz_generated_content_before") {
bindingElement = node.parentNode;
pseudo = ":before";
} else if (node.nodeName == "_moz_generated_content_after") {

Просмотреть файл

@ -638,7 +638,6 @@ exports.isShadowHost = isShadowHost;
function isDirectShadowHostChild(node) {
// Pseudo elements and native anonymous elements are always part of the anonymous tree.
if (
isMarkerPseudoElement(node) ||
isBeforePseudoElement(node) ||
isAfterPseudoElement(node) ||
isNativeAnonymous(node)) {
@ -650,17 +649,6 @@ 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.
*