Bug 143545
Summary: | Web Inspector: LogContentView should use higher level objects | ||
---|---|---|---|
Product: | WebKit | Reporter: | Joseph Pecoraro <joepeck> |
Component: | Web Inspector | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | graouts, inspector-bugzilla-changes, jonowells |
Priority: | P2 | Keywords: | DoNotImportToRadar |
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All |
Joseph Pecoraro
* SUMMARY
LogContentView should use higher level objects. Currently it searches and modifies elements directly, it should be dealing with View / Model objects at a higher level where possible.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Nikita Vasilyev
I was looking at "Web Inspector: Right/Left arrow no longer works in console to expand/collapse ObjectTrees" (https://bugs.webkit.org/show_bug.cgi?id=141949). To fix that bug I need to call ConsoleMessageView#collapse/expand from LogContentView. Currently, the only way to do it, AFAIK, is via `__messageView`:
// FIXME: <https://webkit.org/b/143545> Web Inspector: LogContentView should use higher level objects
this._element.__message = this._message;
this._element.__messageView = this;
https://github.com/WebKit/webkit/blob/d722fe09e441157f1075c342ecf4d2fa7a57c24b/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js#L44-L46
Could you elaborate on "higher level objects"? How do you envision that?
Joseph Pecoraro
> Could you elaborate on "higher level objects"? How do you envision that?
Our WebInspector View/Model objects, instead of DOM elements.
Take TreeOutlines / TreeElements for instance. When working with TreeOutlines clients never dig into the DOM nodes querying DOM classes, it uses APIs that deal with use the higher level TreeOutline/TreeElements classes directly.
In fact it may be wrong to go directly to DOM elements if for instance the "TreeElement" is "hidden" and querying to get the DOM element directly fails to respect that state.