WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
135682
Runtime switch for long mouse press gesture. Part of 135257 - Add long mouse press gesture
https://bugs.webkit.org/show_bug.cgi?id=135682
Summary
Runtime switch for long mouse press gesture. Part of 135257 - Add long mouse ...
Peyton Randolph
Reported
2014-08-06 18:03:06 PDT
Since the long mouse press changes certain interactions with the page, it would be nice to have a runtime switch so clients can opt into the long mouse press.
Attachments
Patch
(7.73 KB, patch)
2014-08-06 18:08 PDT
,
Peyton Randolph
no flags
Details
Formatted Diff
Diff
Patch
(42.91 KB, patch)
2014-08-12 13:57 PDT
,
Peyton Randolph
no flags
Details
Formatted Diff
Diff
Patch
(42.11 KB, patch)
2014-08-12 14:25 PDT
,
Peyton Randolph
no flags
Details
Formatted Diff
Diff
Patch
(42.21 KB, patch)
2014-08-12 15:02 PDT
,
Peyton Randolph
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Peyton Randolph
Comment 1
2014-08-06 18:08:48 PDT
Created
attachment 236159
[details]
Patch
Peyton Randolph
Comment 2
2014-08-12 13:57:29 PDT
Created
attachment 236466
[details]
Patch
Tim Horton
Comment 3
2014-08-12 14:07:44 PDT
Comment on
attachment 236466
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=236466&action=review
> Source/WebCore/ChangeLog:1 > +2014-08-12 Peyton Randolph <
prandolph@apple.com
>
What's up with the duplicate changelog?
> Source/WebCore/page/EventHandler.cpp:1572 > + clearLongMousePressState();
Seems like you're doing the clear in either case; can this be simplified?
> Source/WebCore/page/EventHandler.cpp:1589 > + clearLongMousePressState();
Is this all here to make the runtime switch dynamically switchable in the middle of a press? I think it's sufficient if you can't get IN to a long press, you don't need to check in each step once it's started.
> Source/WebCore/page/EventHandler.cpp:1609 > + clearLongMousePressState();
Another duplicate clear :(
Peyton Randolph
Comment 4
2014-08-12 14:24:43 PDT
(In reply to
comment #3
)
> (From update of
attachment 236466
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=236466&action=review
> > > Source/WebCore/ChangeLog:1 > > +2014-08-12 Peyton Randolph <
prandolph@apple.com
> > > What's up with the duplicate changelog? > > > Source/WebCore/page/EventHandler.cpp:1572 > > + clearLongMousePressState(); > > Seems like you're doing the clear in either case; can this be simplified? > > > Source/WebCore/page/EventHandler.cpp:1589 > > + clearLongMousePressState(); > > Is this all here to make the runtime switch dynamically switchable in the middle of a press? I think it's sufficient if you can't get IN to a long press, you don't need to check in each step once it's started. > > > Source/WebCore/page/EventHandler.cpp:1609 > > + clearLongMousePressState(); > > Another duplicate clear :(
(In reply to
comment #3
)
> (From update of
attachment 236466
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=236466&action=review
> > > Source/WebCore/ChangeLog:1 > > +2014-08-12 Peyton Randolph <
prandolph@apple.com
> > > What's up with the duplicate changelog?
Removed. Had two editors open at the same time.
> > > Source/WebCore/page/EventHandler.cpp:1572 > > + clearLongMousePressState(); > > Seems like you're doing the clear in either case; can this be simplified?
Refactored by moving the clear to before the if statement.
> > > Source/WebCore/page/EventHandler.cpp:1589 > > + clearLongMousePressState(); > > Is this all here to make the runtime switch dynamically switchable in the middle of a press? I think it's sufficient if you can't get IN to a long press, you don't need to check in each step once it's started.
The check in recognizeLongMousePress isn't strictly necessary, but the check in cancelTrackingPotentialLongMousePress is because it gets called whenever a drag is recognized. I removed the check in recognizeLongMousePress.
> > > Source/WebCore/page/EventHandler.cpp:1609 > > + clearLongMousePressState(); > > Another duplicate clear :(
Refactored.
Peyton Randolph
Comment 5
2014-08-12 14:25:27 PDT
Created
attachment 236468
[details]
Patch
Tim Horton
Comment 6
2014-08-12 14:29:54 PDT
Comment on
attachment 236468
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=236468&action=review
> Source/WebCore/page/EventHandler.cpp:1606 > + if (!(page && page->settings().longMousePressEnabled()))
You still don't really need this because it's crazy to worry about the case where the timer started and then the preference was turned off and then the cancel comes through, but I don't really care either way.
Peyton Randolph
Comment 7
2014-08-12 15:02:09 PDT
Created
attachment 236472
[details]
Patch
WebKit Commit Bot
Comment 8
2014-08-12 16:11:36 PDT
Comment on
attachment 236472
[details]
Patch Clearing flags on attachment: 236472 Committed
r172503
: <
http://trac.webkit.org/changeset/172503
>
WebKit Commit Bot
Comment 9
2014-08-12 16:11:39 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug