Bug 143545 - Web Inspector: LogContentView should use higher level objects
Summary: Web Inspector: LogContentView should use higher level objects
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: DoNotImportToRadar
Depends on:
Blocks:
 
Reported: 2015-04-08 17:58 PDT by Joseph Pecoraro
Modified: 2016-12-13 14:43 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2015-04-08 17:58:49 PDT
* 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.
Comment 1 Nikita Vasilyev 2015-05-18 20:48:59 PDT
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?
Comment 2 Joseph Pecoraro 2015-05-18 21:17:35 PDT
> 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.