Bug 58382 - Infinite recursion in WebHTMLView executeSavedKeypressCommands
Summary: Infinite recursion in WebHTMLView executeSavedKeypressCommands
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: Macintosh OS X 10.5
: P2 Normal
Assignee: Enrica Casucci
URL:
Keywords: InRadar, PlatformOnly
Depends on:
Blocks:
 
Reported: 2011-04-12 15:06 PDT by Enrica Casucci
Modified: 2011-04-12 15:49 PDT (History)
1 user (show)

See Also:


Attachments
Patch (5.70 KB, patch)
2011-04-12 15:12 PDT, Enrica Casucci
ap: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Enrica Casucci 2011-04-12 15:06:44 PDT
Execution of some editing commands could trigger a call to selectedRange that internally calls executeSavedKeypressCommands creating an infinite recursion.
Comment 1 Enrica Casucci 2011-04-12 15:06:57 PDT
<rdar://problem/9239370>
Comment 2 Enrica Casucci 2011-04-12 15:12:39 PDT
Created attachment 89281 [details]
Patch
Comment 3 Alexey Proskuryakov 2011-04-12 15:34:42 PDT
Comment on attachment 89281 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=89281&action=review

> Source/WebKit2/UIProcess/API/mac/WKView.mm:1183
> +    // We could be called again if the execution of one command triggers a call to selectedRange.

I would add: "In this case, the state is up to date, and we don't need to execute any more saved commands to return a result"
Comment 4 Enrica Casucci 2011-04-12 15:42:55 PDT
(In reply to comment #3)
> (From update of attachment 89281 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=89281&action=review
> 
> > Source/WebKit2/UIProcess/API/mac/WKView.mm:1183
> > +    // We could be called again if the execution of one command triggers a call to selectedRange.
> 
> I would add: "In this case, the state is up to date, and we don't need to execute any more saved commands to return a result"

Will do. thank you!
Comment 5 Enrica Casucci 2011-04-12 15:49:30 PDT
http://trac.webkit.org/changeset/83655