Bug 17574 - Acid2: Inspection fails after internal anchor navigation
Summary: Acid2: Inspection fails after internal anchor navigation
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL: http://hixie.ch/tests/evil/acid/002-n...
Keywords: HasReduction
Depends on:
Blocks:
 
Reported: 2008-02-27 14:09 PST by Robert Blaut
Modified: 2008-07-16 05:07 PDT (History)
2 users (show)

See Also:


Attachments
Reduction (202 bytes, text/html)
2008-03-23 15:16 PDT, Cameron Zwarich (cpst)
no flags Details
Another test case (192 bytes, text/html)
2008-03-23 20:53 PDT, Cameron Zwarich (cpst)
no flags Details
Further reduction (126 bytes, text/html)
2008-03-23 23:15 PDT, Cameron Zwarich (cpst)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Blaut 2008-02-27 14:09:01 PST
Summary: During digging into bug 4911 I found that the Acid2 test is impossible to inspect with Web Inspector on the first load. The Web Inspector opens window but without html code in it.

Steps to reproduce:
1) Go to a page: http://hixie.ch/tests/evil/acid/002/#top
2) Click "Take the Acid2 test"
3) Right click on "Hello World" an choose Inspect element

Expected result:
The opened window should have html code in it.

Current result:
The opened window is blank.

The problem disappears after reloading the page and retrying above procedure. Notice also incorrect layout!
Comment 1 Adam Roben (:aroben) 2008-03-13 23:32:34 PDT
Works fine here. You may have run into the bug where the Inspector is blank if you turn on WebKitDeveloperExtras and then open the Inspector without loading a new page <rdar://5667892>.

Robert, do you think this is the case? If so, we should retitle this bug and make it the Bugzilla equivalent of <rdar://5667892>.
Comment 2 Robert Blaut 2008-03-14 01:33:23 PDT
(In reply to comment #1)
> Robert, do you think this is the case? If so, we should retitle this bug and
> make it the Bugzilla equivalent of <rdar://5667892>.
> 

No, it isn't the case you described. Sad to say but in the first step above I typed wrong URL. The exact steps should be:

1) Go to a page: http://hixie.ch/tests/evil/acid/002/
2) Click "Take the Acid2 test"
3) Right click on "Hello World" an choose Inspect element

The second step is crucial for this issue. The issue isn't visible if you perform these steps:

1) Go to a page: http://hixie.ch/tests/evil/acid/002/#top
2) Right click on "Hello World" an choose Inspect element.
Comment 3 Cameron Zwarich (cpst) 2008-03-23 14:41:06 PDT
This also works with the standard data URI version of the test:

http://www.webstandards.org/files/acid2/test.html
Comment 4 Cameron Zwarich (cpst) 2008-03-23 15:16:59 PDT
Created attachment 19988 [details]
Reduction

Here is a reduction. It is essentially the same reduction as for bug 13693. It seems the internal anchor navigation causes the inspector to attempt to inspect the 404 in the embedded object element.
Comment 5 Cameron Zwarich (cpst) 2008-03-23 20:53:37 PDT
Created attachment 19991 [details]
Another test case

It has nothing to do with failure to load in the object element, as can be seen in this example. Clicking then inspecting the page causes http://www.webkit.org/ to be inspected instead.
Comment 6 Cameron Zwarich (cpst) 2008-03-23 23:15:59 PDT
Created attachment 19998 [details]
Further reduction

The main document appears in the inspector, except it has type Other. Here is a further reduction without the 404 that illustrates the problem alone.

This is occurring because

CachedResource* cachedResource = frame->document()->docLoader()->cachedResource(requestURL.string());

in InspectorResource::type() is null. If I change the subsequent test to return Doc instead of Other, then inspection works fine.

I think this is actually a loader issue, because it should be a cached resource, unless my definition of cached resource is skewed.
Comment 7 Robert Blaut 2008-07-16 05:07:07 PDT
I'm no longer able to reproduce the problem in WebKit r35177. I close the bug report.