Changeset 53205 in webkit
- Timestamp:
- Jan 13, 2010 2:12:48 PM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 1 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r53204 r53205 1 2010-01-13 Pavel Feldman <pfeldman@chromium.org> 2 3 Reviewed by Timothy Hatcher. 4 5 Web Inspector: Introduce SourceFrame2 with basic breakpoint / execution line 6 rendering capabilities. 7 8 Contains a drive-by naming fix (lineNumberOffset and lineNumberToOffset were 9 too close to each other, but were unrelated). 10 11 https://bugs.webkit.org/show_bug.cgi?id=33618 12 13 * WebCore.gypi: 14 * WebCore.vcproj/WebCore.vcproj: 15 * inspector/front-end/SourceFrame2.js: Added. 16 (WebInspector.SourceFrame2): 17 (WebInspector.SourceFrame2.prototype.set text): 18 (WebInspector.SourceFrame2.prototype.get executionLine): 19 (WebInspector.SourceFrame2.prototype.set executionLine): 20 (WebInspector.SourceFrame2.prototype.revealLine): 21 (WebInspector.SourceFrame2.prototype._toggleBreakpoint): 22 (WebInspector.SourceFrame2.prototype.resize): 23 (WebInspector.BreakpointLineNumberDecorator): 24 (WebInspector.BreakpointLineNumberDecorator.prototype.decorate): 25 (WebInspector.BreakpointLineNumberDecorator.prototype._paintBreakpoint): 26 (WebInspector.BreakpointLineNumberDecorator.prototype._paintProgramCounter): 27 (WebInspector.BreakpointLineNumberDecorator.prototype.mouseDown): 28 (WebInspector.ExecutionLineDecorator): 29 (WebInspector.ExecutionLineDecorator.prototype.decorate): 30 * inspector/front-end/TextEditor.js: 31 (WebInspector.TextEditor): 32 (WebInspector.TextEditor.prototype.get textModel): 33 (WebInspector.TextEditor.prototype.set readOnly): 34 (WebInspector.TextEditor.prototype.set lineNumberDecorator): 35 (WebInspector.TextEditor.prototype.set lineDecorator): 36 (WebInspector.TextEditor.prototype.selectionRange): 37 (WebInspector.TextEditor.prototype._offsetToLine): 38 (WebInspector.TextEditor.prototype._lineToOffset): 39 (WebInspector.TextEditor.prototype.reveal): 40 (WebInspector.TextEditor.prototype._textChanged): 41 (WebInspector.TextEditor.prototype._updateSize): 42 (WebInspector.TextEditor.prototype.updateCanvasSize): 43 (WebInspector.TextEditor.prototype._repaintAll): 44 (WebInspector.TextEditor.prototype._paintLines): 45 (WebInspector.TextEditor.prototype._paintLinesContinuation): 46 (WebInspector.TextEditor.prototype.paintLineNumbers): 47 (WebInspector.TextEditor.prototype._paintCurrentLine): 48 (WebInspector.TextEditor.prototype._mouseDown): 49 (WebInspector.TextEditor.prototype._caretForMouseEvent): 50 (WebInspector.TextEditor.prototype._keyDown): 51 (WebInspector.TextEditor.prototype._handleNavigationKey): 52 (WebInspector.TextEditor.prototype._textInput): 53 (WebInspector.TextEditor.prototype._updateCursor): 54 (WebInspector.TextEditor.prototype._paintSelection): 55 (WebInspector.TextEditor.prototype._initFont): 56 1 57 2010-01-13 Nate Chapin <japhet@chromium.org> 2 58 … … 22 78 Reviewed by Adam Roben. 23 79 24 REGRESSION (r49268): DHTML drag not allowed unless event.dataTransfer.effectAllowed 80 REGRESSION (r49268): DHTML drag not allowed unless event.dataTransfer.effectAllowed 25 81 is set (differs from HTML5). 26 82 Fixes <https://bugs.webkit.org/show_bug.cgi?id=33607> and <rdar://7507114>. 27 83 28 84 If no effectAllowed is set in the dragStart operation, we should default to 29 uninitialized instead of none, so the user doesn't have to manually set the 85 uninitialized instead of none, so the user doesn't have to manually set the 30 86 effectAllowed to enable drag and drop. 31 87 -
trunk/WebCore/WebCore.gypi
r53161 r53205 3723 3723 'inspector/front-end/SidebarTreeElement.js', 3724 3724 'inspector/front-end/SourceFrame.js', 3725 'inspector/front-end/SourceFrame2.js', 3725 3726 'inspector/front-end/SourceSyntaxHighlighter.js', 3726 3727 'inspector/front-end/SourceView.js', -
trunk/WebCore/WebCore.vcproj/WebCore.vcproj
r53156 r53205 42849 42849 </File> 42850 42850 <File 42851 RelativePath="..\inspector\front-end\SourceFrame2.js" 42852 > 42853 </File> 42854 <File 42851 42855 RelativePath="..\inspector\front-end\SourceSyntaxHighlighter.js" 42852 42856 > -
trunk/WebCore/inspector/front-end/TextEditor.js
r53184 r53205 95 95 96 96 this._lineOffsetsCache = [0]; 97 this._readOnly = false; 97 98 } 98 99 … … 106 107 }, 107 108 109 get textModel() 110 { 111 return this._textModel; 112 }, 113 114 set readOnly(readOnly) 115 { 116 this._readOnly = readOnly; 117 }, 118 119 set lineNumberDecorator(lineNumberDecorator) 120 { 121 this._lineNumberDecorator = lineNumberDecorator; 122 }, 123 124 set lineDecorator(lineDecorator) 125 { 126 this._lineDecorator = lineDecorator; 127 }, 128 108 129 setSelection: function(startLine, startColumn, endLine, endColumn) 109 130 { … … 113 134 }, 114 135 115 _offsetToLine Number: function(offset)136 _offsetToLine: function(offset) 116 137 { 117 138 if (offset > this._lineOffsetsCache[this._lineOffsetsCache.length - 1]) { 118 139 // Seeking outside cached area. Fill the cache. 119 140 var lineNumber = this._lineOffsetsCache.length; 120 while (this._line NumberToOffset(lineNumber) < offset)141 while (this._lineToOffset(lineNumber) < offset) 121 142 lineNumber++; 122 143 return lineNumber; … … 136 157 }, 137 158 138 _line NumberToOffset: function(lineNumber)159 _lineToOffset: function(lineNumber) 139 160 { 140 161 var offset = this._lineOffsetsCache[lineNumber]; … … 159 180 160 181 reveal: function(line, column) { 161 var maxScrollTop = this._line NumberToOffset(line);182 var maxScrollTop = this._lineToOffset(line); 162 183 var minScrollTop = maxScrollTop + this._lineHeight(line) - this._canvas.height; 163 184 if (this._scrollTop > maxScrollTop) … … 168 189 var firstColumn = this._columnForOffset(line, this._scrollLeft); 169 190 var maxScrollLeft = this._columnToOffset(line, column); 170 var minScrollLeft = maxScrollLeft - this._container.clientWidth + this._lineNumber Offset;191 var minScrollLeft = maxScrollLeft - this._container.clientWidth + this._lineNumberWidth; 171 192 if (this._scrollLeft < minScrollLeft) 172 193 this._container.scrollLeft = minScrollLeft + 100; … … 185 206 186 207 if (this._highlightingEnabled) { 187 var lastVisibleLine = Math.min(this._textModel.linesCount, this._offsetToLine Number(this._scrollTop + this._canvas.height) + 1);208 var lastVisibleLine = Math.min(this._textModel.linesCount, this._offsetToLine(this._scrollTop + this._canvas.height) + 1); 188 209 this._highlighter.updateHighlight(newRange.startLine, lastVisibleLine); 189 210 } … … 194 215 this._lineOffsetsCache.length = oldRange.startLine + 1; 195 216 // Force linenumber cache to be continuous. 196 this._line NumberToOffset(oldRange.startLine);197 this. _paintLineNumbers();217 this._lineToOffset(oldRange.startLine); 218 this.paintLineNumbers(); 198 219 } 199 220 this._paint(); … … 215 236 _highlightChanged: function(fromLine, toLine) 216 237 { 217 this._invalidateLines(fromLine, toLine + 1);238 this._invalidateLines(fromLine, toLine); 218 239 this._paint(); 219 240 }, … … 221 242 _updateSize: function(startLine, endLine) 222 243 { 223 var newLineNumberDigits = this._decimalDigits(this._textModel.linesCount);224 this._lineNumberOffset = (newLineNumberDigits + 2) * this._digitWidth;225 226 244 var guardedEndLine = Math.min(this._textModel.linesCount, endLine + 1); 227 245 var newMaximum = false; … … 247 265 } 248 266 249 this._sheet.style.width = this._textWidth + this._lineNumberOffset + "px"; 250 this._sheet.style.height = this._lineNumberToOffset(this._textModel.linesCount) + "px"; 251 252 if (this._canvas.width !== this._container.clientWidth || this._canvas.height !== this._container.clientHeight || newLineNumberDigits !== this._lineNumberDigits) { 267 var newLineNumberDigits = this._decimalDigits(this._textModel.linesCount); 268 this._lineNumberWidth = (newLineNumberDigits + 2) * this._digitWidth; 269 270 var newWidth = this._textWidth + this._lineNumberWidth + "px"; 271 var newHeight = this._lineToOffset(this._textModel.linesCount) + "px"; 272 this._sheet.style.width = newWidth; 273 this._sheet.style.height = newHeight; 274 275 if (newLineNumberDigits !== this._lineNumberDigits) { 276 this._lineNumberDigits = newLineNumberDigits; 277 this._repaintAll(); 278 } 279 280 // Changes to size can change the client area (scrollers can appear/disappear) 281 this.updateCanvasSize(); 282 }, 283 284 updateCanvasSize: function() 285 { 286 if (this._canvas.width !== this._container.clientWidth || this._canvas.height !== this._container.clientHeight) { 253 287 this._canvas.width = this._container.clientWidth; 254 288 this._canvas.height = this._container.clientHeight; 255 this._lineNumberDigits = newLineNumberDigits;256 289 this._repaintAll(); 257 290 } … … 261 294 { 262 295 this._invalidateLines(0, this._textModel.linesCount); 263 this. _paintLineNumbers();296 this.paintLineNumbers(); 264 297 this._paint(); 265 298 this._updateCursor(this._selection.endLine, this._selection.endColumn); … … 297 330 this._ctx.font = this._font; 298 331 this._ctx.textBaseline = "bottom"; 299 300 firstLine = Math.max(firstLine, this._offsetToLine Number(this._scrollTop) - 1);301 lastLine = Math.min(lastLine, this._offsetToLine Number(this._scrollTop + this._canvas.height) + 1);332 333 firstLine = Math.max(firstLine, this._offsetToLine(this._scrollTop) - 1); 334 lastLine = Math.min(lastLine, this._offsetToLine(this._scrollTop + this._canvas.height) + 1); 302 335 if (firstLine > lastLine) 303 336 return; … … 306 339 WebInspector.log("Repaint %d:%d", firstLine, lastLine); 307 340 this._ctx.fillStyle = "rgb(255,255,0)"; 308 var fromOffset = this._line NumberToOffset(firstLine);309 var toOffset = this._line NumberToOffset(lastLine);310 this._ctx.fillRect(this._lineNumber Offset - 1, fromOffset - this._scrollTop, this._canvas.width - this._lineNumberOffset+ 1, toOffset - fromOffset);341 var fromOffset = this._lineToOffset(firstLine); 342 var toOffset = this._lineToOffset(lastLine); 343 this._ctx.fillRect(this._lineNumberWidth - 1, fromOffset - this._scrollTop, this._canvas.width - this._lineNumberWidth + 1, toOffset - fromOffset); 311 344 setTimeout(this._paintLinesContinuation.bind(this, firstLine, lastLine), 100); 312 345 } else … … 318 351 this._ctx.save(); 319 352 this._ctx.beginPath(); 320 this._ctx.rect(this._lineNumber Offset - 1, 0, this._canvas.width - this._lineNumberOffset+ 1, this._canvas.height);353 this._ctx.rect(this._lineNumberWidth - 1, 0, this._canvas.width - this._lineNumberWidth + 1, this._canvas.height); 321 354 this._ctx.clip(); 322 355 323 356 // First clear the region, then update last line to fit model (this clears removed lines from the end of the document). 324 var fromOffset = this._lineNumberToOffset(firstLine); 325 var toOffset = lastLine < this._textModel.linesCount ? this._lineNumberToOffset(lastLine) : this._canvas.height + this._scrollTop; 357 var fromOffset = this._lineToOffset(firstLine); 358 var toOffset = lastLine < this._textModel.linesCount ? this._lineToOffset(lastLine) : this._canvas.height + this._scrollTop; 359 326 360 // Do not clear region when paintCurrentLine is likely to do all the necessary work. 327 if ( firstLine + 1 != lastLine || this._selection.endLine != firstLine) {361 if (this._readOnly || firstLine + 1 != lastLine || this._selection.endLine != firstLine) { 328 362 this._ctx.fillStyle = "rgb(255,255,255)"; 329 363 this._ctx.fillRect(0, fromOffset - this._scrollTop, this._canvas.width, toOffset - fromOffset); … … 331 365 lastLine = Math.min(lastLine, this._textModel.linesCount); 332 366 367 // Paint current line for editable mode only. 368 if (!this._readOnly && this._selection.startLine === this._selection.endLine && firstLine <= this._selection.startLine && this._selection.startLine < lastLine) 369 this._paintCurrentLine(this._selection.startLine); 370 371 this._paintSelection(firstLine, lastLine); 372 333 373 if (this._highlightingEnabled) 334 374 this._highlighter.highlight(lastLine); 335 375 336 if (this._selection.startLine === this._selection.endLine && firstLine <= this._selection.startLine && this._selection.startLine < lastLine)337 this._paintCurrentLine(this._selection.startLine);338 339 this._paintSelection(firstLine, lastLine);340 341 376 for (var i = firstLine; i < lastLine; ++i) { 342 377 var line = this._textModel.line(i); 343 var lineOffset = this._lineNumberToOffset(i) + this._textLineHeight - this._scrollTop; 378 var lineOffset = this._lineToOffset(i) - this._scrollTop; 379 380 if (this._lineDecorator) 381 this._lineDecorator.decorate(i, this._ctx, this._lineNumberWidth - 1, lineOffset, this._canvas.width - this._lineNumberWidth + 1, this._lineHeight(i), this._textLineHeight); 344 382 345 383 if (!this._highlightingEnabled) { 346 384 this._ctx.fillStyle = "rgb(0,0,0)"; 347 this._ctx.fillText(line, this._lineNumber Offset - this._scrollLeft, lineOffset);385 this._ctx.fillText(line, this._lineNumberWidth - this._scrollLeft, lineOffset + this._textLineHeight); 348 386 continue; 349 387 } … … 360 398 if (plainTextStart !== -1) { 361 399 this._ctx.fillStyle = "rgb(0,0,0)"; 362 this._ctx.fillText(line.substring(plainTextStart, j), this._lineNumber Offset - this._scrollLeft + this._columnToOffset(i, plainTextStart), lineOffset);400 this._ctx.fillText(line.substring(plainTextStart, j), this._lineNumberWidth - this._scrollLeft + this._columnToOffset(i, plainTextStart), lineOffset + this._textLineHeight); 363 401 plainTextStart = -1; 364 402 } 365 403 this._ctx.fillStyle = attribute.style; 366 this._ctx.fillText(line.substring(j, j + attribute.length), this._lineNumber Offset - this._scrollLeft + this._columnToOffset(i, j), lineOffset);404 this._ctx.fillText(line.substring(j, j + attribute.length), this._lineNumberWidth - this._scrollLeft + this._columnToOffset(i, j), lineOffset + this._textLineHeight); 367 405 j += attribute.length; 368 406 } … … 370 408 if (plainTextStart !== -1) { 371 409 this._ctx.fillStyle = "rgb(0,0,0)"; 372 this._ctx.fillText(line.substring(plainTextStart, line.length), this._lineNumber Offset - this._scrollLeft + this._columnToOffset(i, plainTextStart), lineOffset);410 this._ctx.fillText(line.substring(plainTextStart, line.length), this._lineNumberWidth - this._scrollLeft + this._columnToOffset(i, plainTextStart), lineOffset + this._textLineHeight); 373 411 } 374 412 } … … 376 414 }, 377 415 378 _paintLineNumbers: function()416 paintLineNumbers: function() 379 417 { 380 418 this._ctx.font = this._font; … … 382 420 383 421 this._ctx.fillStyle = "rgb(255,255,255)"; 384 this._ctx.fillRect(0, 0, this._lineNumber Offset- 2, this._canvas.height);422 this._ctx.fillRect(0, 0, this._lineNumberWidth - 2, this._canvas.height); 385 423 386 424 this._ctx.fillStyle = "rgb(235,235,235)"; 387 this._ctx.fillRect(this._lineNumberOffset - 2, 0, 1, this._canvas.height); 388 389 var firstLine = Math.max(0, this._offsetToLineNumber(this._scrollTop) - 1); 390 var lastLine = Math.min(this._textModel.linesCount, this._offsetToLineNumber(this._scrollTop + this._canvas.height) + 1); 391 392 this._ctx.fillStyle = "rgb(155,155,155)"; 393 for (var i = firstLine; i < lastLine; ++i) 394 this._ctx.fillText(i + 1, (this._lineNumberDigits - this._decimalDigits(i + 1) + 1) * this._digitWidth, this._lineNumberToOffset(i) + this._textLineHeight - this._scrollTop); 425 this._ctx.fillRect(this._lineNumberWidth - 2, 0, 1, this._canvas.height); 426 427 var firstLine = Math.max(0, this._offsetToLine(this._scrollTop) - 1); 428 var lastLine = Math.min(this._textModel.linesCount, this._offsetToLine(this._scrollTop + this._canvas.height) + 1); 429 430 for (var i = firstLine; i < lastLine; ++i) { 431 var lineOffset = this._lineToOffset(i) - this._scrollTop; 432 this._ctx.fillStyle = "rgb(155,155,155)"; 433 if (this._lineNumberDecorator && this._lineNumberDecorator.decorate(i, this._ctx, 0, lineOffset, this._lineNumberWidth, this._lineHeight(i), this._textLineHeight)) 434 continue; 435 this._ctx.fillText(i + 1, (this._lineNumberDigits - this._decimalDigits(i + 1) + 1) * this._digitWidth, lineOffset + this._textLineHeight); 436 } 395 437 }, 396 438 … … 398 440 { 399 441 this._ctx.fillStyle = "rgb(232, 242, 254)"; 400 this._ctx.fillRect(0, this._lineNumberToOffset(line) - this._scrollTop, this._canvas.width, this._lineHeight(line)); 401 this._ctx.fillStyle = "rgb(0, 0, 0)"; 442 this._ctx.fillRect(0, this._lineToOffset(line) - this._scrollTop, this._canvas.width, this._lineHeight(line)); 402 443 }, 403 444 … … 426 467 { 427 468 var location = this._caretForMouseEvent(e); 469 470 if (e.x < this._lineNumberWidth && this._lineNumberDecorator) { 471 if (this._lineNumberDecorator.mouseDown(location.line, e)) 472 return; 473 } 474 428 475 if (e.shiftKey) 429 476 this._setSelectionEnd(location.line, location.column); … … 456 503 _caretForMouseEvent: function(e) 457 504 { 458 var lineNumber = Math.max(0, this._offsetToLine Number(e.y + this._scrollTop) - 1);505 var lineNumber = Math.max(0, this._offsetToLine(e.y + this._scrollTop) - 1); 459 506 var line = this._textModel.line(lineNumber); 460 var offset = e.x + this._scrollLeft - this._lineNumber Offset- this._digitWidth;507 var offset = e.x + this._scrollLeft - this._lineNumberWidth - this._digitWidth; 461 508 return { line: lineNumber, column: this._columnForOffset(lineNumber, offset) }; 462 509 }, … … 494 541 return; 495 542 } 543 544 if (this._readOnly) 545 return; 496 546 497 547 var keyCodes = WebInspector.KeyboardShortcut.KeyCodes; … … 535 585 arrowAction.call(this, caretLine - 1, this._desiredCaretColumn, true); 536 586 else { 537 var offset = Math.max(0, this._line NumberToOffset(caretLine) - this._canvas.height);538 arrowAction.call(this, this._offsetToLine Number(offset), this._desiredCaretColumn, true);587 var offset = Math.max(0, this._lineToOffset(caretLine) - this._canvas.height); 588 arrowAction.call(this, this._offsetToLine(offset), this._desiredCaretColumn, true); 539 589 } 540 590 } … … 550 600 arrowAction.call(this, caretLine + 1, this._desiredCaretColumn, true); 551 601 else { 552 var offset = this._line NumberToOffset(caretLine) + this._canvas.height;553 arrowAction.call(this, this._offsetToLine Number(offset), this._desiredCaretColumn, true);602 var offset = this._lineToOffset(caretLine) + this._canvas.height; 603 arrowAction.call(this, this._offsetToLine(offset), this._desiredCaretColumn, true); 554 604 } 555 605 } … … 599 649 _textInput: function(e) 600 650 { 651 if (this._readOnly) 652 return; 653 601 654 if (e.data && !e.altKey && !e.ctrlKey && !e.metaKey) { 602 655 this._replaceSelectionWith(e.data); … … 627 680 return; 628 681 var offset = this._columnToOffset(line, column); 629 if (offset >= this._container.scrollLeft )630 this._cursor.setLocation(this._lineNumber Offset + offset - 1, this._lineNumberToOffset(line));682 if (offset >= this._container.scrollLeft && !this._readOnly) 683 this._cursor.setLocation(this._lineNumberWidth + offset - 1, this._lineToOffset(line)); 631 684 else 632 this._cursor. setLocation(0, 0);685 this._cursor.hide(); 633 686 }, 634 687 … … 657 710 if (i === range.startLine) { 658 711 var offset = this._columnToOffset(range.startLine, range.startColumn); 659 from = offset - this._scrollLeft + this._lineNumber Offset- 1;712 from = offset - this._scrollLeft + this._lineNumberWidth - 1; 660 713 } else 661 714 from = 0; … … 663 716 if (i === range.endLine) { 664 717 var offset = this._columnToOffset(range.endLine, range.endColumn); 665 to = offset - this._scrollLeft + this._lineNumber Offset- 1;718 to = offset - this._scrollLeft + this._lineNumberWidth - 1; 666 719 } else 667 720 to = this._canvas.width; 668 721 669 this._ctx.fillRect(from, this._line NumberToOffset(i) - this._scrollTop, to - from, this._textLineHeight);722 this._ctx.fillRect(from, this._lineToOffset(i) - this._scrollTop, to - from, this._textLineHeight); 670 723 } 671 724 this._ctx.fillStyle = "rgb(0, 0, 0)"; … … 708 761 _paste: function(e) 709 762 { 763 if (this._readOnly) { 764 e.preventDefault(); 765 return; 766 } 767 710 768 var text = e.clipboardData.getData("Text"); 711 769 if (!text) … … 766 824 this._textLineHeight = Math.floor(this._fontSize * 1.4); 767 825 this._cursor.setTextLineHeight(this._textLineHeight); 826 this._lineOffsetsCache = [0]; 768 827 }, 769 828 … … 955 1014 }, 956 1015 1016 hide: function() 1017 { 1018 if (this._paintInterval) { 1019 window.clearInterval(this._paintInterval); 1020 delete this._paintInterval; 1021 } 1022 this._cursorElement.style.display = "none"; 1023 }, 1024 957 1025 setTextLineHeight: function(textLineHeight) 958 1026 { -
trunk/WebCore/inspector/front-end/TextEditorHighlighter.js
r53184 r53205 73 73 // Do small highlight synchronously. This will provide instant highlight on PageUp / PageDown, gentle scrolling. 74 74 var toLine = Math.min(startLine + 200, endLine); 75 this._highlight Lines(startLine, toLine);75 this._highlightInChunks(startLine, toLine); 76 76 77 77 // Schedule tail highlight if necessary. … … 91 91 if (this._requestedEndLine !== endLine) { 92 92 // User keeps updating the job in between of our timer ticks. Just reschedule self, don't eat CPU (they must be scrolling). 93 this._highlightTimer = setTimeout(this._highlightInChunks.bind(this, startLine, this._requestedEndLine), 200);93 this._highlightTimer = setTimeout(this._highlightInChunks.bind(this, startLine, this._requestedEndLine), 100); 94 94 return; 95 95 } … … 134 134 this._tokenizer.condition = this._tokenizer.initialCondition; 135 135 136 var damagedFrom = startLine;137 var damagedTo = startLine;138 136 for (var i = startLine; i < endLine; ++i) { 139 damagedTo = i;140 141 137 state = {}; 142 138 state.preCondition = this._tokenizer.condition; … … 151 147 if (nextLineState && nextLineState.preCondition === state.postCondition) { 152 148 // Following lines are up to date, no need re-highlight. 153 this._damageCallback( damagedFrom, damagedTo);149 this._damageCallback(startLine, i + 1); 154 150 return true; 155 151 } 156 152 } 157 this._damageCallback( damagedFrom, damagedTo);153 this._damageCallback(startLine, endLine); 158 154 return false; 159 155 }, -
trunk/WebCore/inspector/front-end/TextEditorModel.js
r53184 r53205 148 148 { 149 149 this._lines.splice(lineNumber, 0, text); 150 this._attributes.splice(lineNumber, 0, []);150 this._attributes.splice(lineNumber, 0, {}); 151 151 }, 152 152 … … 190 190 var attrs = this._attributes[line]; 191 191 if (!attrs) { 192 attrs = [];192 attrs = {}; 193 193 this._attributes[line] = attrs; 194 194 } -
trunk/WebCore/inspector/front-end/WebKit.qrc
r52985 r53205 65 65 <file>SidebarTreeElement.js</file> 66 66 <file>SourceFrame.js</file> 67 <file>SourceFrame2.js</file> 67 68 <file>SourceSyntaxHighlighter.js</file> 68 69 <file>SourceView.js</file> -
trunk/WebCore/inspector/front-end/inspector.html
r52985 r53205 92 92 <script type="text/javascript" src="ResourceView.js"></script> 93 93 <script type="text/javascript" src="SourceFrame.js"></script> 94 <script type="text/javascript" src="SourceFrame2.js"></script> 94 95 <script type="text/javascript" src="SourceSyntaxHighlighter.js"></script> 95 96 <script type="text/javascript" src="CSSSourceSyntaxHighlighter.js"></script>
Note: See TracChangeset
for help on using the changeset viewer.