Bug 33211

Summary: [chromium] layout-related assertion in SelectionController is firing — fix in Chromium WebKit or maybe in WebCore
Product: WebKit Reporter: anton muhin <antonm>
Component: WebKit Misc.Assignee: Nobody <webkit-unassigned>
Severity: Normal CC: darin, dglazkov, dimich, schenney
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   

Description anton muhin 2010-01-05 09:05:49 PST
After http://trac.webkit.org/changeset/52778 Chromium's RenderViewTest.ImeComposition unit test started to fail on Windows and Mac (it's disabled on Linux).

See http://code.google.com/p/chromium/issues/detail?id=31617 for more details.
Comment 1 Darin Adler 2010-01-05 10:36:40 PST
Anton explained that the assertion happens with this backtrace:

WebCore::SelectionController::recomputeCaretRect Line 936
WebCore::SelectionController::absoluteCaretBounds Line 906
WebKit::WebViewImpl::queryCompositionStatus  Line 1085

Based on that it seems clear that the WebViewImpl::queryCompositionStatus function should trigger layout. The best function to call is probably Document::updateLayout.

Alternatively we could decide that the SelectionController::absoluteCaretBounds function is designed to be called by high level code and is itself responsible for triggering layout. In that case we have to look at all the absoluteCaretBounds call sites and make sure it's OK to trigger layout at each of them.