| 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 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 m_savedPlaceholderFrameRect = toRenderBox(renderer)->frameRect(); | 431 m_savedPlaceholderFrameRect = toRenderBox(renderer)->frameRect(); |
| 432 m_savedPlaceholderRenderStyle = RenderStyle::clone(renderer->style()); | 432 m_savedPlaceholderRenderStyle = RenderStyle::clone(renderer->style()); |
| 433 } | 433 } |
| 434 | 434 |
| 435 if (m_fullScreenElement != document()->documentElement()) | 435 if (m_fullScreenElement != document()->documentElement()) |
| 436 RenderFullScreen::wrapRenderer(renderer, renderer ? renderer->parent() :
0, document()); | 436 RenderFullScreen::wrapRenderer(renderer, renderer ? renderer->parent() :
0, document()); |
| 437 | 437 |
| 438 m_fullScreenElement->setContainsFullScreenElementOnAncestorsCrossingFrameBou
ndaries(true); | 438 m_fullScreenElement->setContainsFullScreenElementOnAncestorsCrossingFrameBou
ndaries(true); |
| 439 | 439 |
| 440 // FIXME: This should not call updateStyleIfNeeded. | 440 // FIXME: This should not call updateStyleIfNeeded. |
| 441 document()->setNeedsStyleRecalc(SubtreeStyleChange); | 441 document()->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTrac
ing::create(StyleChangeReason::FullScreen)); |
| 442 document()->updateRenderTreeIfNeeded(); | 442 document()->updateRenderTreeIfNeeded(); |
| 443 | 443 |
| 444 m_fullScreenElement->didBecomeFullscreenElement(); | 444 m_fullScreenElement->didBecomeFullscreenElement(); |
| 445 | 445 |
| 446 if (document()->frame()) | 446 if (document()->frame()) |
| 447 document()->frame()->eventHandler().scheduleHoverStateUpdate(); | 447 document()->frame()->eventHandler().scheduleHoverStateUpdate(); |
| 448 | 448 |
| 449 m_eventQueueTimer.startOneShot(0, FROM_HERE); | 449 m_eventQueueTimer.startOneShot(0, FROM_HERE); |
| 450 } | 450 } |
| 451 | 451 |
| 452 void Fullscreen::didExitFullScreenForElement(Element*) | 452 void Fullscreen::didExitFullScreenForElement(Element*) |
| 453 { | 453 { |
| 454 if (!m_fullScreenElement) | 454 if (!m_fullScreenElement) |
| 455 return; | 455 return; |
| 456 | 456 |
| 457 if (!document()->isActive()) | 457 if (!document()->isActive()) |
| 458 return; | 458 return; |
| 459 | 459 |
| 460 m_fullScreenElement->willStopBeingFullscreenElement(); | 460 m_fullScreenElement->willStopBeingFullscreenElement(); |
| 461 | 461 |
| 462 m_fullScreenElement->setContainsFullScreenElementOnAncestorsCrossingFrameBou
ndaries(false); | 462 m_fullScreenElement->setContainsFullScreenElementOnAncestorsCrossingFrameBou
ndaries(false); |
| 463 | 463 |
| 464 m_areKeysEnabledInFullScreen = false; | 464 m_areKeysEnabledInFullScreen = false; |
| 465 | 465 |
| 466 if (m_fullScreenRenderer) | 466 if (m_fullScreenRenderer) |
| 467 m_fullScreenRenderer->unwrapRenderer(); | 467 m_fullScreenRenderer->unwrapRenderer(); |
| 468 | 468 |
| 469 m_fullScreenElement = nullptr; | 469 m_fullScreenElement = nullptr; |
| 470 document()->setNeedsStyleRecalc(SubtreeStyleChange); | 470 document()->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTrac
ing::create(StyleChangeReason::FullScreen)); |
| 471 | 471 |
| 472 if (document()->frame()) | 472 if (document()->frame()) |
| 473 document()->frame()->eventHandler().scheduleHoverStateUpdate(); | 473 document()->frame()->eventHandler().scheduleHoverStateUpdate(); |
| 474 | 474 |
| 475 // When fullyExitFullscreen is called, we call exitFullscreen on the topDocu
ment(). That means | 475 // When fullyExitFullscreen is called, we call exitFullscreen on the topDocu
ment(). That means |
| 476 // that the events will be queued there. So if we have no events here, start
the timer on the | 476 // that the events will be queued there. So if we have no events here, start
the timer on the |
| 477 // exiting document. | 477 // exiting document. |
| 478 Document* exitingDocument = document(); | 478 Document* exitingDocument = document(); |
| 479 if (m_eventQueue.isEmpty()) | 479 if (m_eventQueue.isEmpty()) |
| 480 exitingDocument = &document()->topDocument(); | 480 exitingDocument = &document()->topDocument(); |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 603 void Fullscreen::trace(Visitor* visitor) | 603 void Fullscreen::trace(Visitor* visitor) |
| 604 { | 604 { |
| 605 visitor->trace(m_fullScreenElement); | 605 visitor->trace(m_fullScreenElement); |
| 606 visitor->trace(m_fullScreenElementStack); | 606 visitor->trace(m_fullScreenElementStack); |
| 607 visitor->trace(m_fullScreenRenderer); | 607 visitor->trace(m_fullScreenRenderer); |
| 608 visitor->trace(m_eventQueue); | 608 visitor->trace(m_eventQueue); |
| 609 DocumentSupplement::trace(visitor); | 609 DocumentSupplement::trace(visitor); |
| 610 } | 610 } |
| 611 | 611 |
| 612 } // namespace blink | 612 } // namespace blink |
| OLD | NEW |