RESOLVED FIXED84041
Reloading substitute-data/alternate html string for unreachableURL will add an item to the back-forward-history for each reload
https://bugs.webkit.org/show_bug.cgi?id=84041
Summary Reloading substitute-data/alternate html string for unreachableURL will add a...
Tor Arne Vestbø
Reported 2012-04-16 09:31:29 PDT
Calling loadAlternateHTMLString on the page proxy repeatedly, or an initial loadAlternateHTMLString and then reload(), will add multiple entries for the substitute-data in the back-forward history, which does not match the behavior of a successful load and subsequent reload. Reproducible in Safari/WebKit nightly by going to http://www.foobarbaz.com/ and clicking reload multiple times.
Attachments
Patch (15.33 KB, patch)
2012-07-24 15:31 PDT, Vicki Pfau
no flags
Patch (15.38 KB, patch)
2012-07-24 16:34 PDT, Vicki Pfau
no flags
Archive of layout-test-results from gce-cr-linux-05 (1.02 MB, application/zip)
2012-07-24 17:30 PDT, WebKit Review Bot
no flags
Patch (11.79 KB, patch)
2012-07-25 15:51 PDT, Vicki Pfau
no flags
Patch (8.64 KB, patch)
2012-07-25 16:42 PDT, Vicki Pfau
no flags
Archive of layout-test-results from gce-cr-linux-08 (372.27 KB, application/zip)
2012-07-25 18:06 PDT, WebKit Review Bot
no flags
Archive of layout-test-results from gce-cr-linux-01 (490.71 KB, application/zip)
2012-07-25 19:01 PDT, WebKit Review Bot
no flags
Patch (8.70 KB, patch)
2012-07-26 14:35 PDT, Vicki Pfau
no flags
Patch (11.80 KB, patch)
2012-07-26 14:46 PDT, Vicki Pfau
beidson: review+
Tor Arne Vestbø
Comment 1 2012-04-16 09:53:32 PDT
After checking Safari 5 on 10.5.8, and it also creates a new bf-item for each reload, so perhaps this is intended behavior?
Vicki Pfau
Comment 2 2012-07-24 15:31:00 PDT
Vicki Pfau
Comment 3 2012-07-24 16:34:46 PDT
Created attachment 154171 [details] Patch The old patch was applied to an out of date version and therefore didn't apply cleanly to ToT. This is fixed now.
WebKit Review Bot
Comment 4 2012-07-24 16:36:30 PDT
Attachment 154171 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebCore/loader/FrameLoader.h:106: One space before end of line comments [whitespace/comments] [5] Total errors found: 1 in 11 files If any of these errors are false positives, please file a bug against check-webkit-style.
Brady Eidson
Comment 5 2012-07-24 16:52:13 PDT
Comment on attachment 154171 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=154171&action=review Please fix the ChangeLog and Stylebot's complaint before landing. > Source/WebCore/ChangeLog:13 > + > + Added a TestWebKitAPI test. > + I think we normally mention which API test was added by filename.
Vicki Pfau
Comment 6 2012-07-24 16:54:29 PDT
(In reply to comment #5) > (From update of attachment 154171 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=154171&action=review > > Please fix the ChangeLog and Stylebot's complaint before landing. > > > Source/WebCore/ChangeLog:13 > > + > > + Added a TestWebKitAPI test. > > + > > I think we normally mention which API test was added by filename. I tried to figure out what was making the style bot complain about that line and couldn't figure it out. I also looked for other examples in the changelog for API tests, but couldn't find any. I can give it another look, though.
Brady Eidson
Comment 7 2012-07-24 17:01:18 PDT
(In reply to comment #6) > (In reply to comment #5) > > (From update of attachment 154171 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=154171&action=review > > > > Please fix the ChangeLog and Stylebot's complaint before landing. > > > > > Source/WebCore/ChangeLog:13 > > > + > > > + Added a TestWebKitAPI test. > > > + > > > > I think we normally mention which API test was added by filename. > > I tried to figure out what was making the style bot complain about that line and couldn't figure it out. That's why stylebot includes style guide citations! Go to http://www.webkit.org/coding/coding-style.html and look under "Comments" > I also looked for other examples in the changelog for API tests, but couldn't find any. Just say something like "Added API test 'mac/BackForwardList.mm'"
WebKit Review Bot
Comment 8 2012-07-24 17:29:55 PDT
Comment on attachment 154171 [details] Patch Attachment 154171 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/13345035 New failing tests: http/tests/navigation/success200-loadsame.html http/tests/navigation/success200-frames-loadsame.html
WebKit Review Bot
Comment 9 2012-07-24 17:30:00 PDT
Created attachment 154190 [details] Archive of layout-test-results from gce-cr-linux-05 The attached test failures were seen while running run-webkit-tests on the chromium-ews. Bot: gce-cr-linux-05 Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'> Platform: Linux-2.6.39-gcg-201203291735-x86_64-with-Ubuntu-10.04-lucid
Brady Eidson
Comment 10 2012-07-24 17:31:05 PDT
Comment on attachment 154171 [details] Patch Removing r+ based on layout test failures.
Tor Arne Vestbø
Comment 11 2012-07-25 07:25:57 PDT
Comment on attachment 154171 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=154171&action=review > Source/WebCore/loader/FrameLoader.cpp:-1239 > - // FIXME: is this the right place to reset loadType? Perhaps this should be done after loading is finished or aborted. > - m_loadType = FrameLoadTypeStandard; Is removing this FIXME correct? We're still reseting the loadtype up front, just inside loadWithDocumentLoader() instead? > Source/WebKit/mac/WebView/WebFrame.mm:1403 > + _private->coreFrame->loader()->load(request, substituteData, false, _private->coreFrame->loader()->loadType()); I'm also wondering if we really need to pass in the actual load type as an argument. Isn't it more of a boolean shouldReset yes/no, where in the latter case we re-use the previous load type? It just seems a bit weird to pass in "_private->coreFrame->loader()->loadType()", when calling load() on the same instance. If it is in fact a bool relationship, we might even be able to contain the magic of _when_ that is the case inside load(), though I'm not sure how. I assume that's what the original FIXME refers to.
Vicki Pfau
Comment 12 2012-07-25 15:51:04 PDT
Vicki Pfau
Comment 13 2012-07-25 16:42:05 PDT
WebKit Review Bot
Comment 14 2012-07-25 18:06:10 PDT
Comment on attachment 154478 [details] Patch Attachment 154478 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/13350429 New failing tests: http/tests/navigation/slowmetaredirect-basic.html
WebKit Review Bot
Comment 15 2012-07-25 18:06:14 PDT
Created attachment 154505 [details] Archive of layout-test-results from gce-cr-linux-08 The attached test failures were seen while running run-webkit-tests on the chromium-ews. Bot: gce-cr-linux-08 Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'> Platform: Linux-2.6.39-gcg-201203291735-x86_64-with-Ubuntu-10.04-lucid
Vicki Pfau
Comment 16 2012-07-25 18:27:18 PDT
The failing test explicitly says in the comments about the test that the line that's missing in the test output after this patch shouldn't be in the output in the first place. It appears the test expectation might be wrong, and the output after this patch is correct.
WebKit Review Bot
Comment 17 2012-07-25 19:01:47 PDT
Comment on attachment 154478 [details] Patch Attachment 154478 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/13361252 New failing tests: http/tests/navigation/slowmetaredirect-basic.html
WebKit Review Bot
Comment 18 2012-07-25 19:01:51 PDT
Created attachment 154519 [details] Archive of layout-test-results from gce-cr-linux-01 The attached test failures were seen while running run-webkit-tests on the chromium-ews. Bot: gce-cr-linux-01 Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'> Platform: Linux-2.6.39-gcg-201203291735-x86_64-with-Ubuntu-10.04-lucid
Vicki Pfau
Comment 19 2012-07-26 14:35:00 PDT
Created attachment 154754 [details] Patch Speculative fix for cr-linux EWS problems
Brady Eidson
Comment 20 2012-07-26 14:39:41 PDT
Comment on attachment 154754 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=154754&action=review > Tools/ChangeLog:13 > + * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: > + * TestWebKitAPI/Tests/mac/BackForwardList.mm: Added. > + (-[BackForwardListTest webView:didFinishLoadForFrame:]): > + (-[BackForwardListTest webView:didFailProvisionalLoadWithError:forFrame:]): > + (TestWebKitAPI): > + (TestWebKitAPI::TEST): BackForwardList.mm doesn't appear to be included in this diff...?
Vicki Pfau
Comment 21 2012-07-26 14:46:02 PDT
Created attachment 154756 [details] Patch Add missing file
Vicki Pfau
Comment 22 2012-07-26 17:53:22 PDT
Note You need to log in before you can comment on or make changes to this bug.