Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6a68c853447d11bd4ea792fc3936f4168e0a71b2
      
https://github.com/WebKit/WebKit/commit/6a68c853447d11bd4ea792fc3936f4168e0a71b2
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-09-20 (Sun, 20 Sep 2026)

  Changed paths:
    M Source/WebCore/dom/Element.cpp

  Log Message:
  -----------
  Element::dispatchMouseEvent() should build its coalesced/predicted MouseEvent 
vectors with WTF::map
https://bugs.webkit.org/show_bug.cgi?id=324658
rdar://187911859

Reviewed by Ryosuke Niwa.

dispatchMouseEvent() built childMouseEvents and predictedEvents with two
hand-rolled append-in-loop transforms. Each merely maps every element of
PlatformMouseEvent::coalescedEvents()/predictedEvents() through
MouseEvent::create(), so they are pure transforms that WTF::map expresses
more clearly. WTF::map also sizes the destination Vector up front, whereas
the append loops did not reserveInitialCapacity() and reallocated as they
grew.

No change in behavior.

* Source/WebCore/dom/Element.cpp:
(WebCore::Element::dispatchMouseEvent):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to