Bug 22944 - QWebFrame::render() and setViewportSize() causes flash-10 object to jump
Summary: QWebFrame::render() and setViewportSize() causes flash-10 object to jump
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL: http://youtube.com
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-19 19:39 PST by Dmitry
Modified: 2022-07-29 10:06 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry 2008-12-19 19:39:51 PST
I've added the following code to demo browser from Qt 4.4. Using WebKit from SVN, Flash-10 from Adobe, KUbuntu Hardy 8.04.1:

void BrowserMainWindow::slotThumbnail()
{
  QSize size(256,256);
  QSize thumbnailClipSize(1000, 720);
  QRegion thumbnailClipRegion(0, 0, 1000, 720);

  WebView *webView = currentTab();
  QWebPage *page = webView->page();
  QWebFrame *mainFrame = page->mainFrame();
  QSize pageSize = page->viewportSize();

  QPainter painter;
  QPixmap thumbnail(thumbnailClipSize);

  painter.begin(&thumbnail);
  page->setViewportSize(thumbnailClipSize);

  // Flash-10 object jumps here...
  mainFrame->render(&painter, thumbnailClipRegion);

  painter.end();
  page->setViewportSize(pageSize);

  thumbnail.scaled(size, Qt::IgnoreAspectRatio, Qt::SmoothTransformation).save("thumb.png");
}

This code just saves a thumbnail of current tab.

If setViewportSize() is called, a flash-9 video object (YouTube video for example) during rendering jumps to the left side of webpage and then jumps back. Without setViewportSize() rendering works fine.
Comment 1 Dmitry 2008-12-19 20:01:45 PST
"flash-9" read as "flash-10", of course.
Comment 2 Ahmad Saleem 2022-07-29 10:04:19 PDT
Qt framework for Webkit is not supported and even NPAPI Flash plugin support is gone. I think this can be marked as "RESOLVED WONTFIX". Thanks!