Bug 104725 - Crash in EventHandler::selectCursor() on Mac bots running fast/events/mouse-cursor-image-set.html
Summary: Crash in EventHandler::selectCursor() on Mac bots running fast/events/mouse-c...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Beth Dakin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-11 15:00 PST by Beth Dakin
Modified: 2012-12-12 15:00 PST (History)
7 users (show)

See Also:


Attachments
Patch (1.95 KB, patch)
2012-12-11 15:11 PST, Beth Dakin
thorton: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Beth Dakin 2012-12-11 15:00:29 PST
https://bugs.webkit.org/show_bug.cgi?id=99493 enabled image-set for the CSS cursor property. Most of the change is guarded behind #if ENABLE(MOUSE_CURSOR_SCALE).

On the Mac port, we have image-set enabled, so we still parse the image-set in the CSSParser for cursors. But MOUSE_CURSOR_SCALE is not yet enabled, see https://bugs.webkit.org/show_bug.cgi?id=102579

Because we parse the image-set anyway, we see this crash:

 ASSERT(scale == 1);
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.WebCore             	0x000000010faa8eb6 WebCore::EventHandler::selectCursor(WebCore::MouseEventWithHitTestResults const&, WebCore::Scrollbar*) + 1526 (EventHandler.cpp:1481)
1   com.apple.WebCore             	0x000000010faab46c WebCore::EventHandler::handleMouseMoveEvent(WebCore::PlatformMouseEvent const&, WebCore::HitTestResult*, bool) + 1772 (EventHandler.cpp:1912)
2   com.apple.WebCore             	0x000000010faaabd6 WebCore::EventHandler::mouseMoved(WebCore::PlatformMouseEvent const&) + 134 (EventHandler.cpp:1795)
3   com.apple.WebKit2             	0x000000010d37e44c WebKit::handleMouseEvent(WebKit::WebMouseEvent const&, WebKit::WebPage*, bool) + 396 (WebPage.cpp:1526)
4   com.apple.WebKit2             	0x000000010d37e5aa WebKit::WebPage::mouseEventSyncForTesting(WebKit::WebMouseEvent const&, bool&) + 234 (WebPage.cpp:1576)
etc.

I think that the right way to fix this is to avoid parsing the image-set for cursors until it's fully supported on Mac.
Comment 1 Beth Dakin 2012-12-11 15:11:26 PST
Created attachment 178889 [details]
Patch
Comment 2 Beth Dakin 2012-12-11 15:17:45 PST
Thanks, Tim! 

http://trac.webkit.org/changeset/137367
Comment 3 Rick Byers 2012-12-12 14:25:24 PST
Shoot, sorry about that!  Doing exactly what you've done was always my intention (and how I was thinking I had written it) - sorry I missed that.
Comment 4 Beth Dakin 2012-12-12 15:00:07 PST
(In reply to comment #3)
> Shoot, sorry about that!  Doing exactly what you've done was always my intention (and how I was thinking I had written it) - sorry I missed that.

No worries! It happens.