NEW 115763
Make caret not blink when entering dimmed display state before going to display sleep
https://bugs.webkit.org/show_bug.cgi?id=115763
Summary Make caret not blink when entering dimmed display state before going to displ...
Roger Fong
Reported 2013-05-07 15:12:30 PDT
Make the caret not blink on mac when the display goes dim (which happens about 15 seconds before the display goes to sleep).
Attachments
patch (7.06 KB, patch)
2013-05-07 17:05 PDT, Roger Fong
simon.fraser: review-
patch (22.27 KB, patch)
2013-05-12 02:42 PDT, Roger Fong
rniwa: review-
eflews.bot: commit-queue-
Roger Fong
Comment 1 2013-05-07 16:48:25 PDT
Roger Fong
Comment 2 2013-05-07 17:05:48 PDT
Simon Fraser (smfr)
Comment 3 2013-05-07 17:10:31 PDT
Comment on attachment 200999 [details] patch I don't think RenderTheme is the right place for the IOKit code; we might even want it in WebKit/WebKit2. WebCore shouldn't know about screen dimming; it should just be told that the caret should stop blinking.
Tim Horton
Comment 4 2013-05-07 17:11:44 PDT
Comment on attachment 200999 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=200999&action=review > Source/WebCore/ChangeLog:9 > + Update RenderTheme to keep track of the receive display sleep notifications and keep track of the display's state. keep track of the receive? > Source/WebCore/editing/FrameSelection.cpp:1849 > + if (m_frame->view()->renderView()->theme()->isScreenDimmed() || (isCaretBlinkingSuspended() && caretPaint)) Can any of these ever be null? > Source/WebCore/rendering/RenderTheme.h:350 > + static bool m_screenDimmed; I think that statics use s instead of m or something but you should look it up. Also maybe this should just be in the RenderThemeMac file and not in this class at all? But I dunno. > Source/WebCore/rendering/RenderThemeMac.h:262 > + io_service_t m_displayWrangler; This is pretty bizarre to be in RenderTheme*. > Source/WebCore/rendering/RenderThemeMac.mm:2316 > + case kIOMessageDeviceWillPowerOff: > + m_screenDimmed = true; > + break; > + > + case kIOMessageDeviceHasPoweredOn: > + m_screenDimmed = false; > + break; This is not indented correctly. Does this really need to be a switch?
Roger Fong
Comment 5 2013-05-10 17:05:13 PDT
I'm going to move PowerObserver code into a class that handles both Display/Power notifications (the both use IOKit) (calling it DisplayAndPowerController until I or someone else comes up with a better name). This requires me however to also modify the SharedTimerMac.mm (I'm creating a SharedTimerMac.h as well). One piece that I still haven't figured out is where I'm going to instantiate said DisplayAndPowerController. Thoughts?
Roger Fong
Comment 6 2013-05-12 02:42:04 PDT
Created attachment 201484 [details] patch I may want to split this into two patches. One that adds the DisplayAndPowerController class (and gets rid of old PowerObserver stuff) And then another that actually has FrameSelection check the screen state.
EFL EWS Bot
Comment 7 2013-05-12 02:49:49 PDT
EFL EWS Bot
Comment 8 2013-05-12 02:51:24 PDT
Early Warning System Bot
Comment 9 2013-05-12 03:00:41 PDT
Early Warning System Bot
Comment 10 2013-05-12 03:02:15 PDT
Build Bot
Comment 11 2013-05-12 03:13:31 PDT
Build Bot
Comment 12 2013-05-12 03:18:48 PDT
kov's GTK+ EWS bot
Comment 13 2013-05-12 04:03:47 PDT
Ryosuke Niwa
Comment 14 2013-05-12 10:22:09 PDT
(In reply to comment #6) > Created an attachment (id=201484) [details] > patch > > I may want to split this into two patches. > One that adds the DisplayAndPowerController class (and gets rid of old PowerObserver stuff) > And then another that actually has FrameSelection check the screen state. Please do.
Build Bot
Comment 15 2013-05-12 15:05:45 PDT
Ryosuke Niwa
Comment 16 2013-05-13 09:32:04 PDT
Comment on attachment 201484 [details] patch Please split the patch to add DisplayAndPowerController.
Note You need to log in before you can comment on or make changes to this bug.