OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
3 * Copyright (C) 2009 Joseph Pecoraro | 3 * Copyright (C) 2009 Joseph Pecoraro |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 2711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2722 case "Up": | 2722 case "Up": |
2723 case "Down": | 2723 case "Down": |
2724 case "PageUp": | 2724 case "PageUp": |
2725 case "PageDown": | 2725 case "PageDown": |
2726 if (this._handleNameOrValueUpDown(event)) { | 2726 if (this._handleNameOrValueUpDown(event)) { |
2727 event.preventDefault(); | 2727 event.preventDefault(); |
2728 return; | 2728 return; |
2729 } | 2729 } |
2730 break; | 2730 break; |
2731 case "Enter": | 2731 case "Enter": |
2732 if (this.autoCompleteElement && !this.autoCompleteElement.textConten
t.length) { | 2732 // Accept any available autocompletions and advance to the next fiel
d. |
| 2733 if (this.autoCompleteElement && this.autoCompleteElement.textContent
.length) { |
2733 this.tabKeyPressed(); | 2734 this.tabKeyPressed(); |
2734 return; | 2735 return; |
2735 } | 2736 } |
2736 break; | 2737 break; |
2737 } | 2738 } |
2738 | 2739 |
2739 WebInspector.TextPrompt.prototype.onKeyDown.call(this, event); | 2740 WebInspector.TextPrompt.prototype.onKeyDown.call(this, event); |
2740 }, | 2741 }, |
2741 | 2742 |
2742 /** | 2743 /** |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2966 WebInspector.context.addFlavorChangeListener(WebInspector.DOMNode, onNodeCha
nged); | 2967 WebInspector.context.addFlavorChangeListener(WebInspector.DOMNode, onNodeCha
nged); |
2967 onNodeChanged(); | 2968 onNodeChanged(); |
2968 return button; | 2969 return button; |
2969 | 2970 |
2970 function onNodeChanged() | 2971 function onNodeChanged() |
2971 { | 2972 { |
2972 var node = WebInspector.context.flavor(WebInspector.DOMNode); | 2973 var node = WebInspector.context.flavor(WebInspector.DOMNode); |
2973 button.setEnabled(!!node); | 2974 button.setEnabled(!!node); |
2974 } | 2975 } |
2975 } | 2976 } |
OLD | NEW |