Bug 11415 - REGRESSION: Selection change performed even when delete delegate replies NO
Summary: REGRESSION: Selection change performed even when delete delegate replies NO
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 420+
Hardware: Macintosh OS X 10.4
: P1 Normal
Assignee: Nobody
URL:
Keywords: InRadar, Regression
Depends on:
Blocks:
 
Reported: 2006-10-25 15:22 PDT by Duncan Wilcox
Modified: 2006-12-04 02:26 PST (History)
0 users

See Also:


Attachments
Test case (1.23 KB, text/plain)
2006-10-25 15:24 PDT, Duncan Wilcox
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Duncan Wilcox 2006-10-25 15:22:51 PDT
If webView:shouldDeleteDOMRange: replies NO, WebCore/editing/TypingCommand.cpp still performs selection changes and webView:shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting: is called shortly thereafter (incidentally with dangling proposed selection nodes).

What seems to be happening is that TypingCommand::deleteKeyPressed(TextGranularity) and TypingCommand::forwardDeleteKeyPressed(TextGranularity) are performing selection changes before making sure that document()->frame()->shouldDeleteSelection(selectionToDelete) is checked.
Comment 1 Duncan Wilcox 2006-10-25 15:24:46 PDT
Created attachment 11214 [details]
Test case

Run the sample, move to middle text, press delete.

When linked with TOT this test shows that the selection change editing delegate is called right after the delete editing delegate, even though NO is returned to the delete request.
Comment 2 Duncan Wilcox 2006-10-25 15:25:42 PDT
Forgot to mention this is a regression from 2.0.4/419.3
Comment 3 Stephanie Lewis 2006-11-08 15:15:09 PST
radar 4826940
Comment 4 Justin Garcia 2006-12-01 15:52:27 PST
r17981