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

Side by Side Diff: Source/devtools/front_end/ui/TextPrompt.js

Issue 477593005: DevTools: [SSP] live-update property value when it's selected via mouse. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
« 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) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved.
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 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 { 562 {
563 this._acceptSuggestionInternal(); 563 this._acceptSuggestionInternal();
564 }, 564 },
565 565
566 /** 566 /**
567 * @param {boolean=} prefixAccepted 567 * @param {boolean=} prefixAccepted
568 * @return {boolean} 568 * @return {boolean}
569 */ 569 */
570 _acceptSuggestionInternal: function(prefixAccepted) 570 _acceptSuggestionInternal: function(prefixAccepted)
571 { 571 {
572 if (this._isAcceptingSuggestion)
573 return false;
574
575 if (!this.autoCompleteElement || !this.autoCompleteElement.parentNode) 572 if (!this.autoCompleteElement || !this.autoCompleteElement.parentNode)
576 return false; 573 return false;
577 574
578 var text = this.autoCompleteElement.textContent; 575 var text = this.autoCompleteElement.textContent;
579 var textNode = document.createTextNode(text); 576 var textNode = document.createTextNode(text);
580 this.autoCompleteElement.parentNode.replaceChild(textNode, this.autoComp leteElement); 577 this.autoCompleteElement.parentNode.replaceChild(textNode, this.autoComp leteElement);
581 delete this.autoCompleteElement; 578 delete this.autoCompleteElement;
582 579
583 var finalSelectionRange = document.createRange(); 580 var finalSelectionRange = document.createRange();
584 finalSelectionRange.setStart(textNode, text.length); 581 finalSelectionRange.setStart(textNode, text.length);
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 896
900 return; 897 return;
901 } 898 }
902 899
903 WebInspector.TextPrompt.prototype.onKeyDown.apply(this, arguments); 900 WebInspector.TextPrompt.prototype.onKeyDown.apply(this, arguments);
904 }, 901 },
905 902
906 __proto__: WebInspector.TextPrompt.prototype 903 __proto__: WebInspector.TextPrompt.prototype
907 } 904 }
908 905
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