mediawiki-extensions-Visual.../modules/ve/test
Catrope 3035c311ec Make the converter work with full HTML documents rather than fragments
The Parsoid output will also be expected to be a full HTML document. For
backwards compatibility, we allow for the Parsoid output to be a
document fragment as well. We don't send a full document back yet, also
for b/c -- we'll change this later once Parsoid has been updated in
production.

ve.dm.Converter.js:
* Make getDataFromDom() accept a document rather than a node
** Split off the recursion (which does use nodes) into its own function
** For now we just convert the <body>. In the future, we'll want to do
   things with the <head> as well
* Pass the document around so we can use it when creating elements
* Make getDomFromData() return a document rather than a <div>

ve.init.mw.Target.js:
* Store a document (this.doc) rather than a DOM node (this.dom)
* Pass around documents rather than DOM nodes
* Detect whether the Parsoid output is an HTML document or a fragment
  using a hacky regex
* When submitting to Parsoid, submit the innerHTML of the <body>

ve.init.mw.ViewPageTarget.js:
* s/dom/doc/
* Store body.innerHTML in this.originalHtml

ve.Surface.js:
* s/dom/doc/

demos/ve/index.php:
* Don't wrap HTML in <div>
* Pass HTML document rather than DOM node to ve.Surface

ve.dm.Converter.test.js:
* Construct a document from the test HTML, rather than a <div>

ve.dm.example.js:
* Wrap the HTML in the converter test cases in <body> tags to prevent
  misinterpretation (HTML fragments starting with comments, <meta>,
  <link> and whitespace are problematic)

Change-Id: I82fdad0a099febc5e658486cbf8becfcdbc85a2d
2013-02-19 10:38:39 -08:00
..
ce Change the HTML attribute prefix from html/ to html/0/ 2013-02-06 12:00:43 -08:00
dm Make the converter work with full HTML documents rather than fragments 2013-02-19 10:38:39 -08:00
init JSDuck: Generated code documentation! 2013-01-05 01:16:32 +01:00
image.png Losslessly compress png images 2012-08-18 23:12:44 +01:00
index.php Add user interface widgets 2013-02-13 18:04:04 -08:00
ve.BranchNode.test.js JSDuck: Generated code documentation! 2013-01-05 01:16:32 +01:00
ve.Document.test.js JSDuck: Generated code documentation! 2013-01-05 01:16:32 +01:00
ve.example.js JSDuck: Generated code documentation! 2013-01-05 01:16:32 +01:00
ve.Factory.test.js JSDuck: Generated code documentation! 2013-01-05 01:16:32 +01:00
ve.LeafNode.test.js JSDuck: Generated code documentation! 2013-01-05 01:16:32 +01:00
ve.Node.test.js JSDuck: Generated code documentation! 2013-01-05 01:16:32 +01:00
ve.qunit.js Added tests and fixed inconsistencies for empty text node handling 2013-01-29 15:13:17 -08:00
ve.Range.test.js JSDuck: Generated code documentation! 2013-01-05 01:16:32 +01:00
ve.test.js Add ve.createDocumentFromHTML() 2013-02-19 10:30:25 -08:00
ve.Trigger.test.js Trigger refactor 2013-01-28 17:06:13 -08:00