Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js

Issue 2745903003: [DevTools] Do not inherit ObjectPopoverHelper from PopoverHelper. (Closed)
Patch Set: addressed review comments Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com>
4 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 * @return {!Element|!AnchorBox|undefined} 573 * @return {!Element|!AnchorBox|undefined}
574 */ 574 */
575 _getPopoverAnchor(element, event) { 575 _getPopoverAnchor(element, event) {
576 var link = element; 576 var link = element;
577 while (link && !link[Elements.ElementsTreeElement.HrefSymbol]) 577 while (link && !link[Elements.ElementsTreeElement.HrefSymbol])
578 link = link.parentElementOrShadowHost(); 578 link = link.parentElementOrShadowHost();
579 return link ? link : undefined; 579 return link ? link : undefined;
580 } 580 }
581 581
582 /** 582 /**
583 * @param {!Element} link 583 * @param {!Element|!AnchorBox} link
584 * @param {!UI.GlassPane} popover 584 * @param {!UI.GlassPane} popover
585 * @return {!Promise<boolean>} 585 * @return {!Promise<boolean>}
586 */ 586 */
587 _showPopover(link, popover) { 587 _showPopover(link, popover) {
588 var node = this.selectedDOMNode(); 588 var node = this.selectedDOMNode();
589 if (!node) 589 if (!node)
590 return Promise.resolve(false); 590 return Promise.resolve(false);
591 591
592 var fulfill; 592 var fulfill;
593 var promise = new Promise(x => fulfill = x); 593 var promise = new Promise(x => fulfill = x);
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
1112 * @param {!SDK.DOMNode} node 1112 * @param {!SDK.DOMNode} node
1113 * @return {?{title: string, color: string}} 1113 * @return {?{title: string, color: string}}
1114 */ 1114 */
1115 decorate(node) { 1115 decorate(node) {
1116 return { 1116 return {
1117 color: 'orange', 1117 color: 'orange',
1118 title: Common.UIString('Element state: %s', ':' + SDK.CSSModel.fromNode(no de).pseudoState(node).join(', :')) 1118 title: Common.UIString('Element state: %s', ':' + SDK.CSSModel.fromNode(no de).pseudoState(node).join(', :'))
1119 }; 1119 };
1120 } 1120 }
1121 }; 1121 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698