Changeset 91928 in webkit


Ignore:
Timestamp:
Jul 28, 2011 8:13:34 AM (13 years ago)
Author:
vsevik@chromium.org
Message:

Web Inspector: Add resource initiator column to network panel.
https://bugs.webkit.org/show_bug.cgi?id=65105

Reviewed by Pavel Feldman.

Source/WebCore:

Test: http/tests/inspector/network/network-initiator.html

  • English.lproj/localizedStrings.js:
  • dom/Document.cpp:

(WebCore::Document::scheduleStyleRecalc):

  • inspector/Inspector.json:
  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::willRecalculateStyleImpl):
(WebCore::InspectorInstrumentation::didRecalculateStyleImpl):
(WebCore::InspectorInstrumentation::didScheduleStyleRecalculationImpl):

  • inspector/InspectorInstrumentation.h:

(WebCore::InspectorInstrumentation::didScheduleStyleRecalculation):

  • inspector/InspectorResourceAgent.cpp:

(WebCore::InspectorResourceAgent::willSendRequest):
(WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
(WebCore::InspectorResourceAgent::willRecalculateStyle):
(WebCore::InspectorResourceAgent::didRecalculateStyle):
(WebCore::InspectorResourceAgent::didScheduleStyleRecalculation):
(WebCore::InspectorResourceAgent::buildInitiatorObject):
(WebCore::InspectorResourceAgent::InspectorResourceAgent):

  • inspector/InspectorResourceAgent.h:
  • inspector/front-end/NetworkManager.js:

(WebInspector.NetworkDispatcher.prototype.requestWillBeSent):
(WebInspector.NetworkDispatcher.prototype.resourceLoadedFromMemoryCache):
(WebInspector.NetworkDispatcher.prototype._appendRedirect):
(WebInspector.NetworkDispatcher.prototype._createResource):

  • inspector/front-end/NetworkPanel.js:

(WebInspector.NetworkLogView.prototype._createTable):
(WebInspector.NetworkLogView.prototype._createSortingFunctions):
(WebInspector.NetworkLogView.prototype.switchToDetailedView):
(WebInspector.NetworkLogView.prototype.switchToBriefView):
(WebInspector.NetworkLogView.prototype._toggleGridMode):
(WebInspector.NetworkLogView.prototype._toggleViewingResourceMode):
(WebInspector.NetworkDataGridNode.prototype.createCells):
(WebInspector.NetworkDataGridNode.prototype.refreshResource):
(WebInspector.NetworkDataGridNode.prototype._refreshInitiatorCell):
(WebInspector.NetworkDataGridNode.InitiatorComparator):

  • inspector/front-end/networkLogView.css:

(.initiator-column a):

LayoutTests:

  • http/tests/inspector/network/network-initiator-expected.txt: Added.
  • http/tests/inspector/network/network-initiator.html: Added.
  • http/tests/inspector/network/resources/initiator.css: Added.

(.image-background):
(.image-background-2):

Location:
trunk
Files:
3 added
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r91927 r91928  
     12011-07-28  Vsevolod Vlasov  <vsevik@chromium.org>
     2
     3        Web Inspector: Add resource initiator column to network panel.
     4        https://bugs.webkit.org/show_bug.cgi?id=65105
     5
     6        Reviewed by Pavel Feldman.
     7
     8        * http/tests/inspector/network/network-initiator-expected.txt: Added.
     9        * http/tests/inspector/network/network-initiator.html: Added.
     10        * http/tests/inspector/network/resources/initiator.css: Added.
     11        (.image-background):
     12        (.image-background-2):
     13
    1142011-07-28  Tony Gentilcore  <tonyg@chromium.org>
    215
  • trunk/Source/WebCore/ChangeLog

    r91924 r91928  
     12011-07-28  Vsevolod Vlasov  <vsevik@chromium.org>
     2
     3        Web Inspector: Add resource initiator column to network panel.
     4        https://bugs.webkit.org/show_bug.cgi?id=65105
     5
     6        Reviewed by Pavel Feldman.
     7
     8        Test: http/tests/inspector/network/network-initiator.html
     9
     10        * English.lproj/localizedStrings.js:
     11        * dom/Document.cpp:
     12        (WebCore::Document::scheduleStyleRecalc):
     13        * inspector/Inspector.json:
     14        * inspector/InspectorInstrumentation.cpp:
     15        (WebCore::InspectorInstrumentation::willRecalculateStyleImpl):
     16        (WebCore::InspectorInstrumentation::didRecalculateStyleImpl):
     17        (WebCore::InspectorInstrumentation::didScheduleStyleRecalculationImpl):
     18        * inspector/InspectorInstrumentation.h:
     19        (WebCore::InspectorInstrumentation::didScheduleStyleRecalculation):
     20        * inspector/InspectorResourceAgent.cpp:
     21        (WebCore::InspectorResourceAgent::willSendRequest):
     22        (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
     23        (WebCore::InspectorResourceAgent::willRecalculateStyle):
     24        (WebCore::InspectorResourceAgent::didRecalculateStyle):
     25        (WebCore::InspectorResourceAgent::didScheduleStyleRecalculation):
     26        (WebCore::InspectorResourceAgent::buildInitiatorObject):
     27        (WebCore::InspectorResourceAgent::InspectorResourceAgent):
     28        * inspector/InspectorResourceAgent.h:
     29        * inspector/front-end/NetworkManager.js:
     30        (WebInspector.NetworkDispatcher.prototype.requestWillBeSent):
     31        (WebInspector.NetworkDispatcher.prototype.resourceLoadedFromMemoryCache):
     32        (WebInspector.NetworkDispatcher.prototype._appendRedirect):
     33        (WebInspector.NetworkDispatcher.prototype._createResource):
     34        * inspector/front-end/NetworkPanel.js:
     35        (WebInspector.NetworkLogView.prototype._createTable):
     36        (WebInspector.NetworkLogView.prototype._createSortingFunctions):
     37        (WebInspector.NetworkLogView.prototype.switchToDetailedView):
     38        (WebInspector.NetworkLogView.prototype.switchToBriefView):
     39        (WebInspector.NetworkLogView.prototype._toggleGridMode):
     40        (WebInspector.NetworkLogView.prototype._toggleViewingResourceMode):
     41        (WebInspector.NetworkDataGridNode.prototype.createCells):
     42        (WebInspector.NetworkDataGridNode.prototype.refreshResource):
     43        (WebInspector.NetworkDataGridNode.prototype._refreshInitiatorCell):
     44        (WebInspector.NetworkDataGridNode.InitiatorComparator):
     45        * inspector/front-end/networkLogView.css:
     46        (.initiator-column a):
     47
    1482011-07-28  Rob Buis  <rbuis@rim.com>
    249
  • trunk/Source/WebCore/dom/Document.cpp

    r91860 r91928  
    14581458   
    14591459    m_styleRecalcTimer.startOneShot(0);
     1460
     1461    InspectorInstrumentation::didScheduleStyleRecalculation(this);
    14601462}
    14611463
  • trunk/Source/WebCore/inspector/Inspector.json

    r91839 r91928  
    330330                    { "name": "networkIdentifier", "type": "integer", "optional": true, "description": "Identifier of the network request associated with the console message." },
    331331                    { "name": "parameters", "type": "array", "items": { "$ref": "Runtime.RemoteObject" }, "description": "Message parameters in case of the formatted message." },
    332                     { "name": "stackTrace", "type": "array", "optional": true, "items": { "$ref": "CallFrame" }, "description": "Call frames for assert and error messages." }
     332                    { "name": "stackTrace", "$ref": "StackTrace", "description": "Stack trace for assert and error messages." },
    333333                ]
    334334            },
     
    343343                    { "name": "columnNumber", "type": "string", "description": "JavaScript source column number." }
    344344                ]
     345            },
     346            {
     347                "id": "StackTrace",
     348                "type": "array",
     349                "items": { "$ref": "CallFrame" },
     350                "description": "Call frames for assert and error messages."
    345351            }
    346352        ],
     
    460466                    { "name": "bodySize", "type": "number", "description": "Cached response body size." }
    461467                ]
     468            },
     469            {
     470                "id": "Initiator",
     471                "type": "object",
     472                "description": "Information about the resource load initiator.",
     473                "properties": [
     474                    { "name": "type", "type": "string", "enum": ["parser", "script", "other"], "description": "Type of this initiator." },
     475                    { "name": "stackTrace", "$ref": "Console.StackTrace", "description": "Initiator JavaScript stack trace, set for Script only." },
     476                    { "name": "url", "type": "string", "optional": true, "description": "Initiator URL, set for Parser type only." },
     477                    { "name": "lineNumber", "type": "number", "optional": true, "description": "Initiator line number, set for Parser type only." }
     478                ]
    462479            }
    463480        ],
     
    536553                    { "name": "request", "$ref": "ResourceRequest", "description": "Request data." },
    537554                    { "name": "timestamp", "type": "number", "description": "Timestamp." },
    538                     { "name": "stackTrace", "type": "array", "items": { "$ref": "Console.CallFrame"}, "description": "JavaScript stack trace upon issuing this request." },
     555                    { "name": "initiator", "$ref": "Initiator", "description": "Request initiator." },
     556                    { "name": "stackTrace", "$ref": "Console.StackTrace", "description": "JavaScript stack trace upon issuing this request." },
    539557                    { "name": "redirectResponse", "optional": true, "$ref": "ResourceResponse", "description": "Redirect response data." }
    540558                ]
     
    594612                    { "name": "documentURL", "type": "string", "description": "URL of the document this resource is loaded for." },
    595613                    { "name": "timestamp", "type": "number", "description": "Timestamp." },
     614                    { "name": "initiator", "$ref": "Initiator", "description": "Request initiator." },
    596615                    { "name": "resource", "$ref": "CachedResource", "description": "Cached resource data." }
    597616                ]
  • trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp

    r91184 r91928  
    389389        timelineAgentId = timelineAgent->id();
    390390    }
     391    if (InspectorResourceAgent* resourceAgent = instrumentingAgents->inspectorResourceAgent())
     392        resourceAgent->willRecalculateStyle();
    391393    return InspectorInstrumentationCookie(instrumentingAgents, timelineAgentId);
    392394}
     
    396398    if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie))
    397399        timelineAgent->didRecalculateStyle();
     400    InstrumentingAgents* instrumentingAgents = cookie.first;
     401    if (!instrumentingAgents)
     402        return;
     403    if (InspectorResourceAgent* resourceAgent = instrumentingAgents->inspectorResourceAgent())
     404        resourceAgent->didRecalculateStyle();
     405}
     406
     407void InspectorInstrumentation::didScheduleStyleRecalculationImpl(InstrumentingAgents* instrumentingAgents, Document* document)
     408{
     409    if (InspectorResourceAgent* resourceAgent = instrumentingAgents->inspectorResourceAgent())
     410        resourceAgent->didScheduleStyleRecalculation(document);
    398411}
    399412
  • trunk/Source/WebCore/inspector/InspectorInstrumentation.h

    r91184 r91928  
    114114    static InspectorInstrumentationCookie willRecalculateStyle(Document*);
    115115    static void didRecalculateStyle(const InspectorInstrumentationCookie&);
     116    static void didScheduleStyleRecalculation(Document*);
    116117
    117118    static void applyUserAgentOverride(Frame*, String*);
     
    242243    static InspectorInstrumentationCookie willRecalculateStyleImpl(InstrumentingAgents*);
    243244    static void didRecalculateStyleImpl(const InspectorInstrumentationCookie&);
     245    static void didScheduleStyleRecalculationImpl(InstrumentingAgents*, Document*);
    244246
    245247    static void applyUserAgentOverrideImpl(InstrumentingAgents*, String*);
     
    666668}
    667669
     670inline void InspectorInstrumentation::didScheduleStyleRecalculation(Document* document)
     671{
     672#if ENABLE(INSPECTOR)
     673    FAST_RETURN_IF_NO_FRONTENDS(void());
     674    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
     675        didScheduleStyleRecalculationImpl(instrumentingAgents, document);
     676#endif
     677}
     678
    668679inline void InspectorInstrumentation::applyUserAgentOverride(Frame* frame, String* userAgent)
    669680{
  • trunk/Source/WebCore/inspector/InspectorResourceAgent.cpp

    r91858 r91928  
    6161#include "ScriptCallStack.h"
    6262#include "ScriptCallStackFactory.h"
     63#include "ScriptableDocumentParser.h"
    6364#include "WebSocketHandshakeRequest.h"
    6465#include "WebSocketHandshakeResponse.h"
     
    232233    else
    233234        callStackValue = InspectorArray::create();
    234     m_frontend->requestWillBeSent(resourceId, m_pageAgent->frameId(loader->frame()), m_pageAgent->loaderId(loader), loader->url().string(), buildObjectForResourceRequest(request), currentTime(), callStackValue, buildObjectForResourceResponse(redirectResponse));
     235    RefPtr<InspectorObject> initiatorObject = buildInitiatorObject(loader->frame() ? loader->frame()->document() : 0);
     236    m_frontend->requestWillBeSent(resourceId, m_pageAgent->frameId(loader->frame()), m_pageAgent->loaderId(loader), loader->url().string(), buildObjectForResourceRequest(request), currentTime(), initiatorObject, callStackValue, buildObjectForResourceResponse(redirectResponse));
    235237}
    236238
     
    315317    m_resourcesData->resourceCreated(resourceId, loaderId);
    316318    m_resourcesData->addCachedResource(resourceId, resource);
    317 
    318     m_frontend->resourceLoadedFromMemoryCache(resourceId, frameId, loaderId, loader->url().string(), currentTime(), buildObjectForCachedResource(*resource));
     319    RefPtr<InspectorObject> initiatorObject = buildInitiatorObject(loader->frame() ? loader->frame()->document() : 0);
     320
     321    m_frontend->resourceLoadedFromMemoryCache(resourceId, frameId, loaderId, loader->url().string(), currentTime(), initiatorObject, buildObjectForCachedResource(*resource));
    319322}
    320323
     
    348351    if (!m_userAgentOverride.isEmpty())
    349352        *userAgent = m_userAgentOverride;
     353}
     354
     355void InspectorResourceAgent::willRecalculateStyle()
     356{
     357    m_isRecalculatingStyle = true;
     358}
     359
     360void InspectorResourceAgent::didRecalculateStyle()
     361{
     362    m_isRecalculatingStyle = false;
     363    m_styleRecalculationInitiator = nullptr;
     364}
     365
     366void InspectorResourceAgent::didScheduleStyleRecalculation(Document* document)
     367{
     368    if (!m_styleRecalculationInitiator)
     369        m_styleRecalculationInitiator = buildInitiatorObject(document);
     370}
     371
     372PassRefPtr<InspectorObject> InspectorResourceAgent::buildInitiatorObject(Document* document)
     373{
     374    RefPtr<ScriptCallStack> stackTrace = createScriptCallStack(ScriptCallStack::maxCallStackSizeToCapture, true);
     375    if (stackTrace && stackTrace->size() > 0) {
     376        RefPtr<InspectorObject> initiatorObject = InspectorObject::create();
     377        initiatorObject->setString("type", "script");
     378        initiatorObject->setArray("stackTrace", stackTrace->buildInspectorArray());
     379        return initiatorObject;
     380    }
     381
     382    if (document && document->scriptableDocumentParser()) {
     383        RefPtr<InspectorObject> initiatorObject = InspectorObject::create();
     384        initiatorObject->setString("type", "parser");
     385        initiatorObject->setString("url", document->url().string());
     386        initiatorObject->setNumber("lineNumber", document->scriptableDocumentParser()->lineNumber() + 1);
     387        return initiatorObject;
     388    }
     389
     390    if (m_isRecalculatingStyle && m_styleRecalculationInitiator)
     391        return m_styleRecalculationInitiator;
     392
     393    RefPtr<InspectorObject> initiatorObject = InspectorObject::create();
     394    initiatorObject->setString("type", "other");
     395    return initiatorObject;
    350396}
    351397
     
    528574    , m_resourcesData(adoptPtr(new NetworkResourcesData()))
    529575    , m_loadingXHRSynchronously(false)
     576    , m_isRecalculatingStyle(false)
    530577{
    531578    if (isBackgroundEventsCollectionEnabled()) {
  • trunk/Source/WebCore/inspector/InspectorResourceAgent.h

    r91408 r91928  
    105105    void applyUserAgentOverride(String* userAgent);
    106106
     107    // FIXME: InspectorResourceAgent should now be aware of style recalculation.
     108    void willRecalculateStyle();
     109    void didRecalculateStyle();
     110    void didScheduleStyleRecalculation(Document*);
     111
     112    PassRefPtr<InspectorObject> buildInitiatorObject(Document*);
     113
    107114#if ENABLE(WEB_SOCKETS)
    108115    void didCreateWebSocket(unsigned long identifier, const KURL& requestURL);
     
    148155    OwnPtr<NetworkResourcesData> m_resourcesData;
    149156    bool m_loadingXHRSynchronously;
     157
     158    // FIXME: InspectorResourceAgent should now be aware of style recalculation.
     159    RefPtr<InspectorObject> m_styleRecalculationInitiator;
     160    bool m_isRecalculatingStyle;
    150161};
    151162
  • trunk/Source/WebCore/inspector/front-end/NetworkManager.js

    r91457 r91928  
    132132    },
    133133
    134     requestWillBeSent: function(identifier, frameId, loaderId, documentURL, request, time, stackTrace, redirectResponse)
     134    requestWillBeSent: function(identifier, frameId, loaderId, documentURL, request, time, initiator, stackTrace, redirectResponse)
    135135    {
    136136        var resource = this._inflightResourcesById[identifier];
     
    142142            resource = this._appendRedirect(identifier, time, request.url);
    143143        } else
    144             resource = this._createResource(identifier, frameId, loaderId, request.url, documentURL, stackTrace);
     144            resource = this._createResource(identifier, frameId, loaderId, request.url, documentURL, initiator, stackTrace);
    145145        resource.hasNetworkData = true;
    146146        this._updateResourceWithRequest(resource, request);
     
    213213    },
    214214
    215     resourceLoadedFromMemoryCache: function(identifier, frameId, loaderId, documentURL, time, cachedResource)
    216     {
    217         var resource = this._createResource(identifier, frameId, loaderId, cachedResource.url, documentURL);
     215    resourceLoadedFromMemoryCache: function(identifier, frameId, loaderId, documentURL, time, initiator, cachedResource)
     216    {
     217        var resource = this._createResource(identifier, frameId, loaderId, cachedResource.url, documentURL, initiator);
    218218        this._updateResourceWithCachedResource(resource, cachedResource);
    219219        resource.cached = true;
     
    287287        this._finishResource(originalResource, time);
    288288        var newResource = this._createResource(identifier, originalResource.frameId, originalResource.loaderId,
    289              redirectURL, originalResource.documentURL, originalResource.stackTrace);
     289             redirectURL, originalResource.documentURL, originalResource.initiator, originalResource.stackTrace);
    290290        newResource.redirects = previousRedirects.concat(originalResource);
    291291        return newResource;
     
    318318    },
    319319
    320     _createResource: function(identifier, frameId, loaderId, url, documentURL, stackTrace)
     320    _createResource: function(identifier, frameId, loaderId, url, documentURL, initiator, stackTrace)
    321321    {
    322322        var resource = new WebInspector.Resource(identifier, url, loaderId);
    323323        resource.documentURL = documentURL;
    324324        resource.frameId = frameId;
     325        resource.initiator = initiator;
    325326        resource.stackTrace = stackTrace;
    326327        return resource;
  • trunk/Source/WebCore/inspector/front-end/NetworkPanel.js

    r91902 r91928  
    144144    _createTable: function()
    145145    {
    146         var columns = {name: {}, method: {}, status: {}, type: {}, size: {}, time: {}, timeline: {}};
     146        var columns = {name: {}, method: {}, status: {}, type: {}, initiator: {}, size: {}, time: {}, timeline: {}};
    147147        columns.name.titleDOMFragment = this._makeHeaderFragment(WebInspector.UIString("Name"), WebInspector.UIString("Path"));
    148148        columns.name.sortable = true;
     
    162162        columns.type.width = "6%";
    163163
     164        columns.initiator.title = WebInspector.UIString("Initiator");
     165        columns.initiator.sortable = true;
     166        columns.initiator.width = "10%";
     167
    164168        columns.size.titleDOMFragment = this._makeHeaderFragment(WebInspector.UIString("Size"), WebInspector.UIString("Content"));
    165169        columns.size.sortable = true;
     
    174178        columns.timeline.title = "";
    175179        columns.timeline.sortable = false;
    176         columns.timeline.width = "50%";
     180        columns.timeline.width = "40%";
    177181        columns.timeline.sort = "ascending";
    178182
     
    252256        this._sortingFunctions.status = WebInspector.NetworkDataGridNode.ResourcePropertyComparator.bind(null, "statusCode", false);
    253257        this._sortingFunctions.type = WebInspector.NetworkDataGridNode.ResourcePropertyComparator.bind(null, "mimeType", false);
     258        this._sortingFunctions.initiator = WebInspector.NetworkDataGridNode.InitiatorComparator;
    254259        this._sortingFunctions.size = WebInspector.NetworkDataGridNode.SizeComparator;
    255260        this._sortingFunctions.time = WebInspector.NetworkDataGridNode.ResourcePropertyComparator.bind(null, "duration", false);
     
    801806        this._dataGrid.showColumn("status");
    802807        this._dataGrid.showColumn("type");
     808        this._dataGrid.showColumn("initiator");
    803809        this._dataGrid.showColumn("size");
    804810        this._dataGrid.showColumn("time");
     
    810816        widths.status = 6;
    811817        widths.type = 6;
     818        widths.initiator = 10;
    812819        widths.size = 6;
    813820        widths.time = 6;
    814         widths.timeline = 50;
     821        widths.timeline = 40;
    815822
    816823        this._dataGrid.applyColumnWidthsMap(widths);
     
    824831        this._dataGrid.hideColumn("status");
    825832        this._dataGrid.hideColumn("type");
     833        this._dataGrid.hideColumn("initiator");
    826834        this._dataGrid.hideColumn("size");
    827835        this._dataGrid.hideColumn("time");
     
    892900        this._dataGrid.showColumn("status");
    893901        this._dataGrid.showColumn("type");
     902        this._dataGrid.showColumn("initiator");
    894903        this._dataGrid.showColumn("size");
    895904        this._dataGrid.showColumn("time");
     
    900909        widths.status = 6;
    901910        widths.type = 6;
     911        widths.initiator = 10;
    902912        widths.size = 6;
    903913        widths.time = 6;
    904         widths.timeline = 50;
     914        widths.timeline = 40;
    905915
    906916        this._dataGrid.showColumn("timeline");
     
    919929        this._dataGrid.hideColumn("status");
    920930        this._dataGrid.hideColumn("type");
     931        this._dataGrid.hideColumn("initiator");
    921932        this._dataGrid.hideColumn("size");
    922933        this._dataGrid.hideColumn("time");
     
    17251736        this._statusCell = this._createDivInTD("status");
    17261737        this._typeCell = this._createDivInTD("type");
     1738        this._initiatorCell = this._createDivInTD("initiator");
    17271739        this._sizeCell = this._createDivInTD("size");
    17281740        this._timeCell = this._createDivInTD("time");
     
    18171829        this._refreshStatusCell();
    18181830        this._refreshTypeCell();
     1831        this._refreshInitiatorCell();
    18191832        this._refreshSizeCell();
    18201833        this._refreshTimeCell();
     
    19181931    },
    19191932
     1933    _refreshInitiatorCell: function()
     1934    {
     1935        var initiator = this._resource.initiator;
     1936        if (!initiator || initiator.type === "other") {
     1937            this._initiatorCell.addStyleClass("network-dim-cell");
     1938            this._initiatorCell.setTextAndTitle(WebInspector.UIString("Other"));
     1939        } else {
     1940            this._initiatorCell.removeStyleClass("network-dim-cell");
     1941            this._initiatorCell.removeChildren();
     1942            if (initiator.type === "script") {
     1943                var topFrame = initiator.stackTrace[0];
     1944                this._initiatorCell.title = topFrame.url + ":" + topFrame.lineNumber;
     1945                this._initiatorCell.appendChild(WebInspector.linkifyResourceAsNode(topFrame.url, "scripts", topFrame.lineNumber));
     1946                this._appendSubtitle(this._initiatorCell, WebInspector.UIString("Script"));
     1947            } else { // initiator.type === "parser"
     1948                this._initiatorCell.title = initiator.url + ":" + initiator.lineNumber;
     1949                this._initiatorCell.appendChild(WebInspector.linkifyResourceAsNode(initiator.url, "resources", initiator.lineNumber));
     1950                this._appendSubtitle(this._initiatorCell, WebInspector.UIString("Parser"));
     1951            }
     1952        }
     1953    },
     1954
    19201955    _refreshSizeCell: function()
    19211956    {
     
    20742109}
    20752110
     2111WebInspector.NetworkDataGridNode.InitiatorComparator = function(a, b)
     2112{
     2113    if (!a._resource.initiator || a._resource.initiator.type === "Other")
     2114        return -1;
     2115    if (!b._resource.initiator || b._resource.initiator.type === "Other")
     2116        return 1;
     2117
     2118    if (a._resource.initiator.url < b._resource.initiator.url)
     2119        return -1;
     2120    if (a._resource.initiator.url > b._resource.initiator.url)
     2121        return 1;
     2122
     2123    return a._resource.initiator.lineNumber - b._resource.initiator.lineNumber;
     2124}
     2125
    20762126WebInspector.NetworkDataGridNode.ResourcePropertyComparator = function(propertyName, revert, a, b)
    20772127{
  • trunk/Source/WebCore/inspector/front-end/networkLogView.css

    r91359 r91928  
    9090.network-log-grid td.status-column,
    9191.network-log-grid td.type-column,
     92.network-log-grid td.initiator-column,
    9293.network-log-grid td.size-column,
    9394.network-log-grid td.time-column {
     
    111112    font-weight: normal;
    112113    color: gray;
     114}
     115
     116.initiator-column a {
     117    color: inherit;
    113118}
    114119
Note: See TracChangeset for help on using the changeset viewer.