summaryrefslogtreecommitdiffstats
path: root/WebCore/inspector/front-end/ElementsTreeOutline.js
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-02-05 14:27:46 +0000
committerSteve Block <steveblock@google.com>2010-02-15 10:49:50 +0000
commit5e2bc6953fe6923165b8a5d7679939693a1d58d6 (patch)
tree6ccb8c24bc2bf5e8f413e6cfae250b729b426631 /WebCore/inspector/front-end/ElementsTreeOutline.js
parent4a00f4fccc3cb7e9996749a05631f5d7b9de756e (diff)
downloadexternal_webkit-5e2bc6953fe6923165b8a5d7679939693a1d58d6.zip
external_webkit-5e2bc6953fe6923165b8a5d7679939693a1d58d6.tar.gz
external_webkit-5e2bc6953fe6923165b8a5d7679939693a1d58d6.tar.bz2
Merge webkit.org at r54340 : Initial merge by git
Change-Id: Ib489d2ff91186ea3652522e1d586e54416a2cf44
Diffstat (limited to 'WebCore/inspector/front-end/ElementsTreeOutline.js')
-rw-r--r--WebCore/inspector/front-end/ElementsTreeOutline.js19
1 files changed, 4 insertions, 15 deletions
diff --git a/WebCore/inspector/front-end/ElementsTreeOutline.js b/WebCore/inspector/front-end/ElementsTreeOutline.js
index d38a7bb..8d8d5db 100644
--- a/WebCore/inspector/front-end/ElementsTreeOutline.js
+++ b/WebCore/inspector/front-end/ElementsTreeOutline.js
@@ -898,29 +898,18 @@ WebInspector.ElementsTreeElement.prototype = {
if (!hrefValue || hrefValue.indexOf("://") > 0)
return hrefValue;
- var match;
- var documentURL;
for (var frameOwnerCandidate = node; frameOwnerCandidate; frameOwnerCandidate = frameOwnerCandidate.parentNode) {
if (frameOwnerCandidate.documentURL) {
- documentURL = frameOwnerCandidate.documentURL;
+ var result = WebInspector.completeURL(frameOwnerCandidate.documentURL, hrefValue);
+ if (result)
+ return result;
break;
}
}
- if (documentURL) {
- match = documentURL.match(WebInspector.URLRegExp);
- if (match) {
- var path = hrefValue;
- if (path.charAt(0) !== "/") {
- var documentPath = match[4] || "/";
- path = documentPath.substring(0, documentPath.lastIndexOf("/")) + "/" + path;
- }
- return match[1] + "://" + match[2] + (match[3] ? (":" + match[3]) : "") + path;
- }
- }
// documentURL not found or has bad value
for (var url in WebInspector.resourceURLMap) {
- match = url.match(WebInspector.URLRegExp);
+ var match = url.match(WebInspector.URLRegExp);
if (match && match[4] === hrefValue)
return url;
}