Use GetDocument() instead of ownerDocument() in inspector agent.
ownerDocument() is the API for javascript bindings. GetDocument() is the more straightforward method used internally. Additionally, call UpdateStyleAndLayoutTreeForNode() earlier for getMatchedStylesForNode() which means we can remove a call to UpdateDistributionForUnknownReasons() since that is done as part of the style and layout tree update. Also removed parent_style_resolver retrieval since we can just re-use the style_resolver we already had and is always the same object. This CL is in preparation for getting rid of EnsureStyleResolver and specifically getting rid of UpdateActiveStyle() inside EnsureStyleResolver. Change-Id: I9de4fbf1896526d89b983bba2784d0cfba22b25c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2274392 Commit-Queue: Rune Lillesveen <futhark@chromium.org> Reviewed-by:Andrey Kosyakov <caseq@chromium.org> Cr-Commit-Position: refs/heads/master@{#784460}
Showing
Please register or sign in to comment