Summary: | [Qt] QGraphicsWebView shows combo box popups in the wrong position | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Girish Ramakrishnan <girish> | ||||||||||
Component: | WebKit Qt | Assignee: | Girish Ramakrishnan <girish> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | commit-queue, hausmann, kenneth, luiz, zanga.mail | ||||||||||
Priority: | P2 | Keywords: | Qt | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||||
Hardware: | PC | ||||||||||||
OS: | All | ||||||||||||
Bug Depends on: | 33418 | ||||||||||||
Bug Blocks: | |||||||||||||
Attachments: |
|
Description
Girish Ramakrishnan
2010-01-20 01:39:19 PST
Test case: #include <QtGui> #include <QtWebKit> int main(int argc, char **argv) { QApplication app(argc, argv); QGraphicsScene *scene = new QGraphicsScene; QGraphicsWebView *webView = new QGraphicsWebView; webView->load(QUrl("http://www.tizag.com/htmlT/htmlselect.php")); scene->addItem(webView); QGraphicsView *view = new QGraphicsView; view->setScene(scene); view->show(); return app.exec(); } Created attachment 47006 [details]
Patch against 4.6.1
Created attachment 47007 [details]
Patch against 4.6.1 (clean up PopupMenu::~PopupMenu)
Clean up as suggested by Simon.
Luiz Agostini is working on the same part of the code and my commit will probably break his ongoing work. So, I am waiting for him to finish his patch series, before I commit this one. The patch attached will not apply against webkit-trunk, it's 4.6.x only. (In reply to comment #3) > Created an attachment (id=47007) [details] > Patch against 4.6.1 (clean up PopupMenu::~PopupMenu) > > Clean up as suggested by Simon. Cherry-picked into qtwebkit-4.6 as commit 8f5ca3ba5da63a47d4f90bbd867d3e8453443dd3 Created attachment 47188 [details]
Make the proxy widget a child of the QGraphicsWebView
Created attachment 47271 [details]
Patch against webkit-trubk
Note on the destructor part: In the case of QGraphicsWebView, the proxy is gets already deleted by the time it hits the QtFallbackPopup destructor. I am unable to create a debug build of Qt (it say out of memory!). But with qDebug() I have verified that there is no leak and m_proxy indeed gets deleted (I made it a QPointer and it printed out as 0 in the QtFallbackPopup destructor).
We probably need the above check for the patches against 4.6.1 too. (But from what I saw QtFallbackPopup destructor was _never_ called in the 4.6.x WebKit).
Comment on attachment 47271 [details]
Patch against webkit-trubk
LGTM
Comment on attachment 47271 [details] Patch against webkit-trubk Clearing flags on attachment: 47271 Committed r53769: <http://trac.webkit.org/changeset/53769> All reviewed patches have been landed. Closing bug. (In reply to comment #6) > Created an attachment (id=47188) [details] > Make the proxy widget a child of the QGraphicsWebView Cherry-picked into qtwebkit-4.6 with commit f2e94404e9b723442aa2d4eae5399014d763fb6d This still happens to me from time to time with Qt 4.7.4 on ArchLinux 64 bit. Offending page: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>FreeADSP</title> <link rel="icon" href="icon.png" type="image/png" /> <link rel="stylesheet" type="text/css" href="main.css" /> <script type="text/javascript"> function adjustPluginHeight() { var plugin = document.getElementById('plugin'); var statusbar = document.getElementById('statusbar'); plugin.style.marginBottom = (statusbar.offsetHeight + 2) + 'px'; } </script> </head> <body onload="adjustPluginHeight();"> <div id="toolbar"> <table> <tr> <td><button><div class="nowrap">Load plugin</div></button></td> <td><button>Mute</button></td> <td><button>Bypass</button></td> <td><div class="nowrap">Bank: <select><option>1</option><option>2</option><option>3</option><option>4</option><option>5</option></select></div></td> <td><div class="nowrap">Program: <select><option>1</option><option>2</option><option>3</option></select></div></td> </tr> </table> </div> <div id="plugin"> No plugin loaded </div> <div id="statusbar"> status </div> </body> </html> (It happens also with no style sheet, just click several times on one of the two selects and from time to time the misplacement happens). |