Fix min threshhold calculation for resizing the PDF graphics context
Fix min threshhold calculation for resizing the PDF graphics context

This fixes the calculation for the threshhold we use to calculate
whether the graphics context needs to be resized. There isn't a
correctness issue here, as the context will always be large enough
but it results in resizing more than necessary.

This example demonstrates the issue:
-If the plugin size was 100 x 100, we would set the context size to
100+kBufferSize x 100+kBufferSize.
-If the plugin was then resized to 90x90 we would check to see if the plugin
size is smaller than (100+kBufferSize)-kBufferSize x (100+kBufferSize)-kBufferSize
which is equal to 100 x 100.
-But we really intend to check whether it is smaller than
100-kBufferSize x 100-kBufferSize

Thus we should check whether the plugin is smaller than the
(current context size) - 2*kBufferSize which is kBufferSize less than
the plugin size when the context size was last computed.

BUG=303491

Review URL: https://codereview.chromium.org/337443002

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

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