| 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 12 matching lines...) Expand all Loading... |
| 23 m_contentView(nullptr) | 23 m_contentView(nullptr) |
| 24 { | 24 { |
| 25 } | 25 } |
| 26 | 26 |
| 27 HTMLIFrameElement::~HTMLIFrameElement() | 27 HTMLIFrameElement::~HTMLIFrameElement() |
| 28 { | 28 { |
| 29 if (m_contentView) | 29 if (m_contentView) |
| 30 m_contentView->RemoveObserver(this); | 30 m_contentView->RemoveObserver(this); |
| 31 } | 31 } |
| 32 | 32 |
| 33 Node::InsertionNotificationRequest HTMLIFrameElement::insertedInto(ContainerNode
* insertionPoint) | 33 void HTMLIFrameElement::insertedInto(ContainerNode* insertionPoint) |
| 34 { | 34 { |
| 35 InsertionNotificationRequest result = HTMLElement::insertedInto(insertionPoi
nt); | 35 HTMLElement::insertedInto(insertionPoint); |
| 36 if (insertionPoint->inDocument()) | 36 if (insertionPoint->inDocument()) |
| 37 createView(); | 37 createView(); |
| 38 return result; | |
| 39 } | 38 } |
| 40 | 39 |
| 41 void HTMLIFrameElement::removedFrom(ContainerNode* insertionPoint) | 40 void HTMLIFrameElement::removedFrom(ContainerNode* insertionPoint) |
| 42 { | 41 { |
| 43 HTMLElement::removedFrom(insertionPoint); | 42 HTMLElement::removedFrom(insertionPoint); |
| 44 if (m_contentView) | 43 if (m_contentView) |
| 45 m_contentView->Destroy(); | 44 m_contentView->Destroy(); |
| 46 } | 45 } |
| 47 | 46 |
| 48 RenderObject* HTMLIFrameElement::createRenderer(RenderStyle* style) | 47 RenderObject* HTMLIFrameElement::createRenderer(RenderStyle* style) |
| (...skipping 17 matching lines...) Expand all Loading... |
| 66 if (!parentFrame) | 65 if (!parentFrame) |
| 67 return; | 66 return; |
| 68 | 67 |
| 69 KURL url = document().completeURL(urlString); | 68 KURL url = document().completeURL(urlString); |
| 70 m_contentView = parentFrame->loaderClient()->createChildFrame(url); | 69 m_contentView = parentFrame->loaderClient()->createChildFrame(url); |
| 71 if (m_contentView) | 70 if (m_contentView) |
| 72 m_contentView->AddObserver(this); | 71 m_contentView->AddObserver(this); |
| 73 } | 72 } |
| 74 | 73 |
| 75 } | 74 } |
| OLD | NEW |