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
bzimport raised the priority of this task from to Normal.
bzimport set Reference to bz73569.
Catrope created this task.Nov 18 2014, 7:18 PM

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 Normal to Low.Sep 16 2015, 11:54 PM
Jdforrester-WMF removed Esanders as the assignee of this task.
Jdforrester-WMF set Security to None.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 16 2015, 11:54 PM