Use a composed tree based traversal in computing quads in LinkHighlight::computeQuads().
This is a follow-up patch for https://codereview.chromium.org/448593002 to fix a crash. The previous patch uses renderer.slowFirstChild() to get an child renderer in computeQuads(). However, this is not always correct. For example, suppose that <a><div></div></a> is given, the render tree would be: RenderBlock (anonymous) 0x6110004a6400 RenderInline 0x60c00014e6c0 A 0x60d00006cf10 RenderBlock (anonymous) 0x6110004a6180 RenderBlock 0x6110004a62c0 DIV 0x60b00004d930 CLASS="_muf" In this case, there is no child renderer for RenderInline object(0x60c00014e6c0). Instead, LinkHighlight::computeQuads() should use a composed tree based traversal to compute quads correctly because we've already used a composed tree based traversal to get an parent object in the previous patch. BUG=417191 Review URL: https://codereview.chromium.org/622253004 git-svn-id: svn://svn.chromium.org/blink/trunk@183756 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Showing
Please register or sign in to comment