diff options
author | Steve Block <steveblock@google.com> | 2011-05-25 19:08:45 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2011-06-08 13:51:31 +0100 |
commit | 2bde8e466a4451c7319e3a072d118917957d6554 (patch) | |
tree | 28f4a1b869a513e565c7760d0e6a06e7cf1fe95a /Source/WebCore/inspector/front-end/Resource.js | |
parent | 6939c99b71d9372d14a0c74a772108052e8c48c8 (diff) | |
download | external_webkit-2bde8e466a4451c7319e3a072d118917957d6554.zip external_webkit-2bde8e466a4451c7319e3a072d118917957d6554.tar.gz external_webkit-2bde8e466a4451c7319e3a072d118917957d6554.tar.bz2 |
Merge WebKit at r82507: Initial merge by git
Change-Id: I60ce9d780725b58b45e54165733a8ffee23b683e
Diffstat (limited to 'Source/WebCore/inspector/front-end/Resource.js')
-rw-r--r-- | Source/WebCore/inspector/front-end/Resource.js | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/Source/WebCore/inspector/front-end/Resource.js b/Source/WebCore/inspector/front-end/Resource.js index 6cf5b9c..8035fd8 100644 --- a/Source/WebCore/inspector/front-end/Resource.js +++ b/Source/WebCore/inspector/front-end/Resource.js @@ -241,7 +241,10 @@ WebInspector.Resource.prototype = { return 0; if (this.statusCode === 304) // Not modified return this._responseHeadersSize; - // FIXME: We prefer using Content-Length over resourceSize as + if (this._transferSize !== undefined) + return this._transferSize; + // If we did not receive actual transfer size from network + // stack, we prefer using Content-Length over resourceSize as // resourceSize may differ from actual transfer size if platform's // network stack performed decoding (e.g. gzip decompression). // The Content-Length, though, is expected to come from raw @@ -249,19 +252,14 @@ WebInspector.Resource.prototype = { // This won't work for chunked content encoding, so fall back to // resourceSize when we don't have Content-Length. This still won't // work for chunks with non-trivial encodings. We need a way to - // get actaul transfer size from the network stack. + // get actual transfer size from the network stack. var bodySize = Number(this.responseHeaders["Content-Length"] || this.resourceSize); return this._responseHeadersSize + bodySize; }, - get expectedContentLength() + increaseTransferSize: function(x) { - return this._expectedContentLength || 0; - }, - - set expectedContentLength(x) - { - this._expectedContentLength = x; + this._transferSize = (this._transferSize || 0) + x; }, get finished() |