[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198
pfeldman at chromium.org
pfeldman at chromium.org
Sun Feb 20 23:06:43 UTC 2011
The following commit has been merged in the webkit-1.3 branch:
commit b34c2dc04d5304ae8c25666ea4730ea41701b259
Author: pfeldman at chromium.org <pfeldman at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Jan 17 17:51:21 2011 +0000
2011-01-17 Pavel Feldman <pfeldman at chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: unify image data source assignment, add image url
to the image view properties list.
https://bugs.webkit.org/show_bug.cgi?id=52584
* English.lproj/localizedStrings.js:
* inspector/front-end/ImageView.js:
(WebInspector.ImageView.prototype._createContentIfNeeded.onImageLoad):
(WebInspector.ImageView.prototype._createContentIfNeeded):
* inspector/front-end/NetworkPanel.js:
(WebInspector.NetworkDataGridNode.prototype._refreshNameCell):
* inspector/front-end/Resource.js:
(WebInspector.Resource.prototype.populateImageSource):
(WebInspector.Resource.prototype._contentURL):
* inspector/front-end/ResourcesPanel.js:
(WebInspector.FrameResourceTreeElement.prototype.onattach):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75952 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 553405a..b0d97df 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,23 @@
+2011-01-17 Pavel Feldman <pfeldman at chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: unify image data source assignment, add image url
+ to the image view properties list.
+ https://bugs.webkit.org/show_bug.cgi?id=52584
+
+ * English.lproj/localizedStrings.js:
+ * inspector/front-end/ImageView.js:
+ (WebInspector.ImageView.prototype._createContentIfNeeded.onImageLoad):
+ (WebInspector.ImageView.prototype._createContentIfNeeded):
+ * inspector/front-end/NetworkPanel.js:
+ (WebInspector.NetworkDataGridNode.prototype._refreshNameCell):
+ * inspector/front-end/Resource.js:
+ (WebInspector.Resource.prototype.populateImageSource):
+ (WebInspector.Resource.prototype._contentURL):
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.FrameResourceTreeElement.prototype.onattach):
+
2011-01-17 Andrey Kosyakov <caseq at chromium.org>
Reviewed by Pavel Feldman.
diff --git a/Source/WebCore/English.lproj/localizedStrings.js b/Source/WebCore/English.lproj/localizedStrings.js
index 72b57de..0d8edc2 100644
Binary files a/Source/WebCore/English.lproj/localizedStrings.js and b/Source/WebCore/English.lproj/localizedStrings.js differ
diff --git a/Source/WebCore/inspector/front-end/ImageView.js b/Source/WebCore/inspector/front-end/ImageView.js
index c5772c8..917a9da 100644
--- a/Source/WebCore/inspector/front-end/ImageView.js
+++ b/Source/WebCore/inspector/front-end/ImageView.js
@@ -70,12 +70,7 @@ WebInspector.ImageView.prototype = {
var infoListElement = document.createElement("dl");
infoListElement.className = "infoList";
- function onResourceContent(element, content)
- {
- imagePreviewElement.setAttribute("src", this.resource.contentURL);
- }
- this.resource.requestContent(onResourceContent.bind(this));
-
+ this.resource.populateImageSource(imagePreviewElement);
function onImageLoad()
{
@@ -100,6 +95,13 @@ WebInspector.ImageView.prototype = {
dd.textContent = imageProperties[i].value;
infoListElement.appendChild(dd);
}
+ var dt = document.createElement("dt");
+ dt.textContent = WebInspector.UIString("URL");
+ infoListElement.appendChild(dt);
+ var dd = document.createElement("dd");
+ dd.appendChild(WebInspector.linkifyURLAsNode(this.resource.url));
+ infoListElement.appendChild(dd);
+
this._container.appendChild(infoListElement);
}
imagePreviewElement.addEventListener("load", onImageLoad.bind(this), false);
diff --git a/Source/WebCore/inspector/front-end/NetworkPanel.js b/Source/WebCore/inspector/front-end/NetworkPanel.js
index aa868fe..e9e0dcf 100644
--- a/Source/WebCore/inspector/front-end/NetworkPanel.js
+++ b/Source/WebCore/inspector/front-end/NetworkPanel.js
@@ -1419,15 +1419,7 @@ WebInspector.NetworkDataGridNode.prototype = {
if (this._resource.category === WebInspector.resourceCategories.images) {
var previewImage = document.createElement("img");
previewImage.className = "image-network-icon-preview";
-
- function onResourceContent()
- {
- previewImage.src = this._resource.contentURL;
- }
- if (Preferences.useDataURLForResourceImageIcons)
- this._resource.requestContent(onResourceContent.bind(this));
- else
- previewImage.src = this._resource.url;
+ this._resource.populateImageSource(imagePreviewElement);
var iconElement = document.createElement("div");
iconElement.className = "icon";
diff --git a/Source/WebCore/inspector/front-end/Resource.js b/Source/WebCore/inspector/front-end/Resource.js
index 988c4e6..7340645 100644
--- a/Source/WebCore/inspector/front-end/Resource.js
+++ b/Source/WebCore/inspector/front-end/Resource.js
@@ -678,7 +678,20 @@ WebInspector.Resource.prototype = {
this._innerRequestContent();
},
- get contentURL()
+ populateImageSource: function(image)
+ {
+ function onResourceContent()
+ {
+ image.src = this._contentURL();
+ }
+
+ if (Preferences.useDataURLForResourceImageIcons)
+ this.requestContent(onResourceContent.bind(this));
+ else
+ image.src = this.url;
+ },
+
+ _contentURL: function()
{
const maxDataUrlSize = 1024 * 1024;
// If resource content is not available or won't fit a data URL, fall back to using original URL.
diff --git a/Source/WebCore/inspector/front-end/ResourcesPanel.js b/Source/WebCore/inspector/front-end/ResourcesPanel.js
index 9ef8f5b..d96989b 100644
--- a/Source/WebCore/inspector/front-end/ResourcesPanel.js
+++ b/Source/WebCore/inspector/front-end/ResourcesPanel.js
@@ -1011,7 +1011,7 @@ WebInspector.FrameResourceTreeElement.prototype = {
if (this._resource.category === WebInspector.resourceCategories.images) {
var previewImage = document.createElement("img");
previewImage.className = "image-resource-icon-preview";
- previewImage.src = this._resource.url;
+ this._resource.populateImageSource(previewImage);
var iconElement = document.createElement("div");
iconElement.className = "icon";
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list