Changeset 181386 in webkit
- Timestamp:
- Mar 11, 2015 7:09:29 AM (9 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r181367 r181386 1 2015-03-11 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: SearchResultTreeElement.representedObject is missing a saveIdentityToCookie implementation 4 https://bugs.webkit.org/show_bug.cgi?id=134698 5 6 Reviewed by Timothy Hatcher. 7 8 This will restore selection of a global search tree element if you 9 close and reopen the inspector in such a case. 10 11 * UserInterface/Models/DOMSearchMatchObject.js: 12 (WebInspector.DOMSearchMatchObject.prototype.get resource): 13 (WebInspector.DOMSearchMatchObject.titleForDOMNode): 14 Cookie has the resource URL, DOM Node title, and text range. 15 16 * UserInterface/Models/SourceCodeSearchMatchObject.js: 17 (WebInspector.SourceCodeSearchMatchObject.prototype.get sourceCodeTextRange): 18 Cookie has the source code URL and text range. 19 1 20 2015-03-10 Joseph Pecoraro <pecoraro@apple.com> 2 21 -
trunk/Source/WebInspectorUI/UserInterface/Models/DOMSearchMatchObject.js
r174687 r181386 45 45 WebInspector.DOMSearchMatchObject.DOMMatchNodeIconStyleClassName = "dom-match-node-icon"; 46 46 47 WebInspector.DOMSearchMatchObject.TypeIdentifier = "dom-search-match-object"; 48 WebInspector.DOMSearchMatchObject.URLCookieKey = "resource-url"; 49 WebInspector.DOMSearchMatchObject.TitleKey = "title"; 50 WebInspector.DOMSearchMatchObject.TextRangeKey = "text-range"; 51 47 52 WebInspector.DOMSearchMatchObject.prototype = { 48 53 constructor: WebInspector.DOMSearchMatchObject, 54 __proto__: WebInspector.Object.prototype, 49 55 50 56 // Public 57 58 get resource() 59 { 60 return this._resource; 61 }, 51 62 52 63 get domNode() … … 78 89 }, 79 90 91 saveIdentityToCookie(cookie) 92 { 93 cookie[WebInspector.DOMSearchMatchObject.URLCookieKey] = this._resource.url.hash; 94 cookie[WebInspector.DOMSearchMatchObject.TitleKey] = this._title; 95 var textRange = this._sourceCodeTextRange.textRange; 96 cookie[WebInspector.DOMSearchMatchObject.TextRangeKey] = [textRange.startLine, textRange.startColumn, textRange.endLine, textRange.endColumn].join(); 97 }, 98 80 99 // Private 81 100 82 _generateClassName : function()101 _generateClassName() 83 102 { 84 103 switch (this._domNode.nodeType()) { … … 155 174 } 156 175 }; 157 158 WebInspector.DOMSearchMatchObject.prototype.__proto__ = WebInspector.Object.prototype; -
trunk/Source/WebInspectorUI/UserInterface/Models/SourceCodeSearchMatchObject.js
r176358 r181386 38 38 WebInspector.SourceCodeSearchMatchObject.SourceCodeMatchIconStyleClassName = "source-code-match-icon"; 39 39 40 WebInspector.SourceCodeSearchMatchObject.TypeIdentifier = "source-code-search-match-object"; 41 WebInspector.SourceCodeSearchMatchObject.URLCookieKey = "source-code-url"; 42 WebInspector.SourceCodeSearchMatchObject.TextRangeKey = "text-range"; 43 40 44 WebInspector.SourceCodeSearchMatchObject.prototype = { 41 45 constructor: WebInspector.SourceCodeSearchMatchObject, 46 __proto__: WebInspector.Object.prototype, 42 47 43 48 get sourceCode() … … 64 69 { 65 70 return this._sourceCodeTextRange; 71 }, 72 73 saveIdentityToCookie(cookie) 74 { 75 if (this._sourceCode.url) 76 cookie[WebInspector.SourceCodeSearchMatchObject.URLCookieKey] = this._sourceCode.url.hash; 77 78 var textRange = this._sourceCodeTextRange.textRange; 79 cookie[WebInspector.SourceCodeSearchMatchObject.TextRangeKey] = [textRange.startLine, textRange.startColumn, textRange.endLine, textRange.endColumn].join(); 66 80 } 67 81 }; 68 69 WebInspector.SourceCodeSearchMatchObject.prototype.__proto__ = WebInspector.Object.prototype;
Note: See TracChangeset
for help on using the changeset viewer.