| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * | 10 * |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 WebInspector.StyleSheetOutlineDialog = function(uiSourceCode, selectItemCallback
) | 35 WebInspector.StyleSheetOutlineDialog = function(uiSourceCode, selectItemCallback
) |
| 36 { | 36 { |
| 37 WebInspector.SelectionDialogContentProvider.call(this); | 37 WebInspector.SelectionDialogContentProvider.call(this); |
| 38 this._selectItemCallback = selectItemCallback; | 38 this._selectItemCallback = selectItemCallback; |
| 39 this._cssParser = new WebInspector.CSSParser(); | 39 this._cssParser = new WebInspector.CSSParser(); |
| 40 this._cssParser.addEventListener(WebInspector.CSSParser.Events.RulesParsed,
this.refresh.bind(this)); | 40 this._cssParser.addEventListener(WebInspector.CSSParser.Events.RulesParsed,
this.refresh.bind(this)); |
| 41 this._cssParser.parse(uiSourceCode.workingCopy()); | 41 this._cssParser.parse(uiSourceCode.workingCopy()); |
| 42 } | 42 } |
| 43 | 43 |
| 44 /** | 44 /** |
| 45 * @param {!WebInspector.View} view | 45 * @param {!WebInspector.Widget} view |
| 46 * @param {!WebInspector.UISourceCode} uiSourceCode | 46 * @param {!WebInspector.UISourceCode} uiSourceCode |
| 47 * @param {function(number, number)} selectItemCallback | 47 * @param {function(number, number)} selectItemCallback |
| 48 */ | 48 */ |
| 49 WebInspector.StyleSheetOutlineDialog.show = function(view, uiSourceCode, selectI
temCallback) | 49 WebInspector.StyleSheetOutlineDialog.show = function(view, uiSourceCode, selectI
temCallback) |
| 50 { | 50 { |
| 51 if (WebInspector.Dialog.currentInstance()) | 51 if (WebInspector.Dialog.currentInstance()) |
| 52 return; | 52 return; |
| 53 var delegate = new WebInspector.StyleSheetOutlineDialog(uiSourceCode, select
ItemCallback); | 53 var delegate = new WebInspector.StyleSheetOutlineDialog(uiSourceCode, select
ItemCallback); |
| 54 var filteredItemSelectionDialog = new WebInspector.FilteredItemSelectionDial
og(delegate); | 54 var filteredItemSelectionDialog = new WebInspector.FilteredItemSelectionDial
og(delegate); |
| 55 WebInspector.Dialog.show(view.element, filteredItemSelectionDialog); | 55 WebInspector.Dialog.show(view.element, filteredItemSelectionDialog); |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 this._selectItemCallback(lineNumber, rule.columnNumber); | 116 this._selectItemCallback(lineNumber, rule.columnNumber); |
| 117 }, | 117 }, |
| 118 | 118 |
| 119 dispose: function() | 119 dispose: function() |
| 120 { | 120 { |
| 121 this._cssParser.dispose(); | 121 this._cssParser.dispose(); |
| 122 }, | 122 }, |
| 123 | 123 |
| 124 __proto__: WebInspector.SelectionDialogContentProvider.prototype | 124 __proto__: WebInspector.SelectionDialogContentProvider.prototype |
| 125 } | 125 } |
| OLD | NEW |