Commit graph

1619 commits

Author SHA1 Message Date
Trevor Parscal bcf93eb695 Automatically bind and unbind context's window event bindings on documentNode focus and blur
Change-Id: Ie43165da49a36a7d0d13a52318d9c5438dad9605
2012-06-20 12:34:20 -07:00
Trevor Parscal 7a1d74fd18 Change state variable so updates work more than once
Change-Id: I7c701761b09e96e01e26164080d22cafe43019e0
2012-06-20 12:28:01 -07:00
Catrope 427406a0bc After creating a page, refresh the page rather than going back
We can't go back in this case because the action tabs etc. will be wrong

Change-Id: I8e26c43b7735ea8a2ef010bd4141f0ee8d4b1c68
2012-06-20 12:16:27 -07:00
Gabriel Wicke e8c517e48e Merge "Improve preformatted text handling" 2012-06-20 19:08:48 +00:00
Catrope 9f5f43f18a Fix residual selectNodes() breakage from fc4ba3019a
Change-Id: Icc317eab71d4e360905e902a0ae7cc88deab4cbe
2012-06-20 11:39:20 -07:00
Rob Moen b9eb06349f Switch path from ve2 to ve help with Dmrewrite merge
Change-Id: I8fbbfcb3e47a9319398af7262effc1f7cf3df51f
2012-06-20 10:49:00 -07:00
Gabriel Wicke 344fac19b5 Improve preformatted text handling
* Don't escape html-syntax pre content for now; Should parse this with a new
  pre content production later (which needs to be split out of the regular pre
  production in the tokenizer)
* Protect indent-pre content from start-of-line syntax escaping
* Preserve extra leading spaces in the tokenizer
* Two more (now 284) round-trip tests are passing

Change-Id: I199b89c0ee7fae12546df10c1b5117c97caccac5
2012-06-20 19:28:34 +02:00
Gabriel Wicke 6054a4aa14 Clean up serializer newline handling a bit further
Queued newlines and new trailing newlines were not cleanly separated so far,
which caused some trailing newlines to be consumed for needed leading
newlines. This change fixes several newline bugs, taking the number of passing
round-trip tests from 276 back up to 282.

Change-Id: Idb4706e15ce71e63085033e3f3f29557915c11a8
2012-06-20 16:31:39 +02:00
Gabriel Wicke 2426901e5b Fix definition lists with multiple dds
Fixed a bug in the list handler for multiple dds in a definition list. Also
fixed a few JSHint warnings.

Change-Id: I3e883786698a9521347fc2a5e6420646318813a7
2012-06-20 15:34:20 +02:00
Gabriel Wicke c9d3db8f34 Fix a few round-tripping and list issues
At least partly fixes some bugs in
http://www.mediawiki.org/wiki/Parsoid/Bug_test_cases. 276 round-trip tests are
passing.

* Fixes
  http://www.mediawiki.org/wiki/Parsoid/Bug_test_cases#extra_newline_after_empty_dd,
  except for lost newline in 'working' example before next heading
* Fixes newlines in definition lists
  (http://www.mediawiki.org/wiki/Parsoid/Bug_test_cases#dd_indentation etc),
  but does not fix missing / incorrect bullets for those

Change-Id: I21f66e265e43e1d1a4c7da70984a9984b8e6d0dd
2012-06-20 13:53:47 +02:00
Catrope c97d0a5d9e Merge branch 'dmrewrite'
This merges essentially all editor development in the past two months

Change-Id: I2c8653effc4dbb01a6b99a2ac2b87d83fbafa405
2012-06-19 18:28:49 -07:00
Catrope 6afed5e5cc Move ve2/ back to ve/
Change-Id: Ie51d8e48171fb1f84045d1560ee603cee62b91f6
2012-06-19 18:20:28 -07:00
Catrope fc4ba3019a Fix selectNodes() bug: empty range at the start of a node returned []
Because of the end>=left condition, the loop was exiting right before
hitting the startBefore case, so use end>=left-1 instead.

Fixing this exposed another bug that caused nodeRange and nodeOuterRange
to be off by one: we need to increment left after storing it in
startOffset, not before

Change-Id: I54e18fb2119c8caefb4f7a7f2be43c6129afc4c0
2012-06-19 17:12:36 -07:00
Gabriel Wicke b94cad47dc Fix single-line mode for nested lists
Known issue: breaks round-tripping of :;;;::. That test is normally disabled
anyway, so we can fix it later.

Change-Id: I7954271311bfb7e71caae59d8177e3f04a9ebbca
2012-06-20 01:48:52 +02:00
Catrope 39dbbf9455 Merge branch 'dmrewrite' of ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor into dmrewrite 2012-06-19 16:19:00 -07:00
Catrope dc3be737b4 Merge remote-tracking branch 'origin/master' into dmrewrite
Conflicts:
	VisualEditor.i18n.php
	api/ParserService.js
	modules/parser/mediawiki.WikitextSerializer.js

Change-Id: I47b299ff3a6d948dcbeaf53cde5786362b23f66c
2012-06-19 16:16:53 -07:00
Trevor Parscal babb636058 Cleanup
Change-Id: I4af98700e5c4739d749ec95abc111710208d2177
2012-06-19 16:08:14 -07:00
Catrope 61f4a8af78 Update the code to account for the fact that sHref is now a string
and update tests to reflect the recent changes in link handling

Change-Id: Ie1a3e409c22c09f104c244b1db4764fd202fc885
2012-06-19 16:04:07 -07:00
Catrope b6ad91655d Make external links (mostly) work
This handles internal and external links separately, only setting
'title' for the former and only 'href' for the latter.

On the way out, detect external links using a simple regex (needs
improvement). Also don't write sHref any more per Gabriel's request.

Change-Id: Ibc2436d0a12de1d027e116f181db640cbcf3d522
2012-06-19 16:04:07 -07:00
Catrope a80dcf84c6 Prevent the newline hacks from adding newlines before a link
We might be able to get rid of these altogether but I'd rather not touch
this too much for now

Change-Id: I0b55af017df7d9dc023b2d23ecd4f891cb75946b
2012-06-19 16:04:07 -07:00
Catrope 980ae78861 Prevent the converter from creating empty list items
Change-Id: Iae7d5d791d09400f7d3d799043efe6b8714465ec
2012-06-19 16:04:07 -07:00
Trevor Parscal 268e793b03 Fixed class names to match what's in the DOM now, fixes inspector positioning
Change-Id: I0e15c4a9a50b5894a31b1d37251adb3fd4893539
2012-06-19 15:47:17 -07:00
Gabriel Wicke 33dc9abb0d Clean up sHref handling a bit
* sHref is now always a string
* fixes crasher when sHref is not set

Change-Id: If5756948ac6bc26c2d7c04d970b5aba5331cb8bb
2012-06-20 00:34:57 +02:00
Trevor Parscal ba88697145 Remove the context menu stuff when tearing down
Change-Id: I7332d449e428aeec8952f7c70d325db7c5d5366a
2012-06-19 15:32:22 -07:00
Trevor Parscal c39577a06c Made context menu not open after selection ends over top of it
Also fixed some of the positioning to stay correct while scrolling and resizing a window

Change-Id: I40d57b4fb035aea0b43b998251a93a83a46b9735
2012-06-19 15:26:37 -07:00
Gabriel Wicke e117f09362 Wikitext escaping and quite complete source range tracking
* Started to add more complete tag source range (tsr) annotations to most
  start / empty tags. These replace the old sourcePos and sourceTagPos
  annotations, and look more promising for general round-tripping than block
  source ranges (bsr). See
  http://www.mediawiki.org/wiki/User:GWicke/Parsoid_source_ranges for some
  notes on this.
* Added an escapeWikitext method in the serializer that tokenizes supposedly
  text-only content from the DOM with the tokenizer and wraps runs of returned
  non-text tokens into nowiki tags. The source corresponding to non-text
  tokens is retrieved using the tsr annotations.
* Removed old (unused) table productions to avoid confusion.
* 276 round-trip tests are passing, vs. 283 without escaping.

Known issues:
* harmless for now, can be improved later: urllinks in external link captions
  are wrapped in nowiki. Example HTML:

<a rel='mw:extLink' href="http://example.com">http://example2.com</a>

* some start-of-line syntax in wiki-syntax preformatted blocks might be
  wrapped into nowiki when that would not really be needed. Example HTML DOM:

<pre>
* foo
* bar
</pre>

Change-Id: I01c34aedd5c566614d36924add47a6a960e91987
2012-06-19 23:36:44 +02:00
Rob Moen 89df02cdb6 remove on transact proxy as only listening to change
Change-Id: Ifb809a24427f9970fd9a885507fdb376b2dad509
2012-06-19 14:15:31 -07:00
Trevor Parscal 44d50c980f Added i18n messages to mw.msg fallback
Change-Id: Ic4b44eb6ab31392fa727f14ec38800fe6b185d44
2012-06-19 13:58:54 -07:00
Trevor Parscal 39dc10d1d8 Fixed drop-down styling to avoid wrapping
Now that the message keys are showing in the demo we can see how bad things look if the drop-down label is too big and wraps

Change-Id: I776a7e480a3f6240c0929f2f50a865c2de4ec0a5
2012-06-19 13:48:50 -07:00
Trevor Parscal dc6ab4fb95 Introduced ve.msg, an alias for mw.msg if it's available
Change-Id: I67c737e585033edc565e2d941c5a729836a2dbec
2012-06-19 13:44:34 -07:00
Trevor Parscal ecabf9d0cf Fixed the history buttons to be locked out when disabled
Change-Id: Ie68737a271c683ba0e196d910ef562ac1313c69b
2012-06-19 13:05:32 -07:00
Rob Moen 9f3a8e719f Rewrite updateState for listButtonTool
Change-Id: I690ce70304ed49e71836297c701eceb2269d9b97
2012-06-19 12:57:51 -07:00
Trevor Parscal cc17c81469 Convert content branches to paragraphs before wrapping them in a list
Change-Id: I987a92e838b817dfe7afbcaae19c03b9437f7b66
2012-06-19 12:50:01 -07:00
Trevor Parscal 70c8a4fe35 Allow retry after load failure
Change-Id: Ib0766427013a20e70cca3c17c29246d25690079f
2012-06-19 12:26:08 -07:00
Trevor Parscal 9dd09e6b4f Improved error handling and locked the save dialog save button while saving
Change-Id: I57483f242ef81e17ec1c9d30871c07c2a177a590
2012-06-19 12:15:57 -07:00
Catrope 4192d1784a Actually fix the error in the previous commit
Change-Id: I5dd841692b2f39c807527dbeb116c904c7cb0994
2012-06-19 12:14:57 -07:00
Catrope 56a98e0d9c Use jQuery for lastChild as well, for consistency and to prevent errors
Change-Id: Ia024dbc5ca60e857987aeb652a9c8af5d423c2d0
2012-06-19 12:10:29 -07:00
Catrope f2a07014e3 Set sHref on links on the way out
This fixes handling of internal links, but this code needs more love

Change-Id: I2424d23bd7e795bd7c9cc3443fe4ec4001f2a8c9
2012-06-19 11:59:28 -07:00
Catrope f08c0ca3a0 Don't add newlines to text nodes inside lists
Change-Id: Ife11f7b87ab540a8a99f13315f889c2aa41a6a32
2012-06-19 11:55:45 -07:00
Trevor Parscal a62e011d68 Reduced selecting on the documentNode
Change-Id: I6f90e931eedad518d6716cb965606b8fb9387f1e
2012-06-19 10:50:41 -07:00
Trevor Parscal fed9915ba5 Reset the save dialog between uses
Also fixed the watchList binding for loading the right state

Change-Id: I25822ba9dfb25d5f8ade765baf6ae69adc9d40ae
2012-06-19 10:50:41 -07:00
Rob Moen d3cb2ccb26 write update and unlist method for list button tool
Change-Id: Ie1f0f8755aac7058d93890e13efefb3c63ee9710
2012-06-19 10:08:05 -07:00
Catrope 97a1edfd72 Crusade against hardcoded English, i18n for everything
Change-Id: Ibc658e5f67a373394a4ba149e9b9003f3803023a
2012-06-19 01:30:30 -07:00
Catrope 6a48f2b829 Fix inconsistent parameter lists for loadError and saveError events
Change-Id: I7d195793f05f98ff3218f494ef78f9981f6b716f
2012-06-19 01:24:40 -07:00
Catrope c15b9d04a0 Fix typos in license text
Change-Id: I0777955b976c2a5d11e5cde78d12b403b8ec7828
2012-06-19 01:24:40 -07:00
Catrope 5db6504cd3 Fix method docs for change(), you can't actually pass multiple transactions
Change-Id: I24dd0bd009cd2a7588d8bd45c4580460d49271c7
2012-06-19 01:24:40 -07:00
Inez Korczynski 3ac2c8e494 Improve handling for enter key - and support typing "on the selection" by removing selection first. 2012-06-18 22:25:16 -07:00
Inez Korczynski 4cef63538f Replace every second space with &nbsp; and do the same for the first space and last space. 2012-06-18 22:24:18 -07:00
Inez Korczynski 5e845979b8 Merge branch 'dmrewrite' of ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor into dmrewrite 2012-06-18 22:23:15 -07:00
Trevor Parscal ca4f19c726 Fixed remaining uses of transact to change
Change-Id: I63c8fb183be8b37db85ed386d7bf33633e821f80
2012-06-18 22:05:05 -07:00
Trevor Parscal d6dd113d8d Adjusted fades and cleaned up URI objects
Change-Id: I2c6d5758c958ddc222293152707f13d7ae560343
2012-06-18 21:47:43 -07:00
Trevor Parscal 26dee2c8ea Switched to using "pageName" instead of "title" since page names include the namespace prefix, so it's more correct
Change-Id: Icd1a76ad317fc88f7895654ec1c41144c2695648
2012-06-18 21:47:43 -07:00
Trevor Parscal ea81d217b5 Work around broken .clone in mw.Uri
Change-Id: I5e3605c626fc3429c332feab839f555d279e11f7
2012-06-18 21:47:43 -07:00
Catrope 675bd284c5 Make the converter not return an empty document
Various parts of DM and CE choke on completely empty documents, so
return an empty paragraph instead.

Change-Id: I67062b66a44efe53a1bdaf60907653f0cc55dd25
2012-06-18 17:42:12 -07:00
Catrope 0e95b20cda If the page doesn't exist, create a "Create" tab, not an "Edit" tab
Change-Id: Ic9fa936ac96539ca65e2d570a2c5419dc19334df
2012-06-18 17:42:11 -07:00
Trevor Parscal 44d297f8ff Fixed post-save behavior
Change-Id: Ib9bb5d725b1cba2f3e8eb9aa9cf4f2dd2fc87229
2012-06-18 17:39:31 -07:00
Trevor Parscal 4ffc6fff60 Was checking the wrong thing for undefined
Change-Id: I11b813fe8708ef03db2f8b884b3766d8cbe887ce
2012-06-18 17:37:12 -07:00
Trevor Parscal cf1c033bff Added section edit link functionality from diff pages
Change-Id: I2dce543d352f4e086b96c65e53f1a90ef58072fb
2012-06-18 16:52:37 -07:00
Inez Korczynski f97ef02370 Early version of support for typing in "slug" (turning it into paragraph) 2012-06-18 15:50:20 -07:00
Inez Korczynski 6276938d21 Fix problem with turning elements of one type into elements of another type. 2012-06-18 15:30:23 -07:00
Inez Korczynski 6d5e524817 Cleanup in ve.ce.Surface - no significant changes 2012-06-18 15:11:54 -07:00
Inez Korczynski 52aaabd499 Fix ListButtonTool to use method "change" instead of old "transact" 2012-06-18 15:04:30 -07:00
Inez Korczynski 79b1726b70 Merge branch 'dmrewrite' of ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor into dmrewrite 2012-06-18 15:04:00 -07:00
Inez Korczynski 78028ff588 Ported method debounce from underscore.js to ve. 2012-06-18 15:03:38 -07:00
Trevor Parscal f49aa141aa Redirect through the view page when coming from a diff page
Also added URL mixup using window.history.replaceState

Change-Id: If84998b0fe945d82fdfa9a8c88391db30286e972
2012-06-18 14:53:28 -07:00
Inez Korczynski 81375698a2 Fix minor bug in ve.log 2012-06-18 14:48:42 -07:00
Trevor Parscal 70b8c92660 Converted more uses of console.log to ve.log
Change-Id: Id41130de088e56dbe8774689317002baa66f5950
2012-06-18 14:19:07 -07:00
Trevor Parscal 76bca4f520 Added veaction param which auto-initializes the editor
Made edit tabs rendered on non view pages work correctly by routing them to the view page with an extra param that auto-initializes the editor

Change-Id: I4fd9106c8b45c6fc79af9ccb44e18944e9b9d8b9
2012-06-18 14:13:26 -07:00
Gabriel Wicke 5fbc80321b Improve newline handling for comments and nowiki/noinclude tags
* Added a newlineTransparent flag to handlers that prevents changes to the
  onNewline status, so that content following it is still considered to be in
  start-of-line context. This fixes a few rt tests where a comment or nowiki
  tag is at the start of the line, and following content should end up on the
  same line.
* 283 rt parser tests are now passing.

Change-Id: Ie58dcb9e5e9af9000fff61c2e1db5d8649ffc3f6
2012-06-18 22:56:41 +02:00
Trevor Parscal 11a3d883f2 Using resource loader debug scripts to unstub ve.log
Also added ve.dir and converted use of console.log to ve.log

Change-Id: Ibbfd78b6ece163f54f40e997c79a01de6609c2b4
2012-06-18 13:30:39 -07:00
Inez Korczynski 1fa1908402 Merge branch 'dmrewrite' of ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor into dmrewrite 2012-06-18 13:19:24 -07:00
Inez Korczynski 8b823a7dc6 Introduce new method in Surface model called "change" and get rid of "setSelection" and "transact". Start using new method in Surface view - which right away fixes two bugs - typing at the and of the document, and typing in newly created paragraph/heading. 2012-06-18 13:19:07 -07:00
Trevor Parscal 005721cb81 Major cleanup, fixes and refactoring of ve.init
This solves lots of issues in the integration work, and also makes it much easier to extend this class to integrate it into other skins

Change-Id: I3b3c5b22a5664e6cf37e429cc0ac3be2e75b630f
2012-06-18 13:12:47 -07:00
Trevor Parscal debef5671c Made the first paragraph in a list item have no margins or padding to simulate raw text
Change-Id: I7e0aeb9a15db4a56f2a3552430c0da0202f97a97
2012-06-18 13:12:47 -07:00
Gabriel Wicke 97fb2d3c0d Serializer refactoring
* tokens are not modified any more (they are supposed to be immutable)
* handler info is now split in start / end objects and potentially a 'make'
  method; added more flags to govern the newline behavior of different tags
* added a generic singleLine mode for single-line syntactical environments
* switched the web service to line-based diffs to avoid issues when diffing
  the round-trip results of [[:en:Programming language]]
* 280 round-trip tests are passing now

Change-Id: I74b8ffbf69643c5d6e5ec852ec58e680c9018901
2012-06-18 21:52:15 +02:00
Christian Williams ad1e4947d7 Fixing ve.log for IE9
Change-Id: Idfcb68abcdae606a4fd78bfec51cb18a8fb495a2
2012-06-18 12:21:22 -07:00
Subramanya Sastry 18541f0286 Couple minor bug fixes in serializer
Change-Id: I961e2f4e7609cc6b264eaf494b39497401cdc55c
2012-06-18 11:25:21 -07:00
Gabriel Wicke de47a68aaa Emit SpaceCharacters token for HTML5 'space' chars
HTML5 defines space characters as [ \r\n\t\f] in
http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#space-character.
It treats these specially in a few contexts. As an example, the foster
parenting algorithm does not apply to space characters.

As a result, this change fixes the round-tripping of spaces between table
tags, which were previously moved before the table.

Change-Id: I32ab29275a9f824fc66d8286638eb42748cfc9a5
2012-06-18 11:25:21 -07:00
Subramanya Sastry 9b5404e288 First pass redoing serialization code to handle newline requirements
from Parsoid HTML output as well as VE HTML output.  There are still
some newline related failures from parser tests that needs fixing, but
this is getting close.  So committing for now so other eyes can make the
bugs shallow :).

Change-Id: Ia6a218ee9fb3e18fe0573c89ff3a4236779e1e64
2012-06-18 11:25:21 -07:00
Subramanya Sastry 2271f19ecf Removed newline normalization between paragraphs.
Change-Id: Ifd55db73c8fe2b3e952066a75cba2f8e13c58430
2012-06-18 11:25:21 -07:00
Subramanya Sastry 8fd901850c Fix for href handling.
- Check if href for links has the wgScriptPath prefix before
  attempting to strip it from the href.

Change-Id: I844151ef7317476668d1306b96a2aec5a56fd0f1
2012-06-18 11:25:21 -07:00
Subramanya Sastry 18de05ba7f Updated newline handling around lists and nested lists.
- Something like this:
    <ul><li>1</li><li>2<ul><li>2.1</li><li>2.2<ul><li>2.2.1</li><li>2.2.2</li></ul></li><li>2.3</li></ul></li><li>3</li></ul>
  now serializes properly to:

    *1
    *2
    **2.1
    **2.2
    ***2.2.1
    ***2.2.2
    **2.3
    *3

  So does this form which is what the above wikitext parses to:
    <ul><li>1
    </li><li>2
    <ul><li>2.1
    </li><li>2.2
    <ul><li>2.2.1
    </li><li>2.2.2
    </li></ul></li><li>2.3
    </li></ul></li><li>3
    </li></ul>

- Lists (and nested lists) are not entirely newline-insensitive.
  They still depend on newlines *between* lists.  The opening
  <ul> tag for non-nested lists should always start on a new line.
  So, for example,
    <ul><li>foo</li></ul><ul><li>bar</li></ul>
  will serialize to:
    *foo
    *bar
  which is incorrect.  But,
    <ul><li>foo</li></ul>
    <ul><li>bar</li></ul>
  will correctly serialize to:
    *foo

    *bar

Change-Id: I13a0290368574865957bcf57aebab488fbbb7026
2012-06-18 11:25:21 -07:00
Subramanya Sastry 9e5ed592fc Minor code refactoring
Change-Id: Ib7f70a3ac42e3d5a5985e9a9bcffa313bdac289b
2012-06-18 11:25:21 -07:00
Subramanya Sastry 031602f525 Fixed/updated newline handling for <p> tags
- More pieces are now simplified and all(?) newline handling
  is now centralized in the serializeToken function.

- This commit fixes bugs in rt-ing some code snippets
    ----------
    Ex 1: foo<p>bar</p>baz
    ----------

- This commit fixes bugs serializing VE generated html
    ----------
    Ex 2: <p>foo</p><pre>bar</pre> ==> foo\n bar
    ----------

- But, this round of fixes introduces RT failures for certain
  code examples in parserTests.txt.  In all these failing cases,
  inline text/html is embedded within a generated <p> tag during
  parsing.  If these generated <p> tags can have a "gc:1" attribute
  added to them, we can properly serialize them to the original
  form.
    ----------
    Ex 3: foo<pre>bar</pre>
          Parsed HTML: <p>foo</p><pre>bar</pre>
    ----------
  Note how this parsed HTML is identical to what the VE outputs
  in Example 2 above.  So, without the gc:1 attribute, we now
  have conflicting requirements on the example same HTML.
  This increases confidence in the correctness of my commit here.

Change-Id: I86beadec91c445a7f8a6d36a639b406697daa0a2
2012-06-18 11:25:21 -07:00
Subramanya Sastry 7c5a0f680f Refix <pre> serialization.
- Effectively reverted fix from f882a65153
  and added a new fix.

Change-Id: I8b81e26525a5f1a22acaf2c7067f2dcd9b962818
2012-06-18 11:25:21 -07:00
Subramanya Sastry f745633797 Improved, simplified newline handling in wikitext serializer.
- Eliminated newline handling from several places in code and
  mostly isolated it to serializeToken thus simplifying newline
  handling logic.
- Fixing some bugs in the process: # of green roundtrip tests
  went up by 5 (294 --> 299) but actually introduced failures on
  a few originally succeeding tests (additional leading/trailing
  newlines on the entire test output).
- Added bonus: made list serializing (mostly) insensitive to
  newlines between tags.  So, all the following DOM serialize
  identically to the following wikitext:

  *foo
  *bar

  ----------
  <ul><li>foo</li><li>bar</li></ul>

  ----------
  <ul>
  <li>foo</li>
  <li>bar</li>
  </ul>
  ----------
  <ul>

  <li>
  foo

  </li>

  <li>
  bar</li>

  </ul>
  ----------

Change-Id: I76be56c4b2789039dff5f47de4659746882e45d6
2012-06-18 11:25:20 -07:00
Subramanya Sastry f1d03f325e Couple minor bug fixes in serializer
Change-Id: I961e2f4e7609cc6b264eaf494b39497401cdc55c
2012-06-17 22:41:14 -05:00
Gabriel Wicke 41d8212573 Emit SpaceCharacters token for HTML5 'space' chars
HTML5 defines space characters as [ \r\n\t\f] in
http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#space-character.
It treats these specially in a few contexts. As an example, the foster
parenting algorithm does not apply to space characters.

As a result, this change fixes the round-tripping of spaces between table
tags, which were previously moved before the table.

Change-Id: I32ab29275a9f824fc66d8286638eb42748cfc9a5
2012-06-17 16:16:07 +02:00
Subramanya Sastry a229f72833 First pass redoing serialization code to handle newline requirements
from Parsoid HTML output as well as VE HTML output.  There are still
some newline related failures from parser tests that needs fixing, but
this is getting close.  So committing for now so other eyes can make the
bugs shallow :).

Change-Id: Ia6a218ee9fb3e18fe0573c89ff3a4236779e1e64
2012-06-16 10:09:06 -05:00
Catrope b74f24851a Actually fix getRange() this time. Hopefully.
Change-Id: I583a9c2c1ae01370988b4a34ddbf7d3d231e0a74
2012-06-15 16:09:08 -07:00
Christian Williams 3885eb766d Using empty pseudo selector and blank image dataURI to battle IE's ridiculous hasLayout bug.
Change-Id: I2acec8ff4d7444726b94c46fc53c0085457c959e
2012-06-15 15:14:13 -07:00
Christian Williams 8805cebc6e Start/stop poll handling for cut and paste
Change-Id: I8a9dcad6f320bdc90b79bfeaad10622543483ffa
2012-06-15 11:47:05 -07:00
Rob Moen d1eba674b1 Write a better debounced onSelect method for showing the context
view icon after select events are finished being fired.

Change-Id: I4e1307b90eed14b1c9167830018e50b9c7832ae6
2012-06-15 10:46:45 -07:00
Catrope 0be0ebf4a8 Forgot to add dl as a sublist type
Change-Id: Ie04904ffdaf20402dbb22ebe96bcaf2db9ea8b8a
2012-06-15 00:07:09 -07:00
Catrope a4589106ec Add a TODO note about preventDefault in alien nodes
Change-Id: I9aa0c6bec1587bdc65f1585c9ea3562c6d2153e6
2012-06-14 23:57:40 -07:00
Catrope be05c9d7ef Add a TODO to the image code about width&height
Change-Id: I75569c1191a7846567e4a4af2dbcd45449cb729c
2012-06-14 23:54:30 -07:00
Catrope aefd6a9792 Fix domWrapperElementType entries in ce that were out of sync with dm
Change-Id: I2684af71af803bc4b57e43a48986bdfced383193
2012-06-14 23:54:06 -07:00
Catrope dae599ac2f Fix the newline workarounds (for Parsoid newline handling) for headings
* Parsoid outputs bare newlines after a heading unless it's followed by
  a <p>, so strip leading and trailing newlines in all bare text
* Adding a leading newline in <p>s is only needed if preceded by a
  heading, don't add it otherwise
* Headings need a bare newline after them unless followed by a <p>
* Headings also need a bare newline before them if preceded by a <pre>

Change-Id: Ib02f800b26453541604e920fbb3845c51cdc6dea
2012-06-14 22:50:46 -07:00
Catrope 13c44dd336 Apply <p> tag workaround to <dd> and <dt> too
Change-Id: Ie639c8fd740adc8d9fa26d61ebae2716e41eb2ba
2012-06-14 22:50:46 -07:00
Catrope 37a1bf7cc8 Fix indentation of comment, remove commented-out debugger statements
Change-Id: I7db94e262100cb83be382de4ac4858a1535bc9f5
2012-06-14 22:50:46 -07:00