Bug 144774

Summary: ASSERTION when pasting text into the WebInspector console
Product: WebKit Reporter: Sam Weinig <sam>
Component: HTML EditingAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, joepeck, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=144471
Attachments:
Description Flags
Crash log
none
Patch none

Sam Weinig
Reported 2015-05-07 16:37:01 PDT
Created attachment 252647 [details] Crash log I am consistently hitting the assertion, ASSERT_WITH_MESSAGE(needsLayout == (view && view->needsLayout()), "Calling editorState() should not cause a synchronous layout.") under WebPage::didChangeSelection() when pasting text into the WebInspector console. Crash log attached.
Attachments
Crash log (80.40 KB, text/plain)
2015-05-07 16:37 PDT, Sam Weinig
no flags
Patch (2.70 KB, patch)
2015-05-07 18:14 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2015-05-07 16:42:02 PDT
I am able to reproduce.
Chris Dumez
Comment 2 2015-05-07 16:50:01 PDT
Looks like what's causing the sync layout is one of these: result.selectionIsNone = selection.isNone(); result.selectionIsRange = selection.isRange(); result.isContentEditable = selection.isContentEditable(); result.isContentRichlyEditable = selection.isContentRichlyEditable(); result.isInPasswordField = selection.isInPasswordField(); result.hasComposition = frame.editor().hasComposition(); result.shouldIgnoreCompositionSelectionChange = frame.editor().ignoreCompositionSelectionChange(); Not something in platformEditorState.
Chris Dumez
Comment 3 2015-05-07 16:55:50 PDT
What happens is actually that needsLayout is false but (view && view->needsLayout()) is true. This case is fine as we merely scheduled a layout, we did not cause a sync layout. We need to tweak the assertion accordingly.
Chris Dumez
Comment 4 2015-05-07 18:14:10 PDT
Chris Dumez
Comment 5 2015-05-07 18:14:50 PDT
*** Bug 144471 has been marked as a duplicate of this bug. ***
Chris Dumez
Comment 6 2015-05-07 18:25:12 PDT
Comment on attachment 252669 [details] Patch Clearing flags on attachment: 252669 Committed r183969: <http://trac.webkit.org/changeset/183969>
Chris Dumez
Comment 7 2015-05-07 18:25:18 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.