[Webkit-unassigned] [Bug 127938] Web Inspector: Inspect Element sometimes does not select the right DOM Node

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 19 13:20:58 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=127938


Joseph Pecoraro <joepeck at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #231603|review-                     |review?
               Flag|                            |




--- Comment #9 from Joseph Pecoraro <joepeck at webkit.org>  2014-05-19 13:21:20 PST ---
(From update of attachment 231603)
View in context: https://bugs.webkit.org/attachment.cgi?id=231603&action=review

> Source/WebInspectorUI/UserInterface/Controllers/DOMTreeManager.js:39
> +    this._isRestoreSelectedNodeAllowed = true;

How about, "_selectedNodeRestorationAllowed"? WebKit style is typically to avoid "is" on booleans.

> Source/WebInspectorUI/UserInterface/Controllers/DOMTreeManager.js:269
> +    get isRestoreSelectedNodeAllowed() {
> +        return this._isRestoreSelectedNodeAllowed;
> +    },

Style: "{" on newline.

> Source/WebInspectorUI/UserInterface/Views/FrameDOMTreeContentView.js:75
> +        if (WebInspector.domTreeManager.isRestoreSelectedNodeAllowed)
> +            this._restoreSelectedNodeAfterUpdate(this._domTree.frame.url, rootDOMNode.body || rootDOMNode.documentElement);

This seems like the wrong point to check the boolean state.

    - _restoreSelectedNodeAfterUpdate is called in multiple places. Do we want to respect this state in all places it is called?
    - _restoreSelectedNodeAfterUpdate may be called when this state is true, but run its async operation when this state is false, it should check this state again before actually changing the selected node.

It seems like inside _restoreSelectedNodeAfterUpdate is where we should be checking this "is restoration allowed" state, so we never do a restoration when we are not allowed.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list