Bug 14607 - Javascript-Link "Dump Script" (from Apple-Dev-Website) - wrong or no reaction
Summary: Javascript-Link "Dump Script" (from Apple-Dev-Website) - wrong or no reaction
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 523.x (Safari 3)
Hardware: PC Windows XP
: P2 Normal
Assignee: Nobody
URL: http://developer.apple.com/internet/s...
Keywords: InRadar, PlatformOnly
Depends on:
Blocks:
 
Reported: 2007-07-13 10:44 PDT by Alexander Luck
Modified: 2007-12-08 13:50 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Luck 2007-07-13 10:44:07 PDT
[actual release r24238]

in url http://developer.apple.com/internet/safari/faq.html#anchor13 is in the
part "JavaScript Related" the link "Dump Scripts" (with JS function).

But at use this link "Dump Script" is open a new
window. But the window has no content. 
And if i drag this link to Bookmark Bar und i use
this link of the bar then no open a window. No reaction!

The link "Dump Script":

javascript:var%20jsArray%20=%20document.getElementsByTagName(%22script%22);%20var%20theWinref;%20var%20theHTML;%20var%20scriptObj;%20var%20frameURL;%20var%20frameObj;if(jsArray.length%20%3E%200)%20%7B%20theWinref%20=%20window.open('','_blank','width=320,height=255,toolbar=no,location=no,directories=no,status=yes,menubar=no,resizeable=yes');%20theWinref.document.write('%3Chtml%3E%3Chead%3E%3Ctitle%3E'%20+%20window.location.href%20+%20'%3C/title%3E%3C/head%3E%3Cbody%3E'+%20jsArray.length+'%20Script(s)%20Found:');%20theWinref.resizeTo(600,200);theWinref.moveTo(0,0);%20%7D%20for%20(var%20i%20=%200;%20i%20%3C%20jsArray.length;%20i++)%20%7B%20scriptObj%20=%20jsArray%5Bi%5D;%20if(scriptObj.hasAttribute(%22src%22))%7B%20frameURL%20=%20scriptObj.getAttribute(%22src%22);%20theWinref.document.write(%22%3Cp%20style='background-color:%23999933;'%3EScript%20%22+eval(i+1)+%22%20via%20%22%20+%20frameURL%20+%20%22%3Cbr%3E%3Ciframe%20height='100%25'%20width='100%25'%20id='url%22+%20i%20+%20%22'%20src='%22%20+%20frameURL%20+%20%22'%3E%3C/iframe%3E%3C/p%3E%22);%20frameObj%20=%20theWinref.document.getElementById(%22url%22%20+%20i);%20%7D%20else%20%7B%20theHTML%20=%20scriptObj.innerHTML;%20theWinref.document.write(%22%3Cp%20style='background-color:%23999933;'%3EScript%20%22+eval(i+1)+%22:%3Cbr%3E%3Cpre%3E%22%20+%20theHTML%20+%20%22%3C/pre%3E%3C/p%3E%22);%20%7D%20%7D%20if(jsArray.length%20%3E%200)%20%7B%20theWinref.document.write('%3C/body%3E%3C/html%3E');%20%7D
Comment 1 David Kilzer (:ddkilzer) 2007-07-14 15:37:35 PDT
The "Dump Scripts" link at the bottom of the page works for me with a local debug build of WebKit r24285 with Safari 3.0 (522.12) on Mac OS X 10.4.10 (8R218).  This appears to be a Windows-only bug.  Note that I have pop-up blocking enabled on Safari 3.0.

Comment 2 David Kilzer (:ddkilzer) 2007-07-14 15:37:55 PDT
<rdar://problem/5335847>
Comment 3 Alexander Luck 2007-07-14 16:03:52 PDT
David, do you have tested with disabled pop-up blocking?!
Comment 4 David Kilzer (:ddkilzer) 2007-07-14 16:10:56 PDT
(In reply to comment #3)
> David, do you have tested with disabled pop-up blocking?!

I saw the pop-up with pop-up blocking enabled (e.g., so that Safari blocks pop-ups that it thinks are "bad"), so I doubt that disabling pop-up blocking would change that.

I also don't have a Windows box to test this on Windows, and I believe it's a platform-only bug.

Comment 5 Matt Lilek 2007-07-14 17:13:21 PDT
Confirmed with r24293 on Windows XP.
Comment 6 Alexander Luck 2007-07-31 11:55:52 PDT
r24749: 
Safari in this nightly is show a popup window with content! But i can not change the popup size.

>And if i drag this link to Bookmark Bar und i use
>this link of the bar then no open a window. No reaction!
But in this nightly Not change. No reaction with link in Bookmark Bar!
Comment 7 Alexander Luck 2007-09-09 06:47:44 PDT
actual in r25455:
the bookmark "Dump Script" show now in Javascript Console:

SyntaxError: Parse error
undefined                 Line: 1
Comment 8 Alexander Luck 2007-10-20 10:38:52 PDT
With which release is fixed this error?
Comment 9 David Kilzer (:ddkilzer) 2007-10-20 13:12:53 PDT
(In reply to comment #8)
> With which release is fixed this error?

This works with the Safari for Windows 310a18 seed.  Note that if you have an Apple Developer Connection (ADC) account, you may download new seeds of Safari for Windows for free by logging in to <http://developer.apple.com/>.  If you don't have account, create a free "online" account using <https://connect.apple.com/>.  
Comment 10 Alexander Luck 2007-10-28 04:24:57 PDT
Hello David,
i have install the seed. It is open a new window, but the window have no content. The window ought to show the javascripts!

I think the bug reopen or i open a new bug?
Comment 11 David Kilzer (:ddkilzer) 2007-10-28 13:00:12 PDT
(In reply to comment #10)
> Hello David,
> i have install the seed. It is open a new window, but the window have no
> content. The window ought to show the javascripts!
> 
> I think the bug reopen or i open a new bug?

Please open an internal Apple bug report using <https://bugreport.apple.com/> and report the Radar bug number here.  Thanks!

Comment 12 Alexander Luck 2007-10-29 15:37:08 PDT
I have report the Apple Bug. Apple Bug ID# 5566435
Comment 13 David Kilzer (:ddkilzer) 2007-12-08 06:01:18 PST
Steps to reproduce:
1. Launch Safari/WebKit.
2. Go to URL:  http://developer.apple.com/internet/safari/faq.html#anchor13
3. Click "Dump Scripts" link.

With Safari 3.0.4 (523.12) with original WebKit on Mac OS X 10.4.11 (8S165):
- The content in the pop-up window shows.
- The pop-up window is not resizable.
- No resizer thumb is drawn in the lower right-hand corner of the window.
- The height of the scrollable area is too tall to fit in the window (so that it is possible to "lose" the scroll thumb).

With Safari 3.0.4 (523.12.9) with original WebKit on Windows XP SP2:
- The content in the pop-up window shows.
- The pop-up window is not resizable.
- A resizer thumb is drawn in the lower right-hand corner of the window (incorrectly?).
- The height of the scrollable area is too tall to fit in the window (so that it is possible to "lose" the scroll thumb).

With Safari 3.0.4 (523.12) with WebKit nightly r28505 on Mac OS X 10.4.11 (8S165):
- The content in the pop-up window shows.
- The pop-up window is resizable (Bug 16128; r28300).
- A resizer thumb is drawn in the lower right-hand corner of the window, but it's white instead of gray like the rest of the chrome.  (Looks ugly.)
- The height of the scrollable area is the correct height to fit in the window.

With Safari 3.0.4 (523.12.9) with WebKit nightly r28503 on Windows XP SP2:
- The content in the pop-up window shows.
- The pop-up window is resizable (Bug 16128; r28300).
- A resizer thumb is drawn in the lower right-hand corner of the window,and it's gray (correct).
- The height of the scrollable area is too tall to fit in the window (so that it is possible to "lose" the scroll thumb), even after resizing the window.

So it looks like there are two outstanding issues:
- Resizer thumb on Safari 3.0.4 for Tiger is drawn as the wrong color (white instead of gray).
- The height of the scrollable area in the pop-up window in Windows is not correct.

Comment 14 David Kilzer (:ddkilzer) 2007-12-08 13:48:11 PST
(In reply to comment #13)
> So it looks like there are two outstanding issues:
> - Resizer thumb on Safari 3.0.4 for Tiger is drawn as the wrong color (white
> instead of gray).

I filed this radar to cover this issue (which affects both Tiger and Leopard):
<rdar://problem/5637190>

> - The height of the scrollable area in the pop-up window in Windows is not
> correct.

The actual problem here is that there are no window-level scrollbars drawn (as there are 6 scripts that should be printed in the pop-up menu).  This is covered by:
<rdar://problem/5566435>

Comment 15 David Kilzer (:ddkilzer) 2007-12-08 13:50:10 PST
(In reply to comment #14)
> (In reply to comment #13)
> > So it looks like there are two outstanding issues:
> > - Resizer thumb on Safari 3.0.4 for Tiger is drawn as the wrong color (white
> > instead of gray).
> 
> I filed this radar to cover this issue (which affects both Tiger and Leopard):
> <rdar://problem/5637190>

This issue does not affect Windows.

> > - The height of the scrollable area in the pop-up window in Windows is not
> > correct.
> 
> The actual problem here is that there are no window-level scrollbars drawn (as
> there are 6 scripts that should be printed in the pop-up menu).  This is
> covered by:
> <rdar://problem/5566435>

This issue affects both Mac and Windows.