Closed Bug 334609 Opened 18 years ago Closed 18 years ago

On initial paint, caret sometimes paints too short

Categories

(Core :: DOM: Editor, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: mrbkap, Assigned: mrbkap)

References

Details

(Keywords: regression)

Attachments

(1 file)

<I don't have a reduced testcase for this yet>

I've noticed during some testcases that the caret will only paint half as "tall" as the input box that it's in. It seems to always erase the correct rect and correct itself on the second blink, however (by "tall", I mean that the caret will stretch from the top of the input box to only a few pixels down instead of all the way to the bottom).

Note: I seem to be able to trigger this behavior (on Windows, at least, though I think I've seen it while debugging on Linux) by opening the find toolbar with either ctrl+f or using type-ahead-find's '/'.
I see this with toolkit=gtk2 in the find bar. ->all
OS: Windows XP → All
Status: NEW → ASSIGNED
Priority: -- → P3
Hardware: PC → All
Target Milestone: --- → mozilla1.9alpha
Attached patch FixSplinter Review
What was happening here is that the caret was being told to blink in a frame that hadn't been reflowed yet (or had reflowed too short initially). Then when we did reflow the frame, the caret already had a size and position. This patch fixes this bug by making sure the caret updates its position before painting after a reflow.

I also changed the order of the InvalidateOutsideCaret and UpdateCaretPosition calls to favor invalidating the old position (which seems safer to me).
Attachment #234298 - Flags: superreview?(roc)
Attachment #234298 - Flags: review?(roc)
Attachment #234298 - Flags: superreview?(roc)
Attachment #234298 - Flags: superreview+
Attachment #234298 - Flags: review?(roc)
Attachment #234298 - Flags: review+
Fix checked into trunk.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: