Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: cce6984b0a67352ec38c934715f0ec306f5a0cd6
      
https://github.com/WebKit/WebKit/commit/cce6984b0a67352ec38c934715f0ec306f5a0cd6
  Author: Simon Fraser <simon.fra...@apple.com>
  Date:   2023-01-04 (Wed, 04 Jan 2023)

  Changed paths:
    M Tools/DumpRenderTree/mac/EventSendingController.mm
    M Tools/TestRunnerShared/Bindings/JSBasics.cpp
    M Tools/TestRunnerShared/Bindings/JSBasics.h

  Log Message:
  -----------
  eventSender.monitorWheelEvents({ }) is interpreted as 
eventSender.monitorWheelEvents({ resetLatching: false })
https://bugs.webkit.org/show_bug.cgi?id=250110
rdar://103891736

Reviewed by Wenson Hsieh and Brent Fulgham.

booleanProperty(), numericProperty() and objectProperty() would fetch the named 
property from the given
object, but fail to test whether it was the undefined value. 
`booleanProperty()` would then coerce it to
boolean, returning `false` when in fact it should have returned the default 
value. `numericProperty()`
and `objectProperty()` had a similar issue.

In DumpRenderTree, this issue occurs in a related way in 
`-monitorWheelEventsWithOptions:`; for some
reason, `-[WebScriptOject valueForKey:]` deliberately triggers an exception 
when accessing a non-existent
key, so catch that exception.

* Tools/DumpRenderTree/mac/EventSendingController.mm:
(-[EventSendingController monitorWheelEventsWithOptions:]):
* Tools/TestRunnerShared/Bindings/JSBasics.cpp:
(WTR::isValidValue):
(WTR::booleanProperty):
(WTR::numericProperty):
(WTR::objectProperty):
* Tools/TestRunnerShared/Bindings/JSBasics.h:

Canonical link: https://commits.webkit.org/258474@main


_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to