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

Side by Side Diff: third_party/WebKit/Source/core/dom/Fullscreen.cpp

Issue 2451893003: Move Document global rule data to CSSGlobalRuleSet. (Closed)
Patch Set: Rebased. Created 4 years, 1 month 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
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, 2010, 2012 Apple Inc. All 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All
7 * rights reserved. 7 * rights reserved.
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 10 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 DCHECK(m_currentFullScreenElement->isFrameOwnerElement()); 589 DCHECK(m_currentFullScreenElement->isFrameOwnerElement());
590 DCHECK(toHTMLFrameOwnerElement(m_currentFullScreenElement) 590 DCHECK(toHTMLFrameOwnerElement(m_currentFullScreenElement)
591 ->contentFrame() 591 ->contentFrame()
592 ->isRemoteFrame()); 592 ->isRemoteFrame());
593 m_currentFullScreenElement->setContainsFullScreenElement(true); 593 m_currentFullScreenElement->setContainsFullScreenElement(true);
594 } 594 }
595 595
596 m_currentFullScreenElement 596 m_currentFullScreenElement
597 ->setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(true); 597 ->setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(true);
598 598
599 document()->styleEngine().ensureFullscreenUAStyle(); 599 document()->styleEngine().ensureUAStyleForFullscreen();
600 m_currentFullScreenElement->pseudoStateChanged(CSSSelector::PseudoFullScreen); 600 m_currentFullScreenElement->pseudoStateChanged(CSSSelector::PseudoFullScreen);
601 601
602 // FIXME: This should not call updateStyleAndLayoutTree. 602 // FIXME: This should not call updateStyleAndLayoutTree.
603 document()->updateStyleAndLayoutTree(); 603 document()->updateStyleAndLayoutTree();
604 604
605 m_currentFullScreenElement->didBecomeFullscreenElement(); 605 m_currentFullScreenElement->didBecomeFullscreenElement();
606 606
607 if (document()->frame()) 607 if (document()->frame())
608 document()->frame()->eventHandler().scheduleHoverStateUpdate(); 608 document()->frame()->eventHandler().scheduleHoverStateUpdate();
609 609
(...skipping 11 matching lines...) Expand all
621 621
622 if (m_forCrossProcessDescendant) 622 if (m_forCrossProcessDescendant)
623 m_currentFullScreenElement->setContainsFullScreenElement(false); 623 m_currentFullScreenElement->setContainsFullScreenElement(false);
624 624
625 m_currentFullScreenElement 625 m_currentFullScreenElement
626 ->setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(false); 626 ->setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(false);
627 627
628 if (m_fullScreenLayoutObject) 628 if (m_fullScreenLayoutObject)
629 LayoutFullScreenItem(m_fullScreenLayoutObject).unwrapLayoutObject(); 629 LayoutFullScreenItem(m_fullScreenLayoutObject).unwrapLayoutObject();
630 630
631 document()->styleEngine().ensureFullscreenUAStyle(); 631 document()->styleEngine().ensureUAStyleForFullscreen();
632 m_currentFullScreenElement->pseudoStateChanged(CSSSelector::PseudoFullScreen); 632 m_currentFullScreenElement->pseudoStateChanged(CSSSelector::PseudoFullScreen);
633 m_currentFullScreenElement = nullptr; 633 m_currentFullScreenElement = nullptr;
634 634
635 if (document()->frame()) 635 if (document()->frame())
636 document()->frame()->eventHandler().scheduleHoverStateUpdate(); 636 document()->frame()->eventHandler().scheduleHoverStateUpdate();
637 637
638 // When fullyExitFullscreen is called, we call exitFullscreen on the 638 // When fullyExitFullscreen is called, we call exitFullscreen on the
639 // topDocument(). That means that the events will be queued there. So if we 639 // topDocument(). That means that the events will be queued there. So if we
640 // have no events here, start the timer on the exiting document. 640 // have no events here, start the timer on the exiting document.
641 Document* exitingDocument = document(); 641 Document* exitingDocument = document();
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 764
765 DEFINE_TRACE(Fullscreen) { 765 DEFINE_TRACE(Fullscreen) {
766 visitor->trace(m_currentFullScreenElement); 766 visitor->trace(m_currentFullScreenElement);
767 visitor->trace(m_fullscreenElementStack); 767 visitor->trace(m_fullscreenElementStack);
768 visitor->trace(m_eventQueue); 768 visitor->trace(m_eventQueue);
769 Supplement<Document>::trace(visitor); 769 Supplement<Document>::trace(visitor);
770 ContextLifecycleObserver::trace(visitor); 770 ContextLifecycleObserver::trace(visitor);
771 } 771 }
772 772
773 } // namespace blink 773 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.cpp ('k') | third_party/WebKit/Source/core/dom/StyleEngine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698