[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.16-1409-g5afdf4d
joepeck at webkit.org
joepeck at webkit.org
Thu Dec 3 13:39:23 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit c34d25787df656ab73421897e25fcc7ebc3b1262
Author: joepeck at webkit.org <joepeck at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Nov 18 22:05:46 2009 +0000
2009-11-18 Joseph Pecoraro <joepeck at webkit.org>
Reviewed by Pavel Feldman.
Web Inspector: Directly Access <head> Instead of Searching for It
https://bugs.webkit.org/show_bug.cgi?id=31641
Changed old access of the head element (document.getElementsByTagName)
to just use the document.head accessor.
* inspector/front-end/FontView.js:
(WebInspector.FontView):
* inspector/front-end/InjectedScript.js:
(InjectedScript.addStyleSelector):
* inspector/front-end/SourceFrame.js:
(WebInspector.SourceFrame.prototype._loaded):
* inspector/front-end/inspector.js:
(windowLoaded):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51134 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index b0649ef..88d3fc5 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,22 @@
+2009-11-18 Joseph Pecoraro <joepeck at webkit.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: Directly Access <head> Instead of Searching for It
+ https://bugs.webkit.org/show_bug.cgi?id=31641
+
+ Changed old access of the head element (document.getElementsByTagName)
+ to just use the document.head accessor.
+
+ * inspector/front-end/FontView.js:
+ (WebInspector.FontView):
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript.addStyleSelector):
+ * inspector/front-end/SourceFrame.js:
+ (WebInspector.SourceFrame.prototype._loaded):
+ * inspector/front-end/inspector.js:
+ (windowLoaded):
+
2009-11-18 Sam Weinig <sam at webkit.org>
Reviewed by Anders Carlsson.
diff --git a/WebCore/inspector/front-end/FontView.js b/WebCore/inspector/front-end/FontView.js
index 4e1c931..8468cc9 100644
--- a/WebCore/inspector/front-end/FontView.js
+++ b/WebCore/inspector/front-end/FontView.js
@@ -36,7 +36,7 @@ WebInspector.FontView = function(resource)
this.fontStyleElement = document.createElement("style");
this.fontStyleElement.textContent = "@font-face { font-family: \"" + uniqueFontName + "\"; src: url(" + this.resource.url + "); }";
- document.getElementsByTagName("head").item(0).appendChild(this.fontStyleElement);
+ document.head.appendChild(this.fontStyleElement);
this.fontPreviewElement = document.createElement("div");
this.fontPreviewElement.className = "preview";
diff --git a/WebCore/inspector/front-end/InjectedScript.js b/WebCore/inspector/front-end/InjectedScript.js
index 5893bc8..713f02c 100644
--- a/WebCore/inspector/front-end/InjectedScript.js
+++ b/WebCore/inspector/front-end/InjectedScript.js
@@ -238,7 +238,7 @@ InjectedScript.addStyleSelector = function(newContent, selectedNodeId)
var stylesheet = ownerDocument.__stylesheet;
if (!stylesheet) {
- var head = ownerDocument.getElementsByTagName("head")[0];
+ var head = ownerDocument.head;
var styleElement = ownerDocument.createElement("style");
styleElement.type = "text/css";
head.appendChild(styleElement);
diff --git a/WebCore/inspector/front-end/SourceFrame.js b/WebCore/inspector/front-end/SourceFrame.js
index 9d9ff03..f2929ee 100644
--- a/WebCore/inspector/front-end/SourceFrame.js
+++ b/WebCore/inspector/front-end/SourceFrame.js
@@ -212,7 +212,7 @@ WebInspector.SourceFrame.prototype = {
var shortcut = WebInspector.KeyboardShortcut.makeKey(69 /* 'E' */, platformSpecificModifier | WebInspector.KeyboardShortcut.Modifiers.Shift);
this._shortcuts[shortcut] = this._evalSelectionInCallFrame.bind(this);
- var headElement = this.element.contentDocument.getElementsByTagName("head")[0];
+ var headElement = this.element.contentDocument.head;
if (!headElement) {
headElement = this.element.contentDocument.createElement("head");
this.element.contentDocument.documentElement.insertBefore(headElement, this.element.contentDocument.documentElement.firstChild);
diff --git a/WebCore/inspector/front-end/inspector.js b/WebCore/inspector/front-end/inspector.js
index a4ddcce..6627a8b 100644
--- a/WebCore/inspector/front-end/inspector.js
+++ b/WebCore/inspector/front-end/inspector.js
@@ -500,7 +500,7 @@ var windowLoaded = function()
localizedStringsScriptElement.addEventListener("load", WebInspector.loaded.bind(WebInspector), false);
localizedStringsScriptElement.type = "text/javascript";
localizedStringsScriptElement.src = localizedStringsURL;
- document.getElementsByTagName("head").item(0).appendChild(localizedStringsScriptElement);
+ document.head.appendChild(localizedStringsScriptElement);
} else
WebInspector.loaded();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list