Changeset 141424 in webkit
- Timestamp:
- Jan 31, 2013 8:33:06 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r141420 r141424 1 2013-01-31 Andrey Lushnikov <lushnikov@chromium.org> 2 3 Web Inspector: overlay highlight in DTE gets messed up when zoom factor changes. 4 https://bugs.webkit.org/show_bug.cgi?id=108486 5 6 Reviewed by Pavel Feldman. 7 8 Repaint overlay highlight when zoom factor changes. 9 10 No new tests. 11 12 * inspector/front-end/DefaultTextEditor.js: 13 (WebInspector.TextEditorMainPanel.prototype.highlightRegex): 14 (WebInspector.TextEditorMainPanel.prototype.removeHighlight): 15 (WebInspector.TextEditorMainPanel.prototype.highlightRange): 16 (WebInspector.TextEditorMainPanel.prototype._repaintLineRowsAffectedByHighlightDescriptors): 17 (WebInspector.TextEditorMainPanel.prototype.resize): 18 1 19 2013-01-31 Simon Hausmann <simon.hausmann@digia.com> 2 20 -
trunk/Source/WebCore/inspector/front-end/DefaultTextEditor.js
r141414 r141424 1391 1391 var highlightDescriptor = new WebInspector.TextEditorMainPanel.RegexHighlightDescriptor(new RegExp(regex, "g"), cssClass); 1392 1392 this._highlightDescriptors.push(highlightDescriptor); 1393 this._repaintLineRowsAffectedByHighlightDescriptor (highlightDescriptor);1393 this._repaintLineRowsAffectedByHighlightDescriptors([highlightDescriptor]); 1394 1394 return highlightDescriptor; 1395 1395 }, … … 1401 1401 { 1402 1402 this._highlightDescriptors.remove(highlightDescriptor); 1403 this._repaintLineRowsAffectedByHighlightDescriptor (highlightDescriptor);1403 this._repaintLineRowsAffectedByHighlightDescriptors([highlightDescriptor]); 1404 1404 }, 1405 1405 … … 1412 1412 var highlightDescriptor = new WebInspector.TextEditorMainPanel.RangeHighlightDescriptor(range, cssClass); 1413 1413 this._highlightDescriptors.push(highlightDescriptor); 1414 this._repaintLineRowsAffectedByHighlightDescriptor (highlightDescriptor);1414 this._repaintLineRowsAffectedByHighlightDescriptors([highlightDescriptor]); 1415 1415 return highlightDescriptor; 1416 1416 }, 1417 1417 1418 1418 /** 1419 * @param { WebInspector.TextEditorMainPanel.HighlightDescriptor} highlightDescriptor1420 */ 1421 _repaintLineRowsAffectedByHighlightDescriptor : function(highlightDescriptor)1419 * @param {Array.<WebInspector.TextEditorMainPanel.HighlightDescriptor>} highlightDescriptors 1420 */ 1421 _repaintLineRowsAffectedByHighlightDescriptors: function(highlightDescriptors) 1422 1422 { 1423 1423 var visibleFrom = this.scrollTop(); … … 1434 1434 var lineRow = chunk.expandedLineRow(lineNumber); 1435 1435 var line = this._textModel.line(lineNumber); 1436 if (highlightDescriptor.affectsLine(lineNumber, line)) 1437 affectedLineRows.push(lineRow); 1436 for(var j = 0; j < highlightDescriptors.length; ++j) { 1437 if (highlightDescriptors[j].affectsLine(lineNumber, line)) { 1438 affectedLineRows.push(lineRow); 1439 break; 1440 } 1441 } 1438 1442 } 1439 1443 } … … 1443 1447 this._paintLineRows(affectedLineRows); 1444 1448 this._restoreSelection(selection); 1449 }, 1450 1451 resize: function() 1452 { 1453 WebInspector.TextEditorChunkedPanel.prototype.resize.call(this); 1454 this._repaintLineRowsAffectedByHighlightDescriptors(this._highlightDescriptors); 1445 1455 }, 1446 1456
Note: See TracChangeset
for help on using the changeset viewer.