[Webkit-unassigned] [Bug 28862] [Qt][API] Add a new QGraphicsWidget based version of the "QWebView"

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Sep 7 10:44:36 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=28862





--- Comment #17 from Antonio Gomes (tonikitoo) <tonikitoo at gmail.com>  2009-09-07 10:44:36 PDT ---
(... qouted )

> It is a bit unfortunate that the QGVLauncher duplicates code from QtLauncher.
> It
> might be a good thing to clean up in the future.

simon, i agree although we based code in qtlauncher, it is already very cleaned
up :) really ... we chould actually clean up qtlauncher code instead.

> > diff --git a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
> > index d659833..e79ae55 100644
> > --- a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
> > +++ b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
> > @@ -45,6 +45,7 @@
> >  #include "qwebframe_p.h"
> >  #include "qwebsecurityorigin.h"
> >  #include "qwebsecurityorigin_p.h"
> > +#include "qwebview.h"
> >  
> >  #include <qtooltip.h>
> >  #include <qtextdocument.h>
> > @@ -307,8 +308,8 @@ void ChromeClientQt::repaint(const IntRect& windowRect, bool contentChanged, boo
> >  {
> >      // No double buffer, so only update the QWidget if content changed.
> >      if (contentChanged) {
> > -        QWidget* view = m_webPage->view();
> > -        if (view) {
> > +        // Only do implicit paints for QWebView's
> > +        if (QWebView* view = qobject_cast<QWebView*>(m_webPage->view())) {
> >              QRect rect(windowRect);
> >              rect = rect.intersected(QRect(QPoint(0, 0), m_webPage->viewportSize()));
> >              if (!rect.isEmpty())
> > @@ -323,8 +324,8 @@ void ChromeClientQt::repaint(const IntRect& windowRect, bool contentChanged, boo
> >  
> >  void ChromeClientQt::scroll(const IntSize& delta, const IntRect& scrollViewRect, const IntRect&)
> >  {
> > -    QWidget* view = m_webPage->view();
> > -    if (view)
> > +    // Only do implicit paints for QWebView's
> > +    if (QWebView* view = qobject_cast<QWebView*>(m_webPage->view()))
> >          view->scroll(delta.width(), delta.height(), scrollViewRect);
> >      emit m_webPage->scrollRequested(delta.width(), delta.height(), scrollViewRect);
> >  }
> 
> Hmm, I'm not so sure about these two changes. The WebGraphicsItem doesn't call
> setView(), right? So why is this needed?

we were getting viewport doabled updated in scroll events. That is the way
Kenneth found to avoid that. i will let to kenneth a more detailed answer here,
if needed.

> Oh, I just also forgot one more thing: The QWebGraphicsItem destructor calls
> setView(0) - should it do that? :)

simon, QWebView's destructor does the same. Why should not we do the same here
?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list