Merge pull request #16399 from comoyo/972276

Bug 972276 - Cache window size on event to avoid reflows. r=RudyLu(cherry picked from commit 21f1e8abf530c7fe9043a4c526ec1c506825610a)
Merge pull request #16373 from comoyo/bug964739

Bug 964739 - Call resizeUI on keyboard if orientation changed since last time. r=RudyLu(cherry picked from commit 18e305c4616e92df6f25bce619ca08b2ad5398d1)
Merge pull request #17024 from RudyLu/uplift_Bug972276_v1.3t

Uplift bug 972276 and bug 964739 to v1.3t.
a=v1.3T+