Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(496)

Side by Side Diff: Source/core/dom/Document.cpp

Issue 19155002: Introduce toHTMLIFrameElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/css/resolver/StyleResolver.cpp ('k') | Source/core/html/HTMLIFrameElement.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 4727 matching lines...) Expand 10 before | Expand all | Expand 10 after
4738 void Document::resetLastHandledUserGestureTimestamp() 4738 void Document::resetLastHandledUserGestureTimestamp()
4739 { 4739 {
4740 m_lastHandledUserGestureTimestamp = currentTime(); 4740 m_lastHandledUserGestureTimestamp = currentTime();
4741 } 4741 }
4742 4742
4743 HTMLIFrameElement* Document::seamlessParentIFrame() const 4743 HTMLIFrameElement* Document::seamlessParentIFrame() const
4744 { 4744 {
4745 if (!shouldDisplaySeamlesslyWithParent()) 4745 if (!shouldDisplaySeamlesslyWithParent())
4746 return 0; 4746 return 0;
4747 4747
4748 HTMLFrameOwnerElement* ownerElement = this->ownerElement(); 4748 return toHTMLIFrameElement(this->ownerElement());
4749 ASSERT(ownerElement->hasTagName(iframeTag));
4750 return static_cast<HTMLIFrameElement*>(ownerElement);
4751 } 4749 }
4752 4750
4753 bool Document::shouldDisplaySeamlesslyWithParent() const 4751 bool Document::shouldDisplaySeamlesslyWithParent() const
4754 { 4752 {
4755 if (!RuntimeEnabledFeatures::seamlessIFramesEnabled()) 4753 if (!RuntimeEnabledFeatures::seamlessIFramesEnabled())
4756 return false; 4754 return false;
4757 HTMLFrameOwnerElement* ownerElement = this->ownerElement(); 4755 HTMLFrameOwnerElement* ownerElement = this->ownerElement();
4758 if (!ownerElement) 4756 if (!ownerElement)
4759 return false; 4757 return false;
4760 return m_mayDisplaySeamlesslyWithParent && ownerElement->hasTagName(iframeTa g) && ownerElement->fastHasAttribute(seamlessAttr); 4758 return m_mayDisplaySeamlesslyWithParent && ownerElement->hasTagName(iframeTa g) && ownerElement->fastHasAttribute(seamlessAttr);
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
5153 { 5151 {
5154 return DocumentLifecycleNotifier::create(this); 5152 return DocumentLifecycleNotifier::create(this);
5155 } 5153 }
5156 5154
5157 DocumentLifecycleNotifier* Document::lifecycleNotifier() 5155 DocumentLifecycleNotifier* Document::lifecycleNotifier()
5158 { 5156 {
5159 return static_cast<DocumentLifecycleNotifier*>(ScriptExecutionContext::lifec ycleNotifier()); 5157 return static_cast<DocumentLifecycleNotifier*>(ScriptExecutionContext::lifec ycleNotifier());
5160 } 5158 }
5161 5159
5162 } // namespace WebCore 5160 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/resolver/StyleResolver.cpp ('k') | Source/core/html/HTMLIFrameElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698