updateRenderTreeForNodeIfNeeded should use NodeRenderingTraversal::parent

Elements inherit their styles from the composed parent, not the real parent,
so we need to check that in the loop to make sure all ancestors are correct.

Review URL: https://codereview.chromium.org/248533004

git-svn-id: svn://svn.chromium.org/blink/trunk@172339 bbb929c8-8fbe-4397-9dbb-9b2b20218538