Bug 8121

Summary: REGRESSION: 404s are not displayed
Product: WebKit Reporter: Denis Defreyne <amonre>
Component: WebKit Misc.Assignee: Trey Matteson <trey>
Severity: Major CC: ap, trey
Priority: P1 Keywords: Regression
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
URL: http://www.apple.com/akjwfelwajkfwajfkewwefawegawef
Description Flags
proposed patch
proposed patch mjs: review+

Description Denis Defreyne 2006-04-01 11:51:25 PST

Latest nightly is unable to show 404 pages.


Go to a nonexistant page, such as <http://www.apple.com/akjwfelwajkfwajfkewwefawegawef>.


Safari stops loading the page before anything gets displayed. The window stays completely empty. The status bar displays "Cancelled loading the page."


This bug appears in r13626.
Comment 1 Alexey Proskuryakov 2006-04-01 12:10:19 PST
Confirmed with r13615.
Comment 2 Alexey Proskuryakov 2006-04-02 05:05:41 PDT
Caused by the fix in bug 7739 (TOT REGRESSION: Assertion failure loading acid2 test in -[WebCoreFrameBridge installInFrame:]).
Comment 3 Trey Matteson 2006-04-02 10:48:40 PDT
I will take a look.
Comment 4 Trey Matteson 2006-04-02 17:55:28 PDT
Fixed by limiting the previous change to the case of an <object> element.  I also added a couple test cases for this area, and tweaked the test harness to allow Perl files to be executed as tests (so as to generate a specific 404 error).
Comment 5 Trey Matteson 2006-04-02 17:56:16 PDT
Created attachment 7472 [details]
proposed patch
Comment 6 Darin Adler 2006-04-02 18:57:54 PDT
Comment on attachment 7472 [details]
proposed patch

+    return element ? [DOMElement _elementWith:element] : nil;

No need for this ?: expression here. The method _elementWith: handles this case, yielding nil. I know you copied it from the _ownerElement method, which also doesn't need it!
Comment 7 Trey Matteson 2006-04-02 21:01:32 PDT
Created attachment 7474 [details]
proposed patch

Yep, that's where I copied it from.  Same patch with the extra nil checks removed from both places, and [WebCoreFrameBridge currentForm] to boot.
Comment 8 Maciej Stachowiak 2006-04-03 02:47:16 PDT
Comment on attachment 7474 [details]
proposed patch

Comment 9 Darin Adler 2006-04-03 09:15:14 PDT
I applied the patch, and it clearly does fix real 404 erors.

But I can't get the new layout tests to pass, so I can't land yet.
Comment 10 Darin Adler 2006-04-03 09:22:11 PDT
(In reply to comment #9)
> But I can't get the new layout tests to pass, so I can't land yet.

It was a permission problem. Fixed now.