Changeset 126043 in webkit
- Timestamp:
- Aug 20, 2012 11:11:22 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r126042 r126043 1 2012-08-20 Bill Budge <bbudge@chromium.org> 2 3 webkitfullscreenchange not fired properly in iframe. 4 https://bugs.webkit.org/show_bug.cgi?id=93525 5 6 Reviewed by Adam Barth. 7 8 webkitCancelFullScreen exits fullscreen by invoking webkitExitFullScreen on topDocument. 9 However, if webkitDidExitFullScreenForElement is invoked on a descendant document, no events 10 get dispatched. This change starts the event dispatch delay timer on the document where 11 webkitCancelFullScreen was called, so that the events get dispatched. In addition, when events 12 are dispatched, the check whether a node has been removed is changed to also check that the 13 node isn't in another document, as can happen with frames. Finally, webkitExitFullscreen 14 is fixed to remove unnecessary code and conform to the spec. 15 16 No new tests (the existing fullscreen/exit-full-screen-iframe.html test now passes). 17 18 * dom/Document.cpp: 19 (WebCore::Document::webkitExitFullscreen): 20 (WebCore::Document::webkitDidExitFullScreenForElement): 21 (WebCore::Document::fullScreenChangeDelayTimerFired): 22 1 23 2012-08-20 Yuzhu Shen <yzshen@chromium.com> 2 24 -
trunk/Source/WebCore/dom/Document.cpp
r125988 r126043 6 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All rights reserved. 7 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/) 8 * Copyright (C) 2008, 2009, 2011 Google Inc. All rights reserved.8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 9 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 10 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. … … 5555 5555 // 2. Queue a task to fire an event named fullscreenchange with its bubbles attribute set to true 5556 5556 // on doc. 5557 Node* target = currentDoc->m_fullScreenElement.get();5558 if (!target)5559 target = currentDoc;5560 5557 addDocumentToFullScreenChangeEventQueue(currentDoc); 5561 5558 5562 5559 // 3. If doc's fullscreen element stack is empty and doc's browsing context has a browsing context 5563 5560 // container, set doc to that browsing context container's node document. 5564 if (!newTop && currentDoc->ownerElement()) 5561 if (!newTop && currentDoc->ownerElement()) { 5565 5562 currentDoc = currentDoc->ownerElement()->document(); 5563 continue; 5564 } 5566 5565 5567 5566 // 4. Otherwise, set doc to null. … … 5676 5675 scheduleForcedStyleRecalc(); 5677 5676 5678 m_fullScreenChangeDelayTimer.startOneShot(0); 5677 // When webkitCancelFullScreen is called, we call webkitExitFullScreen on the topDocument(). That 5678 // means that the events will be queued there. So if we have no events here, start the timer on 5679 // the exiting document. 5680 Document* exitingDocument = this; 5681 if (m_fullScreenChangeEventTargetQueue.isEmpty() && m_fullScreenErrorEventTargetQueue.isEmpty()) 5682 exitingDocument = topDocument(); 5683 exitingDocument->m_fullScreenChangeDelayTimer.startOneShot(0); 5679 5684 } 5680 5685 … … 5747 5752 node = documentElement(); 5748 5753 5749 // If the element was removed from our tree, also message the documentElement. 5750 if (!contains(node.get())) 5754 // If the element was removed from our tree, also message the documentElement. Since we may 5755 // have a document hierarchy, check that node isn't in another document. 5756 if (!contains(node.get()) && !node->inDocument()) 5751 5757 changeQueue.append(documentElement()); 5752 5758 … … 5762 5768 node = documentElement(); 5763 5769 5764 // If the node was removed from our tree, also message the documentElement. 5765 if (!contains(node.get())) 5770 // If the element was removed from our tree, also message the documentElement. Since we may 5771 // have a document hierarchy, check that node isn't in another document. 5772 if (!contains(node.get()) && !node->inDocument()) 5766 5773 errorQueue.append(documentElement()); 5767 5774
Note: See TracChangeset
for help on using the changeset viewer.