Bug 184570

Summary: REGRESSION: Using the reload button while offline pushes identical pages onto the back/forward list
Product: WebKit Reporter: Sihui Liu <sihui_liu>
Component: HistoryAssignee: Sihui Liu <sihui_liu>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, commit-queue, dbates, ews-watchlist, japhet, sihui_liu, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Sihui Liu
Reported 2018-04-12 16:24:02 PDT
If device is not connected to the internet, pressing reload button will add item to the history list.
Attachments
Patch (4.46 KB, patch)
2018-04-15 23:37 PDT, Sihui Liu
no flags
Patch (4.26 KB, patch)
2018-04-18 10:00 PDT, Sihui Liu
no flags
Patch (4.13 KB, patch)
2018-04-18 10:09 PDT, Sihui Liu
no flags
Sihui Liu
Comment 1 2018-04-12 16:26:11 PDT
Sihui Liu
Comment 2 2018-04-15 23:37:21 PDT
Chris Dumez
Comment 3 2018-04-18 09:29:13 PDT
Comment on attachment 337989 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=337989&action=review r=me with nit fixes. > Source/WebCore/loader/FrameLoader.cpp:1443 > + } else if (shouldTreatURLAsSameAsCurrent(newDocumentLoader->unreachableURL()) && (m_loadType == FrameLoadType::Reload || m_loadType == FrameLoadType::ReloadExpiredOnly || m_loadType == FrameLoadType::ReloadFromOrigin)) There is a isReload(FrameLoadType) utility function that does what you want. > Tools/TestWebKitAPI/Tests/WebKitCocoa/LoadAlternateHTMLString.mm:139 > + NSURL* targetURL = WebCore::URLWithData([NSData dataWithBytes:literal length:strlen(literal)], nil); I would suggest: NSURL *invalidURL = [NSURL URLWithString:@"https://www.example.com<>/"]; And dropping your literal variable.
Sihui Liu
Comment 4 2018-04-18 10:00:43 PDT
Sihui Liu
Comment 5 2018-04-18 10:09:31 PDT
WebKit Commit Bot
Comment 6 2018-04-18 10:50:20 PDT
Comment on attachment 338223 [details] Patch Clearing flags on attachment: 338223 Committed r230767: <https://trac.webkit.org/changeset/230767>
WebKit Commit Bot
Comment 7 2018-04-18 10:50:22 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.