Bug 142751

Summary: Web Inspector: Don't clear the console when navigating to a different page
Product: WebKit Reporter: Nikita Vasilyev <nvasilyev>
Component: Web InspectorAssignee: Devin Rousso <hi>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, graouts, hi, joepeck, jonowells, mattbaker, nvasilyev, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch none

Description Nikita Vasilyev 2015-03-16 14:58:04 PDT
Steps:

0. Open console for this page
1. Right click on the console and set "Keep Log on Reload"
2. Log something, say, 1+1
3. Navigate to a different page, say http://coub.com/view/49yix

Expected result:
Console keeps 1+1 message in the history

Actual result:
Console got cleared.

"Keep Log on Reload" does NOT prevent messages from being erased when navigating to another page. I find this behavior very unpleasant while debugging HTML5 history API on my personal website.
Comment 1 Radar WebKit Bug Importer 2015-03-16 14:58:27 PDT
<rdar://problem/20179772>
Comment 2 Devin Rousso 2015-07-09 14:10:09 PDT
Created attachment 256515 [details]
Patch
Comment 3 Timothy Hatcher 2015-07-09 14:21:37 PDT
Comment on attachment 256515 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=256515&action=review

> Source/WebInspectorUI/ChangeLog:9
> +        (WebInspector.LogManager): No longer distinguishes from page refreshes and page navigations for console clearing.

The context menu to toggle this is still called "Keep Log on Reload", so that would need to change.

> Source/WebInspectorUI/UserInterface/Controllers/LogManager.js:80
> +            if (!this.clearLogOnReloadSetting.value)

Ditto for the setting name.
Comment 4 Devin Rousso 2015-07-09 15:02:16 PDT
Created attachment 256528 [details]
Patch
Comment 5 WebKit Commit Bot 2015-07-09 16:22:19 PDT
Comment on attachment 256528 [details]
Patch

Clearing flags on attachment: 256528

Committed r186645: <http://trac.webkit.org/changeset/186645>
Comment 6 WebKit Commit Bot 2015-07-09 16:22:25 PDT
All reviewed patches have been landed.  Closing bug.