Click a link to a loaded resource in the Console view with the resource tracking disabled. Nothing happens, and the user gets no feedback about why no navigation occurs. Upstreaming http://code.google.com/p/chromium/issues/detail?id=35757
Created attachment 49803 [details] [PATCH] Suggested solution
Comment on attachment 49803 [details] [PATCH] Suggested solution > + 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. */ > }
Created attachment 49813 [details] [PATCH] Comments addressed
Can you attach a screenshot?
Created attachment 49833 [details] [IMAGE] (Windows) Popup shown for a link when resource tracking is off
"make sure the resource tracking" shoud be "make sure that resource tracking"
Created attachment 49846 [details] [PATCH] Typo fixed
Comment on attachment 49846 [details] [PATCH] Typo fixed > +WebInspector.consoleMouseOver = function(event) > +{ > + > +WebInspector.consoleMouseOut = function(event) > +{ Why are these registered on console only? Things like profiler and timeline could also have links to resources.
(In reply to comment #8) > (From update of attachment 49846 [details]) > > +WebInspector.consoleMouseOver = function(event) > > +{ > > > > + > > +WebInspector.consoleMouseOut = function(event) > > +{ > > > Why are these registered on console only? Things like profiler and timeline > could also have links to resources. Because the bug has been reported for the console only. I will broaden the scope.
Created attachment 49899 [details] [PATCH] Handle links in the entire WebInspector
Comment on attachment 49899 [details] [PATCH] Handle links in the entire WebInspector > > + if (anchor.hasCustomHandler) > + return; As we discussed offline, please handle "Profile" and "Resource" panel links same way. Also, please move isTransparentRight parameter from calculator to the Graph representation object.
Created attachment 49900 [details] [PATCH] Handle link clicks uniformly
(In reply to comment #11) > (From update of attachment 49899 [details]) > > > > + if (anchor.hasCustomHandler) > > + return; > > As we discussed offline, please handle "Profile" and "Resource" panel links > same way. Done. > Also, please move isTransparentRight parameter from calculator to the Graph > representation object. Wrong bug.
Committing to http://svn.webkit.org/repository/webkit/trunk ... M WebCore/ChangeLog M WebCore/English.lproj/localizedStrings.js M WebCore/inspector/front-end/ResourcesPanel.js M WebCore/inspector/front-end/inspector.js Committed r55517