Bug 145065 - Prefix force on MouseEvent and add constants for click and force click values
Summary: Prefix force on MouseEvent and add constants for click and force click values
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-15 11:54 PDT by Beth Dakin
Modified: 2015-05-15 14:33 PDT (History)
6 users (show)

See Also:


Attachments
Patch (3.17 KB, patch)
2015-05-15 11:58 PDT, Beth Dakin
thorton: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Beth Dakin 2015-05-15 11:54:38 PDT
Prefix force on MouseEvent and add constants for click and force click values

rdar://problem/20770052
Comment 1 Beth Dakin 2015-05-15 11:58:21 PDT
Created attachment 253211 [details]
Patch
Comment 2 WebKit Commit Bot 2015-05-15 12:01:11 PDT
Attachment 253211 [details] did not pass style-queue:


ERROR: Source/WebCore/dom/MouseEvent.h:52:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/dom/MouseEvent.h:53:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
Total errors found: 2 in 3 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Tim Horton 2015-05-15 12:04:21 PDT
Comment on attachment 253211 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=253211&action=review

> Source/WebCore/dom/MouseEvent.h:95
>      double force() const { return m_force; }
> +    double webkitForce() const { return m_force; }

Isn't there a way in the IDL to have an alias like this without having to have the function twice?
Comment 4 Tim Horton 2015-05-15 12:06:13 PDT
(In reply to comment #3)
> Comment on attachment 253211 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=253211&action=review
> 
> > Source/WebCore/dom/MouseEvent.h:95
> >      double force() const { return m_force; }
> > +    double webkitForce() const { return m_force; }
> 
> Isn't there a way in the IDL to have an alias like this without having to
> have the function twice?

Yes! I think you want something like this:

[Conditional=MOUSE_FORCE_EVENTS, ImplementedAs=force] readonly attribute double webkitForce;
Comment 5 Beth Dakin 2015-05-15 14:33:34 PDT
Thanks, Tim! http://trac.webkit.org/changeset/184417