Last modified: 2014-11-18 19:58:59 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T75569, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 73569 - VisualEditor: Calling buildNodeTree() manually should not be needed
VisualEditor: Calling buildNodeTree() manually should not be needed
Status: ASSIGNED
Product: VisualEditor
Classification: Unclassified
Technical Debt (Other open bugs)
unspecified
All All
: Normal normal
: ---
Assigned To: Ed Sanders
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-11-18 19:18 UTC by Roan Kattouw
Modified: 2014-11-18 19:58 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Roan Kattouw 2014-11-18 19:18:10 UTC
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();
Comment 1 Ed Sanders 2014-11-18 19:58:59 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links