Use a ScopedRedrawLock and invalidate to fix WM_SETCURSOR DefWindowProc artifacts.
Use a ScopedRedrawLock and invalidate to fix WM_SETCURSOR DefWindowProc artifacts.

This is a continuation of https://codereview.chromium.org/12380070
"Redraw after ScopedRedrawLock to fix DefWindowProc artifacts."
That CL was reverted for performance regressions in http://crrev.com/185911
http://chromium-perf.appspot.com/?tab=xp-release-single-core&graph=times&rev=-1&history=150&master=ChromiumPerf&testSuite=page_cycler_intl2&details=true

Use a ScopedRedrawLock in HWNDMessageHandler::OnSetCursor().
( this alone would probably regress http://crbug.com/97808 )
Only InvalidateRect for non-Glass custom frames on WM_SETCURSOR.
( this should prevent a regression of http://crbug.com/97808 )
( limiting invalidation should hopefully minimize the perf regression )
This should be carefully tested on Win7/Vista/XP.

BUG=89820, 97808, 113127, 178600
TEST=No Win7/Vista/XP opaque-frame (classic theme) painting glitches.
R=sky@chromium.org,ben@chromium.org

Review URL: https://chromiumcodereview.appspot.com/12386090

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@186306 0039d316-1c4b-4281-b951-d872f2087c98

patrickm/chromium.src,Fireblend/chromium-crosswalk,Fireblend/chromium-crosswalk,M4sse/chromium.src,Jonekee/chromium.src,patrickm/chromium.src,anirudhSK/chromium,axinging/chromium-crosswalk,Jonekee/chromium.src,M4sse/chromium.src,jaruba/chromium.src,patrickm/chromium.src,mohamed--abdel-maksoud/chromium.src,axinging/chromium-crosswalk,axinging/chromium-crosswalk,Just-D/chromium-1,timopulkkinen/BubbleFish,dushu1203/chromium.src,Fireblend/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,bright-sparks/chromium-spacewalk,pozdnyakov/chromium-crosswalk,jaruba/chromium.src,jaruba/chromium.src,Fireblend/chromium-crosswalk,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk,krieger-od/nwjs_chromium.src,chuan9/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,axinging/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,mogoweb/chromium-crosswalk,Chilledheart/chromium,TheTypoMaster/chromium-crosswalk,hujiajie/pa-chromium,ChromiumWebApps/chromium,mohamed--abdel-maksoud/chromium.src,crosswalk-project/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,ondra-novak/chromium.src,PeterWangIntel/chromium-crosswalk,hujiajie/pa-chromium,littlstar/chromium.src,axinging/chromium-crosswalk,patrickm/chromium.src,M4sse/chromium.src,fujunwei/chromium-crosswalk,anirudhSK/chromium,chuan9/chromium-crosswalk,Jonekee/chromium.src,bright-sparks/chromium-spacewalk,Jonekee/chromium.src,TheTypoMaster/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,pozdnyakov/chromium-crosswalk,anirudhSK/chromium,fujunwei/chromium-crosswalk,axinging/chromium-crosswalk,Pluto-tv/chromium-crosswalk,bright-sparks/chromium-spacewalk,PeterWangIntel/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,Jonekee/chromium.src,anirudhSK/chromium,ltilve/chromium,Just-D/chromium-1,crosswalk-project/chromium-crosswalk-efl,chuan9/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,pozdnyakov/chromium-crosswalk,timopulkkinen/BubbleFish,chuan9/chromium-crosswalk,Just-D/chromium-1,dednal/chromium.src,hgl888/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Jonekee/chromium.src,ondra-novak/chromium.src,bright-sparks/chromium-spacewalk,timopulkkinen/BubbleFish,mogoweb/chromium-crosswalk,krieger-od/nwjs_chromium.src,ChromiumWebApps/chromium,dushu1203/chromium.src,timopulkkinen/BubbleFish,axinging/chromium-crosswalk,fujunwei/chromium-crosswalk,Just-D/chromium-1,hgl888/chromium-crosswalk,fujunwei/chromium-crosswalk,Pluto-tv/chromium-crosswalk,ondra-novak/chromium.src,Pluto-tv/chromium-crosswalk,patrickm/chromium.src,crosswalk-project/chromium-crosswalk-efl,dushu1203/chromium.src,M4sse/chromium.src,ondra-novak/chromium.src,pozdnyakov/chromium-crosswalk,dushu1203/chromium.src,mohamed--abdel-maksoud/chromium.src,ondra-novak/chromium.src,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,bright-sparks/chromium-spacewalk,littlstar/chromium.src,hujiajie/pa-chromium,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk,ondra-novak/chromium.src,Chilledheart/chromium,axinging/chromium-crosswalk,ChromiumWebApps/chromium,mohamed--abdel-maksoud/chromium.src,ltilve/chromium,hujiajie/pa-chromium,ondra-novak/chromium.src,markYoungH/chromium.src,timopulkkinen/BubbleFish,littlstar/chromium.src,ChromiumWebApps/chromium,mogoweb/chromium-crosswalk,pozdnyakov/chromium-crosswalk,markYoungH/chromium.src,PeterWangIntel/chromium-crosswalk,markYoungH/chromium.src,TheTypoMaster/chromium-crosswalk,Jonekee/chromium.src,markYoungH/chromium.src,hgl888/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,dushu1203/chromium.src,mogoweb/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,krieger-od/nwjs_chromium.src,Jonekee/chromium.src,dushu1203/chromium.src,jaruba/chromium.src,krieger-od/nwjs_chromium.src,Pluto-tv/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,hujiajie/pa-chromium,timopulkkinen/BubbleFish,markYoungH/chromium.src,Jonekee/chromium.src,hgl888/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,littlstar/chromium.src,ltilve/chromium,axinging/chromium-crosswalk,krieger-od/nwjs_chromium.src,M4sse/chromium.src,bright-sparks/chromium-spacewalk,pozdnyakov/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,jaruba/chromium.src,dednal/chromium.src,PeterWangIntel/chromium-crosswalk,M4sse/chromium.src,M4sse/chromium.src,anirudhSK/chromium,Fireblend/chromium-crosswalk,timopulkkinen/BubbleFish,M4sse/chromium.src,jaruba/chromium.src,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,anirudhSK/chromium,ondra-novak/chromium.src,dednal/chromium.src,bright-sparks/chromium-spacewalk,TheTypoMaster/chromium-crosswalk,hujiajie/pa-chromium,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,dednal/chromium.src,anirudhSK/chromium,fujunwei/chromium-crosswalk,jaruba/chromium.src,littlstar/chromium.src,crosswalk-project/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,timopulkkinen/BubbleFish,mogoweb/chromium-crosswalk,anirudhSK/chromium,hgl888/chromium-crosswalk-efl,jaruba/chromium.src,hgl888/chromium-crosswalk,ltilve/chromium,krieger-od/nwjs_chromium.src,dednal/chromium.src,ChromiumWebApps/chromium,jaruba/chromium.src,Chilledheart/chromium,dushu1203/chromium.src,crosswalk-project/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,Chilledheart/chromium,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk-efl,hujiajie/pa-chromium,Just-D/chromium-1,mohamed--abdel-maksoud/chromium.src,dushu1203/chromium.src,Just-D/chromium-1,jaruba/chromium.src,hujiajie/pa-chromium,hujiajie/pa-chromium,crosswalk-project/chromium-crosswalk-efl,dednal/chromium.src,Pluto-tv/chromium-crosswalk,ltilve/chromium,pozdnyakov/chromium-crosswalk,pozdnyakov/chromium-crosswalk,fujunwei/chromium-crosswalk,chuan9/chromium-crosswalk,anirudhSK/chromium,hgl888/chromium-crosswalk,dednal/chromium.src,dushu1203/chromium.src,markYoungH/chromium.src,krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,Fireblend/chromium-crosswalk,littlstar/chromium.src,Jonekee/chromium.src,dednal/chromium.src,ChromiumWebApps/chromium,ltilve/chromium,dushu1203/chromium.src,krieger-od/nwjs_chromium.src,M4sse/chromium.src,krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,ChromiumWebApps/chromium,anirudhSK/chromium,Just-D/chromium-1,pozdnyakov/chromium-crosswalk,dushu1203/chromium.src,pozdnyakov/chromium-crosswalk,markYoungH/chromium.src,ChromiumWebApps/chromium,markYoungH/chromium.src,Chilledheart/chromium,timopulkkinen/BubbleFish,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,anirudhSK/chromium,ChromiumWebApps/chromium,dednal/chromium.src,timopulkkinen/BubbleFish,ChromiumWebApps/chromium,ondra-novak/chromium.src,TheTypoMaster/chromium-crosswalk,dednal/chromium.src,ltilve/chromium,Pluto-tv/chromium-crosswalk,M4sse/chromium.src,ChromiumWebApps/chromium,hgl888/chromium-crosswalk,markYoungH/chromium.src,patrickm/chromium.src,mogoweb/chromium-crosswalk,patrickm/chromium.src,Just-D/chromium-1,hgl888/chromium-crosswalk-efl,ltilve/chromium,Chilledheart/chromium,hujiajie/pa-chromium,Chilledheart/chromium,markYoungH/chromium.src,hujiajie/pa-chromium,chuan9/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,patrickm/chromium.src,pozdnyakov/chromium-crosswalk,jaruba/chromium.src,bright-sparks/chromium-spacewalk,Fireblend/chromium-crosswalk,mogoweb/chromium-crosswalk,littlstar/chromium.src,littlstar/chromium.src,Chilledheart/chromium,Chilledheart/chromium,chuan9/chromium-crosswalk,axinging/chromium-crosswalk,Just-D/chromium-1,anirudhSK/chromium,timopulkkinen/BubbleFish,ChromiumWebApps/chromium,mogoweb/chromium-crosswalk,dednal/chromium.src,Fireblend/chromium-crosswalk,patrickm/chromium.src,M4sse/chromium.src,chuan9/chromium-crosswalk,fujunwei/chromium-crosswalk,ltilve/chromium