| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "sky/engine/config.h" | 5 #include "sky/engine/config.h" |
| 6 #include "sky/engine/core/html/HTMLIFrameElement.h" | 6 #include "sky/engine/core/html/HTMLIFrameElement.h" |
| 7 | 7 |
| 8 #include "gen/sky/core/HTMLNames.h" | 8 #include "gen/sky/core/HTMLNames.h" |
| 9 #include "sky/engine/core/frame/LocalFrame.h" | 9 #include "sky/engine/core/frame/LocalFrame.h" |
| 10 #include "sky/engine/core/html/parser/HTMLParserIdioms.h" | 10 #include "sky/engine/core/html/parser/HTMLParserIdioms.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 { | 59 { |
| 60 String urlString = stripLeadingAndTrailingHTMLSpaces(getAttribute(HTMLNames:
:srcAttr)); | 60 String urlString = stripLeadingAndTrailingHTMLSpaces(getAttribute(HTMLNames:
:srcAttr)); |
| 61 if (urlString.isEmpty()) | 61 if (urlString.isEmpty()) |
| 62 urlString = blankURL().string(); | 62 urlString = blankURL().string(); |
| 63 | 63 |
| 64 LocalFrame* parentFrame = document().frame(); | 64 LocalFrame* parentFrame = document().frame(); |
| 65 if (!parentFrame) | 65 if (!parentFrame) |
| 66 return; | 66 return; |
| 67 | 67 |
| 68 KURL url = document().completeURL(urlString); | 68 KURL url = document().completeURL(urlString); |
| 69 m_contentView = parentFrame->loaderClient()->createChildFrame(url); | 69 m_contentView = parentFrame->loaderClient()->createChildFrame(); |
| 70 if (m_contentView) | 70 if (!m_contentView) |
| 71 m_contentView->AddObserver(this); | 71 return; |
| 72 |
| 73 m_contentView->Embed(mojo::String::From(url.string().utf8().data())); |
| 74 m_contentView->AddObserver(this); |
| 72 } | 75 } |
| 73 | 76 |
| 74 } | 77 } |
| OLD | NEW |