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