DescriptionGuard Element and getComputedStyle methods that force a layout with inActiveDocument.
This patch makes touching an Element property that would normally force
a layout not do it when the element is not in the document since the
layout of the document has no impact on the element. I also fixed
getComputedStyle.
Note that this patch does not attempt to fix subclasses of Element, for
example some canvas properties may force layouts still. This just fixes
the core dom Element API, which is most of the usage I found.
I added stack traces and observed forced layouts from getting innerText
on google image search, getBoundingClient rect in most polymer apps,
and offsetTop on various news sites like the NYT. This patch removes
all of these forced layouts.
BUG=585663
Committed: https://crrev.com/f6ae8a23e7de1a6199c1deeaef9041f9cc7caab9
Cr-Commit-Position: refs/heads/master@{#383928}
Patch Set 1 #
Total comments: 1
Messages
Total messages: 16 (8 generated)
|