[webkit-reviews] review granted: [Bug 68959] Extend DOM WheelEvent to differentiate between physical and logical scroll directions : [Attachment 109083] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 3 09:58:08 PDT 2011

Darin Adler <darin at apple.com> has granted Jon Lee <jonlee at apple.com>'s request
for review:
Bug 68959: Extend DOM WheelEvent to differentiate between physical and logical
scroll directions

Attachment 109083: Patch

------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=109083&action=review

OK as-is, but seems to be too conditional in the wrong way, so maybe we could
tighten it up.

> Source/WebCore/dom/WheelEvent.h:95
> +	   WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta,

> +	       Granularity, PassRefPtr<AbstractView>,
> +	       const IntPoint& screenLocation, const IntPoint& pageLocation,
> +	       bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool
> +#endif

Perhaps we could set the directionInvertedFromDevice flag with an explicit set
call after construction. That would eliminate the need to repeat the entire
constructor and improve the ifdefs.

> Source/WebCore/dom/WheelEvent.idl:45
> +	   readonly attribute boolean webkitDirectionInvertedFromDevice;

It’s ugly to use the WTF prefixed macros directly in IDL files.

Ideally this would be a HAVE-type define instead of a direct platform one, like
HAVE(INVERTED_WHEEL) or something like that. The platform macros themselves are
slated for demolition.

Why wouldn’t we want this attribute to exist and be false on all platforms?

More information about the webkit-reviews mailing list