OLD | NEW |
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 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 bool shouldCreatePlaceholder = layoutObject && layoutObject->isBox(); | 449 bool shouldCreatePlaceholder = layoutObject && layoutObject->isBox(); |
450 if (shouldCreatePlaceholder) { | 450 if (shouldCreatePlaceholder) { |
451 m_savedPlaceholderFrameRect = toLayoutBox(layoutObject)->frameRect(); | 451 m_savedPlaceholderFrameRect = toLayoutBox(layoutObject)->frameRect(); |
452 m_savedPlaceholderComputedStyle = ComputedStyle::clone(layoutObject->sty
leRef()); | 452 m_savedPlaceholderComputedStyle = ComputedStyle::clone(layoutObject->sty
leRef()); |
453 } | 453 } |
454 | 454 |
455 if (m_fullScreenElement != document()->documentElement()) | 455 if (m_fullScreenElement != document()->documentElement()) |
456 LayoutFullScreen::wrapLayoutObject(layoutObject, layoutObject ? layoutOb
ject->parent() : 0, document()); | 456 LayoutFullScreen::wrapLayoutObject(layoutObject, layoutObject ? layoutOb
ject->parent() : 0, document()); |
457 | 457 |
458 m_fullScreenElement->setContainsFullScreenElementOnAncestorsCrossingFrameBou
ndaries(true); | 458 m_fullScreenElement->setContainsFullScreenElementOnAncestorsCrossingFrameBou
ndaries(true); |
459 | |
460 document()->styleEngine().ensureFullscreenUAStyle(); | 459 document()->styleEngine().ensureFullscreenUAStyle(); |
461 m_fullScreenElement->pseudoStateChanged(CSSSelector::PseudoFullScreen); | 460 m_fullScreenElement->pseudoStateChanged(CSSSelector::PseudoFullScreen); |
462 | 461 |
463 // FIXME: This should not call updateLayoutTree. | 462 // FIXME: This should not call updateLayoutTree. |
464 document()->updateLayoutTree(); | 463 document()->updateLayoutTree(); |
465 | 464 |
466 m_fullScreenElement->didBecomeFullscreenElement(); | 465 m_fullScreenElement->didBecomeFullscreenElement(); |
467 | 466 |
468 if (document()->frame()) | 467 if (document()->frame()) |
469 document()->frame()->eventHandler().scheduleHoverStateUpdate(); | 468 document()->frame()->eventHandler().scheduleHoverStateUpdate(); |
470 | 469 |
471 m_eventQueueTimer.startOneShot(0, BLINK_FROM_HERE); | 470 m_eventQueueTimer.startOneShot(0, BLINK_FROM_HERE); |
472 } | 471 } |
473 | 472 |
474 void Fullscreen::didExitFullScreenForElement(Element*) | 473 void Fullscreen::didExitFullScreenForElement(Element*) |
475 { | 474 { |
476 if (!m_fullScreenElement) | 475 if (!m_fullScreenElement) |
477 return; | 476 return; |
478 | 477 |
479 if (!document()->isActive()) | 478 if (!document()->isActive()) |
480 return; | 479 return; |
481 | 480 |
482 m_fullScreenElement->willStopBeingFullscreenElement(); | 481 m_fullScreenElement->willStopBeingFullscreenElement(); |
483 | 482 |
484 m_fullScreenElement->setContainsFullScreenElementOnAncestorsCrossingFrameBou
ndaries(false); | 483 m_fullScreenElement->setContainsFullScreenElementOnAncestorsCrossingFrameBou
ndaries(false); |
485 | 484 |
486 if (m_fullScreenLayoutObject) | 485 if (m_fullScreenLayoutObject) |
487 LayoutFullScreenItem(m_fullScreenLayoutObject).unwrapLayoutObject(); | 486 LayoutFullScreenItem(m_fullScreenLayoutObject).unwrapLayoutObject(); |
488 | 487 |
| 488 document()->styleEngine().ensureFullscreenUAStyle(); |
489 m_fullScreenElement->pseudoStateChanged(CSSSelector::PseudoFullScreen); | 489 m_fullScreenElement->pseudoStateChanged(CSSSelector::PseudoFullScreen); |
490 m_fullScreenElement = nullptr; | 490 m_fullScreenElement = nullptr; |
491 | 491 |
492 if (document()->frame()) | 492 if (document()->frame()) |
493 document()->frame()->eventHandler().scheduleHoverStateUpdate(); | 493 document()->frame()->eventHandler().scheduleHoverStateUpdate(); |
494 | 494 |
495 // When fullyExitFullscreen is called, we call exitFullscreen on the topDocu
ment(). That means | 495 // When fullyExitFullscreen is called, we call exitFullscreen on the topDocu
ment(). That means |
496 // that the events will be queued there. So if we have no events here, start
the timer on the | 496 // that the events will be queued there. So if we have no events here, start
the timer on the |
497 // exiting document. | 497 // exiting document. |
498 Document* exitingDocument = document(); | 498 Document* exitingDocument = document(); |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
625 #if ENABLE(OILPAN) | 625 #if ENABLE(OILPAN) |
626 visitor->trace(m_fullScreenElement); | 626 visitor->trace(m_fullScreenElement); |
627 visitor->trace(m_fullScreenElementStack); | 627 visitor->trace(m_fullScreenElementStack); |
628 visitor->trace(m_eventQueue); | 628 visitor->trace(m_eventQueue); |
629 #endif | 629 #endif |
630 WillBeHeapSupplement<Document>::trace(visitor); | 630 WillBeHeapSupplement<Document>::trace(visitor); |
631 DocumentLifecycleObserver::trace(visitor); | 631 DocumentLifecycleObserver::trace(visitor); |
632 } | 632 } |
633 | 633 |
634 } // namespace blink | 634 } // namespace blink |
OLD | NEW |