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

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

Issue 15510002: Remove setFullScreenRendererSize and setFullScreenRendererBackgroundColor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/Document.h ('k') | no next file » | 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 4927 matching lines...) Expand 10 before | Expand all | Expand 10 after
4938 ASSERT(!m_fullScreenRenderer); 4938 ASSERT(!m_fullScreenRenderer);
4939 4939
4940 m_fullScreenRenderer = renderer; 4940 m_fullScreenRenderer = renderer;
4941 } 4941 }
4942 4942
4943 void Document::fullScreenRendererDestroyed() 4943 void Document::fullScreenRendererDestroyed()
4944 { 4944 {
4945 m_fullScreenRenderer = 0; 4945 m_fullScreenRenderer = 0;
4946 } 4946 }
4947 4947
4948 void Document::setFullScreenRendererSize(const IntSize& size)
4949 {
4950 ASSERT(m_fullScreenRenderer);
4951 if (!m_fullScreenRenderer)
4952 return;
4953
4954 if (m_fullScreenRenderer) {
4955 RefPtr<RenderStyle> newStyle = RenderStyle::clone(m_fullScreenRenderer-> style());
4956 newStyle->setWidth(Length(size.width(), WebCore::Fixed));
4957 newStyle->setHeight(Length(size.height(), WebCore::Fixed));
4958 newStyle->setTop(Length(0, WebCore::Fixed));
4959 newStyle->setLeft(Length(0, WebCore::Fixed));
4960 m_fullScreenRenderer->setStyle(newStyle);
4961 updateLayout();
4962 }
4963 }
4964
4965 void Document::setFullScreenRendererBackgroundColor(Color backgroundColor)
4966 {
4967 if (!m_fullScreenRenderer)
4968 return;
4969
4970 RefPtr<RenderStyle> newStyle = RenderStyle::clone(m_fullScreenRenderer->styl e());
4971 newStyle->setBackgroundColor(backgroundColor);
4972 m_fullScreenRenderer->setStyle(newStyle);
4973 }
4974
4975 void Document::fullScreenChangeDelayTimerFired(Timer<Document>*) 4948 void Document::fullScreenChangeDelayTimerFired(Timer<Document>*)
4976 { 4949 {
4977 // Since we dispatch events in this function, it's possible that the 4950 // Since we dispatch events in this function, it's possible that the
4978 // document will be detached and GC'd. We protect it here to make sure we 4951 // document will be detached and GC'd. We protect it here to make sure we
4979 // can finish the function successfully. 4952 // can finish the function successfully.
4980 RefPtr<Document> protectDocument(this); 4953 RefPtr<Document> protectDocument(this);
4981 Deque<RefPtr<Node> > changeQueue; 4954 Deque<RefPtr<Node> > changeQueue;
4982 m_fullScreenChangeEventTargetQueue.swap(changeQueue); 4955 m_fullScreenChangeEventTargetQueue.swap(changeQueue);
4983 Deque<RefPtr<Node> > errorQueue; 4956 Deque<RefPtr<Node> > errorQueue;
4984 m_fullScreenErrorEventTargetQueue.swap(errorQueue); 4957 m_fullScreenErrorEventTargetQueue.swap(errorQueue);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
5030 bool elementInSubtree = false; 5003 bool elementInSubtree = false;
5031 if (amongChildrenOnly) 5004 if (amongChildrenOnly)
5032 elementInSubtree = m_fullScreenElement->isDescendantOf(node); 5005 elementInSubtree = m_fullScreenElement->isDescendantOf(node);
5033 else 5006 else
5034 elementInSubtree = (m_fullScreenElement == node) || m_fullScreenElement- >isDescendantOf(node); 5007 elementInSubtree = (m_fullScreenElement == node) || m_fullScreenElement- >isDescendantOf(node);
5035 5008
5036 if (elementInSubtree) 5009 if (elementInSubtree)
5037 fullScreenElementRemoved(); 5010 fullScreenElementRemoved();
5038 } 5011 }
5039 5012
5040 bool Document::isAnimatingFullScreen() const
5041 {
5042 return m_isAnimatingFullScreen;
5043 }
5044
5045 void Document::setAnimatingFullScreen(bool flag) 5013 void Document::setAnimatingFullScreen(bool flag)
5046 { 5014 {
5047 if (m_isAnimatingFullScreen == flag) 5015 if (m_isAnimatingFullScreen == flag)
5048 return; 5016 return;
5049 m_isAnimatingFullScreen = flag; 5017 m_isAnimatingFullScreen = flag;
5050 5018
5051 if (m_fullScreenElement && m_fullScreenElement->isDescendantOf(this)) { 5019 if (m_fullScreenElement && m_fullScreenElement->isDescendantOf(this)) {
5052 m_fullScreenElement->setNeedsStyleRecalc(); 5020 m_fullScreenElement->setNeedsStyleRecalc();
5053 scheduleForcedStyleRecalc(); 5021 scheduleForcedStyleRecalc();
5054 } 5022 }
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
5638 return; 5606 return;
5639 5607
5640 Vector<RefPtr<Element> > associatedFormControls; 5608 Vector<RefPtr<Element> > associatedFormControls;
5641 copyToVector(m_associatedFormControls, associatedFormControls); 5609 copyToVector(m_associatedFormControls, associatedFormControls);
5642 5610
5643 frame()->page()->chrome()->client()->didAssociateFormControls(associatedForm Controls); 5611 frame()->page()->chrome()->client()->didAssociateFormControls(associatedForm Controls);
5644 m_associatedFormControls.clear(); 5612 m_associatedFormControls.clear();
5645 } 5613 }
5646 5614
5647 } // namespace WebCore 5615 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/Document.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698