Jeremy wrote:
On Mon, Jun 23, 2008 at 05:05:29AM +0000, corvid wrote:
In SELECT, if standard_widget_colors is set, color and backgroundColor are set to NULL. This tells FltkResource::setWidgetStyle() to leave the colors on the widget alone.
This is done for most input types in form.cc, not just SELECT, see: * Html_tag_open_input() * Html_tag_open_isindex() * Html_tag_open_select()
However it is not done in: * Html_tag_open_button() * Html_input_image()
The first three show fltk widgets.
Is the potential crash only an issue for SELECT inputs? If so, why?
INPUT and ISINDEX don't have close tags, so other tags can't be sneaked inside them.
If an inline element inside a SELECT calls style->color->getColor() or style->backgroundColor->getColor(), we get that crash.
There's dw::core::Widget::getBgColor() , which chains up the widget hierarchy looking for a non-NULL background color. Perhaps we should be calling that? However there is no equivalent (that I can see) for foreground colors. Perhaps there should be?
I guess the getColor()s could go in something that goes up the DilloHtmlState stack looking for non-NULL...