DevTools: Ensure to fetch contrast for the right element in highlight.
In NodeHighlightTool ctor, we may override which node is actually used, if the node in question is under a content-visibility element which prevents visibility. When later on we fetch the contrast values for that node, we should use |node_| as opposed to |node| since at that time, the two values could be different. Note that this changes includes leveraging NodeHighlightTool directly in the getHighlightObjectForTest function, since previously the two implementations were different. The updated test would now fail without the |node| -> |node_| switch, but passes with the switch. R=chrishtr@chromium.org Fixed: 1090371 Change-Id: Ic98aafaf02818203311bf6a745575a0612612914 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2228124Reviewed-by:Chris Harrelson <chrishtr@chromium.org> Commit-Queue: vmpstr <vmpstr@chromium.org> Cr-Commit-Position: refs/heads/master@{#775172}
Showing
Please register or sign in to comment