Changeset 86737 in webkit
- Timestamp:
- May 17, 2011 11:12:12 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r86736 r86737 1 2011-05-17 Jeremy Noble <jer.noble@apple.com> 2 3 Reviewed by Darin Adler. 4 5 Removing a full-screen element or ancestor from the DOM should trigger exiting full-screen mode. 6 https://bugs.webkit.org/show_bug.cgi?id=60997 7 8 Updated the following tests with the new expectation that removing an element from the DOM will trigger 9 full screen mode to exit. 10 11 * fullscreen/full-screen-remove-ancestor-expected.txt: 12 * fullscreen/full-screen-remove-ancestor.html: 13 * fullscreen/full-screen-remove-children-expected.txt: 14 * fullscreen/full-screen-remove-children.html: 15 * fullscreen/full-screen-remove-expected.txt: 16 * fullscreen/full-screen-remove.html: 17 1 18 2011-05-17 Csaba Osztrogonác <ossy@webkit.org> 2 19 -
trunk/LayoutTests/fullscreen/full-screen-remove-ancestor-expected.txt
r75450 r86737 2 2 EXPECTED (document.webkitCurrentFullScreenElement == '[object HTMLElement]') OK 3 3 EVENT(webkitfullscreenchange) 4 EXPECTED (document.webkitCurrentFullScreenElement == ' [object HTMLHtmlElement]') OK4 EXPECTED (document.webkitCurrentFullScreenElement == 'null') OK 5 5 END OF TEST 6 6 -
trunk/LayoutTests/fullscreen/full-screen-remove-ancestor.html
r81038 r86737 20 20 21 21 var spanEnteredFullScreen = function(event) { 22 callback = documentEnteredFullScreen;22 callback = spanExitedFullScreen; 23 23 testExpected("document.webkitCurrentFullScreenElement", span); 24 24 document.body.removeChild(div); 25 25 }; 26 26 27 var documentEnteredFullScreen = function(event) {27 var spanExitedFullScreen = function(event) { 28 28 callback = null; 29 testExpected("document.webkitCurrentFullScreenElement", document.documentElement);29 testExpected("document.webkitCurrentFullScreenElement", null); 30 30 endTest(); 31 31 }; -
trunk/LayoutTests/fullscreen/full-screen-remove-children-expected.txt
r86185 r86737 2 2 EXPECTED (document.webkitCurrentFullScreenElement == '[object HTMLElement]') OK 3 3 EVENT(webkitfullscreenchange) 4 EXPECTED (document.webkitCurrentFullScreenElement == ' [object HTMLHtmlElement]') OK4 EXPECTED (document.webkitCurrentFullScreenElement == 'null') OK 5 5 END OF TEST 6 6 -
trunk/LayoutTests/fullscreen/full-screen-remove-children.html
r86185 r86737 20 20 21 21 var spanEnteredFullScreen = function(event) { 22 callback = documentEnteredFullScreen;22 callback = spanExitedFullScreen; 23 23 testExpected("document.webkitCurrentFullScreenElement", span); 24 24 div.innerHTML = ""; 25 25 }; 26 26 27 var documentEnteredFullScreen = function(event) {27 var spanExitedFullScreen = function(event) { 28 28 callback = null; 29 testExpected("document.webkitCurrentFullScreenElement", document.documentElement);29 testExpected("document.webkitCurrentFullScreenElement", null); 30 30 endTest(); 31 31 }; -
trunk/LayoutTests/fullscreen/full-screen-remove-expected.txt
r75450 r86737 2 2 EXPECTED (document.webkitCurrentFullScreenElement == '[object HTMLElement]') OK 3 3 EVENT(webkitfullscreenchange) 4 EXPECTED (document.webkitCurrentFullScreenElement == ' [object HTMLHtmlElement]') OK4 EXPECTED (document.webkitCurrentFullScreenElement == 'null') OK 5 5 END OF TEST 6 6 -
trunk/LayoutTests/fullscreen/full-screen-remove.html
r81038 r86737 19 19 20 20 var spanEnteredFullScreen = function(event) { 21 callback = documentEnteredFullScreen;21 callback = spanExitedFullScreen; 22 22 testExpected("document.webkitCurrentFullScreenElement", span); 23 23 span.parentNode.removeChild(span); 24 24 }; 25 25 26 var documentEnteredFullScreen = function(event) {26 var spanExitedFullScreen = function(event) { 27 27 callback = null; 28 testExpected("document.webkitCurrentFullScreenElement", document.documentElement);28 testExpected("document.webkitCurrentFullScreenElement", null); 29 29 endTest(); 30 30 }; -
trunk/Source/WebCore/ChangeLog
r86732 r86737 1 2011-05-17 Jeremy Noble <jer.noble@apple.com> 2 3 Reviewed by Darin Adler. 4 5 Removing a full-screen element or ancestor from the DOM should trigger exiting full-screen mode. 6 https://bugs.webkit.org/show_bug.cgi?id=60997 7 8 Tests: fullscreen/full-screen-remove-ancestor.html 9 fullscreen/full-screen-remove-children.html 10 fullscreen/full-screen-remove.html 11 12 * dom/Document.cpp: 13 (WebCore::Document::fullScreenChangeDelayTimerFired): If the target node was removed from the document 14 make sure to message the documentElement() as well. 15 (WebCore::Document::fullScreenElementRemoved): Cancel full screen mode. 16 1 17 2011-05-17 Yuta Kitamura <yutak@chromium.org> 2 18 -
trunk/Source/WebCore/dom/Document.cpp
r86700 r86737 4988 4988 4989 4989 element->dispatchEvent(Event::create(eventNames().webkitfullscreenchangeEvent, true, false)); 4990 4991 // If the element was removed from our tree, also message the documentElement. 4992 if (!contains(element.get())) 4993 m_fullScreenChangeEventTargetQueue.append(documentElement()); 4990 4994 } 4991 4995 } … … 4993 4997 void Document::fullScreenElementRemoved() 4994 4998 { 4995 // If the current full screen element or any of its ancestors is removed, set the current 4996 // full screen element to the document root, and fire a fullscreenchange event to inform 4997 // clients of the DOM. 4998 if (m_fullScreenRenderer) 4999 m_fullScreenRenderer->remove(); 5000 setFullScreenRenderer(0); 5001 5002 m_fullScreenChangeEventTargetQueue.append(m_fullScreenElement.release()); 5003 m_fullScreenElement = documentElement(); 5004 recalcStyle(Force); 5005 5006 // Dispatch this event manually, before the element is actually removed from the DOM 5007 // so that the message cascades as expected. 5008 fullScreenChangeDelayTimerFired(&m_fullScreenChangeDelayTimer); 5009 m_fullScreenChangeDelayTimer.stop(); 4999 webkitCancelFullScreen(); 5010 5000 } 5011 5001
Note: See TracChangeset
for help on using the changeset viewer.