Trevor Parscal
02592b3ec0
More cleanup
2012-03-09 22:55:49 +00:00
Trevor Parscal
60c9c484aa
More cleanup (jshint complaints)
2012-03-09 22:51:00 +00:00
Trevor Parscal
ce824d6299
Cleanup
2012-03-09 22:45:22 +00:00
Inez Korczynski
4bc7dbbe5e
Initial import of CursorObserver and ContentObserver (not being used yet).
2012-03-09 22:18:24 +00:00
Trevor Parscal
2f9fcde16e
Removed duplicate static methods and members that were copied to ve.dm - lets just leave them in ve.dm.DocumentNode for now.
2012-03-09 21:54:00 +00:00
Trevor Parscal
15b3515a1b
Updated QUnit
2012-03-09 21:50:24 +00:00
Roan Kattouw
b13d0a849d
Add a check for the length of unwrapOuter, and add a test for each
...
exception
2012-03-09 01:44:31 +00:00
Roan Kattouw
bc600b34be
Make prepareWrap() use the data from the model rather than the unwrap
...
parameters. This fixes the case where rolling back a list unwrap would
restore the list items without their attributes
2012-03-09 01:14:41 +00:00
Roan Kattouw
04910777d9
Fix stupid typos so wrapEach actually works
2012-03-09 00:38:34 +00:00
Roan Kattouw
ab26581b2e
Fix cursor adjustment in replace()
2012-03-08 23:21:28 +00:00
Roan Kattouw
5054ed320e
Implement prepareWrap and add tests for it
2012-03-08 23:21:26 +00:00
Roan Kattouw
9b66749575
Add documentation for to-be-written prepareWrap function
2012-03-08 23:21:24 +00:00
Roan Kattouw
d978797fca
Add a very simple transaction builder for content replacements
2012-03-08 23:21:21 +00:00
Roan Kattouw
cac9971299
Implement the replace operation for the linear model
2012-03-08 23:21:20 +00:00
Roan Kattouw
46dbb30b7a
Factor the batched splice code out from ve.insertIntoArray() into a
...
separate function
2012-03-08 23:21:18 +00:00
Roan Kattouw
93deba7b5c
Add replace operation
2012-03-08 23:21:17 +00:00
Trevor Parscal
becb1daa39
Added more tests for ve.dm.DocumentSynchronizer and fixed some bugs along the way
2012-03-08 19:35:51 +00:00
Gabriel Wicke
ffc9383096
Temporary fix for template tokenization, especially needed for
...
[[Template:Cite core]].
2012-03-08 14:24:04 +00:00
Alexandre Emsenhuber
62e8312535
svn:eol-style native
2012-03-08 12:27:02 +00:00
Gabriel Wicke
39017dd769
Percent-encode spaces in URLs, so that they are recognized as valid URLs later
...
on.
2012-03-08 11:53:15 +00:00
Gabriel Wicke
7518db8197
A few fixes to parser functions and template expansion. Trim whitespace off
...
template arguments, let the last duplicate key win and fake pagenamee slightly
better.
2012-03-08 11:44:37 +00:00
Gabriel Wicke
51023feaa4
Improvements for image option handling.
2012-03-08 10:03:22 +00:00
Gabriel Wicke
b1e131d568
A bit more documentation and naming cleanup in the tokenizer wrapper.
2012-03-08 09:00:45 +00:00
Trevor Parscal
459c4fa271
Added some basic tests for resize and insert. Fixed some bugs in both of those code paths along the way.
2012-03-08 00:52:30 +00:00
Trevor Parscal
de0f83643b
Typo in file name
2012-03-07 23:48:58 +00:00
christian
df4f017b21
preserve range after applying annotation
2012-03-07 23:35:38 +00:00
Inez Korczynski
ab496f7bc9
Get rid of showCursorAt method. And replace calls to it with calls to showCursor.
2012-03-07 23:33:41 +00:00
Inez Korczynski
8e56acbaca
Added getDOMNodeAndOffset and showSelection methods to Surface. Ohhh and little wrapper around it - showCursor.
2012-03-07 23:32:26 +00:00
christian
76b7127e29
removing usage of rangy anchornode for determining rendering scope - using model and autoRender
2012-03-07 21:41:53 +00:00
Inez Korczynski
73f53e89c6
Small refactoring. Changed method name, from Surface.getSelection to Surface.getSelectionRange.
2012-03-07 21:37:39 +00:00
christian
22ce25dc69
replacing cursor after annotating works
2012-03-07 21:06:07 +00:00
Trevor Parscal
55cf0c8ada
Added sketch for ve.dm.DocumentSynchronizer which is a utility object for queueing up actions to be performed on the model tree such as deletion, insertion, rebuilding, resizing and updating of node. Using this approach, we can collect actions across multiple steps, and then normalize them to avoid duplicate work and mutate the model tree in a single step.
2012-03-07 20:21:32 +00:00
Gabriel Wicke
f02ff95aa3
Token representation clean-up. Now all tokens are differentiated using
...
constructors instead of type attributes.
2012-03-07 20:06:54 +00:00
Rob Moen
0520e64d97
port over annotation methods from ES to CE, remove unused renderDomNode method
2012-03-07 19:37:17 +00:00
Rob Moen
73fbbe29ab
cleanup whitespace
2012-03-07 19:33:00 +00:00
Gabriel Wicke
f157093a41
Delegate responsibility for resetting the token rank to transforms, if full
...
re-processing in a phase is wanted. By default, after a token type change or
the return of multiple tokens only the remaining transforms with higher ranks
are applied.
Updated a few comments as well.
2012-03-07 19:29:53 +00:00
Gabriel Wicke
1f8c43b9e2
A few minor documentation updates.
2012-03-07 18:42:26 +00:00
Gabriel Wicke
5f618103d7
Set allTokensProcessed flag for async callbacks from the template expander.
2012-03-07 17:36:33 +00:00
Gabriel Wicke
e5a1116817
Start re-transformation as soon as possible in TokenAccumulator._returnTokens
...
to maximize IO concurrency. Signal that all tokens are fully transformed to
callbacks called from TokenAccumulator._returnTokens. The result should be a
single re-transformation when entering the callback chain, and only if the
transform does not signal that it took care of full transformation itself.
Template expansion would set this flag, as the nested transform pipeline
processes all tokens to the end of phase async12.
2012-03-07 16:29:06 +00:00
Gabriel Wicke
656524dbbc
Fixes for multi-transformer expansion in AsyncTransformManager. Added argument
...
to callback which lets transforms indicate if their returned tokens are fully
processed for their phase. If not, the callback re-processes them so that any
remaining transforms are applied.
2012-03-07 15:39:18 +00:00
christian
816a6717a6
adding autoRender property to SurfaceView to enable/disable automatic rendering of view when model is updated
2012-03-07 08:13:12 +00:00
Trevor Parscal
a82ddeae51
Fixed some jshint complaints and enforced 100char line endings
2012-03-06 23:51:31 +00:00
Inez Korczynski
2e9ab44719
Update class names, from ve.es to ve.cs, and update code that uses those classes
2012-03-06 22:39:43 +00:00
Inez Korczynski
594a0e6d6c
Rename bunch of files from ve.es.* to ve.ce.* (and update references)
2012-03-06 22:35:42 +00:00
Inez Korczynski
8dcd638249
Copy files from ve/es to ve/ce and update references
2012-03-06 22:31:44 +00:00
Gabriel Wicke
af03eb4f29
Improve generic attribute expansion before external link processing, and make
...
wgUploadPath configurable. Also change the hard-coded fall-back image sizes to
sensible defaults. This breaks three parser tests until image size retrieval
from the wiki is implemented.
2012-03-06 18:02:35 +00:00
Gabriel Wicke
227103e12c
Accept empty table cell attribute sections, and consider percent-encoded %2525
...
valid. 270 tests passing.
2012-03-06 14:32:45 +00:00
Gabriel Wicke
2efcd3cd57
Reworked percent encoding handling for URIs to get closer to the 'url
...
construction' part of the HTML5 spec:
http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#url-manipulation-and-creation
Removed a few whitelisted test cases that are now passing directly.
The encoding canonicalization could also be moved to the Sanitizer. Doing this
early in token stream processing however has the advantage of providing further
transformations uniform data to work with. We could even consider to move this
even further into the tokenizer.
2012-03-06 13:49:37 +00:00
Rob Moen
809df81282
enable CE demo toolbar, added annnotation and renderDomNode methods
2012-03-05 22:08:35 +00:00
Gabriel Wicke
19fe9726a2
Fix invalid external link representation. 268 tests passing.
2012-03-05 18:06:29 +00:00