Chromium Code Reviews| Index: components/safe_browsing/renderer/threat_dom_details.cc |
| diff --git a/components/safe_browsing/renderer/threat_dom_details.cc b/components/safe_browsing/renderer/threat_dom_details.cc |
| index b790b965ff24fe9d029aab9999e9d3a59483841c..637529ab37198de379b74c331a2ce4454a5db4d4 100644 |
| --- a/components/safe_browsing/renderer/threat_dom_details.cc |
| +++ b/components/safe_browsing/renderer/threat_dom_details.cc |
| @@ -146,6 +146,16 @@ void HandleElement( |
| child_node.tag_name = element.TagName().Utf8(); |
| child_node.parent = summary_node->url; |
| + // The body of an iframe may be in a different renderer. Look up the routing |
| + // ID of the local or remote frame and store it with the iframe node. If this |
| + // element is not a frame then the result of the lookup will be null. |
| + blink::WebFrame* subwebframe = |
|
Charlie Reis
2017/05/10 22:17:49
nit: subframe
lpz
2017/05/12 13:53:16
Done.
|
| + blink::WebFrame::FromFrameOwnerElement(element); |
| + if (subwebframe) { |
| + child_node.child_frame_routing_id = |
| + content::RenderFrame::GetRoutingIdForWebFrame(subwebframe); |
| + } |
| + |
| // Populate the element's attributes, but only collect the ones that are |
| // configured in the finch study. |
| const auto& tag_attribute_iter = std::find_if( |