Changeset 56280 in webkit
- Timestamp:
- Mar 19, 2010 4:05:15 PM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r56256 r56280 1 2010-03-19 Alexander Pavlov <apavlov@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 Web Inspector: caret moves past prompt in javascript console 6 https://bugs.webkit.org/show_bug.cgi?id=26602 7 8 Having noticed any Element children besides a leading <br> (which are empty 9 text nodes), WebCore editing facility thinks it should delete the <br>, 10 thus clearing away the text prompt contents. 11 12 * inspector/front-end/TextPrompt.js: 13 (WebInspector.TextPrompt.prototype.clearAutoComplete): 14 (WebInspector.TextPrompt.prototype._completionsReady): 15 * inspector/front-end/utilities.js: 16 (Element.prototype.pruneEmptyTextNodes): 17 1 18 2010-03-19 Adam Roben <aroben@apple.com> 2 19 -
trunk/WebCore/inspector/front-end/TextPrompt.js
r52099 r56280 150 150 151 151 this._userEnteredRange.deleteContents(); 152 this.element.pruneEmptyTextNodes(); 152 153 153 154 var userTextNode = document.createTextNode(this._userEnteredText); … … 224 225 225 226 fullWordRange.deleteContents(); 227 this.element.pruneEmptyTextNodes(); 226 228 227 229 var finalSelectionRange = document.createRange(); -
trunk/WebCore/inspector/front-end/utilities.js
r54962 r56280 218 218 this.style.left = x + "px"; 219 219 this.style.top = y + "px"; 220 } 221 222 Element.prototype.pruneEmptyTextNodes = function() 223 { 224 var sibling = this.firstChild; 225 while (sibling) { 226 var nextSibling = sibling.nextSibling; 227 if (sibling.nodeType === this.TEXT_NODE && sibling.nodeValue === "") 228 this.removeChild(sibling); 229 sibling = nextSibling; 230 } 220 231 } 221 232
Note: See TracChangeset
for help on using the changeset viewer.