Changeset 223023 in webkit


Ignore:
Timestamp:
Oct 7, 2017, 4:44:45 PM (8 years ago)
Author:
Darin Adler
Message:

Update Document.createEvent for recent DOM specification changes
https://bugs.webkit.org/show_bug.cgi?id=178052

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/dom/events/EventTarget-dispatchEvent-expected.txt: Updated to expect more tests to pass.
  • web-platform-tests/dom/nodes/Document-createEvent-expected.txt: Ditto.
  • web-platform-tests/html/browsers/browsing-the-web/unloading-documents/beforeunload-canceling-expected.txt: Ditto.

Source/WebCore:

  • dom/BeforeUnloadEvent.cpp:

(WebCore::BeforeUnloadEvent::BeforeUnloadEvent): Added a constructor for
createForBindings.
(WebCore::BeforeUnloadEvent::~BeforeUnloadEvent): Deleted. Just let the
compiler generate this.

  • dom/BeforeUnloadEvent.h: Added createForBindings. Also made more things private.
  • dom/Document.cpp:

(WebCore::Document::createEvent): Updated comments for clarity. Responding to
changes to the DOM specification, added support for "beforeunloadevent", "focusevent",
and "svgevents", moved "keyboardevents" and "popstateevent" into the list of strings
we should remove, and moved "compositionevent", "devicemotionevent",
"deviceorientationevent", "hashchangeevent", "storageevent", and "textevent" into
the list of strings we should keep.

  • dom/Event.h: Added a virtual setRelatedTarget alongside the virtual relatedTarget

to allow us to clean up the code that manipulates it.

  • dom/EventContext.cpp:

(WebCore::MouseOrFocusEventContext::handleLocalEvents const): Call the virtual
setRelatedTarget instead of doing a little type casting dance.

  • dom/FocusEvent.h: Added createForBindings. Made more functions private and

changed setRelatedTarget into a private final override.

  • dom/MouseEvent.h: Changed setRelatedTarget into a private final override.
Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r223021 r223023  
     12017-10-07  Darin Adler  <darin@apple.com>
     2
     3        Update Document.createEvent for recent DOM specification changes
     4        https://bugs.webkit.org/show_bug.cgi?id=178052
     5
     6        Reviewed by Chris Dumez.
     7
     8        * web-platform-tests/dom/events/EventTarget-dispatchEvent-expected.txt: Updated to expect more tests to pass.
     9        * web-platform-tests/dom/nodes/Document-createEvent-expected.txt: Ditto.
     10        * web-platform-tests/html/browsers/browsing-the-web/unloading-documents/beforeunload-canceling-expected.txt: Ditto.
     11
    1122017-10-07  Andy Estes  <aestes@apple.com>
    213
  • trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/EventTarget-dispatchEvent-expected.txt

    r220772 r223023  
    22
    33PASS Calling dispatchEvent(null).
    4 FAIL If the event's initialized flag is not set, an InvalidStateError must be thrown (BeforeUnloadEvent). The operation is not supported.
     4PASS If the event's initialized flag is not set, an InvalidStateError must be thrown (BeforeUnloadEvent).
    55PASS If the event's initialized flag is not set, an InvalidStateError must be thrown (CompositionEvent).
    66PASS If the event's initialized flag is not set, an InvalidStateError must be thrown (CustomEvent).
     
    1010PASS If the event's initialized flag is not set, an InvalidStateError must be thrown (Event).
    1111PASS If the event's initialized flag is not set, an InvalidStateError must be thrown (Events).
    12 FAIL If the event's initialized flag is not set, an InvalidStateError must be thrown (FocusEvent). The operation is not supported.
     12PASS If the event's initialized flag is not set, an InvalidStateError must be thrown (FocusEvent).
    1313PASS If the event's initialized flag is not set, an InvalidStateError must be thrown (HashChangeEvent).
    1414PASS If the event's initialized flag is not set, an InvalidStateError must be thrown (HTMLEvents).
     
    1818PASS If the event's initialized flag is not set, an InvalidStateError must be thrown (MouseEvents).
    1919PASS If the event's initialized flag is not set, an InvalidStateError must be thrown (StorageEvent).
    20 FAIL If the event's initialized flag is not set, an InvalidStateError must be thrown (SVGEvents). The operation is not supported.
     20PASS If the event's initialized flag is not set, an InvalidStateError must be thrown (SVGEvents).
    2121PASS If the event's initialized flag is not set, an InvalidStateError must be thrown (TextEvent).
    2222FAIL If the event's initialized flag is not set, an InvalidStateError must be thrown (TouchEvent). The operation is not supported.
  • trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Document-createEvent-expected.txt

    r220772 r223023  
    11
    2 FAIL BeforeUnloadEvent should be an alias for BeforeUnloadEvent. The operation is not supported.
    3 FAIL createEvent('BeforeUnloadEvent') should be initialized correctly. undefined is not an object (evaluating 'ev.type')
    4 FAIL beforeunloadevent should be an alias for BeforeUnloadEvent. The operation is not supported.
    5 FAIL createEvent('beforeunloadevent') should be initialized correctly. undefined is not an object (evaluating 'ev.type')
    6 FAIL BEFOREUNLOADEVENT should be an alias for BeforeUnloadEvent. The operation is not supported.
    7 FAIL createEvent('BEFOREUNLOADEVENT') should be initialized correctly. undefined is not an object (evaluating 'ev.type')
     2PASS BeforeUnloadEvent should be an alias for BeforeUnloadEvent.
     3PASS createEvent('BeforeUnloadEvent') should be initialized correctly.
     4PASS beforeunloadevent should be an alias for BeforeUnloadEvent.
     5PASS createEvent('beforeunloadevent') should be initialized correctly.
     6PASS BEFOREUNLOADEVENT should be an alias for BeforeUnloadEvent.
     7PASS createEvent('BEFOREUNLOADEVENT') should be initialized correctly.
    88PASS Should throw NOT_SUPPORTED_ERR for pluralized legacy event interface "BeforeUnloadEvents"
    99PASS CompositionEvent should be an alias for CompositionEvent.
     
    5454PASS EVENTS should be an alias for Event.
    5555PASS createEvent('EVENTS') should be initialized correctly.
    56 FAIL FocusEvent should be an alias for FocusEvent. The operation is not supported.
    57 FAIL createEvent('FocusEvent') should be initialized correctly. undefined is not an object (evaluating 'ev.type')
    58 FAIL focusevent should be an alias for FocusEvent. The operation is not supported.
    59 FAIL createEvent('focusevent') should be initialized correctly. undefined is not an object (evaluating 'ev.type')
    60 FAIL FOCUSEVENT should be an alias for FocusEvent. The operation is not supported.
    61 FAIL createEvent('FOCUSEVENT') should be initialized correctly. undefined is not an object (evaluating 'ev.type')
     56PASS FocusEvent should be an alias for FocusEvent.
     57PASS createEvent('FocusEvent') should be initialized correctly.
     58PASS focusevent should be an alias for FocusEvent.
     59PASS createEvent('focusevent') should be initialized correctly.
     60PASS FOCUSEVENT should be an alias for FocusEvent.
     61PASS createEvent('FOCUSEVENT') should be initialized correctly.
    6262PASS Should throw NOT_SUPPORTED_ERR for pluralized legacy event interface "FocusEvents"
    6363PASS HashChangeEvent should be an alias for HashChangeEvent.
     
    109109PASS createEvent('STORAGEEVENT') should be initialized correctly.
    110110PASS Should throw NOT_SUPPORTED_ERR for pluralized legacy event interface "StorageEvents"
    111 FAIL SVGEvents should be an alias for Event. The operation is not supported.
    112 FAIL createEvent('SVGEvents') should be initialized correctly. undefined is not an object (evaluating 'ev.type')
    113 FAIL svgevents should be an alias for Event. The operation is not supported.
    114 FAIL createEvent('svgevents') should be initialized correctly. undefined is not an object (evaluating 'ev.type')
    115 FAIL SVGEVENTS should be an alias for Event. The operation is not supported.
    116 FAIL createEvent('SVGEVENTS') should be initialized correctly. undefined is not an object (evaluating 'ev.type')
     111PASS SVGEvents should be an alias for Event.
     112PASS createEvent('SVGEvents') should be initialized correctly.
     113PASS svgevents should be an alias for Event.
     114PASS createEvent('svgevents') should be initialized correctly.
     115PASS SVGEVENTS should be an alias for Event.
     116PASS createEvent('SVGEVENTS') should be initialized correctly.
    117117FAIL TextEvent should be an alias for CompositionEvent. assert_equals: expected object "[object CompositionEventPrototype]" but got object "[object TextEventPrototype]"
    118118PASS createEvent('TextEvent') should be initialized correctly.
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/unloading-documents/beforeunload-canceling-expected.txt

    r215164 r223023  
    33PASS Returning a string must not cancel the event: CustomEvent, cancelable
    44FAIL Returning false must not cancel the event, because it's coerced to the DOMString "false" which does not cancel CustomEvents: CustomEvent, cancelable assert_false: The event must not have been canceled expected false got true
    5 FAIL Returning a string must not cancel the event: BeforeUnloadEvent with type "click", cancelable The operation is not supported.
     5PASS Returning a string must not cancel the event: BeforeUnloadEvent with type "click", cancelable
    66PASS Returning null with a real iframe unloading
    77PASS Returning undefined with a real iframe unloading
  • trunk/Source/WebCore/ChangeLog

    r223021 r223023  
     12017-10-07  Darin Adler  <darin@apple.com>
     2
     3        Update Document.createEvent for recent DOM specification changes
     4        https://bugs.webkit.org/show_bug.cgi?id=178052
     5
     6        Reviewed by Chris Dumez.
     7
     8        * dom/BeforeUnloadEvent.cpp:
     9        (WebCore::BeforeUnloadEvent::BeforeUnloadEvent): Added a constructor for
     10        createForBindings.
     11        (WebCore::BeforeUnloadEvent::~BeforeUnloadEvent): Deleted. Just let the
     12        compiler generate this.
     13        * dom/BeforeUnloadEvent.h: Added createForBindings. Also made more things private.
     14
     15        * dom/Document.cpp:
     16        (WebCore::Document::createEvent): Updated comments for clarity. Responding to
     17        changes to the DOM specification, added support for "beforeunloadevent", "focusevent",
     18        and "svgevents", moved "keyboardevents" and "popstateevent" into the list of strings
     19        we should remove, and moved "compositionevent", "devicemotionevent",
     20        "deviceorientationevent", "hashchangeevent", "storageevent", and "textevent" into
     21        the list of strings we should keep.
     22
     23        * dom/Event.h: Added a virtual setRelatedTarget alongside the virtual relatedTarget
     24        to allow us to clean up the code that manipulates it.
     25
     26        * dom/EventContext.cpp:
     27        (WebCore::MouseOrFocusEventContext::handleLocalEvents const): Call the virtual
     28        setRelatedTarget instead of doing a little type casting dance.
     29
     30        * dom/FocusEvent.h: Added createForBindings. Made more functions private and
     31        changed setRelatedTarget into a private final override.
     32
     33        * dom/MouseEvent.h: Changed setRelatedTarget into a private final override.
     34
    1352017-10-07  Andy Estes  <aestes@apple.com>
    236
  • trunk/Source/WebCore/dom/BeforeUnloadEvent.cpp

    r165676 r223023  
    3333}
    3434
     35BeforeUnloadEvent::BeforeUnloadEvent(ForBindingsFlag)
     36{
     37}
     38
    3539bool BeforeUnloadEvent::isBeforeUnloadEvent() const
    3640{
     
    3842}
    3943
    40 BeforeUnloadEvent::~BeforeUnloadEvent()
    41 {
    42 }
    43 
    4444} // namespace WebCore
  • trunk/Source/WebCore/dom/BeforeUnloadEvent.h

    r208179 r223023  
    33 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de)
    44 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
    5  * Copyright (C) 2003, 2004, 2005, 2006 Apple Inc.
     5 * Copyright (C) 2003-2017 Apple Inc. All rights reserved.
    66 * Copyright (C) 2013 Samsung Electronics
    77 *
     
    3131class BeforeUnloadEvent final : public Event {
    3232public:
    33     virtual ~BeforeUnloadEvent();
    34 
    3533    static Ref<BeforeUnloadEvent> create()
    3634    {
     
    3836    }
    3937
     38    static Ref<BeforeUnloadEvent> createForBindings()
     39    {
     40        return adoptRef(*new BeforeUnloadEvent { ForBindings });
     41    }
     42
    4043    String returnValue() const { return m_returnValue; }
    4144    void setReturnValue(const String& returnValue) { m_returnValue = returnValue; }
    4245
    43     EventInterface eventInterface() const override { return BeforeUnloadEventInterfaceType; }
     46private:
     47    enum ForBindingsFlag { ForBindings };
     48    BeforeUnloadEvent();
     49    BeforeUnloadEvent(ForBindingsFlag);
    4450
    45 private:
    46     BeforeUnloadEvent();
    47 
    48     bool isBeforeUnloadEvent() const override;
     51    EventInterface eventInterface() const final { return BeforeUnloadEventInterfaceType; }
     52    bool isBeforeUnloadEvent() const final;
    4953
    5054    String m_returnValue;
  • trunk/Source/WebCore/dom/Document.cpp

    r222997 r223023  
    3131#include "AXObjectCache.h"
    3232#include "Attr.h"
     33#include "BeforeUnloadEvent.h"
    3334#include "CDATASection.h"
    3435#include "CSSAnimationController.h"
     
    6566#include "ExtensionStyleSheets.h"
    6667#include "FocusController.h"
     68#include "FocusEvent.h"
    6769#include "FontFaceSet.h"
    6870#include "FormController.h"
     
    42604262ExceptionOr<Ref<Event>> Document::createEvent(const String& type)
    42614263{
    4262     // Please do *not* add new event classes to this function unless they are
    4263     // required for compatibility of some actual legacy web content.
     4264    // Please do *not* add new event classes to this function unless they are required
     4265    // for compatibility with the DOM specification or some actual legacy web content.
    42644266
    42654267    // This mechanism is superceded by use of event constructors.
     
    42694271    // <https://dom.spec.whatwg.org/#dom-document-createevent>.
    42704272
     4273    if (equalLettersIgnoringASCIICase(type, "beforeunloadevent"))
     4274        return Ref<Event> { BeforeUnloadEvent::createForBindings() };
     4275    if (equalLettersIgnoringASCIICase(type, "compositionevent"))
     4276        return Ref<Event> { CompositionEvent::createForBindings() };
    42714277    if (equalLettersIgnoringASCIICase(type, "customevent"))
    42724278        return Ref<Event> { CustomEvent::create() };
    4273     if (equalLettersIgnoringASCIICase(type, "event") || equalLettersIgnoringASCIICase(type, "events") || equalLettersIgnoringASCIICase(type, "htmlevents"))
     4279    if (equalLettersIgnoringASCIICase(type, "event") || equalLettersIgnoringASCIICase(type, "events") || equalLettersIgnoringASCIICase(type, "htmlevents") || equalLettersIgnoringASCIICase(type, "svgevents"))
    42744280        return Event::createForBindings();
    4275     if (equalLettersIgnoringASCIICase(type, "keyboardevent") || equalLettersIgnoringASCIICase(type, "keyboardevents"))
     4281    if (equalLettersIgnoringASCIICase(type, "focusevent"))
     4282        return Ref<Event> { FocusEvent::createForBindings() };
     4283    if (equalLettersIgnoringASCIICase(type, "hashchangeevent"))
     4284        return Ref<Event> { HashChangeEvent::createForBindings() };
     4285    if (equalLettersIgnoringASCIICase(type, "keyboardevent"))
    42764286        return Ref<Event> { KeyboardEvent::createForBindings() };
    42774287    if (equalLettersIgnoringASCIICase(type, "messageevent"))
    42784288        return Ref<Event> { MessageEvent::createForBindings() };
     4289    if (equalLettersIgnoringASCIICase(type, "storageevent"))
     4290        return Ref<Event> { StorageEvent::createForBindings() };
    42794291    if (equalLettersIgnoringASCIICase(type, "mouseevent") || equalLettersIgnoringASCIICase(type, "mouseevents"))
    42804292        return Ref<Event> { MouseEvent::createForBindings() };
     4293    if (equalLettersIgnoringASCIICase(type, "textevent"))
     4294        return Ref<Event> { TextEvent::createForBindings() }; // FIXME: HTML specification says this should create a CompositionEvent, not a TextEvent.
    42814295    if (equalLettersIgnoringASCIICase(type, "uievent") || equalLettersIgnoringASCIICase(type, "uievents"))
    42824296        return Ref<Event> { UIEvent::createForBindings() };
    4283     if (equalLettersIgnoringASCIICase(type, "popstateevent"))
    4284         return Ref<Event> { PopStateEvent::createForBindings() };
    4285 
    4286 #if ENABLE(TOUCH_EVENTS)
    4287     if (equalLettersIgnoringASCIICase(type, "touchevent"))
    4288         return Ref<Event> { TouchEvent::createForBindings() };
    4289 #endif
    4290 
    4291     // The following string comes from the SVG specifications
    4292     // <http://www.w3.org/TR/SVG/script.html#InterfaceSVGZoomEvent>
    4293     // <http://www.w3.org/TR/SVG2/interact.html#InterfaceSVGZoomEvent>.
    4294     // However, since there is no provision for initializing the event once it is created,
    4295     // there is no practical value in this feature.
    4296 
    4297     if (equalLettersIgnoringASCIICase(type, "svgzoomevents"))
    4298         return Ref<Event> { SVGZoomEvent::createForBindings() };
    4299 
    4300     // The following strings are for event classes where WebKit supplies an init function.
    4301     // These strings are not part of the DOM specification and we would like to eliminate them.
    4302     // However, we currently include these because we have concerns about backward compatibility.
    4303 
    4304     // FIXME: For each of the strings below, prove there is no content depending on it and remove
    4305     // both the string and the corresponding init function for that class.
    4306 
    4307     if (equalLettersIgnoringASCIICase(type, "compositionevent"))
    4308         return Ref<Event> { CompositionEvent::createForBindings() };
    4309     if (equalLettersIgnoringASCIICase(type, "hashchangeevent"))
    4310         return Ref<Event> { HashChangeEvent::createForBindings() };
    4311     if (equalLettersIgnoringASCIICase(type, "mutationevent") || equalLettersIgnoringASCIICase(type, "mutationevents"))
    4312         return Ref<Event> { MutationEvent::createForBindings() };
    4313     if (equalLettersIgnoringASCIICase(type, "overflowevent"))
    4314         return Ref<Event> { OverflowEvent::createForBindings() };
    4315     if (equalLettersIgnoringASCIICase(type, "storageevent"))
    4316         return Ref<Event> { StorageEvent::createForBindings() };
    4317     if (equalLettersIgnoringASCIICase(type, "textevent"))
    4318         return Ref<Event> { TextEvent::createForBindings() };
    4319     if (equalLettersIgnoringASCIICase(type, "wheelevent"))
    4320         return Ref<Event> { WheelEvent::createForBindings() };
    4321 
     4297
     4298    // FIXME: Consider including support for these event classes even when device orientation
     4299    // support is not enabled.
    43224300#if ENABLE(DEVICE_ORIENTATION)
    43234301    if (equalLettersIgnoringASCIICase(type, "devicemotionevent"))
     
    43264304        return Ref<Event> { DeviceOrientationEvent::createForBindings() };
    43274305#endif
     4306
     4307#if ENABLE(TOUCH_EVENTS)
     4308    if (equalLettersIgnoringASCIICase(type, "touchevent"))
     4309        return Ref<Event> { TouchEvent::createForBindings() };
     4310#endif
     4311
     4312    // FIXME: Add support for "dragevent", which the DOM specification calls for.
     4313
     4314    // The following string comes from the SVG specification
     4315    // <http://www.w3.org/TR/SVG/script.html#InterfaceSVGZoomEvent>
     4316    // However, since there is no provision for initializing the event once it is created,
     4317    // there is no practical value in this feature.
     4318    // FIXME: Confirm there is no content depending on this and remove it.
     4319
     4320    if (equalLettersIgnoringASCIICase(type, "svgzoomevents"))
     4321        return Ref<Event> { SVGZoomEvent::createForBindings() };
     4322
     4323    // The following strings are not part of the DOM specification and we would like to eliminate them.
     4324    // However, we currently include them until we resolve any issues with backward compatibility.
     4325    // FIXME: For each of the strings below, confirm that there is no content depending on it and remove
     4326    // the string, remove the createForBindings function, and also consider removing the corresponding
     4327    // init function for that class.
     4328
     4329    if (equalLettersIgnoringASCIICase(type, "keyboardevents"))
     4330        return Ref<Event> { KeyboardEvent::createForBindings() };
     4331    if (equalLettersIgnoringASCIICase(type, "mutationevent") || equalLettersIgnoringASCIICase(type, "mutationevents"))
     4332        return Ref<Event> { MutationEvent::createForBindings() };
     4333    if (equalLettersIgnoringASCIICase(type, "overflowevent"))
     4334        return Ref<Event> { OverflowEvent::createForBindings() };
     4335    if (equalLettersIgnoringASCIICase(type, "popstateevent"))
     4336        return Ref<Event> { PopStateEvent::createForBindings() };
     4337    if (equalLettersIgnoringASCIICase(type, "wheelevent"))
     4338        return Ref<Event> { WheelEvent::createForBindings() };
    43284339
    43294340    return Exception { NotSupportedError };
  • trunk/Source/WebCore/dom/Event.h

    r222392 r223023  
    169169
    170170    virtual EventTarget* relatedTarget() const { return nullptr; }
     171    virtual void setRelatedTarget(EventTarget&) { }
    171172
    172173protected:
  • trunk/Source/WebCore/dom/EventContext.cpp

    r210216 r223023  
    7676void MouseOrFocusEventContext::handleLocalEvents(Event& event) const
    7777{
    78     ASSERT(is<MouseEvent>(event) || is<FocusEvent>(event));
    79     if (m_relatedTarget) {
    80         if (is<MouseEvent>(event))
    81             downcast<MouseEvent>(event).setRelatedTarget(m_relatedTarget.get());
    82         else if (is<FocusEvent>(event))
    83             downcast<FocusEvent>(event).setRelatedTarget(m_relatedTarget.get());
    84     }
     78    if (m_relatedTarget)
     79        event.setRelatedTarget(*m_relatedTarget);
    8580    EventContext::handleLocalEvents(event);
    8681}
  • trunk/Source/WebCore/dom/FocusEvent.h

    r208179 r223023  
    11/*
    22 * Copyright (C) 2013 Google Inc. All rights reserved.
     3 * Copyright (C) 2017 Apple Inc. All rights reserved.
    34 *
    45 * Redistribution and use in source and binary forms, with or without
     
    4041    }
    4142
     43    static Ref<FocusEvent> createForBindings()
     44    {
     45        return adoptRef(*new FocusEvent);
     46    }
     47
    4248    struct Init : UIEventInit {
    4349        RefPtr<EventTarget> relatedTarget;
     
    4955    }
    5056
    51     EventTarget* relatedTarget() const override { return m_relatedTarget.get(); }
    52     void setRelatedTarget(RefPtr<EventTarget>&& relatedTarget) { m_relatedTarget = WTFMove(relatedTarget); }
    53 
    54     EventInterface eventInterface() const override;
     57    EventTarget* relatedTarget() const final { return m_relatedTarget.get(); }
    5558
    5659private:
     60    FocusEvent() = default;
    5761    FocusEvent(const AtomicString& type, bool canBubble, bool cancelable, DOMWindow*, int, RefPtr<EventTarget>&&);
    5862    FocusEvent(const AtomicString& type, const Init&, IsTrusted);
    5963
    60     bool isFocusEvent() const override;
     64    EventInterface eventInterface() const final;
     65    bool isFocusEvent() const final;
     66
     67    void setRelatedTarget(EventTarget& relatedTarget) final { m_relatedTarget = &relatedTarget; }
    6168
    6269    RefPtr<EventTarget> m_relatedTarget;
  • trunk/Source/WebCore/dom/MouseEvent.h

    r222392 r223023  
    5858    bool buttonDown() const { return m_buttonDown; }
    5959    EventTarget* relatedTarget() const final { return m_relatedTarget.get(); }
    60     void setRelatedTarget(EventTarget* relatedTarget) { m_relatedTarget = relatedTarget; }
    6160    double force() const { return m_force; }
    6261    void setForce(double force) { m_force = force; }
     
    9594    bool isDragEvent() const;
    9695
     96    void setRelatedTarget(EventTarget& relatedTarget) final { m_relatedTarget = &relatedTarget; }
     97
    9798    unsigned short m_button { 0 };
    9899    unsigned short m_syntheticClickType { 0 };
Note: See TracChangeset for help on using the changeset viewer.