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

Side by Side Diff: Source/devtools/front_end/sources/StyleSheetOutlineDialog.js

Issue 1356363002: [DevTools] Remove relativeToElement from Dialog. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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
OLDNEW
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
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.Widget} view
46 * @param {!WebInspector.UISourceCode} uiSourceCode 45 * @param {!WebInspector.UISourceCode} uiSourceCode
47 * @param {function(number, number)} selectItemCallback 46 * @param {function(number, number)} selectItemCallback
48 */ 47 */
49 WebInspector.StyleSheetOutlineDialog.show = function(view, uiSourceCode, selectI temCallback) 48 WebInspector.StyleSheetOutlineDialog.show = function(uiSourceCode, selectItemCal lback)
50 { 49 {
51 if (WebInspector.Dialog.currentInstance()) 50 if (WebInspector.Dialog.currentInstance())
52 return; 51 return;
53 var delegate = new WebInspector.StyleSheetOutlineDialog(uiSourceCode, select ItemCallback); 52 var delegate = new WebInspector.StyleSheetOutlineDialog(uiSourceCode, select ItemCallback);
54 var filteredItemSelectionDialog = new WebInspector.FilteredItemSelectionDial og(delegate); 53 var filteredItemSelectionDialog = new WebInspector.FilteredItemSelectionDial og(delegate);
55 WebInspector.Dialog.show(view.element, filteredItemSelectionDialog); 54 WebInspector.Dialog.show(filteredItemSelectionDialog);
56 } 55 }
57 56
58 WebInspector.StyleSheetOutlineDialog.prototype = { 57 WebInspector.StyleSheetOutlineDialog.prototype = {
59 /** 58 /**
60 * @override 59 * @override
61 * @return {number} 60 * @return {number}
62 */ 61 */
63 itemCount: function() 62 itemCount: function()
64 { 63 {
65 return this._cssParser.rules().length; 64 return this._cssParser.rules().length;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 this._selectItemCallback(lineNumber, rule.columnNumber); 115 this._selectItemCallback(lineNumber, rule.columnNumber);
117 }, 116 },
118 117
119 dispose: function() 118 dispose: function()
120 { 119 {
121 this._cssParser.dispose(); 120 this._cssParser.dispose();
122 }, 121 },
123 122
124 __proto__: WebInspector.SelectionDialogContentProvider.prototype 123 __proto__: WebInspector.SelectionDialogContentProvider.prototype
125 } 124 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/sources/SourcesView.js ('k') | Source/devtools/front_end/timeline/TimelinePanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698