Cleanup the code to adjust the size/location of compact navigation bar.  Clipping happens when the location is not in Root's vibible rect.  I think this is good and general enough to be used with different layouts.
Cleanup the code to adjust the size/location of compact navigation bar.
 Clipping happens when the location is not in Root's vibible rect.
 I think this is good and general enough to be used with different layouts.

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/553177

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

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