qt5base-lts/tests/auto/gui/text/qtextdocument
Alexey Chernov 2d5d6c8fbc Color transparency support in html import/export
Export of color transparency component is added for cases where color
is exported to html. New static function colorValue() is added to
prepare CSS string representation of QColor. When the color is opaque,
it falls down to QColor::name() method which was used previously,
otherwise it returns 'rgba()' CSS statement or 'transparent' keyword in
case transparency is 0.
6-digit precision is used for alpha value as it's maximum which can be
processed properly by Gecko and Webkit engines
(http://lists.w3.org/Archives/Public/www-style/2009Dec/0295.html).

Import part for rgba() statement was also added to QCssParser. It
supports rgba() color values as stated in CSS Color Module Level 3
(http://www.w3.org/TR/css3-color/#rgba-color).

Import of undocumented statement 'rgba(int,int,int,int);' was also
added to preserve regression test success and to provide compatibility
with previous code relying on this behaviour.

Test cases added to QCssParser autotest for rgba(int,int,int,float)
statement and to QTextDocument autotest for rgba(int,int,int,float)
and 'transparent' statements for certain 'color', 'background-color'
and 'bgcolor' properties.

Change-Id: Id341c4e800249820d52edef8003e50f9a74d062b
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-07-10 03:24:56 +02:00
..
.gitignore Moved gui autotests into new directory structure 2011-09-01 10:59:49 +02:00
common.h Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qtextdocument.pro gui: eliminated usage of qttest_p4.prf 2011-10-25 07:19:31 +02:00
tst_qtextdocument.cpp Color transparency support in html import/export 2012-07-10 03:24:56 +02:00