[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
Tue Sep 8 03:08:24 PDT 2009


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


Ariya Hidayat <ariya.hidayat at trolltech.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #39165|review?                     |review-
               Flag|                            |




--- Comment #22 from Ariya Hidayat <ariya.hidayat at trolltech.com>  2009-09-08 03:08:24 PDT ---
(From update of attachment 39165)

> +#include "qwebpage_p.h"

Is this really needed?

> +#include <QGraphicsScene>
> +#include <QGraphicsView>

Can we use the <QtGui/Foo> pattern also here?

> +    setFlag(QGraphicsItem::ItemUsesExtendedStyleOption, true);

This is Qt 4.6 only. Please guard it with QT_VERSION properly for <= 4.5.

> +    if (this->progress == progress / 100.0)

Please use qFuzzyCompare.

> +void QWebGraphicsItemPrivate::_q_doScroll(int dx, int dy, const QRect& rectToScroll)
> +{
> +    q->scroll(qreal(dx), qreal(dy), QRectF(rectToScroll));
> +}

I found out that this does not really work if I subclass QWebGraphicsItem.
An example: I have my customized QWebGraphicsItem that clips the painting so
that the corners are rounded. When this function is invoked, say scrolling
vertically, the whole painted item is scrolled, meaning the bottom rounded
corners are also scrolled. The correct thing of course that the _contents_ of
the web page is scrolled, not merely the item.
The real fix would be to call update, instead of scroll. I understand that this
is optimization issue, but I'd rather have a correctly painted item than a fast
but garbage one.

> +bool QWebGraphicsItem::interactive() const

Following Qt-ish naming, this should be isInteractive instead.

> +    emit interactiveChanged();

The name could be misleading. What about interactivityChanged?

> +++ b/WebKit/qt/Api/qwebgraphicsitem_p.h

Is there any reason we need separate file for this? Unline other qweb* classes,
QWebGraphicsItemPrivate is not need by anyone else, right?

Overall, looks really good!

r- until the issues above are addressed.

-- 
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