As per design discussed in issue #816. Extracting this into a separate
view makes it optional for consumers to use (or potentially further
customize).
Fixes#816.
Moving these checks into a node filter ensures it is only required
once per node, rather than once per node-position.
This results in a 60% improvement in position iteration speed.
Transformed all read-only uses to use node.getElements*. Any loop that
immediately modifies the nodes in the list has been updated to use the
DomUtils.getElements* version.
Removed getStyleElement, getParagraphStyleElement and
getParagraphStyleAttributes from OdtDocument as these functions simply
redirect to their implementations in odf.Formatting.
Simplifies the caret class, and allows more exotic view configurations
to be inserted without breaking core code.
As a bonus, the new Viewport class is able to scroll arbitrary
rectangles into view.
The removed code was intended to implement continue list functionality.
However this code no longer worked due to a regression introduced in commit 3ae9e0c.
As I have refactored this area and implemented the continue list
functionality in the new list styles class this old code is no longer
required.
The removed code in OdfCanvas also made use of the
getFirstNonWhitespaceChild function in OdfUtils and the removed code was
the last remaining usage of it. As it is preferable to make use of DOM API
calls which give us the desired behaviour such as
element.firstElementChild I have removed this function.
Giving each list a unique counter allows us to implement continued
numbering functionality while avoiding unexpected numbering due to how CSS
counter values are scoped to an elements sibilings or children.
Moved the processing of the list style to get the content rule into a
separate method so it can be re used for continue list styles. Also
ensured that the new getContentRule function returns a complete rule with
the semicolon on the end.
Specifically:
1. No style:list-level-properties is present.
2. No style:list-level-label-alignment child of that is present.
In this case, it simply falls back to default zero margins and
bullet widths.
Previously this would simply not load documents which did not come
with this optional element in a list style.
Layout tests and CSS generation tests are added for both cases.
The returned object from the applied styles calculation did not have
specific type information for Closure Compiler so I have added some
typedefs that describe the returned object.
In order to improve the OT-ability of text and paragraph removal
with other operations, the merge behaviour has been extracted.
The logic for building up the necessary remove operations has
been encapsulated in TextController for now as all uses pass
through this point still.
Let DirectFormattingController obey this "edit.reviewMode"
constraint by not creating any operations or processing any
action to format text when the cursor is not within the local
user's annotation.
Signals are exposed to toolbar widgets so they may
enable/disable themselves on the fly depending on the cursor
context.
<script/> tags are executed when inserted into the DOM. This is unwanted, so they are are removed before the XML is inserted into the DOM.
In addition, <style/> elements can be used to execute code, so they are removed too.
* remove @license tag (to prevent Closure compiler keeping the comment)
* use copyright@kogmbh.com email address everywhere
* remove "additional permission", to be added only to released webodf.js
* separate license header by empty line from following content