[Webkit-unassigned] [Bug 42232] Make changing Cursors work in WebKit2.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 13 22:37:02 PDT 2010


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





--- Comment #5 from mitz at webkit.org  2010-07-13 22:37:01 PST ---
(From update of attachment 61468)
> +        - Rework Windows cursor code to use less global variables.

fewer?

> Index: WebCore/page/Chrome.h
> ===================================================================
> --- WebCore/page/Chrome.h	(revision 63102)
> +++ WebCore/page/Chrome.h	(working copy)
> @@ -69,6 +69,7 @@ namespace WebCore {
>          virtual IntRect windowToScreen(const IntRect&) const;
>          virtual PlatformPageClient platformPageClient() const;
>          virtual void scrollbarsModeDidChange() const;
> +        virtual void setCursor(const Cursor&);

Does this method need to be virtual?

> +        PlatformCursor impl() const { return m_platformCursor; }

I’d rename this method to platformCursor() as well.

> +    const char* nameForCursorType(Cursor::Type);

How is this going to be used? Should it return 0 instead of the constant string "ERROR"?

> -    return [[NSCursor alloc] initWithImage:img hotSpot:determineHotSpot(image, hotSpot)];
> +    return [[NSCursor alloc] initWithImage:img hotSpot:hotSpot];

You should explain in the change log how hotSpot changed from being an out parameter in this function (and its caller) to being an in parameter.

> +Cursor::Cursor(Image* image, const IntPoint& hotSpot)

> +Cursor::Cursor(Type type)

> +Cursor::Cursor(const Cursor& other)

> +Cursor& Cursor::operator=(const Cursor& other)

> +PlatformCursor Cursor::platformCursor() const

These methods have identical implementations in CursorMac.mm and CursorWin.cpp. Can they be shared in Cursor.cpp inside #if USE(LAZY_NATIVE_CURSOR)?

>  void Widget::setCursor(const Cursor& cursor)

I think this method has identical implementations in WidgetMac.mm and WidgetWin.cpp. Can they be shared in Widget.cpp inside #if USE(LAZY_NATIVE_CURSOR)?

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