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

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

Issue 2197653004: DevTools: do not apply number editings shortcuts to HTML attributes which look like URL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 671
672 /** 672 /**
673 * @param {!Event} event 673 * @param {!Event} event
674 * @return {string} 674 * @return {string}
675 */ 675 */
676 function postKeyDownFinishHandler(event) 676 function postKeyDownFinishHandler(event)
677 { 677 {
678 WebInspector.handleElementValueModifications(event, attribute); 678 WebInspector.handleElementValueModifications(event, attribute);
679 return ""; 679 return "";
680 } 680 }
681 config.setPostKeydownFinishHandler(postKeyDownFinishHandler); 681
682 if (!(new WebInspector.ParsedURL(attributeValueElement.textContent).isVa lid))
dgozman 2016/07/29 23:12:38 if (!attributeValueElement.textContent.asParsedURL
lushnikov 2016/07/29 23:29:41 sweet 8) thanks!
683 config.setPostKeydownFinishHandler(postKeyDownFinishHandler);
682 684
683 this._editing = WebInspector.InplaceEditor.startEditing(attribute, confi g); 685 this._editing = WebInspector.InplaceEditor.startEditing(attribute, confi g);
684 686
685 this.listItemElement.getComponentSelection().setBaseAndExtent(elementFor Selection, 0, elementForSelection, 1); 687 this.listItemElement.getComponentSelection().setBaseAndExtent(elementFor Selection, 0, elementForSelection, 1);
686 688
687 return true; 689 return true;
688 }, 690 },
689 691
690 /** 692 /**
691 * @param {!Element} textNodeElement 693 * @param {!Element} textNodeElement
(...skipping 930 matching lines...) Expand 10 before | Expand all | Expand 10 after
1622 }, 1624 },
1623 1625
1624 _editAsHTML: function() 1626 _editAsHTML: function()
1625 { 1627 {
1626 var promise = WebInspector.Revealer.revealPromise(this.node()); 1628 var promise = WebInspector.Revealer.revealPromise(this.node());
1627 promise.then(() => WebInspector.actionRegistry.action("elements.edit-as- html").execute()); 1629 promise.then(() => WebInspector.actionRegistry.action("elements.edit-as- html").execute());
1628 }, 1630 },
1629 1631
1630 __proto__: TreeElement.prototype 1632 __proto__: TreeElement.prototype
1631 } 1633 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698