[webkit-reviews] review denied: [Bug 35574] Web Inspector: Nothing happens on navigation to resource from console if resource tracking is disabled : [Attachment 49803] [PATCH] Suggested solution

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 2 07:33:41 PST 2010


Pavel Feldman <pfeldman at chromium.org> has denied Alexander Pavlov (apavlov)
<apavlov at chromium.org>'s request for review:
Bug 35574: Web Inspector: Nothing happens on navigation to resource from
console if resource tracking is disabled
https://bugs.webkit.org/show_bug.cgi?id=35574

Attachment 49803: [PATCH] Suggested solution
https://bugs.webkit.org/attachment.cgi?id=49803&action=review

------- Additional Comments from Pavel Feldman <pfeldman at chromium.org>
> +	   var message = WebInspector.UIString(
> +	       "Cannot open this link. Make sure the resource tracking is
enabled in the %s panel.");
> +	   var anchorIndex = message.indexOf("%s");
> +	   if (anchorIndex < 0) {
> +	       var leftPart = message;
> +	       var rightPart = "";
>	   } else {
> -	       var profileString =
WebInspector.ProfileType.URLRegExp.exec(anchor.href);
> -	       if (profileString)
> -		   WebInspector.showProfile(anchor.href, anchor.lineNumber);
> +	       var leftPart = message.substring(0, anchorIndex);
> +	       var panelAnchorElement = document.createElement("a");
> +	       panelAnchorElement.href = "#";
> +	       panelAnchorElement.hasCustomHandler = true;
> +	       panelAnchorElement.textContent =
WebInspector.UIString("Resources");
> +	       var rightPart = message.substring(anchorIndex + 2);
>	   }
> +	   popupContentElement.appendChild(document.createTextNode(leftPart));
> +	   if (panelAnchorElement)
> +	       popupContentElement.appendChild(panelAnchorElement);
> +	   popupContentElement.appendChild(document.createTextNode(rightPart));

> +	   var popup = new WebInspector.Popover(popupContentElement);
> +
> +	   function dismissAndShowResourcesPanel(popup)
> +	   {
> +	       popup.hide();
> +	       WebInspector.showResourcesPanel();
> +	   }
> +	   panelAnchorElement.addEventListener("click",
dismissAndShowResourcesPanel.bind(this, popup));
> +
> +	   popup.show(anchor);
> +	   popup.hideWhenClickedOutside();

Could you extract method?

> +    background-color: rgba(255, 255, 255, 0.5);

I don't like the fact that popover blurs the background and blocks user input
outside the bubble. Could we make link non-clickable and show popover on hover
instead? Or even better, as in Eclipse, display a little 'hint lamp' near the
link. Popover would become visible when you hover over the lamp / click it.

> +    z-index: 99;
> +}
> +
>  .popover.top-left-arrow .arrow {
>      /* The default is top-left, no styles needed. */
>  }


More information about the webkit-reviews mailing list