[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.22-985-g3c00f00
pfeldman at chromium.org
pfeldman at chromium.org
Wed Mar 17 18:20:09 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 226ab8ad67289aa3c09427602b74c56bf5693e20
Author: pfeldman at chromium.org <pfeldman at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Mar 5 10:09:11 2010 +0000
2010-03-05 Ilya Tikhonovsky <loislo at chromium.org>
Reviewed by Pavel Feldman.
Web Inspector: Do not show link helper in popovers and/or for external resources.
https://bugs.webkit.org/show_bug.cgi?id=35785
* English.lproj/localizedStrings.js:
* inspector/front-end/ResourcesPanel.js:
(WebInspector.ResourcesPanel.prototype.canShowSourceLine):
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype._scriptOrResourceForURLAndLine):
* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelinePanel.prototype.hide):
* inspector/front-end/inspector.js:
(WebInspector.documentMouseOver):
(WebInspector.documentClick.followLink):
(WebInspector.documentClick):
(WebInspector.addMainEventListeners):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55575 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index c6e3bd5..61a441d 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,24 @@
+2010-03-05 Ilya Tikhonovsky <loislo at chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: Do not show link helper in popovers and/or for external resources.
+
+ https://bugs.webkit.org/show_bug.cgi?id=35785
+
+ * English.lproj/localizedStrings.js:
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourcesPanel.prototype.canShowSourceLine):
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel.prototype._scriptOrResourceForURLAndLine):
+ * inspector/front-end/TimelinePanel.js:
+ (WebInspector.TimelinePanel.prototype.hide):
+ * inspector/front-end/inspector.js:
+ (WebInspector.documentMouseOver):
+ (WebInspector.documentClick.followLink):
+ (WebInspector.documentClick):
+ (WebInspector.addMainEventListeners):
+
2010-03-05 Fumitoshi Ukai <ukai at chromium.org>
Reviewed by Alexey Proskuryakov.
diff --git a/WebCore/English.lproj/localizedStrings.js b/WebCore/English.lproj/localizedStrings.js
index 50d4560..4283e20 100644
Binary files a/WebCore/English.lproj/localizedStrings.js and b/WebCore/English.lproj/localizedStrings.js differ
diff --git a/WebCore/inspector/front-end/ResourcesPanel.js b/WebCore/inspector/front-end/ResourcesPanel.js
index ff1287e..af92bfb 100644
--- a/WebCore/inspector/front-end/ResourcesPanel.js
+++ b/WebCore/inspector/front-end/ResourcesPanel.js
@@ -467,7 +467,7 @@ WebInspector.ResourcesPanel.prototype = {
canShowSourceLine: function(url, line)
{
- return !!WebInspector.resourceForURL(url) && InspectorBackend.resourceTrackingEnabled();
+ return this._resourceTrackingEnabled && !!WebInspector.resourceForURL(url);
},
showSourceLine: function(url, line)
diff --git a/WebCore/inspector/front-end/ScriptsPanel.js b/WebCore/inspector/front-end/ScriptsPanel.js
index ffdf205..45e5678 100644
--- a/WebCore/inspector/front-end/ScriptsPanel.js
+++ b/WebCore/inspector/front-end/ScriptsPanel.js
@@ -517,19 +517,22 @@ WebInspector.ScriptsPanel.prototype = {
_scriptOrResourceForURLAndLine: function(url, line)
{
+ var scriptWithMatchingUrl = null;
for (var sourceID in this._sourceIDMap) {
var scriptOrResource = this._sourceIDMap[sourceID];
if (scriptOrResource instanceof WebInspector.Script) {
- var script = scriptOrResource;
- if (script.startingLine <= line && script.startingLine + script.linesCount > line)
- return script;
+ if (scriptOrResource.sourceURL !== url)
+ continue;
+ scriptWithMatchingUrl = scriptOrResource;
+ if (scriptWithMatchingUrl.startingLine <= line && scriptWithMatchingUrl.startingLine + scriptWithMatchingUrl.linesCount > line)
+ return scriptWithMatchingUrl;
} else {
var resource = scriptOrResource;
if (resource.url === url)
return resource;
}
}
- return null;
+ return scriptWithMatchingUrl;
},
showView: function(view)
@@ -690,7 +693,7 @@ WebInspector.ScriptsPanel.prototype = {
option.representedObject = script.resource || script;
option.url = displayName;
option.startingLine = script.startingLine;
- option.text = script.resource ? displayName : String.sprintf("%s:%d", displayName, script.startingLine);
+ option.text = script.resource || script.startingLine === 1 ? displayName : String.sprintf("%s:%d", displayName, script.startingLine);
function optionCompare(a, b)
{
diff --git a/WebCore/inspector/front-end/TimelinePanel.js b/WebCore/inspector/front-end/TimelinePanel.js
index 884962d..2c452e5 100644
--- a/WebCore/inspector/front-end/TimelinePanel.js
+++ b/WebCore/inspector/front-end/TimelinePanel.js
@@ -239,6 +239,12 @@ WebInspector.TimelinePanel.prototype = {
this._refresh();
},
+ hide: function()
+ {
+ WebInspector.Panel.prototype.hide.call(this);
+ this._closeRecordDetails();
+ },
+
_onScroll: function(event)
{
this._closeRecordDetails();
diff --git a/WebCore/inspector/front-end/inspector.js b/WebCore/inspector/front-end/inspector.js
index ab99be1..2a50149 100644
--- a/WebCore/inspector/front-end/inspector.js
+++ b/WebCore/inspector/front-end/inspector.js
@@ -617,37 +617,17 @@ WebInspector.documentMouseOver = function(event)
return;
const anchor = event.target;
- if (!anchor.hasStyleClass("webkit-html-external-link") && !anchor.hasStyleClass("webkit-html-resource-link"))
+ if (!anchor.hasStyleClass("webkit-html-resource-link"))
return;
-
- if (WebInspector.canShowSourceLine(anchor.href, anchor.lineNumber, anchor.preferredPanel) || WebInspector.ProfileType.URLRegExp.exec(anchor.href))
- return;
-
- WebInspector._showPopupTimer = setTimeout(WebInspector.showBadLinkPopup.bind(WebInspector, anchor), 250);
-}
-
-WebInspector.documentMouseOut = function(event)
-{
- if (event.target.tagName !== "A")
+ if (WebInspector.canShowSourceLine(anchor.href, anchor.lineNumber, anchor.preferredPanel) || WebInspector.ProfileType.URLRegExp.exec(anchor.href)) {
+ if (event.target.originalTitle)
+ event.target.title = event.target.originalTitle;
return;
-
- if (WebInspector._showPopupTimer) {
- clearTimeout(WebInspector._showPopupTimer);
- delete WebInspector._showPopupTimer;
- } else if (WebInspector._badLinkPopup && !this._mouseOverPopup)
- WebInspector._hidePopupTimer = setTimeout(WebInspector.hideBadLinkPopupIfNecessary.bind(WebInspector), 750);
-}
-
-WebInspector.hideBadLinkPopupIfNecessary = function()
-{
- if (!this._badLinkPopup)
- return;
- this._badLinkPopup.hide();
- delete this._badLinkPopup;
- if (this._hidePopupTimer) {
- clearTimeout(this._hidePopupTimer);
- delete this._hidePopupTimer;
}
+
+ if (!event.target.originalTitle)
+ event.target.originalTitle = event.target.title;
+ event.target.title = WebInspector.UIString("Cannot open this link. Make sure that resource tracking is enabled in the Resources panel.");
}
WebInspector.documentClick = function(event)
@@ -687,8 +667,6 @@ WebInspector.documentClick = function(event)
}
return;
}
-
- WebInspector.showBadLinkPopup(anchor);
}
if (WebInspector.followLinkTimeout)
@@ -705,61 +683,6 @@ WebInspector.documentClick = function(event)
followLink();
}
-WebInspector.showBadLinkPopup = function(anchor)
-{
- this.hideBadLinkPopupIfNecessary();
-
- // Show an info popup for a link that cannot be opened right away.
- var popupContentElement = document.createElement("span");
- popupContentElement.className = "monospace";
-
- var message = WebInspector.UIString(
- "Cannot open this link. Make sure that resource tracking is enabled in the %s panel.");
- var anchorIndex = message.indexOf("%s");
- if (anchorIndex < 0) {
- var leftPart = message;
- var rightPart = "";
- } else {
- var leftPart = message.substring(0, anchorIndex);
- var panelAnchorElement = document.createElement("a");
- panelAnchorElement.href = "webkit-link-action://show-panel/resources";
- 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);
-
- if (panelAnchorElement)
- panelAnchorElement.addEventListener("click", this.hideBadLinkPopupIfNecessary.bind(this));
-
- function popupOverOut(event)
- {
- if (event.type === "mouseover") {
- if (this._mouseOverPopup)
- return; // Entered from child.
- clearTimeout(this._hidePopupTimer);
- delete this._hidePopupTimer;
- this._mouseOverPopup = true;
- } else {
- const relTarget = event.relatedTarget;
- if (relTarget && relTarget.enclosingNodeOrSelfWithClass("popover"))
- return; // Leaving to child.
- delete this._mouseOverPopup;
- this.hideBadLinkPopupIfNecessary();
- }
- }
- const boundHandler = popupOverOut.bind(this);
- popupContentElement.addEventListener("mouseover", boundHandler, true);
- popupContentElement.addEventListener("mouseout", boundHandler, true);
-
- popup.show(anchor);
- this._badLinkPopup = popup;
- delete this._showPopupTimer;
-}
-
WebInspector.documentKeyDown = function(event)
{
if (this.currentFocusElement && this.currentFocusElement.handleKeyEvent) {
@@ -1721,7 +1644,6 @@ WebInspector.addMainEventListeners = function(doc)
doc.defaultView.addEventListener("blur", this.windowBlurred.bind(this), false);
doc.addEventListener("click", this.documentClick.bind(this), true);
doc.addEventListener("mouseover", this.documentMouseOver.bind(this), true);
- doc.addEventListener("mouseout", this.documentMouseOut.bind(this), true);
}
WebInspector._searchFieldManualFocus = function(event)
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 180f9bd..93a474b 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,15 @@
+2010-03-05 Ilya Tikhonovsky <loislo at chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: Do not show link helper in popovers and/or for external resources.
+
+ https://bugs.webkit.org/show_bug.cgi?id=35785
+
+ * src/js/DebuggerAgent.js:
+ (devtools.DebuggerAgent.prototype.initUI):
+ (devtools.DebuggerAgent.prototype.addScriptInfo_):
+
2010-03-04 Garret Kelly <gdk at chromium.org>
Reviewed by Darin Fisher.
diff --git a/WebKit/chromium/src/js/DebuggerAgent.js b/WebKit/chromium/src/js/DebuggerAgent.js
index 873cffb..f4eccb1 100644
--- a/WebKit/chromium/src/js/DebuggerAgent.js
+++ b/WebKit/chromium/src/js/DebuggerAgent.js
@@ -181,7 +181,7 @@ devtools.DebuggerAgent.prototype.initUI = function()
// pending addition into the UI.
for (var scriptId in this.parsedScripts_) {
var script = this.parsedScripts_[scriptId];
- WebInspector.parsedScriptSource(scriptId, script.getUrl(), undefined /* script source */, script.getLineOffset());
+ WebInspector.parsedScriptSource(scriptId, script.getUrl(), undefined /* script source */, script.getLineOffset() + 1);
}
return;
}
@@ -926,7 +926,7 @@ devtools.DebuggerAgent.prototype.addScriptInfo_ = function(script, msg)
this.parsedScripts_[script.id] = new devtools.ScriptInfo(script.id, script.name, script.lineOffset, contextType);
if (this.scriptsPanelInitialized_) {
// Only report script as parsed after scripts panel has been shown.
- WebInspector.parsedScriptSource(script.id, script.name, script.source, script.lineOffset);
+ WebInspector.parsedScriptSource(script.id, script.name, script.source, script.lineOffset + 1);
}
};
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list