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 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 } | 608 } |
609 | 609 |
610 if (element && element._node) | 610 if (element && element._node) |
611 this._domModel.highlightDOMNodeWithConfig(element._node.id, { mode:
"all", showInfo: !WebInspector.KeyboardShortcut.eventHasCtrlOrMeta(event) }); | 611 this._domModel.highlightDOMNodeWithConfig(element._node.id, { mode:
"all", showInfo: !WebInspector.KeyboardShortcut.eventHasCtrlOrMeta(event) }); |
612 else | 612 else |
613 this._domModel.hideDOMNodeHighlight(); | 613 this._domModel.hideDOMNodeHighlight(); |
614 }, | 614 }, |
615 | 615 |
616 _onmouseout: function(event) | 616 _onmouseout: function(event) |
617 { | 617 { |
618 var nodeUnderMouse = event.elementFromPoint(); | 618 var nodeUnderMouse = event.deepElementFromPoint(); |
619 if (nodeUnderMouse && nodeUnderMouse.isDescendant(this._element)) | 619 if (nodeUnderMouse && nodeUnderMouse.isDescendant(this._element)) |
620 return; | 620 return; |
621 | 621 |
622 if (this._previousHoveredElement) { | 622 if (this._previousHoveredElement) { |
623 this._previousHoveredElement.hovered = false; | 623 this._previousHoveredElement.hovered = false; |
624 delete this._previousHoveredElement; | 624 delete this._previousHoveredElement; |
625 } | 625 } |
626 | 626 |
627 this._domModel.hideDOMNodeHighlight(); | 627 this._domModel.hideDOMNodeHighlight(); |
628 }, | 628 }, |
(...skipping 1661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2290 { | 2290 { |
2291 var rewrittenHref = node.resolveURL(value); | 2291 var rewrittenHref = node.resolveURL(value); |
2292 if (rewrittenHref === null) { | 2292 if (rewrittenHref === null) { |
2293 var span = document.createElement("span"); | 2293 var span = document.createElement("span"); |
2294 setValueWithEntities.call(this, span, value); | 2294 setValueWithEntities.call(this, span, value); |
2295 return span; | 2295 return span; |
2296 } | 2296 } |
2297 value = value.replace(closingPunctuationRegex, "$&\u200B"); | 2297 value = value.replace(closingPunctuationRegex, "$&\u200B"); |
2298 if (value.startsWith("data:")) | 2298 if (value.startsWith("data:")) |
2299 value = value.trimMiddle(60); | 2299 value = value.trimMiddle(60); |
2300 return linkify(rewrittenHref, value, "", node.nodeName().toLowerCase
() === "a"); | 2300 var anchor = linkify(rewrittenHref, value, "", node.nodeName().toLow
erCase() === "a"); |
| 2301 anchor.preventFollow = true; |
| 2302 return anchor; |
2301 } | 2303 } |
2302 | 2304 |
2303 if (linkify && (name === "src" || name === "href")) { | 2305 if (linkify && (name === "src" || name === "href")) { |
2304 attrValueElement.appendChild(linkifyValue.call(this, value)); | 2306 attrValueElement.appendChild(linkifyValue.call(this, value)); |
2305 } else if (linkify && node.nodeName().toLowerCase() === "img" && name ==
= "srcset") { | 2307 } else if (linkify && node.nodeName().toLowerCase() === "img" && name ==
= "srcset") { |
2306 var sources = value.split(","); | 2308 var sources = value.split(","); |
2307 for (var i = 0; i < sources.length; ++i) { | 2309 for (var i = 0; i < sources.length; ++i) { |
2308 if (i > 0) | 2310 if (i > 0) |
2309 attrValueElement.createTextChild(", "); | 2311 attrValueElement.createTextChild(", "); |
2310 var source = sources[i].trim(); | 2312 var source = sources[i].trim(); |
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2950 treeOutline.rootDOMNode = node; | 2952 treeOutline.rootDOMNode = node; |
2951 if (!treeOutline.children[0].hasChildren) | 2953 if (!treeOutline.children[0].hasChildren) |
2952 treeOutline._element.classList.add("single-node"); | 2954 treeOutline._element.classList.add("single-node"); |
2953 treeOutline.setVisible(true); | 2955 treeOutline.setVisible(true); |
2954 treeOutline.element.treeElementForTest = treeOutline.children[0]
; | 2956 treeOutline.element.treeElementForTest = treeOutline.children[0]
; |
2955 resolve(treeOutline.element); | 2957 resolve(treeOutline.element); |
2956 } | 2958 } |
2957 } | 2959 } |
2958 } | 2960 } |
2959 } | 2961 } |
OLD | NEW |