OLD | NEW |
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 Loading... |
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 Loading... |
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 }; |
OLD | NEW |