From: caseq@chromium.org Date: Wed, 18 Jan 2012 17:14:12 +0000 (+0000) Subject: Web Inspector: omit compression field in HAR entries for resources coming from cache X-Git-Tag: 070512121124~15093 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2a93747fe5e1af6aff4d7ca20710ca28f4ac1c44;p=profile%2Fivi%2Fwebkit-efl.git Web Inspector: omit compression field in HAR entries for resources coming from cache https://bugs.webkit.org/show_bug.cgi?id=76543 Reviewed by Yury Semikhatsky. Source/WebCore: * inspector/front-end/HAREntry.js: (WebInspector.HAREntry.prototype._buildContent): (WebInspector.HAREntry.prototype.get responseCompression): LayoutTests: * http/tests/inspector/resource-har-conversion-expected.txt: * http/tests/inspector/resource-har-headers-expected.txt: * http/tests/inspector/resource-parameters-expected.txt: * platform/chromium/http/tests/inspector/resource-har-conversion-expected.txt: Removed. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105282 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog index 9bb9b5c..69ed321 100644 --- a/LayoutTests/ChangeLog +++ b/LayoutTests/ChangeLog @@ -1,3 +1,15 @@ +2012-01-18 Andrey Kosyakov + + Web Inspector: omit compression field in HAR entries for resources coming from cache + https://bugs.webkit.org/show_bug.cgi?id=76543 + + Reviewed by Yury Semikhatsky. + + * http/tests/inspector/resource-har-conversion-expected.txt: + * http/tests/inspector/resource-har-headers-expected.txt: + * http/tests/inspector/resource-parameters-expected.txt: + * platform/chromium/http/tests/inspector/resource-har-conversion-expected.txt: Removed. + 2012-01-18 Csaba Osztrogonác [Qt] Unreviewed gardening. Skip failing tests, simplify qt-wk2 skipped list. diff --git a/LayoutTests/http/tests/inspector/resource-har-conversion-expected.txt b/LayoutTests/http/tests/inspector/resource-har-conversion-expected.txt index 8a92a43..edd5174 100644 --- a/LayoutTests/http/tests/inspector/resource-har-conversion-expected.txt +++ b/LayoutTests/http/tests/inspector/resource-har-conversion-expected.txt @@ -98,7 +98,6 @@ Page reloaded. ] content : { size : - compression : mimeType : "application/x-javascript" } redirectURL : "" @@ -134,8 +133,8 @@ Page reloaded. ] content : { size : - compression : mimeType : "text/html" + compression : } redirectURL : "" headersSize : @@ -170,7 +169,6 @@ Page reloaded. ] content : { size : - compression : mimeType : "application/x-javascript" } redirectURL : "" @@ -210,8 +208,8 @@ Page reloaded. ] content : { size : - compression : mimeType : "application/xml" + compression : } redirectURL : "" headersSize : diff --git a/LayoutTests/http/tests/inspector/resource-har-headers-expected.txt b/LayoutTests/http/tests/inspector/resource-har-headers-expected.txt index 08de0c2..3850121 100644 --- a/LayoutTests/http/tests/inspector/resource-har-headers-expected.txt +++ b/LayoutTests/http/tests/inspector/resource-har-headers-expected.txt @@ -53,8 +53,8 @@ HAR:{ ] content : { size : 1000 - compression : 500 mimeType : "text/html" + compression : 500 } redirectURL : "" headersSize : 39 diff --git a/LayoutTests/http/tests/inspector/resource-parameters-expected.txt b/LayoutTests/http/tests/inspector/resource-parameters-expected.txt index d23227b..c1e05fb 100644 --- a/LayoutTests/http/tests/inspector/resource-parameters-expected.txt +++ b/LayoutTests/http/tests/inspector/resource-parameters-expected.txt @@ -49,8 +49,8 @@ Tests that resources panel shows form data parameters. ] content : { size : 14 - compression : mimeType : "application/xml" + compression : } redirectURL : "" headersSize : diff --git a/LayoutTests/platform/chromium/http/tests/inspector/resource-har-conversion-expected.txt b/LayoutTests/platform/chromium/http/tests/inspector/resource-har-conversion-expected.txt index 8a92a43..edd5174 100644 --- a/LayoutTests/platform/chromium/http/tests/inspector/resource-har-conversion-expected.txt +++ b/LayoutTests/platform/chromium/http/tests/inspector/resource-har-conversion-expected.txt @@ -98,7 +98,6 @@ Page reloaded. ] content : { size : - compression : mimeType : "application/x-javascript" } redirectURL : "" @@ -134,8 +133,8 @@ Page reloaded. ] content : { size : - compression : mimeType : "text/html" + compression : } redirectURL : "" headersSize : @@ -170,7 +169,6 @@ Page reloaded. ] content : { size : - compression : mimeType : "application/x-javascript" } redirectURL : "" @@ -210,8 +208,8 @@ Page reloaded. ] content : { size : - compression : mimeType : "application/xml" + compression : } redirectURL : "" headersSize : diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index babfc8b..f4ce94b 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,14 @@ +2012-01-18 Andrey Kosyakov + + Web Inspector: omit compression field in HAR entries for resources coming from cache + https://bugs.webkit.org/show_bug.cgi?id=76543 + + Reviewed by Yury Semikhatsky. + + * inspector/front-end/HAREntry.js: + (WebInspector.HAREntry.prototype._buildContent): + (WebInspector.HAREntry.prototype.get responseCompression): + 2012-01-18 Mihnea Ovidenie [CSSRegions]Fix region style code in CSSStyleSelector diff --git a/Source/WebCore/inspector/front-end/HAREntry.js b/Source/WebCore/inspector/front-end/HAREntry.js index 939c458..0cb0f48 100644 --- a/Source/WebCore/inspector/front-end/HAREntry.js +++ b/Source/WebCore/inspector/front-end/HAREntry.js @@ -104,12 +104,15 @@ WebInspector.HAREntry.prototype = { */ _buildContent: function() { - return { + var content = { size: this._resource.resourceSize, - compression: this.responseCompression, mimeType: this._resource.mimeType, // text: this._resource.content // TODO: pull out into a boolean flag, as content can be huge (and needs to be requested with an async call) }; + var compression = this.responseCompression; + if (typeof compression === "number") + content.compression = compression; + return content; }, /** @@ -252,6 +255,8 @@ WebInspector.HAREntry.prototype = { */ get responseCompression() { + if (this._resource.cahced || this._resource.statusCode === 304) + return; return this._resource.resourceSize - (this._resource.transferSize - this._resource.responseHeadersSize); } }