Refactoring: Turn private custom element methods into functions. (#3882)
Refactoring: Turn private custom element methods into functions. (#3882)

And inline a few methods.

The calls on the element are slow and cannot be optimized because the compiler doesn't touch the extern objects.


adiant/amphtml,pietergreyling/amphtml,zhouyx/amphtml,jasti/amphtml,rifler/amphtml,Mixpo/amphtml,widespace-os/amphtml,JuliusThms/amphtml,ericlindley-g/amphtml,kamtschatka/amphtml,yevheniiminin/amphtml,clawr/amphtml,lzanol/amphtml,vmarteev/amphtml,BenDz/amphtml,jdelhommeau/amphtml,sriramkrish85/amphtml,ampproject/amphtml,smartadserver/amphtml,DistroScale/amphtml,keithwrightbos/amphtml,yieldmo/amphtml,tlong2/amphtml,sharethrough/amphtml,DistroScale/amphtml,aghassemi/amphtml,techhtml/amphtml,arealit/amphtml,src-code/amphtml,DarXector/amphtml,pedjoni8/amphtml,sebastianbenz/amphtml,voyagegroup/amphtml,shawnbuso/amphtml,adtechnology/amphtml,adiant/amphtml,burtcorp/amphtml,jmadler/amphtml,zhangsu/amphtml,voyagegroup/amphtml,britice/amphtml,jpettitt/amphtml,sebastianbenz/amphtml,clawr/amphtml,camelburrito/amphtml,Gregable/amphtml,DarXector/amphtml,zhouyx/amphtml,adiant/amphtml,JuliusThms/amphtml,nexxtv/amphtml,ericlindley-g/amphtml,widespace-os/amphtml,cvializ/amphtml,BrightcoveOS/amphtml,jpettitt/amphtml,kmh287/amphtml,devjsun/amphtml,taboola/amphtml,pedjoni8/amphtml,yandex-pcode/amphtml,keithwrightbos/amphtml,DarXector/amphtml,honeybadgerdontcare/amphtml,cvializ/amphtml,devjsun/amphtml,techhtml/amphtml,rifler/amphtml,dvoytenko/amphtml,cory-work/amphtml,prateekbh/amphtml,fullspeed-sp/amphtml,shawnbuso/amphtml,nexxtv/amphtml,spotxchange/amphtml,ruturajv-media-net/amphtml,bpaduch/amphtml,interspacejp/amphtml,devjsun/amphtml,arealit/amphtml,erwinmombay/amphtml,JuliusThms/amphtml,kamtschatka/amphtml,amoad-amoe/amphtml,arealit/amphtml,jdelhommeau/amphtml,media-net/amphtml,alanorozco/amphtml,spotxchange/amphtml,powdercloud/amphtml,rlugojr/amphtml,src-code/amphtml,tdrl/amphtml,voyagegroup/amphtml,devjsun/amphtml,AaronCritchley/amphtml,zhouyx/amphtml,rajkumarsrk/amphtml,yieldbot/amphtml,honeybadgerdontcare/amphtml,danielrozenberg/amphtml,erwinmombay/amphtml,donttrustthisbot/amphtml,criteo-forks/amphtml,rifler/amphtml,pedjoni8/amphtml,DarXector/amphtml,vmarteev/amphtml,BrightcoveOS/amphtml,dotandads/amphtml,chaveznvg/amphtml,shawnbuso/amphtml,sklobovskaya/amphtml,jridgewell/amphtml,zhouyx/amphtml,chaveznvg/amphtml,ampproject/amphtml,lannka/amphtml,pedjoni8/amphtml,laterpay/amphtml,bpaduch/amphtml,pedjoni8/amphtml,jlucero-contentad/amphtml,rsimha-amp/amphtml,AaronCritchley/amphtml,Mobusi-ads/amphtml,ruturajv-media-net/amphtml,donttrustthisbot/amphtml,rlugojr/amphtml,wjfang/amphtml,koshka/amphtml,DarXector/amphtml,DAC-f1h-dev/amphtml,ericlindley-g/amphtml,interspacejp/amphtml,burtcorp/amphtml,tdrl/amphtml,aghassemi/amphtml,taboola/amphtml,BrightcoveOS/amphtml,gumgum/amphtml,erwinmombay/amphtml,bpaduch/amphtml,Adtoma/amphtml,danielrozenberg/amphtml,sriramkrish85/amphtml,jlucero-contentad/amphtml,Mobusi-ads/amphtml,donttrustthisbot/amphtml,engtat/amphtml,rajkumarsrk/amphtml,engtat/amphtml,yandex-pcode/amphtml,AaronCritchley/amphtml,jridgewell/amphtml,jasti/amphtml,mlb7687/amphtml,ruturajv-media-net/amphtml,kixer-com/amphtml,laterpay/amphtml,rajkumarsrk/amphtml,jpettitt/amphtml,adtechnology/amphtml,mhc-gh/amphtml,camelburrito/amphtml,taboola/amphtml,zhucl/amphtml,kixer-com/amphtml,lannka/amphtml,zhucl/amphtml,jpettitt/amphtml,criteo-forks/amphtml,rsimha-amp/amphtml,jpettitt/amphtml,DistroScale/amphtml,jmadler/amphtml,jasti/amphtml,widespace-os/amphtml,zhucl/amphtml,arealit/amphtml,Gregable/amphtml,pietergreyling/amphtml,powdercloud/amphtml,rlugojr/amphtml,zhangsu/amphtml,Mixpo/amphtml,widespace-os/amphtml,DAC-f1h-dev/amphtml,cvializ/amphtml,AaronCritchley/amphtml,BrightcoveOS/amphtml,clawr/amphtml,adtechnology/amphtml,zhangsu/amphtml,Lith/amphtml,sortable/amphtml,comScore/amphtml,tdrl/amphtml,Gregable/amphtml,rlugojr/amphtml,vmarteev/amphtml,alanorozco/amphtml,mhc-gh/amphtml,danielrozenberg/amphtml,sklobovskaya/amphtml,adtechnology/amphtml,yieldbot/amphtml,JuliusThms/amphtml,Adtoma/amphtml,ericlindley-g/amphtml,rsimha-amp/amphtml,triplelift/amphtml,engtat/amphtml,koshka/amphtml,taboola/amphtml,ericlindley-g/amphtml,lzanol/amphtml,nexxtv/amphtml,vmarteev/amphtml,adup-tech/amphtml,dvoytenko/amphtml,Mobusi-ads/amphtml,prateekbh/amphtml,ADITION/amphtml,comScore/amphtml,comScore/amphtml,koshka/amphtml,camelburrito/amphtml,chaveznvg/amphtml,camelburrito/amphtml,sriramkrish85/amphtml,donttrustthisbot/amphtml,dotandads/amphtml,src-code/amphtml,cvializ/amphtml,adup-tech/amphtml,smartadserver/amphtml,rlugojr/amphtml,BenDz/amphtml,rsimha-amp/amphtml,dvoytenko/amphtml,mhc-gh/amphtml,BrightcoveOS/amphtml,vmarteev/amphtml,prateekbh/amphtml,lannka/amphtml,kixer-com/amphtml,triplelift/amphtml,yieldmo/amphtml,sriramkrish85/amphtml,tlong2/amphtml,Mixpo/amphtml,BrightcoveOS/amphtml,rifler/amphtml,pietergreyling/amphtml,media-net/amphtml,fullspeed-sp/amphtml,yandex-pcode/amphtml,mhc-gh/amphtml,BenDz/amphtml,ruturajv-media-net/amphtml,JuliusThms/amphtml,src-code/amphtml,devjsun/amphtml,ampproject/amphtml,media-net/amphtml,amoad-amoe/amphtml,taboola/amphtml,spotxchange/amphtml,danielrozenberg/amphtml,mlb7687/amphtml,yevheniiminin/amphtml,vmarteev/amphtml,voyagegroup/amphtml,yevheniiminin/amphtml,sharethrough/amphtml,chaveznvg/amphtml,Adtoma/amphtml,adtechnology/amphtml,shawnbuso/amphtml,taboola/amphtml,smartadserver/amphtml,prateekbh/amphtml,ruturajv-media-net/amphtml,Mobusi-ads/amphtml,erwinmombay/amphtml,pedjoni8/amphtml,camelburrito/amphtml,wjfang/amphtml,clawr/amphtml,kmh287/amphtml,interspacejp/amphtml,ADITION/amphtml,Gregable/amphtml,aghassemi/amphtml,honeybadgerdontcare/amphtml,fullspeed-sp/amphtml,ericlindley-g/amphtml,keithwrightbos/amphtml,wjfang/amphtml,lzanol/amphtml,jpettitt/amphtml,mhc-gh/amphtml,cory-work/amphtml,sortable/amphtml,engtat/amphtml,amoad-amoe/amphtml,alanorozco/amphtml,bpaduch/amphtml,donttrustthisbot/amphtml,sklobovskaya/amphtml,tdrl/amphtml,erwinmombay/amphtml,clawr/amphtml,honeybadgerdontcare/amphtml,triplelift/amphtml,powdercloud/amphtml,Gregable/amphtml,cory-work/amphtml,laterpay/amphtml,keithwrightbos/amphtml,tdrl/amphtml,smartadserver/amphtml,techhtml/amphtml,tlong2/amphtml,cvializ/amphtml,zhangsu/amphtml,chaveznvg/amphtml,sharethrough/amphtml,widespace-os/amphtml,criteo-forks/amphtml,sklobovskaya/amphtml,sebastianbenz/amphtml,mhc-gh/amphtml,zhouyx/amphtml,fullspeed-sp/amphtml,adup-tech/amphtml,jridgewell/amphtml,comScore/amphtml,dvoytenko/amphtml,src-code/amphtml,DistroScale/amphtml,burtcorp/amphtml,luciancrasovan/amphtml,ecoron/amphtml,Adtoma/amphtml,kixer-com/amphtml,burtcorp/amphtml,ADITION/amphtml,yieldmo/amphtml,wjfang/amphtml,Gregable/amphtml,jlucero-contentad/amphtml,shawnbuso/amphtml,Mixpo/amphtml,keithwrightbos/amphtml,spotxchange/amphtml,yevheniiminin/amphtml,camelburrito/amphtml,nexxtv/amphtml,sklobovskaya/amphtml,aghassemi/amphtml,kixer-com/amphtml,jasti/amphtml,wjfang/amphtml,kamtschatka/amphtml,zhucl/amphtml,luciancrasovan/amphtml,adiant/amphtml,Lith/amphtml,voyagegroup/amphtml,ampproject/amphtml,mhc-gh/amphtml,techhtml/amphtml,yandex-pcode/amphtml,dotandads/amphtml,burtcorp/amphtml,interspacejp/amphtml,DAC-f1h-dev/amphtml,bpaduch/amphtml,danielrozenberg/amphtml,alanorozco/amphtml,wjfang/amphtml,avimehta/amphtml,AaronCritchley/amphtml,amoad-amoe/amphtml,rsimha-amp/amphtml,jmadler/amphtml,kmh287/amphtml,jpettitt/amphtml,yieldmo/amphtml,dotandads/amphtml,tlong2/amphtml,alanorozco/amphtml,vmarteev/amphtml,nexxtv/amphtml,zhucl/amphtml,powdercloud/amphtml,koshka/amphtml,lzanol/amphtml,chaveznvg/amphtml,camelburrito/amphtml,avimehta/amphtml,danielrozenberg/amphtml,donttrustthisbot/amphtml,techhtml/amphtml,keithwrightbos/amphtml,ecoron/amphtml,Lith/amphtml,rajkumarsrk/amphtml,BenDz/amphtml,tlong2/amphtml,DistroScale/amphtml,cory-work/amphtml,pietergreyling/amphtml,sebastianbenz/amphtml,yandex-pcode/amphtml,sebastianbenz/amphtml,dvoytenko/amphtml,media-net/amphtml,engtat/amphtml,media-net/amphtml,comScore/amphtml,jlucero-contentad/amphtml,luciancrasovan/amphtml,Mobusi-ads/amphtml,yandex-pcode/amphtml,adiant/amphtml,mlb7687/amphtml,danielrozenberg/amphtml,clawr/amphtml,avimehta/amphtml,sharethrough/amphtml,nexxtv/amphtml,sriramkrish85/amphtml,engtat/amphtml,ampproject/amphtml,tlong2/amphtml,interspacejp/amphtml,ecoron/amphtml,engtat/amphtml,adup-tech/amphtml,luciancrasovan/amphtml,criteo-forks/amphtml,dotandads/amphtml,lannka/amphtml,amoad-amoe/amphtml,wjfang/amphtml,pietergreyling/amphtml,gumgum/amphtml,amoad-amoe/amphtml,bpaduch/amphtml,honeybadgerdontcare/amphtml,luciancrasovan/amphtml,zhucl/amphtml,jpettitt/amphtml,sebastianbenz/amphtml,jridgewell/amphtml,Mixpo/amphtml,smartadserver/amphtml,triplelift/amphtml,DarXector/amphtml,adup-tech/amphtml,widespace-os/amphtml,sharethrough/amphtml,kmh287/amphtml,cory-work/amphtml,dotandads/amphtml,arealit/amphtml,arealit/amphtml,Adtoma/amphtml,mlb7687/amphtml,kmh287/amphtml,yieldmo/amphtml,koshka/amphtml,spotxchange/amphtml,adup-tech/amphtml,sortable/amphtml,src-code/amphtml,ampproject/amphtml,Adtoma/amphtml,zhucl/amphtml,rajkumarsrk/amphtml,Lith/amphtml,fullspeed-sp/amphtml,AaronCritchley/amphtml,rsimha-amp/amphtml,DAC-f1h-dev/amphtml,gumgum/amphtml,adtechnology/amphtml,jridgewell/amphtml,interspacejp/amphtml,kamtschatka/amphtml,Lith/amphtml,comScore/amphtml,britice/amphtml,luciancrasovan/amphtml,ampproject/amphtml,erwinmombay/amphtml,prateekbh/amphtml,adiant/amphtml,kamtschatka/amphtml,smartadserver/amphtml,fullspeed-sp/amphtml,JuliusThms/amphtml,sklobovskaya/amphtml,gumgum/amphtml,rajkumarsrk/amphtml,yevheniiminin/amphtml,lannka/amphtml,aghassemi/amphtml,triplelift/amphtml,adiant/amphtml,yieldmo/amphtml,voyagegroup/amphtml,honeybadgerdontcare/amphtml,powdercloud/amphtml,alanorozco/amphtml,yieldbot/amphtml,jlucero-contentad/amphtml,alanorozco/amphtml,bpaduch/amphtml,shawnbuso/amphtml,gumgum/amphtml,yieldbot/amphtml,luciancrasovan/amphtml,yandex-pcode/amphtml,dvoytenko/amphtml,koshka/amphtml,sortable/amphtml,kixer-com/amphtml,jmadler/amphtml,lannka/amphtml,mlb7687/amphtml,sklobovskaya/amphtml,jdelhommeau/amphtml,lannka/amphtml,jdelhommeau/amphtml,media-net/amphtml,cory-work/amphtml,zhangsu/amphtml,criteo-forks/amphtml,yieldmo/amphtml,powdercloud/amphtml,arealit/amphtml,nexxtv/amphtml,sriramkrish85/amphtml,triplelift/amphtml,prateekbh/amphtml,pietergreyling/amphtml,jmadler/amphtml,yieldbot/amphtml,BenDz/amphtml,criteo-forks/amphtml,keithwrightbos/amphtml,avimehta/amphtml,ruturajv-media-net/amphtml,rifler/amphtml,yieldbot/amphtml,ADITION/amphtml,cvializ/amphtml,burtcorp/amphtml,avimehta/amphtml,mhc-gh/amphtml,voyagegroup/amphtml,DistroScale/amphtml,Lith/amphtml,kixer-com/amphtml,Gregable/amphtml,media-net/amphtml,kamtschatka/amphtml,aghassemi/amphtml,Mixpo/amphtml,mlb7687/amphtml,Mobusi-ads/amphtml,britice/amphtml,devjsun/amphtml,ecoron/amphtml,rsimha-amp/amphtml,zhangsu/amphtml,rifler/amphtml,Gregable/amphtml,ecoron/amphtml,media-net/amphtml,DAC-f1h-dev/amphtml,jridgewell/amphtml,comScore/amphtml,jmadler/amphtml,yevheniiminin/amphtml,laterpay/amphtml,shawnbuso/amphtml,BenDz/amphtml,sortable/amphtml,DAC-f1h-dev/amphtml,lzanol/amphtml,jlucero-contentad/amphtml,prateekbh/amphtml,rlugojr/amphtml,jdelhommeau/amphtml,britice/amphtml,gumgum/amphtml,rajkumarsrk/amphtml,spotxchange/amphtml,jasti/amphtml,sharethrough/amphtml,jridgewell/amphtml,alanorozco/amphtml,laterpay/amphtml,jdelhommeau/amphtml,cory-work/amphtml,ecoron/amphtml,clawr/amphtml,zhouyx/amphtml,ampproject/amphtml,taboola/amphtml,honeybadgerdontcare/amphtml,powdercloud/amphtml,zhouyx/amphtml,lzanol/amphtml,danielrozenberg/amphtml,jasti/amphtml,techhtml/amphtml,tdrl/amphtml,sortable/amphtml,donttrustthisbot/amphtml,avimehta/amphtml,gumgum/amphtml,laterpay/amphtml,ADITION/amphtml,kmh287/amphtml