Commit graph

1815 commits

Author SHA1 Message Date
Trevor Parscal acdd5679ec Finish implementing ve.dm.Converter and document it
* Add code to handle elements and annotations
* Drop support for aliens from getDomElementFromDataElement() and move it into getDomFromData()
* Implement getDomElementFromDataAnnotation()
* Document a few functions

Change-Id: Ic6a418cbf9d7d1ad96299d7d3633970a876c6103
2012-06-07 21:58:56 -07:00
Trevor Parscal cc0c490502 Fix typo in LinkAnnotation
Change-Id: Idfb969a73c59aef1acf54edd61d555cdc295534c
2012-06-07 21:16:55 -07:00
Trevor Parscal f2b3df8027 Cleaned up some useless/unused functions
Change-Id: I6aa5d0ed3d21993ed653ee64b4928ef98874db2d
2012-06-07 15:02:40 -07:00
Rob Moen e1b8f9422d Fix bug in getAnnotationsFromRange where if the range length was 0
it would return no annotations.

Change-Id: Iec33366b2a1249122a21617d6681ae039557c2fe
2012-06-07 14:53:30 -07:00
Christian Williams 244551ff96 Updating model selection after cut and paste
Change-Id: Iefaec5a3d705c6caae76941bc05810152d870bb8
2012-06-07 14:48:46 -07:00
Trevor Parscal 453bec4555 Fixed alienInline and alienBlock conversion (was missing closings)
Change-Id: Ie8e51eb8d9a452c656aebf341071da5627dd80b5
2012-06-07 14:30:06 -07:00
Trevor Parscal fa9fe8b08a Added support for alienInline nodes
Change-Id: I15b9cbcdb66b966dca28edcb26bf5d54a4f17be6
2012-06-07 14:16:19 -07:00
Rob Moen 9fe6658a0e Put getSelectionRect method back in surface view.
Change-Id: Iaec899bec157ef39810d391b2ed51d4f8fe3be9d
2012-06-07 14:13:55 -07:00
Rob Moen 4b940c3b19 Init rangy in case of Toshiba
Annotate button redraws selection after annotation
Added contextView hooks to select listener in toolbar.

Change-Id: I598fe715dd84976862eed63e4f55cb6bc6e75b18
2012-06-07 14:04:39 -07:00
Christian Williams 1f86885d47 Fixing copy and paste
Change-Id: I57ead6a6d831aa739df49960f97cb2f91f672730
2012-06-07 14:03:48 -07:00
Catrope 9cab267911 Fix some JS errors in the ve.ui code
Change-Id: I57057369f56dc20b56231ed4bbe34816c3c718d7
2012-06-07 13:29:14 -07:00
Catrope 3c1de3dc4f Add ve.dm.Document.getBalancedData()
Change-Id: I2420ef5369b9eae053962898b64dd7324e714bbd
2012-06-07 13:17:57 -07:00
Catrope feac2f6069 Factor out element cloning into a getClonedElement() function
Change-Id: Id6024c15d4d9c9141bc4e1afa39fce29992b8647
2012-06-07 13:17:57 -07:00
Translation updater bot 81d53403a8 Localisation updates from http://translatewiki.net.
Change-Id: I29672237acf0ab18963bdd46702b53c675e00b4c
2012-06-07 19:15:00 +00:00
Inez Korczynski 6704b01e30 Merge branch 'dmrewrite' of ssh://review/mediawiki/extensions/VisualEditor into dmrewrite 2012-06-07 11:44:35 -07:00
Inez Korczynski 5c41fa2fb8 Define min-height for P and HX tags - needed when those tags are empty.
Change-Id: I0ba1c950cc06b3ff040c208c1b9a4970b2f73493
2012-06-07 11:44:05 -07:00
Trevor Parscal 18461387c0 Roan officially does not owe the team lunch (at this precise moment)
Change-Id: I90a6198da97ea90f60d9668c21d7386984a03ff0
2012-06-07 11:33:58 -07:00
Inez Korczynski ffd411b5e7 Merge branch 'dmrewrite' of ssh://review/mediawiki/extensions/VisualEditor into dmrewrite 2012-06-07 11:26:48 -07:00
Inez Korczynski 22ebab2fa5 Simplify example document that we are currently using in our sandbox (now
it does not include Alien nodes and Images - because we are not going to
support them for June release).

Change-Id: I229e4b5f2881714252699f23aef164655fa8bcf6
2012-06-07 11:25:40 -07:00
Christian Williams f318d68966 Merge branch 'dmrewrite' of ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor into dmrewrite 2012-06-07 11:17:14 -07:00
Christian Williams 88ae9b0826 Simplified demo HTML (no images or aliens)
Change-Id: If882086eeccf27a55f1ff7ae0d3657c17268c23e
2012-06-07 11:16:56 -07:00
Inez Korczynski 02f913a7db Added accidently removed registrations for events handling.
Change-Id: I6e5df649909b025f7e7aeb35ff9e8ff0b7fcd5f9
2012-06-07 11:10:08 -07:00
Inez Korczynski 97001e1301 Improvements to selection mechanism.
Change-Id: I031dd3493832034c985b15bf213cafe2c4813136
2012-06-07 11:03:22 -07:00
Inez Korczynski 95297a2c73 Delete from ce.BranchNode code that is not needed anymore.
Change-Id: I64f869a9fd54d089d2c6a31d827ddaccb9ece900
2012-06-07 11:02:59 -07:00
Inez Korczynski f711d78d4d Merge branch 'dmrewrite' of ssh://review/mediawiki/extensions/VisualEditor into dmrewrite 2012-06-07 10:58:42 -07:00
Trevor Parscal c8ec9fc6f5 Added a test for removing all the content of a paragraph in the middle of a document
Change-Id: Ibbbc401a6484616dca52133b605d643ba3f810eb
2012-06-07 10:57:03 -07:00
Gabriel Wicke 3f61dc9821 Link talk page separately
Change-Id: Ib839f619e7e14ccf0ef698fc2e780ef4b0d65505
2012-06-07 13:42:05 +02:00
Gabriel Wicke 3549a16085 Add a 'report issue' link below round-trip results
Change-Id: I5e3a785a328af0debcf83dc2038b5e5417fa5158
2012-06-07 13:37:40 +02:00
Gabriel Wicke bec7fb2f8c Mention citations as not round-tripping
Change-Id: I57e25f6f4072bae2f5681b8611e98f899875d1e2
2012-06-07 13:18:44 +02:00
Gabriel Wicke 76cca063ba Add hint on where to support issues in web service entry page
* Explain what we are currently interested in and link to
  :mw:Talk:Parsoid/Todo.

Change-Id: I747c6ee8a021a7a73ec91b73281c1c679a00da8f
2012-06-07 13:16:05 +02:00
Gabriel Wicke 1ca586e5f1 Improve interwiki config a bit
* Moved wikipedia default prefixes to environment
* Added 'addInterwiki' method
* Adjusted link handling normalizeTitle to reflect this

Change-Id: If5b2314cc36346b6da8649ed410457a612d80a22
2012-06-07 12:30:16 +02:00
Gabriel Wicke 2fa5baabbb Make it easier to configure the default wiki, and add support for mediawiki.org
* mw:Foo now loads pages from mediawiki.org
* The default prefix still is 'en'. You can switch this to 'mw' in ParserService.js.

Change-Id: I1208667e6114bd711b7988a8b3adb32ffab70969
2012-06-07 11:50:40 +02:00
Gabriel Wicke b49102281f Remove a few entries we now care about from the whitelist
They are mostly about whitespace, but there is also a debatable quote test
that outputs an empty bold element at the end of the line. We should perhaps
strip this empty bold in the QuoteTransformer, as the preservation of an empty
bold tag in round-tripping does not seem to be too useful.

Change-Id: I1d8f3ebabcd9f6249e5170de420ba52e8aea22ca
2012-06-07 10:04:20 +02:00
Subramanya Sastry b665a2558f Fixed bugs handing/transforming quotes
- Three bugs that were messing up quote transformations.
- Now, the following cases are handled properly:

  * ''foo'''
  * '''foo''
  * ''foo''''
  * ''''foo''

  These tests (and other quote tests) have to be added to core parser
  tests file.

- One more parser test green.

Change-Id: I4f93e8910639f546bfc9304becab17d26d5529de
2012-06-07 01:37:45 -05:00
Christian Williams 51aa317df3 Undo and Redo support
Change-Id: Icdbebccefe3cc162b9ff6c0d978d5e4fc1f2c561
2012-06-06 20:28:06 -07:00
Inez Korczynski d96db8dce7 Merge branch 'dmrewrite' of ssh://review/mediawiki/extensions/VisualEditor into dmrewrite 2012-06-06 18:50:02 -07:00
Catrope d8359da409 Change calls to getElementType() (which doesn't exist) to getType()
Change-Id: I894835a0178beddce480c48917700090b31c80b2
2012-06-06 18:03:55 -07:00
Rob Moen 72ee6bac1a Comment out robs selection test stuff
Change-Id: I251de0935f733915042684d186da57b43bc35c51
2012-06-06 17:50:28 -07:00
Rob Moen 232f2c58f7 Fix linkInspector tool
Change-Id: I89fa17b1a72c3f45bce5a11b49aa5445c5990f68
2012-06-06 17:50:01 -07:00
Trevor Parscal b62beed2e2 Added implementation for ve.dm.Converter.getDataFromDom
Change-Id: I8561d4a00ba630b86fb7bcd3e347fe2c6c2f6aa3
2012-06-06 17:47:27 -07:00
Rob Moen 8db70ed263 Annotation buttons now working
Created new document method to determine if a specific annotation
object is inside an annotation array.

Change-Id: Id645929cbf31030b8b0fcacb8dfb36e61aaad129
2012-06-06 17:06:37 -07:00
Christian Williams 709e81b71a Merge branch 'dmrewrite' of ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor into dmrewrite 2012-06-06 16:29:21 -07:00
Christian Williams 77d5cae575 Consecutive spaces
Change-Id: I3f51ce0a2ee0a78e56c55de94bd45796b400680d
2012-06-06 16:29:02 -07:00
Catrope 3383dc9011 Delete old ApiQueryParseTree module, unused
Change-Id: Ib39ce97a44fe63a8f38efc4935a215b5d2b854fa
2012-06-06 16:11:29 -07:00
Catrope 41684c704a Quick hack to make Parsoid URL configurable
Change-Id: Id314ee13f4e7cc3d0efa3f55d89165acf79109f0
2012-06-06 16:08:41 -07:00
Catrope f34b41fe3f Add a test case for a complex removal
Change-Id: I9e57bf2f1381b1da196308f1cd27c9be58bf8509
2012-06-06 15:36:08 -07:00
Catrope 5e47bdc57f Maintain a transaction-wide offset adjustment
This fixes a bug where the second replace operation in a transaction
would cause the rebuild of the wrong range, or the adjustment of the
wrong text node.

Change-Id: I9b1c68d84999d538fe10bb193f4dfdd694121d2a
2012-06-06 15:34:55 -07:00
Catrope 02b19f337f Add zero-length text nodes to empty content nodes
This is needed to make the results of certain transactions' tree sync
round-trip cleanly through the ve.dm.Document constructor

Change-Id: I2ab0758ec6bd7afba5b6645c7330f9fa2d45205d
2012-06-06 15:33:42 -07:00
Translation updater bot 42daebe50a Localisation updates from http://translatewiki.net.
Change-Id: Ieb79571c97e1158414ecccbc8d5e984382f2cce5
2012-06-06 20:19:14 +00:00
Catrope ae3d31d447 Shallow-copy annotation objects in HTMLConverter
This fixes an annotation contamination issue that was causing Rob's
tests to throw exceptions

Change-Id: Ic5171d600b0b2ff97cc569e1e6f9488fab177c7c
2012-06-06 12:21:01 -07:00