Changeset 85316 in webkit


Ignore:
Timestamp:
Apr 29, 2011 4:43:30 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-04-29 Vsevolod Vlasov <vsevik@chromium.org>

Reviewed by Pavel Feldman.

Web Inspector: Hyperlink Auditing (ping) requests are not shown in network panel
https://bugs.webkit.org/show_bug.cgi?id=58794

Added ping requests to network panel.

  • http/tests/inspector/network/ping-expected.txt: Added.
  • http/tests/inspector/network/ping.html: Added.

2011-04-29 Vsevolod Vlasov <vsevik@chromium.org>

Reviewed by Pavel Feldman.

Web Inspector: Hyperlink Auditing (ping) requests are not shown in network panel
https://bugs.webkit.org/show_bug.cgi?id=58794

Added ping requests to network panel.

Test: http/tests/inspector/network/ping.html

  • English.lproj/localizedStrings.js:
  • inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::continueAfterPingLoaderImpl):
  • inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::continueAfterPingLoader):
  • inspector/front-end/NetworkPanel.js: (WebInspector.NetworkDataGridNode.prototype.refreshResource): (WebInspector.NetworkDataGridNode.prototype._refreshStatusCell): (WebInspector.NetworkDataGridNode.prototype._refreshTypeCell):
  • inspector/front-end/Resource.js: (WebInspector.Resource.prototype.get formParameters): (WebInspector.Resource.prototype.requestContentType): (WebInspector.Resource.prototype.isPingRequest):
  • loader/PingLoader.cpp: (WebCore::PingLoader::PingLoader):
  • loader/PingLoader.h:
Location:
trunk
Files:
2 added
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r85315 r85316  
     12011-04-29  Vsevolod Vlasov  <vsevik@chromium.org>
     2
     3        Reviewed by Pavel Feldman.
     4
     5        Web Inspector: Hyperlink Auditing (ping) requests are not shown in network panel
     6        https://bugs.webkit.org/show_bug.cgi?id=58794
     7
     8        Added ping requests to network panel.
     9
     10        * http/tests/inspector/network/ping-expected.txt: Added.
     11        * http/tests/inspector/network/ping.html: Added.
     12
    1132011-04-28  Pavel Podivilov  <podivilov@chromium.org>
    214
  • trunk/Source/WebCore/ChangeLog

    r85315 r85316  
     12011-04-29  Vsevolod Vlasov  <vsevik@chromium.org>
     2
     3        Reviewed by Pavel Feldman.
     4
     5        Web Inspector: Hyperlink Auditing (ping) requests are not shown in network panel
     6        https://bugs.webkit.org/show_bug.cgi?id=58794
     7
     8        Added ping requests to network panel.
     9
     10        Test: http/tests/inspector/network/ping.html
     11
     12        * English.lproj/localizedStrings.js:
     13        * inspector/InspectorInstrumentation.cpp:
     14        (WebCore::InspectorInstrumentation::continueAfterPingLoaderImpl):
     15        * inspector/InspectorInstrumentation.h:
     16        (WebCore::InspectorInstrumentation::continueAfterPingLoader):
     17        * inspector/front-end/NetworkPanel.js:
     18        (WebInspector.NetworkDataGridNode.prototype.refreshResource):
     19        (WebInspector.NetworkDataGridNode.prototype._refreshStatusCell):
     20        (WebInspector.NetworkDataGridNode.prototype._refreshTypeCell):
     21        * inspector/front-end/Resource.js:
     22        (WebInspector.Resource.prototype.get formParameters):
     23        (WebInspector.Resource.prototype.requestContentType):
     24        (WebInspector.Resource.prototype.isPingRequest):
     25        * loader/PingLoader.cpp:
     26        (WebCore::PingLoader::PingLoader):
     27        * loader/PingLoader.h:
     28
    1292011-04-28  Pavel Podivilov  <podivilov@chromium.org>
    230
  • trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp

    r84774 r85316  
    404404}
    405405
     406void InspectorInstrumentation::continueAfterPingLoaderImpl(InspectorAgent* inspectorAgent, unsigned long identifier, DocumentLoader* loader, ResourceRequest& request, const ResourceResponse& response)
     407{
     408    willSendRequestImpl(inspectorAgent, identifier, loader, request, response);
     409}
     410
    406411void InspectorInstrumentation::markResourceAsCachedImpl(InspectorAgent* inspectorAgent, unsigned long identifier)
    407412{
  • trunk/Source/WebCore/inspector/InspectorInstrumentation.h

    r85030 r85316  
    114114    static void applyUserAgentOverride(Frame*, String*);
    115115    static void willSendRequest(Frame*, unsigned long identifier, DocumentLoader*, ResourceRequest&, const ResourceResponse& redirectResponse);
     116    static void continueAfterPingLoader(Frame*, unsigned long identifier, DocumentLoader*, ResourceRequest&, const ResourceResponse&);
    116117    static void markResourceAsCached(Page*, unsigned long identifier);
    117118    static void didLoadResourceFromMemoryCache(Page*, DocumentLoader*, const CachedResource*);
     
    235236    static void applyUserAgentOverrideImpl(InspectorAgent*, String*);
    236237    static void willSendRequestImpl(InspectorAgent*, unsigned long identifier, DocumentLoader*, ResourceRequest&, const ResourceResponse& redirectResponse);
     238    static void continueAfterPingLoaderImpl(InspectorAgent*, unsigned long identifier, DocumentLoader*, ResourceRequest&, const ResourceResponse&);
    237239    static void markResourceAsCachedImpl(InspectorAgent*, unsigned long identifier);
    238240    static void didLoadResourceFromMemoryCacheImpl(InspectorAgent*, DocumentLoader*, const CachedResource*);
     
    629631}
    630632
     633inline void InspectorInstrumentation::continueAfterPingLoader(Frame* frame, unsigned long identifier, DocumentLoader* loader, ResourceRequest& request, const ResourceResponse& response)
     634{
     635#if ENABLE(INSPECTOR)
     636    if (InspectorAgent* ic = inspectorAgentForFrame(frame))
     637        InspectorInstrumentation::continueAfterPingLoaderImpl(ic, identifier, loader, request, response);
     638#endif
     639}
     640
    631641inline void InspectorInstrumentation::markResourceAsCached(Page* page, unsigned long identifier)
    632642{
  • trunk/Source/WebCore/inspector/front-end/NetworkPanel.js

    r85312 r85316  
    14891489
    14901490        this._refreshStatusCell();
    1491 
    1492         if (this._resource.mimeType) {
    1493             this._typeCell.removeStyleClass("network-dim-cell");
    1494             this._typeCell.setTextAndTitle(this._resource.mimeType);
    1495         } else {
    1496             this._typeCell.addStyleClass("network-dim-cell");
    1497             this._typeCell.setTextAndTitle(WebInspector.UIString("Pending"));
    1498         }
    1499 
     1491        this._refreshTypeCell();
    15001492        this._refreshSizeCell();
    15011493        this._refreshTimeCell();
     
    15801572            if (this._resource.isDataURL() && this._resource.finished)
    15811573                this._statusCell.setTextAndTitle(WebInspector.UIString("(data url)"));
     1574            else if (this._resource.isPingRequest())
     1575                this._statusCell.setTextAndTitle(WebInspector.UIString("(ping)"));
    15821576            else
    15831577                this._statusCell.setTextAndTitle(WebInspector.UIString("(Pending)"));
    15841578            this._statusCell.addStyleClass("network-dim-cell");
     1579        }
     1580    },
     1581
     1582    _refreshTypeCell: function()
     1583    {
     1584        if (this._resource.mimeType) {
     1585            this._typeCell.removeStyleClass("network-dim-cell");
     1586            this._typeCell.setTextAndTitle(this._resource.mimeType);
     1587        } else if (this._resource.isPingRequest) {
     1588            this._typeCell.removeStyleClass("network-dim-cell");
     1589            this._typeCell.setTextAndTitle(this._resource.requestContentType());
     1590        } else {
     1591            this._typeCell.addStyleClass("network-dim-cell");
     1592            this._typeCell.setTextAndTitle(WebInspector.UIString("Pending"));
    15851593        }
    15861594    },
  • trunk/Source/WebCore/inspector/front-end/Resource.js

    r84778 r85316  
    588588        if (!this.requestFormData)
    589589            return;
    590         var requestContentType = this.requestHeaderValue("Content-Type");
     590        var requestContentType = this.requestContentType();
    591591        if (!requestContentType || !requestContentType.match(/^application\/x-www-form-urlencoded\s*(;.*)?$/i))
    592592            return;
     
    848848    },
    849849   
     850    requestContentType: function()
     851    {
     852        return this.requestHeaderValue("Content-Type");
     853    },
     854
     855    isPingRequest: function()
     856    {
     857        return "text/ping" === this.requestContentType();
     858    },
     859   
    850860    _contentURL: function()
    851861    {
  • trunk/Source/WebCore/loader/PingLoader.cpp

    r85030 r85316  
    3737#include "Frame.h"
    3838#include "FrameLoaderClient.h"
     39#include "InspectorInstrumentation.h"
    3940#include "Page.h"
    4041#include "ProgressTracker.h"
     
    111112}
    112113
    113 PingLoader::PingLoader(Frame* frame, const ResourceRequest& request)
     114PingLoader::PingLoader(Frame* frame, ResourceRequest& request)
    114115    : m_timeout(this, &PingLoader::timeout)
    115116{
     
    117118    m_shouldUseCredentialStorage = frame->loader()->client()->shouldUseCredentialStorage(frame->loader()->activeDocumentLoader(), identifier);
    118119    m_handle = ResourceHandle::create(frame->loader()->networkingContext(), request, this, false, false);
     120
     121    InspectorInstrumentation::continueAfterPingLoader(frame, identifier, frame->loader()->activeDocumentLoader(), request, ResourceResponse());
    119122
    120123    // If the server never responds, FrameLoader won't be able to cancel this load and
  • trunk/Source/WebCore/loader/PingLoader.h

    r84478 r85316  
    6262
    6363private:
    64     PingLoader(Frame*, const ResourceRequest&);
     64    PingLoader(Frame*, ResourceRequest&);
    6565
    6666    void didReceiveResponse(ResourceHandle*, const ResourceResponse&) { delete this; }
Note: See TracChangeset for help on using the changeset viewer.