Page MenuHomePhabricator

VisualEditor: Calling buildNodeTree() manually should not be needed
Open, LowPublic

Description

We explicitly call buildNodeTree() in a few places. Ideally, we would not need to do this outside of ve.dm.Document.

Suspect calls (excluding dm.Document, excluding tests):

lib/ve/src/ce/ve.ce.Surface.js
1000: doc.buildNodeTree();
1711: doc.buildNodeTree();


Version: unspecified
Severity: normal

Details

Reference
bz73569

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:51 AM
bzimport added a project: Technical-Debt.
bzimport set Reference to bz73569.

The node tree is lazily evaluated by buildNodeTree the first time you call getDocumentNode. In the examples your provide (paste and drag-drop) we call buildNodeTree after sanitisation has occurred, as sanitisation happens on the data model array.

Jdforrester-WMF lowered the priority of this task from Medium to Low.
Jdforrester-WMF set Security to None.