Trevor Parscal
e34ec4b479
Added canHaveChildren and canHaveGrandchildren to all nodes
...
Change-Id: Ibe53292f7269736750e03da49e5bb5913c0124ab
2012-05-04 17:50:54 -07:00
Trevor Parscal
1d74945dfc
Fixes for Roan's crazy half-baked commit
...
Change-Id: Ic104debc3a941e4cf8e4dca19633dcad04a0fe0a
2012-05-04 16:13:54 -07:00
Christian Williams
28eb0c82e5
Adding HTML DOM -> Linear Model converter
...
Change-Id: Iae109d75e64321a7fe4ee8492d79ef5481716246
2012-05-04 15:47:41 -07:00
Catrope
d11af2b687
Queue and deduplicate events in DocumentSynchronizer
...
Change-Id: I90577cd078c3d0b6706f5f827b66b46a450e7086
2012-05-04 15:42:35 -07:00
Rob Moen
d42e738636
- Optimize surface model and write unit tests
...
Change-Id: I8de24c840c5aa2d4232e6e2cc5f72cbd30be96b4
2012-05-04 15:29:47 -07:00
Inez Korczynski
0562d83f2f
Merge branch 'dmrewrite' of ssh://review/mediawiki/extensions/VisualEditor into dmrewrite
2012-05-04 15:20:47 -07:00
Inez Korczynski
bab1a9672c
Fix method getDocument in dm.Surface and start using it
...
Change-Id: I613b1e938cd0d8f3a6ac8a48121901287c8fc5af
2012-05-04 15:20:14 -07:00
Catrope
2baeb5532d
Initial stab at DocumentSynchronizer
...
Change-Id: I7176fd7235a82a6314bf431d00870d9ddb40f370
2012-05-04 15:18:07 -07:00
Trevor Parscal
dc27d8acb4
Refactored dom wrapper functionality in ce nodes
...
* Moved implementation of getting and updating a DOM wrapper to ve.ce.BranchNode
* Updated ve.ce.BranchNode tests
* Renamed ve.NodeFactory.createNode to ve.NodeFactory.create
* Added ve.NodeFactory.lookup which gets the constructor of a type
* Added attribute pass-through to ve.dm.BranchNodeStub
Change-Id: I8f5b7d3d3ae616cc5f39828b24b655163d782ae5
2012-05-04 13:31:14 -07:00
Trevor Parscal
d2480baed0
Removed bubbling update events in dm and ce node trees and splice events from ce branches
...
The bubbling update events are not needed with ce or dm, but were once upon a time useful for es, this just eliminates some unused cruft that was costing extra function call overhead.
Change-Id: Ia16d0f4cd74c84cded5caecada33ee83d0882f30
2012-05-04 12:28:32 -07:00
Trevor Parscal
9887dbd96f
Split Broke DefinitionListNode out of ListNode and DefinitionListItemNode out of ListItemNode
...
* Makes it simpler in the linear model because we don't have to use style: "item" for regular list items and style: "definition" for definition lists
* Enforces correct nesting through existing node rules systems
* Updates tests accordingly
Change-Id: I64d80af938e325f1961226505bdc386bb35ccdda
2012-05-04 11:56:32 -07:00
Catrope
11a3b6886b
Implement basic replace processor
...
* Implement basic TransactionProcessor.replace(), only does content
replacements
* Add ve.dm.Document.containsElementData()
* Fix bug in attribute()
* Write basic tests for attribute() and replace()
Change-Id: Ie9c22aec3f2631be5b0bd66790408ad283565491
2012-05-04 11:09:10 -07:00
Trevor Parscal
a9b26c8b55
Removed recursive rendering calls in favor of 100% event driven updates
...
Change-Id: I636222518e4cbeddb1c02901b79a9dcb09eeb952
2012-05-03 17:19:01 -07:00
Rob Moen
014084fc65
- fix demo styling for docs list
...
Change-Id: I5e5d16fe9a002e3cafd01138ad9b92ff987178d6
2012-05-03 16:27:28 -07:00
Rob Moen
0cd31fba2e
rename surfaceModel to model in ce.Surface
...
Change-Id: I5d49915b4645464729ab1e4552982cbd38f712b1
2012-05-03 16:14:54 -07:00
Rob Moen
b05347ac4e
removed margin-top for documentNode
...
Change-Id: I6e888ca858bc2d9e6772150715b10ab157f84b46
2012-05-03 16:07:51 -07:00
Rob Moen
bead2050b9
Merge branch 'dmrewrite' of ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor into dmrewrite
2012-05-03 16:04:47 -07:00
Rob Moen
da65ad48c8
- extend surface model and surface view with event emitter
...
- added surface view base methods
- enabled toolbar in ve.Surface
Change-Id: Ib6a62ef2509712f812f262283c45bb30c8f97ef1
2012-05-03 16:02:21 -07:00
Christian Williams
99e841d31a
Making document contenteditable
...
Change-Id: If79bb8c69431e07de2a42cc5b565b3093c29c4cd
2012-05-03 15:42:02 -07:00
Inez Korczynski
1ecb762d35
Merge branch 'dmrewrite' of ssh://review/mediawiki/extensions/VisualEditor into dmrewrite
...
Conflicts:
modules/ve2/ve.Surface.js
Change-Id: I1c81426203f01fa2f698819bf6c63a3afd1239c9
2012-05-03 15:02:04 -07:00
Inez Korczynski
d01d27cc09
Get more tags/nodes working in the demo
...
Change-Id: I5335fbbe15d010a73a06f24bc56ebb3c3c6bd2d7
2012-05-03 15:00:34 -07:00
Rob Moen
cdcca3eeb2
Move linearModel object into sandbox.js
...
Change-Id: Ia87e6fb13abab31f14f997f8ba7a9b631f6fb667
2012-05-03 14:27:36 -07:00
Rob Moen
56dff6dacb
Added new node types
...
Change-Id: I6b5f2e5a7dbdb7c59b4799d44f7924c5594c0e34
2012-05-03 14:22:09 -07:00
Inez Korczynski
6224c60075
Rendering works in very basic version
...
Change-Id: I8789860fe82f2e7db1e503889e20ce51de57bfa2
2012-05-03 14:02:35 -07:00
Inez Korczynski
06ca808b65
Missing keyword: new
...
Change-Id: Id65d30d702e991620e0d454fa000c438f4738b41
2012-05-03 13:32:23 -07:00
Rob Moen
7bcb65e036
- Port surface constructor into dmrewrite.
...
- Create document model object linear model instead of wikidom
Change-Id: I16307c290ead3e4b29dfbd1b76759e4c19c3fc8b
2012-05-03 13:23:21 -07:00
Trevor Parscal
7b7ff5a503
Added ve.dm.Surface, ve.ce.Surface, ve.ce.Document
...
Change-Id: I382730e1a9f1abcb4b42499267c8dcaf76fc64e1
2012-05-03 13:21:13 -07:00
Trevor Parscal
b1b9fb5133
Added tests for getDataFromNode
...
Change-Id: Ic762832dcdda3bdaf92dbd989659235fdff73596
2012-05-03 13:11:36 -07:00
Inez Korczynski
619f10108c
Minor fixes to getHtml method in TextNode
...
Change-Id: I53c873b6e307d53cc87c2e111ab99f694972b17b
2012-05-03 11:11:46 -07:00
Inez Korczynski
a1db1537ad
Minor fixes to getHtml method in TextNode
...
Change-Id: I4d0b1a0295071ead413d68945310d3a4ef6fe7e4
2012-05-03 10:11:39 -07:00
Inez Korczynski
09c7393901
Minot fix
...
Change-Id: If10f9135f9bf33af17be6f8a2db59433d9898944
2012-05-02 22:32:34 -07:00
Inez Korczynski
a3b32b6615
Big refactoring to TextNode to make it work with new format of storing
...
annotations.
Change-Id: If84fcfdd04ff42e9b2449e1c8186d64fec4fb1ac
2012-05-02 22:28:57 -07:00
Inez Korczynski
9f11f437d2
Merge branch 'dmrewrite' of ssh://review/mediawiki/extensions/VisualEditor into dmrewrite
2012-05-02 19:29:49 -07:00
Inez Korczynski
d81b972cdf
Very dirty but working version of getHtml method for TextNode (with bunch
...
of tests that are passing now).
Change-Id: Ie76bd59bc0a5e10e2a3b3e014b2d0e4701fcc368
2012-05-02 19:29:03 -07:00
Trevor Parscal
64d56971a9
Removing unused code
...
Change-Id: I23213531eeef95110d0a3d1e2476449c580b55b7
2012-05-02 17:05:22 -07:00
Trevor Parscal
b7b2fc1179
Made render for ce leaf nodes abstract and added a test for it
...
Change-Id: Iee228d5f1a18a5c9618680fa81ab132a85472fa6
2012-05-02 15:59:43 -07:00
Trevor Parscal
947c3ddf22
Fixed incorrect class name for method typo
...
Change-Id: I82390896ef7136bfc8ed8734d8bd9014e756af5e
2012-05-02 15:59:15 -07:00
Trevor Parscal
d412c8c159
Removed unused method (using factory instead)
...
Change-Id: I0ed9260d261b7e4c19e5d57f70331aef1a341cdf
2012-05-02 15:58:40 -07:00
Trevor Parscal
16e12debdc
Added ve.getHash and ported ve.Json
...
Change-Id: I4a5d86426902e0473cdb0f98c3d121eed607f93c
2012-05-02 15:23:01 -07:00
Inez Korczynski
ff40652099
Get rid of range parameter in ve.ce.TextNode.prototype.getHtml as it is
...
not being used anyway.
Change-Id: I7c54d35001fa0db6d7ab9d12f35ab2d841016f0d
2012-05-02 14:21:41 -07:00
Inez Korczynski
dd6094842e
Created a test file for ve.ce.TextNode and fixed some minor issues.
...
Change-Id: Ifbf6b7ba2a27eedf6d5d4f6cb06b98c38eb52c5b
2012-05-02 14:18:02 -07:00
Trevor Parscal
b4313ae262
Moved getOffsetFromNode to ve.dm.BranchNode
...
* Also updated a call to getOffsetFromNode in ve.dm.Document
Change-Id: Ief8f9e532e39cd1051d7f3b6df6ed341747098e5
2012-05-02 14:06:35 -07:00
Trevor Parscal
fd28fff50f
Added test for replaceDomWrapper and onSplice in ve.ce.BranchNode
...
* Also fixed calls to addListenerMethod
* Also routed adding children in the constructor of ve.dm.BranchNode to the splice method
* Renamed types of ve.dm stub nodes to avoid collisions (since we have to register ce nodes by the same names for them to be generated by onSplice)
Change-Id: Ia2e75cf0a62186cc0e214683feb25c619590318a
2012-05-02 13:58:50 -07:00
Trevor Parscal
8bd0d385eb
Added test for whitespacePattern, getDomText and getDomHash in ce
...
* Also fixed some naming typos in the units under test
Change-Id: I17f753a122f94dd16f7783f60b5c0eb1c6d3e480
2012-05-02 12:54:42 -07:00
Trevor Parscal
fee375cf4e
Removed global variable introduction
...
Change-Id: I331b19cafeb20610f7b42bacaff20757a342dffc
2012-05-02 12:37:30 -07:00
Trevor Parscal
676ffa4dbc
Ported getDomText and getDomHtml from ve to ve2
...
Change-Id: I3547d95c2749543eae745722ceddaa0a969e4e80
2012-05-02 12:28:27 -07:00
Trevor Parscal
1d94af144a
Added update handlers to heading, list, list item and image ce nodes
...
* Also renamed convertDomElement to replaceDomWrapper in ve.ce.BranchNode
* Also added extra documentation for node rules
Change-Id: Ia8ac6be34e2b021be96974ac1ba9119bd8077d60
2012-05-02 11:30:37 -07:00
Trevor Parscal
94f53dc6c7
Made text nodes not rely on a wrapper
...
By using this.$ as a selection of contiguous top-level nodes (text or otherwise) we can avoid wrapping each text node in a span
Change-Id: I141c2df8f13646db3fff0da93d218c2dcf154c8a
2012-05-02 10:58:14 -07:00
Trevor Parscal
f1505a0e62
Merge remote-tracking branch 'origin/master' into dmrewrite
...
Change-Id: I43a3cd999ec0a5d3d05ee1e5bb71c450d485bc01
2012-05-02 10:17:44 -07:00
Trevor Parscal
158c9f7692
Consolidated before/after attach/detach events
...
Change-Id: I4220715ac4505152fb30ac2d5664a0ffb2b846f5
2012-04-30 19:50:45 -07:00