Bug 145468

Summary: Web Inspector: Console.messagesCleared should include a reason (frame navigated, console-api, etc)
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: graouts, inspector-bugzilla-changes, jonowells, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   

Description Joseph Pecoraro 2015-05-29 13:34:36 PDT
* SUMMARY
Console.messagesCleared should include a reason (frame navigated, console-api, etc)

The frontend handles console clears differently for reloads then navigations, command line clear(), and console.clear() calls. The frontend would like to avoid clearing the console log buffer on page reloads but that is currently not easy to determine. Having a "reason" associated with the event would let the frontend be smarter about how it handles this message.

* NOTES
- Current reasons: frameNavigated, console-api (console.clear), CommandLineAPI (js> clear)
- Alternatively, it may be enough to just have the backend not even send messagesCleared for frame navigations, and let the frontend just do it on its own.
- We still need to worry about Legacy backends that won't have the reason
Comment 1 Joseph Pecoraro 2015-05-29 13:34:44 PDT
<rdar://problem/13767079>