Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Issue 2716983002: [Devtools] Moved DataGridNode's .parent property to proper getter/setter (Closed)

Created:
3 years, 10 months ago by allada
Modified:
3 years, 8 months ago
Reviewers:
caseq, alph, luoe
CC:
chromium-reviews, caseq+blink_chromium.org, tyoshino+watch_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, apavlov+blink_chromium.org, gavinp+loader_chromium.org, devtools-reviews_chromium.org, blink-reviews, loading-reviews+fetch_chromium.org, kinuko+watch, Nate Chapin, loading-reviews_chromium.org, pfeldman, kozyatinskiy+blink_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Devtools] Moved DataGridNode's .parent property to proper getter/setter This patch is in prep for a future patch that will invalidate network grid nodes if the parent of the node is changed it will need to recalculate the depth of the node. As it stands now it caches the ._depth property, but we need to make sure it recalculates under any case the parent changes. R=caseq,luoe BUG=None

Patch Set 1 #

Patch Set 2 : [Devtools] Moved DataGridNode's .parent property to proper getter/setter #

Patch Set 3 : [Devtools] Moved DataGridNode's .parent property to proper getter/setter #

Total comments: 3

Patch Set 4 : changes #

Messages

Total messages: 12 (2 generated)
allada
PTL
3 years, 10 months ago (2017-02-25 00:26:27 UTC) #3
allada
ping
3 years, 9 months ago (2017-03-03 23:59:57 UTC) #4
luoe
https://codereview.chromium.org/2716983002/diff/40001/third_party/WebKit/Source/devtools/front_end/data_grid/DataGrid.js File third_party/WebKit/Source/devtools/front_end/data_grid/DataGrid.js (right): https://codereview.chromium.org/2716983002/diff/40001/third_party/WebKit/Source/devtools/front_end/data_grid/DataGrid.js#newcode1340 third_party/WebKit/Source/devtools/front_end/data_grid/DataGrid.js:1340: this._parent = parentNode; Do we need to recalculate depth ...
3 years, 9 months ago (2017-03-06 16:56:40 UTC) #5
allada
PTaL https://codereview.chromium.org/2716983002/diff/40001/third_party/WebKit/Source/devtools/front_end/data_grid/DataGrid.js File third_party/WebKit/Source/devtools/front_end/data_grid/DataGrid.js (right): https://codereview.chromium.org/2716983002/diff/40001/third_party/WebKit/Source/devtools/front_end/data_grid/DataGrid.js#newcode1340 third_party/WebKit/Source/devtools/front_end/data_grid/DataGrid.js:1340: this._parent = parentNode; On 2017/03/06 16:56:40, luoe wrote: ...
3 years, 9 months ago (2017-03-06 18:18:32 UTC) #6
allada
friendly ping @ caseq.
3 years, 9 months ago (2017-03-08 02:44:35 UTC) #7
caseq
So does this imply that current way of invalidating depth within insertChild() does not work? ...
3 years, 9 months ago (2017-03-09 00:13:49 UTC) #8
allada
On 2017/03/09 00:13:49, caseq wrote: > So does this imply that current way of invalidating ...
3 years, 9 months ago (2017-03-09 00:38:13 UTC) #9
caseq
On 2017/03/09 00:38:13, allada wrote: > > The reason I did it this way is ...
3 years, 9 months ago (2017-03-09 00:49:12 UTC) #10
allada
On 2017/03/09 00:49:12, caseq wrote: > Ah, I see... Can we do it in a ...
3 years, 9 months ago (2017-03-09 01:41:20 UTC) #11
caseq
3 years, 9 months ago (2017-03-13 20:31:02 UTC) #12
On 2017/03/09 01:41:20, allada wrote:
> On 2017/03/09 00:49:12, caseq wrote:
> > Ah, I see... Can we do it in a less invasive manner? For example, any parent
> > changes seem to be done through detaching/attaching the node, so perhaps we
> > could move _depth invalidation into DataGridNode._attach()?
> 
> Yes, I could and don't have any major issue doing so, I am simply trying to
> slowly pay off technical debt. "parent" should not be changed outside one of
> the extending classes (much like "_dataGrid") so normalizing this field while
> I needed it changed anyway seemed like the more appropriate thing to do.

As discussed offline, let's extract logical tree structure management (i.e.
next/prev/parent etc) into separate methods in DataGrid and make sure these are
re-used in derived classes.

Powered by Google App Engine
This is Rietveld 408576698