Focus saving and restoring is expensive on most browsers, so major gains
in performance are realised by not doing this for every operation. A new
pair of signals implemented by operation routers denotes when a batch of
operations is about to processed, and when the router has completed this
batch.
Note, there is no implied promises about how many operations are executed
within a batch. This is left as a choice to the router implementations.
We only create a new paragraph style once per unique paragraph style
name. This vastly reduces the number of new styles created when
formatting a number of paragraphs that all share the same existing
paragraph style.
These calls are UI render-related operations, and don't need to be done
immediately after every operation. Batching these up and doing them all
once after all ops are processed greatly improves the performance of
paragraph alignment updates with multiple paragraphs selected.
0px height elements are not able to receive an active selection in most
browsers. Setting a minimum height ensures the event trap is still able
to be selected when in an empty paragraph.
The list of files changes on many commits and makes merging hard. This patch simply removes the list from the code and uses one that is generated and placed in the build directory.
Inline blocks will cause the browser to allow word-wrapping to occur
either side of the node, an effect that is VERY undesirable for a
caret.
Making the event trap absolute, but expanded to the full height of the
cursor shows the composition menu displays in the same place as if
the trap was an inline-block. The cursor and trap are switched to inline
blocks during composition so the contained characters take up space in
the document.
When a cursor is removed from the document, the associated caret should
also be destroyed. This prevents stale timers from attempting to update
the style on detached nodes, which causes crashes in some browsers
(e.g., WebKit in Cocoa on OSX10.8).
Toggling the content editable flag while the element is in focus will
sometimes stop the browser from allowing the IME to be activated.
Blurring the focus and then restoring ensures the browser re-evaluates
the IME state after the content editable flag has been updated.
Consumers of the applied style summary information benefit from knowing
which common styles are applied to the given selection (e.g., so the
appropriate common paragraph & text styles can be selected in the UI).
Also, decrease the maximum latency between a render request and when the
update is performed to be 0ms. The previous value of 200ms was quite
noticeable when indenting or unindenting paragraphs.
This initializes the Session, SessionView,
and SessionController, without yet enabling
editing, so that cursor movements and therefore
virtual selections work.
Hide the caret and handle.
By changing how boundaries are being checked, iteration
performance is boosted quite significantly for text node
retrieval.
* Replace @returns with @return in affected files