Chromium Code Reviews| 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 "config.h" | 5 #include "config.h" |
| 6 #include "core/html/HTMLIFrameElement.h" | 6 #include "core/html/HTMLIFrameElement.h" |
| 7 | 7 |
| 8 #include "core/HTMLNames.h" | 8 #include "core/HTMLNames.h" |
| 9 #include "core/frame/LocalFrame.h" | 9 #include "core/frame/LocalFrame.h" |
| 10 #include "core/frame/RemoteFrame.h" | |
| 10 #include "core/html/parser/HTMLParserIdioms.h" | 11 #include "core/html/parser/HTMLParserIdioms.h" |
| 11 #include "core/loader/FrameLoaderClient.h" | 12 #include "core/loader/FrameLoaderClient.h" |
| 12 #include "core/rendering/RenderRemote.h" | 13 #include "core/rendering/RenderRemote.h" |
| 13 | 14 |
| 14 namespace blink { | 15 namespace blink { |
| 15 | 16 |
| 16 PassRefPtr<HTMLIFrameElement> HTMLIFrameElement::create(Document& document) | 17 PassRefPtr<HTMLIFrameElement> HTMLIFrameElement::create(Document& document) |
| 17 { | 18 { |
| 18 return adoptRef(new HTMLIFrameElement(document)); | 19 return adoptRef(new HTMLIFrameElement(document)); |
| 19 } | 20 } |
| 20 | 21 |
| 21 HTMLIFrameElement::HTMLIFrameElement(Document& document) | 22 HTMLIFrameElement::HTMLIFrameElement(Document& document) |
| 22 : HTMLElement(HTMLNames::iframeTag, document) | 23 : HTMLElement(HTMLNames::iframeTag, document), |
| 24 m_contentFrame(nullptr) | |
|
abarth-chromium
2014/11/10 23:03:51
No need for this. OwnPtr does it automatically.
| |
| 23 { | 25 { |
| 24 } | 26 } |
| 25 | 27 |
| 26 HTMLIFrameElement::~HTMLIFrameElement() | 28 HTMLIFrameElement::~HTMLIFrameElement() |
| 27 { | 29 { |
| 28 } | 30 } |
| 29 | 31 |
| 30 Node::InsertionNotificationRequest HTMLIFrameElement::insertedInto(ContainerNode * insertionPoint) | 32 Node::InsertionNotificationRequest HTMLIFrameElement::insertedInto(ContainerNode * insertionPoint) |
| 31 { | 33 { |
| 32 InsertionNotificationRequest result = HTMLElement::insertedInto(insertionPoi nt); | 34 InsertionNotificationRequest result = HTMLElement::insertedInto(insertionPoi nt); |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 52 { | 54 { |
| 53 String urlString = stripLeadingAndTrailingHTMLSpaces(getAttribute(HTMLNames: :srcAttr)); | 55 String urlString = stripLeadingAndTrailingHTMLSpaces(getAttribute(HTMLNames: :srcAttr)); |
| 54 if (urlString.isEmpty()) | 56 if (urlString.isEmpty()) |
| 55 urlString = blankURL().string(); | 57 urlString = blankURL().string(); |
| 56 | 58 |
| 57 LocalFrame* parentFrame = document().frame(); | 59 LocalFrame* parentFrame = document().frame(); |
| 58 if (!parentFrame) | 60 if (!parentFrame) |
| 59 return; | 61 return; |
| 60 | 62 |
| 61 KURL url = document().completeURL(urlString); | 63 KURL url = document().completeURL(urlString); |
| 62 parentFrame->loaderClient()->createView(url); | 64 m_contentFrame = parentFrame->loaderClient()->createChildFrame(url); |
| 63 } | 65 } |
| 64 | 66 |
| 65 } | 67 } |
| OLD | NEW |