Changeset 51134 in webkit
- Timestamp:
- Nov 18, 2009 2:05:46 PM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r51133 r51134 1 2009-11-18 Joseph Pecoraro <joepeck@webkit.org> 2 3 Reviewed by Pavel Feldman. 4 5 Web Inspector: Directly Access <head> Instead of Searching for It 6 https://bugs.webkit.org/show_bug.cgi?id=31641 7 8 Changed old access of the head element (document.getElementsByTagName) 9 to just use the document.head accessor. 10 11 * inspector/front-end/FontView.js: 12 (WebInspector.FontView): 13 * inspector/front-end/InjectedScript.js: 14 (InjectedScript.addStyleSelector): 15 * inspector/front-end/SourceFrame.js: 16 (WebInspector.SourceFrame.prototype._loaded): 17 * inspector/front-end/inspector.js: 18 (windowLoaded): 19 1 20 2009-11-18 Sam Weinig <sam@webkit.org> 2 21 -
trunk/WebCore/inspector/front-end/FontView.js
r37289 r51134 37 37 this.fontStyleElement = document.createElement("style"); 38 38 this.fontStyleElement.textContent = "@font-face { font-family: \"" + uniqueFontName + "\"; src: url(" + this.resource.url + "); }"; 39 document. getElementsByTagName("head").item(0).appendChild(this.fontStyleElement);39 document.head.appendChild(this.fontStyleElement); 40 40 41 41 this.fontPreviewElement = document.createElement("div"); -
trunk/WebCore/inspector/front-end/InjectedScript.js
r50639 r51134 239 239 var stylesheet = ownerDocument.__stylesheet; 240 240 if (!stylesheet) { 241 var head = ownerDocument. getElementsByTagName("head")[0];241 var head = ownerDocument.head; 242 242 var styleElement = ownerDocument.createElement("style"); 243 243 styleElement.type = "text/css"; -
trunk/WebCore/inspector/front-end/SourceFrame.js
r50755 r51134 213 213 this._shortcuts[shortcut] = this._evalSelectionInCallFrame.bind(this); 214 214 215 var headElement = this.element.contentDocument. getElementsByTagName("head")[0];215 var headElement = this.element.contentDocument.head; 216 216 if (!headElement) { 217 217 headElement = this.element.contentDocument.createElement("head"); -
trunk/WebCore/inspector/front-end/inspector.js
r51119 r51134 501 501 localizedStringsScriptElement.type = "text/javascript"; 502 502 localizedStringsScriptElement.src = localizedStringsURL; 503 document. getElementsByTagName("head").item(0).appendChild(localizedStringsScriptElement);503 document.head.appendChild(localizedStringsScriptElement); 504 504 } else 505 505 WebInspector.loaded();
Note: See TracChangeset
for help on using the changeset viewer.