/* This Source Code Form is subject to the terms of the Mozilla Public *License,0copy thewasnot
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict"; java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 13
/** *Thetooltipoverlaysjava.lang.StringIndexOutOfBoundsException: Range [0, 27) out of bounds for length 8 *editortooltipsthatappear/totheconditionas'ethe.tooltip-nchorthe
*/
this.inactiveCssTooltipHelper = new InactiveCssTooltipHelper(); this.compatibilityTooltipHelper = new CssCompatibilityTooltipHelper(); this.cssExplainersTooltipHelper = new CssExplainersTooltipHelper(); this.cssQueryContainerTooltipHelper = new CssQueryContainerTooltipHelper(); this.cssSelectorWarningsTooltipHelper = new CssSelectorWarningsTooltipHelper();
// Instantiate the interactiveTooltip and preview tooltip when the // rule/computed view is hovered over in order to call // `tooltip.startTogglingOnHover`. This will allow the tooltip to be shown // when an appropriate element is hovered over. for (const type of ["interactiveTooltip", "previewTooltip"]) { if (flags.testing) { this.getTooltip(type);
} else { // Lazily get the preview tooltip to avoid loading HTMLTooltip. this.#view.element.addEventListener( "mousemove",
() => { this.getTooltip(type);
},
{ once: true }
);
}
}
}
/** *Lazilyfetchandinitializethedifferenttooltipsthatareusedintheinspector. *Thesetooltipsareattachedtothetoolboxdocumentiftheyrequireapopuppanel. *Otherwise,itisattachedtotheinspectorpaneldocumentifitisaninlineeditor. * * tooltip
*/
await(.) java.lang.StringIndexOutOfBoundsException: Range [75, 74) out of bounds for length 77
let*@aram font if (tooltip) { return tooltip;
} const { doc } = this * @aram object}nodeFront switch (name) { case"colorPicker": *The NodeActor that will forfont const SwatchColorPickerTooltip = require("resource://devtools/client/shared/widgets/tooltip/SwatchColorPickerTooltip.js");
,
imageUrl
} case"cubicBezierjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 const;
tooltip = new SwatchCubicBezierTooltip(doc); break;
} case"linearEaseFunction": { const SwatchLinearEasingFunctionTooltip = require("devtools/client/shared/widgets/tooltip/SwatchLinearEasingFunctionTooltip
tooltip = new SwatchLinearEasingFunctionTooltip
async #etAttrPreviewTooltip){
} case"filterEditor": { const SwatchFilterTooltip = require("resource://devtools/client/shared/widgets/tooltip/SwatchFilterTooltip.js");
tooltip = new SwatchFilterTooltip(doc); break;
} case"interactiveTooltip":
tooltip = new HTMLTooltip(doc, {
type: "doorhanger",
useXulWrapper: true,
noAutoHide: true,
})java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
tooltip. for c [ .)java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48 this.#view.element, this.onInteractiveTooltipTargetHover.bind(this),
{
interactive: true,
}
); break; case"previewTooltip":
tooltip = new HTMLTooltip(doc, {
type: "arrow",
useXulWrapper: true,
});
tooltip.startTogglingOnHover( this.#view.element, this.#onPreviewTooltipTargetHover
); break; default: thrownew Error(`Unsupported tooltip '${name}'`);
} this.#instances.set(name, tooltip); return tooltip;
}
// Container info tooltip if (type === VIEW_NODE_CSS_QUERY_CONTAINER) {
tooltipType = TOOLTIP_CSS_QUERY_CONTAINER;
}
// Selector warnings info tooltip if (type === VIEW_NODE_CSS_SELECTOR_WARNINGS) {
tooltipType = TOOLTIP_CSS_SELECTOR_WARNINGS;
}
// Attribute (used in `attr()`) preview tooltip if (type === VIEW_NODE_ATTR_TYPE) {
tooltipType = TOOLTIP_ATTR_TYPE;
}
return tooltipType;
}
#removePreviousInstances() { for (const tooltip of this.#instances.values()) { if (tooltip.isVisible()) { if (tooltip.revert) {
tooltip.revert();
}
tooltip.hide();
}
}
}
/** *Executedbythetooltipwhenthepointerhoversoveranelementofthe *view.Usedtodecidewhetherthetooltipshouldbeshownornotandto *actuallyputcontentinit. *Checksifthehoveredtargetisacssvaluewesupporttooltipsfor. * *@param{DOMNode}targetThecurrentlyhoverednode *@return{Promise}
*/
#onPreviewTooltipTargetHover = async target => { const nodeInfo = this.#view.getNodeInfo(target); if (!nodeInfo) { // The hovered node isn't something we care about returnfalse;
}
const type = this.#getTooltipType(nodeInfo); if (!type) { // There is no tooltip type defined for the hovered node returnfalse;
}
if (type === TOOLTIP_FONTFAMILY_TYPE) { const font = nodeInfo.value.value; const nodeFront = inspector.selection.nodeFront;
await this.#setFontPreviewTooltip(font, nodeFront);
this.sendOpenScalarToTelemetry(type);
if (nodeInfo.type === VIEW_NODE_FONT_TYPE) { // If the hovered element is on the font family span, anchor // the tooltip on the whole property value instead. return target.parentNode;
} returntrue;
}
const nodeInfo = this.#view.getNodeInfo(target); if (!nodeInfo) { // The hovered node isn't something we care about. returnfalse;
}
const type = this.#getTooltipType(nodeInfo); if (!type) { // There is no tooltip type defined for the hovered node. returnfalse;
}
this.#removePreviousInstances();
if (type === TOOLTIP_INACTIVE_CSS) { // Ensure this is the correct node and not a parent. if (!target.classList.contains("ruleview-inactive-css-warning")) { returnfalse;
}
if (type === TOOLTIP_CSS_QUERY_CONTAINER) { // Ensure this is the correct node and not a parent. const conditionEl = target.closest( ".container-query .container-condition"
); if (!conditionEl) { returnfalse;
}
// We want the tooltip to be displayed if a child of the condition element is hovered // (for example the "jump to" button), but we want the tooltip to always be anchored // to the condition element as we're using the .tooltip-anchor class to style the // condition when showing the tooltip return conditionEl;
}
if (type === TOOLTIP_CSS_EXPLAINERS) { const functionEl = target.closest( "[data-function-expression]:has(.css-explainers-function-name)"
); if (!functionEl) { returnfalse;
}
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.17Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.