CSS4J CHANGES
=============

Version 0.13
------------
- Added methods for end-user style preferences, with support for !important 
  properties. See XHTMLDocumentFactory's setUserAgentStyleSheet and 
  setUserStyleSheet. Method setDefaultStyleSheet is now deprecated, as the 
  default sheet is now computed from the aforementioned style sheets.
- Improved the handling of @media rules: if the document style targets a 
  specific medium (like 'screen' or 'print'), then account for the matching 
  @media rules when computing the style, otherwise ignore them. See the 
  setTargetMedium() method of the style sheet.
- Added the getId() convenience method to XHTMLElement.
- Computed styles now return an empty style declaration when the style sheet 
  is disabled.
- Fixed a bug where under certain circumstances, some shorthand properties 
  were not reset to default values when they should.
- Various code cleanups and documentation updates.


Version 0.12.1
--------------
- Enforce order of the styles in XHTMLDocument by using a LinkedHashSet 
  instead of a HashSet. Another bug reported by V.R. Gopalan.


Version 0.12
------------
- This release comes from the 'experimental' branch, with changes improving 
  the integration with DOM4J, and the experimental 'box' packages.
- Computed styles for the font-family property are now more robust. If the 
  most relevant style declaration did not contain any font families supported 
  by the style database, the base default value was returned. Now it looks 
  for a lesser relevant style declaration until finding a supported font, or 
  finally gives the base default if it could not find any.


Version 0.11.1
--------------
- Change to CSSStringValue to correctly handle font-family strings where more 
  than two alternate families were specified (previous change only got the 
  first two, thanks to R.V. Gopalan for catching it and pointing to the fix).


Version 0.11
------------
- WARNING: fixed the handling of multiple font-family values. Now CSS4J 
  escapes string values containing spaces, which may or may not be what your 
  application code expects. Feedback would be appreciated. Thanks to V. R. 
  Gopalan for bringing up the issue of font-family parsing.
- Fixed a bug with descendant, child, and direct adjacent selectors. Thanks 
  to V. Ravi Gopalan for reporting the problem and providing the solution.
- Make selectors case-insensitive.
- Package .doc.pdf.itext updated to iText 5.


Version 0.10
------------
- Fixed a bug that prevented 'border-<side>' shorthand properties from being 
  parsed correctly. Problem reported by Cameron Braid.
- Added a few classes from JCLF 2.x, that have been removed from JCLF version 
  3. CSS4J now requires JCLF 3.0 or higher.


Version 0.9.3
-------------
- Elements with multiple classes did not match the styles. Bug reported by 
  Cameron Braid.


Version 0.9.2
-------------
- Fixed a bug in getCssText() where some shorthand subproperties that were 
  correctly parsed and set, would not appear when retrieving the text 
  representation of the shorthand with getCssText(). Thanks to Cameron 
  Braid for reporting the bug.
- Refactor of Table interfaces.
- iText PDF Alignment translators made static and public.
- Additional XPP3 tests and other unit tests.
- Unit tests adapted to JUnit 4.4.


Version 0.9.1
-------------
- A bug in the handling of shorthand properties has been corrected, and 
  shorthands should be consistent with CSS spec now.
- Workaround for XPP3 parser support. Previously, the use of XPP3 parser
  caused NPEs because this parser adds attributes to elements before 
  setting the parent. Problem (and a patch) reported by Stefan Haustein.
- Added unit tests for the above mentioned changes.


Version 0.9
-----------
- Added user agent abstractions. The interfaces are a work in progress.
- ElementReplacer setter and getter, moved from style database to user 
  agent.
- In XHTMLDocumentFactory, now the 'html' element is created as a 
  CSSStylableElement and handled like other stylable elements.
- Some methods in PDFStyleFormatter are back to style-based arguments, 
  to allow its use without the box classes.
- Fixed a NPE in the parsing of shorthand properties, reported by Stefan 
  Haustein.
- The getPeerXPath() and getParentXPath() methods of the DOM4J style 
  declaration were swapped in version 0.7 (regression).
- Update to CSS2ComputedProperties interface.
- Update to the experimental box model, including support for asynchronous 
  downloading of embedded images.
- Replaced elements now account for the values of the width and height 
  (X)HTML element attributes.
- Added a new ErrorHandler method.
- Added an unit test.


Version 0.8
-----------
- Improvements to CSS2ComputedProperties. Notably, the #computeFloatValue
  method has been added. Also, #getFontFamily() and #getFontWeight() are 
  now available both in CSS2ComputedProperties and in the visual box 
  interfaces.
- Added the CSSPoint class.
- Update to the experimental box model.
- Enhancements to Javadoc comments.
- Added an unit test.


Version 0.7
-----------
- API CHANGE: The CSSStyleSheetFactory class has been simplified, 
  and the #create methods will no longer attempt to load a default 
  style sheet.
- API CHANGE: The methods for font sizes now return integer values, for 
  consistency with the StyleDatabase changes from version 0.4 to 0.5.
- API CHANGE: Argument of StyleDatabase#setInitialColor changed to 
  String. By default, initial color is black.
- Update to the experimental box model.
- Added finer-grained primitive value classes.
- Added initial experimental support for several deprecated HTML elements 
  and attributes.
- Improved handling of CSS selectors, which also fixes a bug (reported 
  by Robert Novotny) where class-only selectors were being ignored.
- Fixed a bug where a NPE was thrown when calling 
  XHTMLDocument#addStyleSheet without the internal style having been 
  initialized. Problem reported by Robert Novotny.
- Fixed a bug where the per-element style cache was not being cleared 
  when the 'style' attribute of an element was changed.
- A few refactors, for better separation of DOM/DOM4J classes.
- Fixes and enhancements to Javadoc comments.
- Added a few unit tests.


Version 0.6
-----------
- API CHANGE: StyleDatabase is now an interface, and not an abstract class.
- API CHANGE: Java2DStyleDatabase moved to 'j2d' subpackage.
- API CHANGE: A new visual formatting package has been added, and the box 
  methods in CSS2ComputedProperties have been moved to the new visual 
  classes. Those methods now attempt to return 'used' values instead of 
  'computed' ones.
  Values useful for rendering have been improved thanks to the new visual 
  formatting package, with several new methods and previously unhandled 
  cases added.
  The visual package is a work in progress, and more classes are going to 
  be added in future releases.
- API CHANGE: Some exceptions have been replaced by an error handling 
  interface, to allow different CSS consumers to apply their own error 
  policy.
- API CHANGE: For convenience, package-level XHTMLDocument.setStyleDatabase 
  method has been made cache-safe and changed to public visibility.
- Added the getURL method to XHTMLDocument.
- Reverted the rename of PropertyDatabase to CSS21PropertyDatabase done in 
  last milestone release.
- Fixed a bug where the default value for the 'display' property was 
  being ignored.
- Fixed one case where a bug from the SAC parser could lead to ignoring an 
  identifier.
- Added code to deal with an edge case in the ComputedStyle.getCSSValue() 
  method.
- Completed several Javadoc comments.


Version 0.5
-----------
- API CHANGE: Now, several methods in the CSS2ComputedProperties interface 
  do not take a unit argument. Instead, they always use the unit given by 
  the StyleDatabase.getNaturalUnit() method.
- Now getComputedStyle always returns a style, even if no style declaration 
  (default or in the document) applies. Thanks to Stefan Haustein for 
  bringing attention to this.
- Exceptions due to problems instantiating the SAC parser are now propagated 
  as DOMExceptions. Previously, the handling could lead to a misleading 
  NullPointerException, which made difficult to figure out the real cause. 
  Problem reported by Stefan Haustein.
  The solution in this release is not final, as some methods are now throwing 
  DOMExceptions of an unexpected type (per the W3C spec). In general, several 
  exceptions thrown in the code will be re-examined, as some CSS consumers 
  (browsers) expect certain problems to be ignored (as mandated by W3C spec), 
  while others want those errors to be pointed out and managed.
- Added parseProperty method to StyleDeclarationFactory.
- Computed styles now take into account initial values for properties.
- PropertyDatabase renamed as CSS21PropertyDatabase. Note that this class is 
  part of the implementation, and not in the supported API.
- New style database for headless devices.
- Fixed a bug in percentage handling in getFontSize().
- Added some Javadoc comments.
- Added more unit tests.


Version 0.4.0
-------------
- Usability improvement: Now CSS4J will find the style sheets on its own;
  Previously, one had to manually retrieve the style sheet definitions 
  from LINKs and STYLEs, and set it to the XHTMLDocument.
- IMPORTANT API CHANGE: Renamed XHTMLElement to CSSStylableElement. 
  Non-stylable elements are now DefaultElements.
- Per-element computed styles can now be cached.
- Several refactors and cleanups.
- Fixed a bug in individual rule insertion.
- DOMCSSStyleSheet.deleteRule method now throws the right Exception.
- Implemented more methods in interface CSS2Properties. Use of this 
  interface is still not recommended.
- Fixed a bug where property priorities were printed in the wrong place 
  for the getCssText() method.
- Fixed the behavior when accessing the property priority. Now it 
  behaves according to spec.
- Fixed the behavior of item() when accessing out of bounds indexes. 
  Now it behaves according to spec.
- Better printing of integer values in properties.
- Mark property read as Privileged in SAC parser factory.
- Account for security exceptions in parser factory.
- Added several Javadoc comments.
- Added unit tests.


Version 0.3.1
-------------
- Table rendering interface changed.


Version 0.3.0
-------------
- Better support for DOM trees.
- Support for headless devices.
- Adjustments to default XHTML CSS files.
- Improvements to CSS2ComputedProperties interface.


Version 0.2.0
-------------
- Added a new InputStream parameter to the static method of CSSStyleSheetFactory.