Fix unit test for reading a utf-8 file as binary.
This test was broken because webkit browsers report the request as a string
instead of a byte array. The string has to be converted back to a byte array
in such cases.
Merge pull request #256 from vandenoever/utf8asbinary

Fix unit test for reading a utf-8 file as binary.
Restore the end point of selection range to where it was initially after
splitting boundaries.

Given the following selection <p>a[bcd]<span>efg</span></p> calling the
splitBoundaries at the moment moves the end point of selection to immediately after opening span <p>a[bcd<span>]efg</span></p>
this causes getTextElements (passing includePartial = true) to return
both "bcd" and "efg" which is incorrect.
Merge pull request #251 from kevinlli/splitBoundariesFix

Restore the end point of selection range to where it was initially after splitting boundaries.
Make cursor sub-element CSS styles component-specific

Previous implementation was using the element type (span or div) to
determine if the element was a handle or caret. This is problematic if
additional elements are placed inside the cursor node (as necessary for
proper IME support)
Allow multiple subscribers to the cursor update event
Workaround for Firefox selection.collapse bug

Attempting to collapse a selection if a content editable element is the
current activeElement for the document will cause the collapse call to
throw an exception.

https://bugzilla.mozilla.org/show_bug.cgi?id=773137
https://bugzilla.mozilla.org/show_bug.cgi?id=787305
EventManager.focus will now detect & restore unscrolled scrollable parents

Scrollable parents that had no current scroll offset were being ignored.
This meant that the view could end up reset at a non-0 scroll offset when
focus was restored to the event trap.
Support text input using the OS’s IME system

This change extends the use of the event trap to allow in-line character addition
using the OS's IME. The event trap will now be moved to within the local user's
cursor block, and will become visible when a composition start event is detected.

This has been tested on Chrome, FF & Safari on all platforms. In addition, this
enables support in FF on Android.

Known issues
- No IME support on Chrome under Linux. The compositionend event emitted by Chrome
contains no data, so the input character can't be detected.

TODO
- Test in an NV build
- Rebind canvas element on undo
Support text input using MacOS’s option+char method

Some IMEs will stack end & start requests back to back. Code has been
added that forces the display to reset between new composition sessions,
rather than incorrectly interrupting the new composition session 0ms later
as would happen if the background task executes after the composition
start event.

One known edge case on Safari under MacOS is that if composition is ended by
pressing another text char, Safari reports a keypress event with the same value
as the last compositionend data, rather than the new key that was pressed.