Title: [231111] trunk/Source/WebCore
- Revision
- 231111
- Author
- [email protected]
- Date
- 2018-04-27 14:21:30 -0700 (Fri, 27 Apr 2018)
Log Message
Regression(r222392?): Events can have a negative timestamp which causes app breakage
https://bugs.webkit.org/show_bug.cgi?id=185040
<rdar://problem/39638051>
Reviewed by Wenson Hsieh.
The real fix is in UIKit when generating the touch timestamps. However, this patch
does some hardening to make sure that Event.timestamp can never return a negative
value even if something goes wrong.
* dom/Event.cpp:
(WebCore::Event::timeStampForBindings const):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (231110 => 231111)
--- trunk/Source/WebCore/ChangeLog 2018-04-27 19:44:02 UTC (rev 231110)
+++ trunk/Source/WebCore/ChangeLog 2018-04-27 21:21:30 UTC (rev 231111)
@@ -1,3 +1,18 @@
+2018-04-27 Chris Dumez <[email protected]>
+
+ Regression(r222392?): Events can have a negative timestamp which causes app breakage
+ https://bugs.webkit.org/show_bug.cgi?id=185040
+ <rdar://problem/39638051>
+
+ Reviewed by Wenson Hsieh.
+
+ The real fix is in UIKit when generating the touch timestamps. However, this patch
+ does some hardening to make sure that Event.timestamp can never return a negative
+ value even if something goes wrong.
+
+ * dom/Event.cpp:
+ (WebCore::Event::timeStampForBindings const):
+
2018-04-27 Christopher Reid <[email protected]>
URL::appendEncodedHostName is using the deprecated uidna_IDNToASCII function
Modified: trunk/Source/WebCore/dom/Event.cpp (231110 => 231111)
--- trunk/Source/WebCore/dom/Event.cpp 2018-04-27 19:44:02 UTC (rev 231110)
+++ trunk/Source/WebCore/dom/Event.cpp 2018-04-27 21:21:30 UTC (rev 231111)
@@ -170,7 +170,7 @@
if (!performance)
return 0;
- return performance->relativeTimeFromTimeOriginInReducedResolution(m_createTime);
+ return std::max(performance->relativeTimeFromTimeOriginInReducedResolution(m_createTime), 0.);
}
void Event::resetBeforeDispatch()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes