Changeset 55614 in webkit


Ignore:
Timestamp:
Mar 6, 2010 3:00:35 AM (14 years ago)
Author:
pfeldman@chromium.org
Message:

2010-03-06 Ilya Tikhonovsky <loislo@chromium.org>

Reviewed by Pavel Feldman.

Web Inspector: in Timeline panel, click followed with mouse move resets popover.

https://bugs.webkit.org/show_bug.cgi?id=35827

  • inspector/front-end/Popover.js: (WebInspector.PopoverHelper.prototype._mouseDown): (WebInspector.PopoverHelper.prototype._mouseMove): (WebInspector.PopoverHelper.prototype._handleMouseAction):
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/inspector/timeline-network-resource-expected.txt

    r51539 r55614  
    1919+- mimeType : application/x-javascript
    2020+- expectedContentLength : 210
     21+- url : * DEFINED *
    2122+ }
    2223+ type : 13
     
    2728+- identifier : * DEFINED *
    2829+- didFail : false
     30+- url : * DEFINED *
    2931+ }
    3032+ type : 14
  • trunk/WebCore/ChangeLog

    r55613 r55614  
     12010-03-06  Ilya Tikhonovsky  <loislo@chromium.org>
     2
     3        Reviewed by Pavel Feldman.
     4
     5        Web Inspector: in Timeline panel, click followed with mouse move resets popover.
     6
     7        https://bugs.webkit.org/show_bug.cgi?id=35827
     8
     9        * inspector/front-end/Popover.js:
     10        (WebInspector.PopoverHelper.prototype._mouseDown):
     11        (WebInspector.PopoverHelper.prototype._mouseMove):
     12        (WebInspector.PopoverHelper.prototype._handleMouseAction):
     13
    1142010-03-05  Tony Chang  <tony@chromium.org>
    215
  • trunk/WebCore/inspector/front-end/Popover.js

    r55530 r55614  
    161161    _mouseDown: function(event)
    162162    {
    163         this._resetHoverTimer();
    164         if (this._showOnClick) {
    165             var anchor = this._getAnchor(event.target);
    166             if (anchor) {
    167                 this._popup = this._showPopup(anchor);
    168                 this._killHidePopupTimer();
    169             }
    170         }
     163        this._killHidePopupTimer();
     164        this._handleMouseAction(event, true);
    171165    },
    172166
     
    177171            return;
    178172
    179         this._resetHoverTimer();
    180173        // User has 500ms to reach the popup.
    181         if (this._popup) {
     174        if (this._popup && !this._hidePopupTimer) {
    182175            var self = this;
    183176            function doHide()
     
    189182        }
    190183
     184        this._handleMouseAction(event);
     185    },
     186
     187    _handleMouseAction: function(event, isMouseDown)
     188    {
     189        this._resetHoverTimer();
     190
    191191        this._hoverElement = this._getAnchor(event.target);
    192192        if (!this._hoverElement)
    193193            return;
    194194
    195         const toolTipDelay = this._popup ? 600 : 1000;
     195        const toolTipDelay = isMouseDown ? 0 : (this._popup ? 600 : 1000);
    196196        this._hoverTimer = setTimeout(this._mouseHover.bind(this, this._hoverElement), toolTipDelay);
    197197    },
  • trunk/WebCore/inspector/front-end/TimelinePanel.js

    r55575 r55614  
    625625        if (sendRequestRecord) { // False if we started instrumentation in the middle of request.
    626626            sendRequestRecord._responseReceivedFormattedTime = this.startTime;
     627            record.data.url = sendRequestRecord.data.url;
    627628            this.startTime = sendRequestRecord.startTime;
    628629            this.details = this._getRecordDetails(sendRequestRecord, sendRequestRecords);
     
    633634        var sendRequestRecord = sendRequestRecords[record.data.identifier];
    634635        if (sendRequestRecord) {// False for main resource.
     636            record.data.url = sendRequestRecord.data.url;
    635637            this.startTime = sendRequestRecord._responseReceivedFormattedTime;
    636638            this.callerScriptName = sendRequestRecord.callerScriptName;
     
    696698        recordContentTable.appendChild(this._createRow(WebInspector.UIString("Duration"), text));
    697699
     700        const recordTypes = WebInspector.TimelineAgent.RecordType;
    698701        if (this.details) {
    699             if ( this.type == WebInspector.TimelineAgent.RecordType.TimerInstall ||
    700                 this.type == WebInspector.TimelineAgent.RecordType.TimerFire ||
    701                 this.type == WebInspector.TimelineAgent.RecordType.TimerRemove) {
     702            if (this.type == recordTypes.TimerInstall ||
     703                this.type == recordTypes.TimerFire ||
     704                this.type == recordTypes.TimerRemove) {
    702705                recordContentTable.appendChild(this._createRow(WebInspector.UIString("Timer Id"), this.data.timerId));
    703706                if (this.timeout) {
     
    709712                    recordContentTable.appendChild(this._createLinkRow(WebInspector.UIString("Call Site"), link));
    710713                }
    711             } else if ( this.type == WebInspector.TimelineAgent.RecordType.FunctionCall ) {
     714            } else if (this.type == recordTypes.FunctionCall) {
    712715                var link = WebInspector.linkifyResourceAsNode(this.data.scriptName, "scripts", this.data.scriptLine, "timeline-details");
    713716                recordContentTable.appendChild(this._createLinkRow(WebInspector.UIString("Location"), link));
     717            } else if (this.type === recordTypes.ResourceSendRequest || this.type === recordTypes.ResourceReceiveResponse || this.type === recordTypes.ResourceFinish) {
     718                var link = WebInspector.linkifyResourceAsNode(this.data.url, "resources", null, "timeline-details");
     719                recordContentTable.appendChild(this._createLinkRow(WebInspector.UIString("Resource"), link));
    714720            } else
    715721                recordContentTable.appendChild(this._createRow(WebInspector.UIString("Details"), this.details));
     
    740746            case WebInspector.TimelineAgent.RecordType.EvaluateScript:
    741747            case WebInspector.TimelineAgent.RecordType.ResourceSendRequest:
    742                 return WebInspector.displayNameForURL(record.data.url);
    743748            case WebInspector.TimelineAgent.RecordType.ResourceReceiveResponse:
    744749            case WebInspector.TimelineAgent.RecordType.ResourceFinish:
    745                 var sendRequestRecord = sendRequestRecords[record.data.identifier];
    746                 return sendRequestRecord ? WebInspector.displayNameForURL(sendRequestRecord.data.url) : "";
     750                return WebInspector.displayNameForURL(record.data.url);
    747751            case WebInspector.TimelineAgent.RecordType.MarkTimeline:
    748752                return record.data.message;
Note: See TracChangeset for help on using the changeset viewer.