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

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

Issue 1913833002: Current work-in-progress crbug.com/567021 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More assert fixes Created 4 years, 6 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
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 r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 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) 2010 Nokia Corporation and/or its subsidiary(-ies) 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
9 * Copyright (C) 2013 Google Inc. All rights reserved. 9 * Copyright (C) 2013 Google Inc. All rights reserved.
10 * 10 *
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 LayoutFullScreen::wrapLayoutObject(layoutObject, layoutObject ? layoutOb ject->parent() : 0, document()); 439 LayoutFullScreen::wrapLayoutObject(layoutObject, layoutObject ? layoutOb ject->parent() : 0, document());
440 440
441 if (isAncestorOfFullscreenElement) { 441 if (isAncestorOfFullscreenElement) {
442 DCHECK(m_fullScreenElement->isFrameOwnerElement()); 442 DCHECK(m_fullScreenElement->isFrameOwnerElement());
443 DCHECK(toHTMLFrameOwnerElement(m_fullScreenElement)->contentFrame()->isR emoteFrame()); 443 DCHECK(toHTMLFrameOwnerElement(m_fullScreenElement)->contentFrame()->isR emoteFrame());
444 m_fullScreenElement->setContainsFullScreenElement(true); 444 m_fullScreenElement->setContainsFullScreenElement(true);
445 } 445 }
446 446
447 m_fullScreenElement->setContainsFullScreenElementOnAncestorsCrossingFrameBou ndaries(true); 447 m_fullScreenElement->setContainsFullScreenElementOnAncestorsCrossingFrameBou ndaries(true);
448 448
449 document()->styleEngine().ensureFullscreenUAStyle(); 449 document()->styleEngine().ensureUAStyleForFullscreen();
450 m_fullScreenElement->pseudoStateChanged(CSSSelector::PseudoFullScreen); 450 m_fullScreenElement->pseudoStateChanged(CSSSelector::PseudoFullScreen);
451 451
452 // FIXME: This should not call updateStyleAndLayoutTree. 452 // FIXME: This should not call updateStyleAndLayoutTree.
453 document()->updateStyleAndLayoutTree(); 453 document()->updateStyleAndLayoutTree();
454 454
455 m_fullScreenElement->didBecomeFullscreenElement(); 455 m_fullScreenElement->didBecomeFullscreenElement();
456 456
457 if (document()->frame()) 457 if (document()->frame())
458 document()->frame()->eventHandler().scheduleHoverStateUpdate(); 458 document()->frame()->eventHandler().scheduleHoverStateUpdate();
459 459
(...skipping 11 matching lines...) Expand all
471 m_fullScreenElement->willStopBeingFullscreenElement(); 471 m_fullScreenElement->willStopBeingFullscreenElement();
472 472
473 if (isAncestorOfFullscreenElement) 473 if (isAncestorOfFullscreenElement)
474 m_fullScreenElement->setContainsFullScreenElement(false); 474 m_fullScreenElement->setContainsFullScreenElement(false);
475 475
476 m_fullScreenElement->setContainsFullScreenElementOnAncestorsCrossingFrameBou ndaries(false); 476 m_fullScreenElement->setContainsFullScreenElementOnAncestorsCrossingFrameBou ndaries(false);
477 477
478 if (m_fullScreenLayoutObject) 478 if (m_fullScreenLayoutObject)
479 LayoutFullScreenItem(m_fullScreenLayoutObject).unwrapLayoutObject(); 479 LayoutFullScreenItem(m_fullScreenLayoutObject).unwrapLayoutObject();
480 480
481 document()->styleEngine().ensureFullscreenUAStyle(); 481 document()->styleEngine().ensureUAStyleForFullscreen();
482 m_fullScreenElement->pseudoStateChanged(CSSSelector::PseudoFullScreen); 482 m_fullScreenElement->pseudoStateChanged(CSSSelector::PseudoFullScreen);
483 m_fullScreenElement = nullptr; 483 m_fullScreenElement = nullptr;
484 484
485 if (document()->frame()) 485 if (document()->frame())
486 document()->frame()->eventHandler().scheduleHoverStateUpdate(); 486 document()->frame()->eventHandler().scheduleHoverStateUpdate();
487 487
488 // When fullyExitFullscreen is called, we call exitFullscreen on the topDocu ment(). That means 488 // When fullyExitFullscreen is called, we call exitFullscreen on the topDocu ment(). That means
489 // that the events will be queued there. So if we have no events here, start the timer on the 489 // that the events will be queued there. So if we have no events here, start the timer on the
490 // exiting document. 490 // exiting document.
491 Document* exitingDocument = document(); 491 Document* exitingDocument = document();
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 DEFINE_TRACE(Fullscreen) 612 DEFINE_TRACE(Fullscreen)
613 { 613 {
614 visitor->trace(m_fullScreenElement); 614 visitor->trace(m_fullScreenElement);
615 visitor->trace(m_fullScreenElementStack); 615 visitor->trace(m_fullScreenElementStack);
616 visitor->trace(m_eventQueue); 616 visitor->trace(m_eventQueue);
617 Supplement<Document>::trace(visitor); 617 Supplement<Document>::trace(visitor);
618 ContextLifecycleObserver::trace(visitor); 618 ContextLifecycleObserver::trace(visitor);
619 } 619 }
620 620
621 } // namespace blink 621 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.cpp ('k') | third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698