Files
WebODF/webodf
Philip Peitsch 2c0f8a765e Escape list prefix, suffix and bullet chars in the CSS rules
Various browser cope differently with unescaped characters in a CSS
content block, though all browsers agree it is a bad thing. WebKit
will throw an error, Chrome & FF will "guess" where the rule ends
(and usually get it wrong).

This patch does 2 things to fix this:
- Consistently use double-quotes to quote strings
- Escape backspace and double-quote chars in the CSS-related content

The vast amount of testing code is primarily creating a string tokenizer
able to parse out the displayed text across Chrome/WebKit + FF. As there
is no simple way to get the "rendered text" from a pseudo-element, a lot
of code is required to compute this. There are tests included for the
hand-rolled tokenizer as well to ensure proper function.

No tests have been added for OdfCanvas, as the existing list logic in
here is destined (sooner rather than later) to be merged into the newer
list CSS translation class.
2014-04-30 21:17:23 +10:00
..
…
…

This directory contains the javacript code to WebODF as well as applications that use it. The applications are browser applications, commandline applications and unit tests.

lib/
lib/core/    Parts of WebODF that also work on JavaScript runtimes without a
             document window.
lib/gui/     Parts of WebODF that require a domtree

The library should be able to run in a number of different runtimes. Currently these are:
 - a webbrowser
 - node.js
 - rhino
A common API is implemented for these three environments in the files lib/browser.js, lib/node.js and lib/rhino.js respectively.



Requirements on the code

There are several requirements that need to met before code can be considered for inclusion in WebODF. Most requirements can be checked automatically, a few have to be checked by hand. A contribution must:
 - be contributed under the appropriate license
 - be javascript
 - not give any warnings in a JSLint check
 - be unchanged when passed through jsbeautifier
 - compile with the closure compiler
 - must pass all the unit tests that were passed before
   - as separate js files in the currenlty used Node.JS implementation
   - as a single compiled file in the currenlty used Node.JS implementation
   - as separate js files in the currenlty used Rhino implementation
   - as a single compiled file Rhino implementation
 - must have equal or greater code coverage for the each of the test runs

The automatic checks can be performed by running a dedicated command that reports in an xml file. This report is compared to the previous report.

runtests.js is the command that creates a report.