Bug 128587

Summary: Frame::rectForSelection shouldn't instantiate FrameSelection
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: HTML EditingAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, buildbot, darin, enrica, justin.garcia, mitz, psolanki, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 127832    
Attachments:
Description Flags
Cleanup
enrica: review+, rniwa: commit-queue-
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion none

Ryosuke Niwa
Reported 2014-02-11 01:19:39 PST
Right now, Frame::rectForSelection instantiates a FrameSelection in order to compute the absolute caret bounds of start and end points. We're trying to contain the side-effects of FrameSelection::setSelection with suppressSelectionNotifications and restoreSelectionNotifications on WebEditorClient, as well as suppressCloseTyping and restoreCloseTyping on FrameSelection but selectionchange event still fires and it could change the focus, Because it uses FrameSelection::setSelection on both start and end points, it erroneously fires selectionchange events and closes the open typing command.
Attachments
Cleanup (25.71 KB, patch)
2014-02-11 01:38 PST, Ryosuke Niwa
enrica: review+
rniwa: commit-queue-
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion (504.22 KB, application/zip)
2014-02-11 04:19 PST, Build Bot
no flags
Ryosuke Niwa
Comment 1 2014-02-11 01:38:33 PST
Build Bot
Comment 2 2014-02-11 04:19:56 PST
Comment on attachment 223827 [details] Cleanup Attachment 223827 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/5678939372519424 New failing tests: animations/stop-animation-on-suspend.html
Build Bot
Comment 3 2014-02-11 04:19:57 PST
Created attachment 223841 [details] Archive of layout-test-results from webkit-ews-07 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-07 Port: mac-mountainlion Platform: Mac OS X 10.8.5
Alexey Proskuryakov
Comment 4 2014-02-11 10:29:29 PST
> animations/stop-animation-on-suspend.html Now, that's a lie.
Enrica Casucci
Comment 5 2014-02-11 14:09:45 PST
Comment on attachment 223827 [details] Cleanup View in context: https://bugs.webkit.org/attachment.cgi?id=223827&action=review > Source/WebCore/editing/htmlediting.cpp:1278 > + // if caretNode is a block and caret is inside it then caret should be painted by that block Comment style.
Ryosuke Niwa
Comment 6 2014-02-11 14:31:56 PST
Comment on attachment 223827 [details] Cleanup (In reply to comment #5) > (From update of attachment 223827 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=223827&action=review > > > Source/WebCore/editing/htmlediting.cpp:1278 > > + // if caretNode is a block and caret is inside it then caret should be painted by that block > > Comment style. WIll fix.
Ryosuke Niwa
Comment 7 2014-02-11 17:48:15 PST
Note You need to log in before you can comment on or make changes to this bug.