RESOLVED INVALID 14954
NSView redisplay doesn't update display when selection changes
https://bugs.webkit.org/show_bug.cgi?id=14954
Summary NSView redisplay doesn't update display when selection changes
Nicholas Riley
Reported 2007-08-12 17:42:37 PDT
I'm trying to flash the selected text synchronously, but asking the NSView to redisplay doesn't draw anything after I change the selection. This code works fine in released versions of Safari 2 (419.3). WebHTMLView *view; [...] NSRect selectionRect = [view selectionRect]; for (i = 0 ; i < textBlinkCount ; i++) { [view deselectAll]; [view setNeedsDisplayInRect: selectionRect]; [view display]; usleep(60000); [[view _bridge] selectNSRange: selectedRange]; [view setNeedsDisplayInRect: selectionRect]; [view display]; usleep(60000); } I asked about this on #webkit and Darin suggested using [[view window] displayIfNeeded], which behaved identically to the above code (works in 419.3, not in nightly).
Attachments
David Kilzer (:ddkilzer)
Comment 1 2007-08-12 21:15:01 PDT
Nicholas Riley
Comment 2 2008-03-06 03:51:08 PST
I think this may have been a coding error on my part; whatever the issue was, it now works fine with Safari 3.0.4/3.1.
Note You need to log in before you can comment on or make changes to this bug.