[Webkit-unassigned] [Bug 44062] [Qt] Use LAZY_NATIVE_CURSOR
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Aug 18 06:11:42 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=44062
--- Comment #12 from Balazs Kelemen <kb at inf.u-szeged.hu> 2010-08-18 06:11:42 PST ---
>
> In my opinion, each of the above items should happen on its own step, so r-
Roger that, I will separate the 3 step.
>
> > + (WebCore::Widget::setCursor): Propagete the callback forward through HostWindow.
> > +
> > 2010-08-17 Philippe Normand <pnormand at igalia.com>
>
> Typo: propagete
That is what I wrote but the correct spelling is propagate :)
>
>
> >
> > -const Cursor& grabbingCursor()
> > +void Cursor::ensurePlatformCursor() const
> > {
>
> who calls this method?
Cursor::platformCursor. It is in the common part of the Cursor class (Cursor.cpp)
>
> > + m_platformCursor = new QCursor(QPixmap(QLatin1String(":/webkit/resources/verticalTextCursor.png")), 7, 7);
> > + break;
> > + case Cell:
> > + m_platformCursor = new QCursor(QPixmap(QLatin1String(":/webkit/resources/cellCursor.png")), 7, 7);
> > + break;
> > + case ContextMenu:
> > + m_platformCursor = new QCursor(QPixmap(QLatin1String(":/webkit/resources/contextMenuCursor.png")), 3, 2);
> > + break;
> > + case Alias:
> > + m_platformCursor = new QCursor(QPixmap(QLatin1String(":/webkit/resources/aliasCursor.png")), 11, 3);
> > + break;
> > + case Progress:
> > + m_platformCursor = new QCursor(QPixmap(QLatin1String(":/webkit/resources/progressCursor.png")), 3, 2);
> > + break;
> > + case Copy:
> > + m_platformCursor = new QCursor(QPixmap(QLatin1String(":/webkit/resources/copyCursor.png")), 3, 2);
> > + break;
> > + case ZoomIn:
> > + m_platformCursor = new QCursor(QPixmap(QLatin1String(":/webkit/resources/zoomInCursor.png")), 7, 7);
> > + break;
> > + case ZoomOut:
> > + m_platformCursor = new QCursor(QPixmap(QLatin1String(":/webkit/resources/zoomOutCursor.png")), 7, 7);
> > + break;
>
> where these hardcoded hotspots come from?
>From the original CursorQt.cpp, in the Cursors class. I just copy-pasted the paths.
>
> 7 , 7
> 11, 3
> 3 , 2
> ...
>
> > diff --git a/WebCore/platform/qt/WidgetQt.cpp b/WebCore/platform/qt/WidgetQt.cpp
> > index 0903b6e..e64d655 100644
> > --- a/WebCore/platform/qt/WidgetQt.cpp
> > +++ b/WebCore/platform/qt/WidgetQt.cpp
> > @@ -78,10 +78,10 @@ void Widget::setFocus(bool focused)
> > void Widget::setCursor(const Cursor& cursor)
> > {
> > #ifndef QT_NO_CURSOR
> > - QWebPageClient* pageClient = root()->hostWindow()->platformPageClient();
> > -
> > - if (pageClient)
> > - pageClient->setCursor(cursor.impl());
> > + ScrollView* view = root();
> > + if (!view)
> > + return;
> > + view->hostWindow()->setCursor(cursor);
> > #endif
> > }
>
> Do you have a case where root() is null here? It should not be null at all, since was not being null-checked before. I'd rather add a assert(root()).
>
I followed the mac and win Widget implementations with this null check here. root() returns with zero if the root element in the widget tree is not a FrameView so I think this null check is necessary.
Follow up patches will be coming.
--
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