WebKit Bugzilla
Attachment 345793 Details for
Bug 188024
: Secheuristic should be proportional to width, not height.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188024-20180725151310.patch (text/plain), 4.39 KB, created by
Jeremy Jones
on 2018-07-25 15:13:11 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Jeremy Jones
Created:
2018-07-25 15:13:11 PDT
Size:
4.39 KB
patch
obsolete
>Subversion Revision: 234109 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 1c28fa0db410366a9c5bd88b7a75cd489dec549b..c007c448daa13cd2cf05c315d3c843a20a951c9d 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,26 @@ >+2018-07-25 Jeremy Jones <jeremyj@apple.com> >+ >+ Secheuristic should be proportional to width, not height. >+ https://bugs.webkit.org/show_bug.cgi?id=188024 >+ rdar://problem/42101780 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ We were getting inconsistent results between portrait and landscape. The problem is that >+ we were using the ratio of deltaY of touches vs height of the device. However, >+ in portrait, keyboards use a much smaller oprtion of the height of the divice. >+ >+ Keyboards get taller in porportion to the width of the device, not the height of the device. >+ Keyboard height / deivce width is much most stable than keyboard height / device height. >+ >+ * UIProcess/ios/fullscreen/FullscreenTouchSecheuristic.cpp: >+ (WebKit::FullscreenTouchSecheuristic::distanceScore): >+ * UIProcess/ios/fullscreen/FullscreenTouchSecheuristic.h: >+ (WebKit::FullscreenTouchSecheuristic::setWidthWeight): >+ (WebKit::FullscreenTouchSecheuristic::setHeightWeight): >+ * UIProcess/ios/fullscreen/WKFullScreenViewController.mm: >+ (-[WKFullScreenViewController initWithWebView:]): >+ > 2018-07-23 John Wilander <wilander@apple.com> > > Resource Load Statistics: Add logging of Storage Access API use in experimental debug mode >diff --git a/Source/WebKit/UIProcess/ios/fullscreen/FullscreenTouchSecheuristic.cpp b/Source/WebKit/UIProcess/ios/fullscreen/FullscreenTouchSecheuristic.cpp >index d0cf7a9f3aa17ea17ca5d89ef45bcd89d7c2cce8..dd65755dc329e059e51c03e143f1c850980673c9 100644 >--- a/Source/WebKit/UIProcess/ios/fullscreen/FullscreenTouchSecheuristic.cpp >+++ b/Source/WebKit/UIProcess/ios/fullscreen/FullscreenTouchSecheuristic.cpp >@@ -65,8 +65,8 @@ double FullscreenTouchSecheuristic::distanceScore(const CGPoint& nextLocation, c > m_xWeight * pow(nextLocation.x - lastLocation.x, 2) + > m_yWeight * pow(nextLocation.y - lastLocation.y, 2)); > double sizeFactor = sqrt( >- m_xWeight * pow(m_size.width, 2) + >- m_yWeight * pow(m_size.height, 2)); >+ m_widthWeight * pow(m_size.width, 2) + >+ m_heightWeight * pow(m_size.height, 2)); > double scaledDistance = distance / sizeFactor; > if (scaledDistance <= m_cutoff) > return scaledDistance * (m_rampUpSpeed / deltaTime); >diff --git a/Source/WebKit/UIProcess/ios/fullscreen/FullscreenTouchSecheuristic.h b/Source/WebKit/UIProcess/ios/fullscreen/FullscreenTouchSecheuristic.h >index b3cdca3d7c0316a8f45779d21d8108fac3d58af7..0df55d14cdf57689211669075c658b5bfd478959 100644 >--- a/Source/WebKit/UIProcess/ios/fullscreen/FullscreenTouchSecheuristic.h >+++ b/Source/WebKit/UIProcess/ios/fullscreen/FullscreenTouchSecheuristic.h >@@ -40,6 +40,8 @@ public: > void setRampDownSpeed(Seconds speed) { m_rampDownSpeed = speed; } > void setXWeight(double weight) { m_xWeight = weight; } > void setYWeight(double weight) { m_yWeight = weight; } >+ void setWidthWeight(double weight) { m_widthWeight = weight; } >+ void setHeightWeight(double weight) { m_heightWeight = weight; } > void setSize(CGSize size) { m_size = size; } > void setGamma(double gamma) { m_gamma = gamma; } > void setGammaCutoff(double cutoff) { m_cutoff = cutoff; } >@@ -53,6 +55,8 @@ private: > Seconds m_rampDownSpeed { 1 }; > double m_xWeight { 1 }; > double m_yWeight { 1 }; >+ double m_widthWeight { 1 }; >+ double m_heightWeight { 1 }; > double m_gamma { 1 }; > double m_cutoff { 1 }; > CGSize m_size { }; >diff --git a/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm b/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm >index 94f034330c81a7a3856eedf0c029045814bf7ce9..e5eae4d2a96d2978fd34994a2eda50c19df7f30d 100644 >--- a/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm >+++ b/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm >@@ -183,6 +183,7 @@ - (id)initWithWebView:(WKWebView *)webView > _secheuristic.setRampUpSpeed(Seconds(0.25)); > _secheuristic.setRampDownSpeed(Seconds(1.)); > _secheuristic.setXWeight(0); >+ _secheuristic.setHeightWeight(0); > _secheuristic.setGamma(0.1); > _secheuristic.setGammaCutoff(0.08); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
ews-watchlist
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188024
:
345791
| 345793 |
345888