Bug 151065 - [Mac] Gesture Events should not have negative scale
Summary: [Mac] Gesture Events should not have negative scale
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-11-09 17:04 PST by Joseph Pecoraro
Modified: 2015-12-15 16:57 PST (History)
9 users (show)

See Also:


Attachments
[TEST] Gesture Test (1.38 KB, text/html)
2015-11-09 17:04 PST, Joseph Pecoraro
no flags Details
patch (13.04 KB, patch)
2015-12-15 14:35 PST, Tim Horton
andersca: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2015-11-09 17:04:13 PST
Created attachment 265120 [details]
[TEST] Gesture Test

* SUMMARY
[Mac] Gesture Events should not have negative scale.

* STEPS TO REPRODUCE
1. Load test page
2. Pinch on the box
  => scale goes negative the box starts re-growing (due to CSS transform scale()). Did not expect the scale to ever go negative.

* NOTES
- Loading the same test case on iOS, the scale does not go negative. It approaches zero but rarely goes below 0.15. It never goes negative.
- Since scale is local to 1 (>1 = fingers moved apart, <1 = fingers moved closer together) it is natural to use a a multiplier of the start value. When values get very close to zero, or go negative, the usefulness diminish and it means a rapid change from the original value.
Comment 1 Radar WebKit Bug Importer 2015-11-09 17:04:39 PST
<rdar://problem/23474123>
Comment 2 Tim Horton 2015-11-10 10:49:57 PST
I'm not sure we have enough information (at least, the way it's currently implemented, on top of AppKit's magnification) to do anything better than maxing with 0. But, we can certainly do that.
Comment 3 Tim Horton 2015-11-10 10:56:25 PST
I don't think that's the right thing to do, though, because that would mean you could be moving your fingers and the scale wouldn't be changing.
Comment 4 Tim Horton 2015-11-10 11:25:16 PST
We'll fix these elsewhere.
Comment 5 Tim Horton 2015-12-15 14:12:37 PST
Reopened to post the WebKit bits for review.
Comment 6 Tim Horton 2015-12-15 14:35:53 PST
Created attachment 267393 [details]
patch
Comment 7 WebKit Commit Bot 2015-12-15 14:38:35 PST
Attachment 267393 [details] did not pass style-queue:


ERROR: Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm:3163:  Missing space around : in range-based for statement  [whitespace/colon] [4]
ERROR: Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm:3175:  Missing space around : in range-based for statement  [whitespace/colon] [4]
ERROR: Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm:3185:  Missing space around : in range-based for statement  [whitespace/colon] [4]
ERROR: Source/WebKit2/Shared/mac/NativeWebGestureEventMac.mm:82:  Comma should be at the beginning of the line in a member initialization list.  [whitespace/init] [4]
Total errors found: 4 in 10 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 8 Tim Horton 2015-12-15 16:57:32 PST
http://trac.webkit.org/changeset/194125