Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 883886ee70ad3953b2e7e3bf6a079897bc76adcd
https://github.com/WebKit/WebKit/commit/883886ee70ad3953b2e7e3bf6a079897bc76adcd
Author: Alan Baradlay <[email protected]>
Date: 2024-06-14 (Fri, 14 Jun 2024)
Changed paths:
M Source/WebCore/page/EventHandler.cpp
Log Message:
-----------
Crash under RenderObject::createVisiblePosition() while dragging the volume
scrubber on a video player
https://bugs.webkit.org/show_bug.cgi?id=275469
<rdar://129080145>
Reviewed by Antti Koivisto.
1. In EventHandler::mouseDragged we dispatch the "mouse move" event
2. JS triggers some mutation which makes the tree dirty
3. later in EventHandler::handleMouseMoveEvent() we call
EventHandler::handleMouseDraggedEvent() (tree is dirty)
which, through a few layers of functions calls
VisiblePosition::canonicalPosition()
4. VisiblePosition::canonicalPosition() needs a clean tree so it calls
Document::updateLayout() which is turn destroys some renderers (see #2)
5. In-between EventHandler::handleMouseDraggedEvent() and
VisiblePosition::canonicalPosition(), we CheckPtr a renderer which gets
destroyed at #4.
The fix (what we normally do with cases like this) is to make sure we clean the
tree before entering VisiblePosition.
* Source/WebCore/page/EventHandler.cpp:
(WebCore::EventHandler::handleMouseDraggedEvent):
Canonical link: https://commits.webkit.org/280013@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes