Fixed crash when rendering form elements with Qt 4.4
authorhausmann@webkit.org <hausmann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 Dec 2007 12:04:31 +0000 (12:04 +0000)
committerhausmann@webkit.org <hausmann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 Dec 2007 12:04:31 +0000 (12:04 +0000)
commite91c6923afcc6fbba2641778175583fed20784d0
tree42aa7ea5b324131a39b8b190b91f020b64c05788
parentf36ed29ff0ed72a251ba00c45606416699175fae
Fixed crash when rendering form elements with Qt 4.4

QPainter::device() is not guaranteed to return a QWidget, so do the safe "cast" with the
help of QPaintDevice::devType().
Also fall back to the QApplication::style() if we don't have a widget.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28344 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/platform/qt/RenderThemeQt.cpp