Chromium Code Reviews| 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 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 Loading... | |
| 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 } |
| OLD | NEW |