Bug 33204 - [Qt] Assertion failure in SelectionController::recomputeCaretRect()
Summary: [Qt] Assertion failure in SelectionController::recomputeCaretRect()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-05 02:59 PST by Andreas Kling
Modified: 2010-01-06 23:08 PST (History)
3 users (show)

See Also:


Attachments
Trigger a layout (if needed) before calling SelectionController::absoluteCaretBounds() (1.10 KB, patch)
2010-01-05 03:08 PST, Andreas Kling
no flags Details | Formatted Diff | Diff
Return an invalid Qt::ImMicroFocus if queried while the view needs to layout. (1.20 KB, patch)
2010-01-05 05:18 PST, Andreas Kling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kling 2010-01-05 02:59:03 PST
Introduced by http://trac.webkit.org/changeset/52778
Comment 1 Andreas Kling 2010-01-05 03:00:42 PST
ASSERTION FAILED: !m_frame->view() || !m_frame->view()->needsLayout()
(../../../WebCore/editing/SelectionController.cpp:929 bool WebCore::SelectionController::recomputeCaretRect())

The problem originates in QWebPage::inputMethodQuery(Qt::ImMicroFocus) which calls SelectionController::absoluteCaretBounds() when the view needs to layout.
Comment 2 Andreas Kling 2010-01-05 03:08:46 PST
Created attachment 45879 [details]
Trigger a layout (if needed) before calling SelectionController::absoluteCaretBounds()
Comment 3 WebKit Review Bot 2010-01-05 03:11:27 PST
style-queue ran check-webkit-style on attachment 45879 [details] without any errors.
Comment 4 Simon Hausmann 2010-01-05 03:15:59 PST
Comment on attachment 45879 [details]
Trigger a layout (if needed) before calling SelectionController::absoluteCaretBounds()

r=me, appears consistent with similar changes in r52778
Comment 5 Andreas Kling 2010-01-05 05:18:53 PST
Created attachment 45882 [details]
Return an invalid Qt::ImMicroFocus if queried while the view needs to layout.

There was more than one way to trigger that assertion, so instead of hacking our way out of it, just return an invalid ImMicroFocus if called at a bad time.
Comment 6 WebKit Review Bot 2010-01-05 05:24:11 PST
style-queue ran check-webkit-style on attachment 45882 [details] without any errors.
Comment 7 WebKit Commit Bot 2010-01-06 23:08:01 PST
Comment on attachment 45882 [details]
Return an invalid Qt::ImMicroFocus if queried while the view needs to layout.

Clearing flags on attachment: 45882

Committed r52903: <http://trac.webkit.org/changeset/52903>
Comment 8 WebKit Commit Bot 2010-01-06 23:08:06 PST
All reviewed patches have been landed.  Closing bug.