OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
3 * Copyright (C) 2009 Joseph Pecoraro | 3 * Copyright (C) 2009 Joseph Pecoraro |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 this._sectionsContainer = document.createElement("div"); | 61 this._sectionsContainer = document.createElement("div"); |
62 this.bodyElement.appendChild(this._sectionsContainer); | 62 this.bodyElement.appendChild(this._sectionsContainer); |
63 | 63 |
64 this._spectrumHelper = new WebInspector.SpectrumPopupHelper(); | 64 this._spectrumHelper = new WebInspector.SpectrumPopupHelper(); |
65 this._linkifier = new WebInspector.Linkifier(new WebInspector.Linkifier.Defa
ultCSSFormatter()); | 65 this._linkifier = new WebInspector.Linkifier(new WebInspector.Linkifier.Defa
ultCSSFormatter()); |
66 | 66 |
67 WebInspector.cssModel.addEventListener(WebInspector.CSSStyleModel.Events.Sty
leSheetAdded, this._styleSheetOrMediaQueryResultChanged, this); | 67 WebInspector.cssModel.addEventListener(WebInspector.CSSStyleModel.Events.Sty
leSheetAdded, this._styleSheetOrMediaQueryResultChanged, this); |
68 WebInspector.cssModel.addEventListener(WebInspector.CSSStyleModel.Events.Sty
leSheetRemoved, this._styleSheetOrMediaQueryResultChanged, this); | 68 WebInspector.cssModel.addEventListener(WebInspector.CSSStyleModel.Events.Sty
leSheetRemoved, this._styleSheetOrMediaQueryResultChanged, this); |
69 WebInspector.cssModel.addEventListener(WebInspector.CSSStyleModel.Events.Sty
leSheetChanged, this._styleSheetOrMediaQueryResultChanged, this); | 69 WebInspector.cssModel.addEventListener(WebInspector.CSSStyleModel.Events.Sty
leSheetChanged, this._styleSheetOrMediaQueryResultChanged, this); |
70 WebInspector.cssModel.addEventListener(WebInspector.CSSStyleModel.Events.Med
iaQueryResultChanged, this._styleSheetOrMediaQueryResultChanged, this); | 70 WebInspector.cssModel.addEventListener(WebInspector.CSSStyleModel.Events.Med
iaQueryResultChanged, this._styleSheetOrMediaQueryResultChanged, this); |
71 WebInspector.domAgent.addEventListener(WebInspector.DOMAgent.Events.AttrModi
fied, this._attributeChanged, this); | 71 WebInspector.domModel.addEventListener(WebInspector.DOMModel.Events.AttrModi
fied, this._attributeChanged, this); |
72 WebInspector.domAgent.addEventListener(WebInspector.DOMAgent.Events.AttrRemo
ved, this._attributeChanged, this); | 72 WebInspector.domModel.addEventListener(WebInspector.DOMModel.Events.AttrRemo
ved, this._attributeChanged, this); |
73 WebInspector.settings.showUserAgentStyles.addChangeListener(this._showUserAg
entStylesSettingChanged.bind(this)); | 73 WebInspector.settings.showUserAgentStyles.addChangeListener(this._showUserAg
entStylesSettingChanged.bind(this)); |
74 WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeMod
el.EventTypes.FrameResized, this._frameResized, this); | 74 WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeMod
el.EventTypes.FrameResized, this._frameResized, this); |
75 this.element.classList.add("styles-pane"); | 75 this.element.classList.add("styles-pane"); |
76 this.element.classList.toggle("show-user-styles", WebInspector.settings.show
UserAgentStyles.get()); | 76 this.element.classList.toggle("show-user-styles", WebInspector.settings.show
UserAgentStyles.get()); |
77 this.element.addEventListener("mousemove", this._mouseMovedOverElement.bind(
this), false); | 77 this.element.addEventListener("mousemove", this._mouseMovedOverElement.bind(
this), false); |
78 document.body.addEventListener("keydown", this._keyDown.bind(this), false); | 78 document.body.addEventListener("keydown", this._keyDown.bind(this), false); |
79 document.body.addEventListener("keyup", this._keyUp.bind(this), false); | 79 document.body.addEventListener("keyup", this._keyUp.bind(this), false); |
80 } | 80 } |
81 | 81 |
82 // Keep in sync with RenderStyleConstants.h PseudoId enum. Array below contains
pseudo id names for corresponding enum indexes. | 82 // Keep in sync with RenderStyleConstants.h PseudoId enum. Array below contains
pseudo id names for corresponding enum indexes. |
(...skipping 2951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3034 return; | 3034 return; |
3035 } | 3035 } |
3036 | 3036 |
3037 var results = this._cssCompletions.startsWith(prefix); | 3037 var results = this._cssCompletions.startsWith(prefix); |
3038 var selectedIndex = this._cssCompletions.mostUsedOf(results); | 3038 var selectedIndex = this._cssCompletions.mostUsedOf(results); |
3039 completionsReadyCallback(results, selectedIndex); | 3039 completionsReadyCallback(results, selectedIndex); |
3040 }, | 3040 }, |
3041 | 3041 |
3042 __proto__: WebInspector.TextPrompt.prototype | 3042 __proto__: WebInspector.TextPrompt.prototype |
3043 } | 3043 } |
OLD | NEW |