Auto merge of #8170 - Ms2ger:cleanup-canvas, r=frewsxcv
Auto merge of #8170 - Ms2ger:cleanup-canvas, r=frewsxcv

Cleanup some code in htmlcanvaselement.rs.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8170)
<!-- Reviewable:end -->

CJ8664/servo,larsbergstrom/servo,KiChjang/servo,mattnenterprise/servo,thiagopnts/servo,eddyb/servo,larsbergstrom/servo,SimonSapin/servo,sadmansk/servo,emilio/servo,thiagopnts/servo,notriddle/servo,jimberlage/servo,nnethercote/servo,paulrouget/servo,cbrewster/servo,szeged/servo,saneyuki/servo,cbrewster/servo,ConnorGBrewster/servo,jimberlage/servo,nnethercote/servo,emilio/servo,dsandeephegde/servo,splav/servo,dsandeephegde/servo,pyfisch/servo,dati91/servo,nnethercote/servo,szeged/servo,mbrubeck/servo,paulrouget/servo,sadmansk/servo,splav/servo,peterjoel/servo,eddyb/servo,avadacatavra/servo,saneyuki/servo,ConnorGBrewster/servo,splav/servo,peterjoel/servo,saneyuki/servo,thiagopnts/servo,anthgur/servo,mbrubeck/servo,DominoTree/servo,peterjoel/servo,dsandeephegde/servo,KiChjang/servo,larsbergstrom/servo,dati91/servo,CJ8664/servo,paulrouget/servo,mattnenterprise/servo,paulrouget/servo,avadacatavra/servo,canaltinova/servo,notriddle/servo,peterjoel/servo,splav/servo,anthgur/servo,splav/servo,cbrewster/servo,saneyuki/servo,SimonSapin/servo,pyfisch/servo,rnestler/servo,saneyuki/servo,pyfisch/servo,fiji-flo/servo,dati91/servo,fiji-flo/servo,mbrubeck/servo,rnestler/servo,anthgur/servo,larsbergstrom/servo,jimberlage/servo,upsuper/servo,szeged/servo,szeged/servo,avadacatavra/servo,anthgur/servo,peterjoel/servo,splav/servo,eddyb/servo,szeged/servo,cbrewster/servo,CJ8664/servo,mbrubeck/servo,avadacatavra/servo,dati91/servo,mattnenterprise/servo,dsandeephegde/servo,dati91/servo,jimberlage/servo,mbrubeck/servo,DominoTree/servo,upsuper/servo,anthgur/servo,paulrouget/servo,dsandeephegde/servo,SimonSapin/servo,notriddle/servo,sadmansk/servo,thiagopnts/servo,nrc/servo,DominoTree/servo,nrc/servo,SimonSapin/servo,CJ8664/servo,thiagopnts/servo,notriddle/servo,pyfisch/servo,peterjoel/servo,larsbergstrom/servo,steveklabnik/servo,DominoTree/servo,eddyb/servo,DominoTree/servo,steveklabnik/servo,notriddle/servo,peterjoel/servo,ConnorGBrewster/servo,pyfisch/servo,DominoTree/servo,KiChjang/servo,DominoTree/servo,KiChjang/servo,peterjoel/servo,canaltinova/servo,nrc/servo,nrc/servo,mattnenterprise/servo,steveklabnik/servo,ConnorGBrewster/servo,upsuper/servo,canaltinova/servo,cbrewster/servo,eddyb/servo,steveklabnik/servo,KiChjang/servo,cbrewster/servo,eddyb/servo,fiji-flo/servo,szeged/servo,pyfisch/servo,larsbergstrom/servo,paulrouget/servo,canaltinova/servo,sadmansk/servo,mattnenterprise/servo,ConnorGBrewster/servo,DominoTree/servo,mbrubeck/servo,anthgur/servo,steveklabnik/servo,peterjoel/servo,CJ8664/servo,saneyuki/servo,canaltinova/servo,szeged/servo,fiji-flo/servo,eddyb/servo,cbrewster/servo,steveklabnik/servo,emilio/servo,szeged/servo,DominoTree/servo,CJ8664/servo,emilio/servo,jimberlage/servo,sadmansk/servo,paulrouget/servo,cbrewster/servo,sadmansk/servo,SimonSapin/servo,nrc/servo,dsandeephegde/servo,anthgur/servo,mbrubeck/servo,splav/servo,dsandeephegde/servo,SimonSapin/servo,szeged/servo,anthgur/servo,notriddle/servo,fiji-flo/servo,ConnorGBrewster/servo,upsuper/servo,upsuper/servo,sadmansk/servo,nnethercote/servo,emilio/servo,paulrouget/servo,emilio/servo,szeged/servo,nnethercote/servo,jimberlage/servo,jimberlage/servo,CJ8664/servo,mattnenterprise/servo,nnethercote/servo,KiChjang/servo,pyfisch/servo,thiagopnts/servo,saneyuki/servo,fiji-flo/servo,upsuper/servo,ConnorGBrewster/servo,mattnenterprise/servo,emilio/servo,nnethercote/servo,SimonSapin/servo,saneyuki/servo,mbrubeck/servo,rnestler/servo,KiChjang/servo,pyfisch/servo,notriddle/servo,nnethercote/servo,splav/servo,KiChjang/servo,dati91/servo,avadacatavra/servo,upsuper/servo,nnethercote/servo,dati91/servo,emilio/servo,nnethercote/servo,ConnorGBrewster/servo,canaltinova/servo,DominoTree/servo,paulrouget/servo,larsbergstrom/servo,KiChjang/servo,larsbergstrom/servo,rnestler/servo,rnestler/servo,thiagopnts/servo,eddyb/servo,avadacatavra/servo,emilio/servo,canaltinova/servo,saneyuki/servo,nrc/servo,pyfisch/servo,sadmansk/servo,canaltinova/servo,splav/servo,larsbergstrom/servo,paulrouget/servo,jimberlage/servo,fiji-flo/servo,dati91/servo,steveklabnik/servo,rnestler/servo,SimonSapin/servo,notriddle/servo,notriddle/servo,emilio/servo,avadacatavra/servo,KiChjang/servo,pyfisch/servo,rnestler/servo,CJ8664/servo,notriddle/servo,splav/servo,fiji-flo/servo,larsbergstrom/servo,saneyuki/servo,mattnenterprise/servo,jimberlage/servo,rnestler/servo,upsuper/servo,thiagopnts/servo,dsandeephegde/servo,avadacatavra/servo,peterjoel/servo,nrc/servo