AngelicTech / thtmlviewer

Automatically exported from code.google.com/p/thtmlviewer
Other
1 stars 1 forks source link

background: none not treated as transparent #404

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Which steps will reproduce the problem?
create an HTML Document with the following line in the body:
<div style="background: none border-box rgba(128, 0, 0, 0);">Hello World</div>

What is the expected output? 
Treated like Transparent, means white background: that's how it's specified and 
how other Browsers treat it.

What do you see instead?
Red-Background

Which version of the product are you using? 
11.4 but tested with 11.5 FrameViewer-Demo, too

How we fixed it:
In StyleUn.pas we changed the ColorArray like this

const
NumColors = 177;
Colors: array[1..NumColors] of ThtString = ('transparent', 'none',
     'black', 'maroon', 'green', 'olive', 'navy', 'purple', 'teal', 'gray',
     'silver', 'red', 'lime', 'yellow', 'blue', 'fuchsia', 'aqua', 'white',
     'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige',
[snip!]
ColorValues: array[1..NumColors] of TColor = (clNone, clNone,
     clBLACK, clMAROON, clGREEN, clOLIVE, clNAVY, clPURPLE, clTEAL, clGRAY,
     clSILVER, clRED, clLIME, clYELLOW, clBLUE, clFUCHSIA, clAQUA, clWHITE,
     $FFF8F0, $D7EBFA, $D4FF7F, $FFFFF0, $DCF5F5,

Original issue reported on code.google.com by Sebal...@googlemail.com on 10 Mar 2015 at 12:18

Attachments: