Skip to content

Commit f4ee86a

Browse files
hanselfmu-chromiumDevtools-frontend LUCI CQ
authored andcommitted
Add interest target linking
This CL adds the frontend part for linking interesttarget=X to X in the DOM tree. Bug: 393244954 Change-Id: I088d32baff337f1372ffc68f6fd44e242d8c8f1c Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6277291 Commit-Queue: Changhao Han <[email protected]> Auto-Submit: Changhao Han <[email protected]> Reviewed-by: Eric Leese <[email protected]>
1 parent 9412902 commit f4ee86a

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

front_end/panels/elements/ElementsTreeElement.ts

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,10 @@ const UIStrings = {
208208
*@description Text of a tooltip to redirect to another element in the Elements panel
209209
*/
210210
showPopoverTarget: 'Show popover target',
211+
/**
212+
*@description Text of a tooltip to redirect to another element in the Elements panel
213+
*/
214+
showInterestTarget: 'Show interest target',
211215
/**
212216
*@description Text of the tooltip for scroll adorner.
213217
*/
@@ -1684,11 +1688,21 @@ export class ElementsTreeElement extends UI.TreeOutline.TreeElement {
16841688
setValueWithEntities.call(this, attrValueElement, value);
16851689
}
16861690

1687-
if (name === 'popovertarget') {
1688-
const linkedPart = value ? attrValueElement : attrNameElement;
1689-
void this.linkifyElementByRelation(
1690-
linkedPart, Protocol.DOM.GetElementByRelationRequestRelation.PopoverTarget,
1691-
i18nString(UIStrings.showPopoverTarget));
1691+
switch (name) {
1692+
case 'popovertarget': {
1693+
const linkedPart = value ? attrValueElement : attrNameElement;
1694+
void this.linkifyElementByRelation(
1695+
linkedPart, Protocol.DOM.GetElementByRelationRequestRelation.PopoverTarget,
1696+
i18nString(UIStrings.showPopoverTarget));
1697+
break;
1698+
}
1699+
case 'interesttarget': {
1700+
const linkedPart = value ? attrValueElement : attrNameElement;
1701+
void this.linkifyElementByRelation(
1702+
linkedPart, Protocol.DOM.GetElementByRelationRequestRelation.InterestTarget,
1703+
i18nString(UIStrings.showInterestTarget));
1704+
break;
1705+
}
16921706
}
16931707

16941708
if (hasText) {

0 commit comments

Comments
 (0)