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..882404048bb46067744834478aa86684d98e7dbf 100644 |
| --- a/components/safe_browsing/renderer/threat_dom_details.cc |
| +++ b/components/safe_browsing/renderer/threat_dom_details.cc |
| @@ -146,6 +146,15 @@ void HandleElement( |
| child_node.tag_name = element.TagName().Utf8(); |
| child_node.parent = summary_node->url; |
| + // The body of an iframe will be in a different renderer. Look up the |
| + // routing_id of that renderer and store it with the iframe node. |
| + if (child_node.tag_name == "IFRAME" || child_node.tag_name == "FRAME") { |
|
dmazzoni
2017/05/01 20:10:07
Checking the tag name seems brittle to me, even th
lpz
2017/05/02 19:36:24
Thanks, done.
|
| + blink::WebFrame* subwebframe = |
| + blink::WebFrame::FromFrameOwnerElement(element); |
| + child_node.other_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( |