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

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

Issue 2519213002: [DevTools] Remove preventFollow and special checks for links throughout frontend. (Closed)
Patch Set: Created 4 years, 1 month 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 767 matching lines...) Expand 10 before | Expand all | Expand 10 after
778 if (UI.isEditing()) 778 if (UI.isEditing())
779 return; 779 return;
780 780
781 var contextMenu = new UI.ContextMenu(event); 781 var contextMenu = new UI.ContextMenu(event);
782 var isPseudoElement = !!treeElement.node().pseudoType(); 782 var isPseudoElement = !!treeElement.node().pseudoType();
783 var isTag = treeElement.node().nodeType() === Node.ELEMENT_NODE && !isPseudo Element; 783 var isTag = treeElement.node().nodeType() === Node.ELEMENT_NODE && !isPseudo Element;
784 var textNode = event.target.enclosingNodeOrSelfWithClass('webkit-html-text-n ode'); 784 var textNode = event.target.enclosingNodeOrSelfWithClass('webkit-html-text-n ode');
785 if (textNode && textNode.classList.contains('bogus')) 785 if (textNode && textNode.classList.contains('bogus'))
786 textNode = null; 786 textNode = null;
787 var commentNode = event.target.enclosingNodeOrSelfWithClass('webkit-html-com ment'); 787 var commentNode = event.target.enclosingNodeOrSelfWithClass('webkit-html-com ment');
788 contextMenu.appendApplicableItems(event.target);
lushnikov 2016/11/22 01:11:49 why is this gone?
dgozman 2016/11/22 01:33:19 It's now done automatically in ContextMenu constru
789 if (textNode) { 788 if (textNode) {
790 contextMenu.appendSeparator(); 789 contextMenu.appendSeparator();
791 treeElement.populateTextContextMenu(contextMenu, textNode); 790 treeElement.populateTextContextMenu(contextMenu, textNode);
792 } else if (isTag) { 791 } else if (isTag) {
793 contextMenu.appendSeparator(); 792 contextMenu.appendSeparator();
794 treeElement.populateTagContextMenu(contextMenu, event); 793 treeElement.populateTagContextMenu(contextMenu, event);
795 } else if (commentNode) { 794 } else if (commentNode) {
796 contextMenu.appendSeparator(); 795 contextMenu.appendSeparator();
797 treeElement.populateNodeContextMenu(contextMenu); 796 treeElement.populateNodeContextMenu(contextMenu);
798 } else if (isPseudoElement) { 797 } else if (isPseudoElement) {
(...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after
1694 */ 1693 */
1695 function resolved(node) { 1694 function resolved(node) {
1696 if (node) { 1695 if (node) {
1697 this.treeOutline._selectedDOMNode = node; 1696 this.treeOutline._selectedDOMNode = node;
1698 this.treeOutline._selectedNodeChanged(); 1697 this.treeOutline._selectedNodeChanged();
1699 } 1698 }
1700 } 1699 }
1701 return true; 1700 return true;
1702 } 1701 }
1703 }; 1702 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698