Changeset 84706 in webkit
- Timestamp:
- Apr 22, 2011 4:52:44 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 5 added
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r84696 r84706 1 2011-04-19 Jer Noble <jer.noble@apple.com> 2 3 Reviewed by Daniel Bates. 4 5 Full Screen from within an <iframe> does not cause <iframe> to resize. 6 https://bugs.webkit.org/show_bug.cgi?id=58638 7 8 * fullscreen/full-screen-frameset-expected.txt: Added. 9 * fullscreen/full-screen-frameset.html: Added. 10 * fullscreen/content/inner.html: Added. 11 * fullscreen/full-screen-iframe-allowed-expected.txt: Updated. 12 * fullscreen/full-screen-iframe-allowed.html: Add a button with which to trigger 13 full screen mode in Safari. 14 * fullscreen/full-screen-iframe-not-allowed-expected.txt: Updated. 15 * fullscreen/full-screen-iframe-not-allowed.html: Ditto. 16 * fullscreen/resources/allowed.html: Added. 17 * fullscreen/resources/inner.html: Added. 18 1 19 2011-04-22 Xiaomei Ji <xji@chromium.org> 2 20 -
trunk/LayoutTests/fullscreen/full-screen-iframe-allowed-expected.txt
r81038 r84706 1 1 Test for bug 56264: Handle entering full screen security restrictions 2 2 3 To test manually, press Space- the page should enter full screen mode.3 To test manually, click the "Go full screen" button - the page should enter full screen mode. 4 4 5 5 EVENT(webkitfullscreenchange) 6 SUCCEED - entered full screen! 6 TEST(document.getElementById('frame').contentDocument.width==document.width) OK 7 7 END OF TEST 8 8 -
trunk/LayoutTests/fullscreen/full-screen-iframe-allowed.html
r81038 r84706 1 1 <p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=56264">bug 56264</a>: 2 2 Handle entering full screen security restrictions</p> 3 <p>To test manually, press Space- the page should enter full screen mode.</p>3 <p>To test manually, click the "Go full screen" button - the page should enter full screen mode.</p> 4 4 <script src="full-screen-test.js"></script> 5 5 <script> … … 8 8 9 9 waitForEvent(frame.contentDocument, 'webkitfullscreenchange', function() { 10 consoleWrite("SUCCEED - entered full screen!");10 test("document.getElementById('frame').contentDocument.width==document.width") 11 11 endTest(); 12 12 }); … … 23 23 } 24 24 </script> 25 <iframe id="frame" src=" about:blank" onload="runTest()" webkitallowfullscreen>25 <iframe id="frame" src="resources/inner.html" width="300" height="100" onload="runTest()" webkitallowfullscreen> 26 26 </iframe> -
trunk/LayoutTests/fullscreen/full-screen-iframe-not-allowed-expected.txt
r81038 r84706 1 1 Test for bug 56264: Handle entering full screen security restrictions 2 2 3 To test manually, press Space- the page should not enter full screen mode.3 To test manually, click the "Go full screen" button - the page should not enter full screen mode. 4 4 5 5 SUCCEED - did not enter full screen! -
trunk/LayoutTests/fullscreen/full-screen-iframe-not-allowed.html
r81038 r84706 1 1 <p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=56264">bug 56264</a>: 2 2 Handle entering full screen security restrictions</p> 3 <p>To test manually, press Space- the page should not enter full screen mode.</p>3 <p>To test manually, click the "Go full screen" button - the page should not enter full screen mode.</p> 4 4 <script src="full-screen-test.js"></script> 5 5 <script> … … 23 23 } 24 24 </script> 25 <iframe id="frame" src=" about:blank" onload="runTest()">25 <iframe id="frame" src="resources/inner.html" onload="runTest()"> 26 26 </iframe> -
trunk/Source/WebCore/ChangeLog
r84701 r84706 1 2011-04-19 Jer Noble <jer.noble@apple.com> 2 3 Reviewed by Daniel Bates. 4 5 Full Screen from within an <iframe> does not cause <iframe> to resize. 6 https://bugs.webkit.org/show_bug.cgi?id=58638 7 8 Tests: fullscreen/full-screen-frameset.html 9 10 * css/CSSStyleSelector.cpp: 11 (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Add the 12 -webkit-full-screen pseudo class to frame elements which contain 13 full screen elements. 14 * css/fullscreen.css: 15 (iframe:-webkit-full-screen): Add iframe-specific styling rules. 16 * dom/Document.cpp: 17 (WebCore::Document::setContainsFullScreenElementRecursively): Added. Walk up each 18 successive document owner element, calling setContainsFullScreenElement() if 19 owner is a frame element. 20 (WebCore::Document::fullScreenIsAllowedForElement): Use the new Element::isFrameElementBase 21 call instead of checking the element's tag name. 22 (WebCore::Document::webkitWillEnterFullScreenForElement): Mark any containing 23 iframes as containing a full screen element. 24 (WebCore::Document::webkitWillExitFullScreenForElement): Ditto. 25 * dom/Element.h: 26 (WebCore::Element::isFrameElementBase): Added. 27 * html/HTMLFrameElement.h: 28 (WebCore::HTMLFrameElement::allowFullScreen): Disable full screen from within 29 HTMLFrameElements. 30 * html/HTMLFrameElementBase.cpp: 31 (WebCore::HTMLFrameElementBase::setContainsFullScreenElement): Added. 32 * html/HTMLFrameElementBase.h: 33 (WebCore::HTMLFrameElementBase::containsFullScreenElement): Added. 34 (WebCore::HTMLFrameElementBase::isFrameElementBase): Added. 35 1 36 2011-04-22 Michael Saboff <msaboff@apple.com> 2 37 -
trunk/Source/WebCore/css/CSSStyleSelector.cpp
r84609 r84706 60 60 #include "HTMLDocument.h" 61 61 #include "HTMLElement.h" 62 #include "HTMLFrameElementBase.h" 62 63 #include "HTMLInputElement.h" 63 64 #include "HTMLNames.h" … … 2946 2947 // that element. Also, an <iframe>, <object> or <embed> element whose child browsing 2947 2948 // context's Document is in the fullscreen state has the 'full-screen' pseudoclass applied. 2949 if (e->isFrameElementBase() && static_cast<HTMLFrameElementBase*>(e)->containsFullScreenElement()) 2950 return true; 2948 2951 if (!e->document()->webkitIsFullScreen()) 2949 2952 return false; -
trunk/Source/WebCore/css/fullscreen.css
r83654 r84706 23 23 } 24 24 25 iframe:-webkit-full-screen { 26 margin: 0 !important; 27 padding: 0 !important; 28 border: 0 !important; 29 position: fixed !important; 30 height: 100% !important; 31 width: 100% !important; 32 left: 0 !important; 33 top: 0 !important; 34 } 35 25 36 video:-webkit-full-page-media:-webkit-full-screen::-webkit-media-controls-panel { 26 37 bottom: 0px; -
trunk/Source/WebCore/dom/Document.cpp
r84688 r84706 4775 4775 ASSERT(element); 4776 4776 while (HTMLFrameOwnerElement* ownerElement = element->document()->ownerElement()) { 4777 if (!ownerElement-> hasTagName(frameTag) && !ownerElement->hasTagName(iframeTag))4777 if (!ownerElement->isFrameElementBase()) 4778 4778 continue; 4779 4779 … … 4813 4813 page()->chrome()->client()->exitFullScreenForElement(m_fullScreenElement.get()); 4814 4814 } 4815 4815 4816 static void setContainsFullScreenElementRecursively(Element* element, bool contains) 4817 { 4818 if (!element) 4819 return; 4820 4821 do { 4822 if (!element->isFrameElementBase()) 4823 continue; 4824 4825 static_cast<HTMLFrameElementBase*>(element)->setContainsFullScreenElement(contains); 4826 } while ((element = element->document()->ownerElement())); 4827 } 4828 4816 4829 void Document::webkitWillEnterFullScreenForElement(Element* element) 4817 4830 { … … 4824 4837 m_fullScreenElement->detach(); 4825 4838 4839 setContainsFullScreenElementRecursively(ownerElement(), true); 4840 4826 4841 recalcStyle(Force); 4827 4842 … … 4850 4865 void Document::webkitWillExitFullScreenForElement(Element*) 4851 4866 { 4867 setContainsFullScreenElementRecursively(ownerElement(), false); 4868 4852 4869 if (m_fullScreenRenderer) { 4853 4870 m_fullScreenRenderer->setAnimating(true); -
trunk/Source/WebCore/dom/Element.h
r84665 r84706 322 322 virtual bool isInRange() const { return false; } 323 323 virtual bool isOutOfRange() const { return false; } 324 virtual bool isFrameElementBase() const { return false; } 324 325 325 326 virtual bool formControlValueMatchesRenderer() const { return false; } -
trunk/Source/WebCore/html/HTMLFrameElement.h
r82747 r84706 47 47 virtual void parseMappedAttribute(Attribute*); 48 48 49 #if ENABLE(FULLSCREEN_API) 50 virtual bool allowFullScreen() const { return false; } 51 #endif 52 49 53 bool m_frameBorder; 50 54 bool m_frameBorderSet; -
trunk/Source/WebCore/html/HTMLFrameElementBase.cpp
r84506 r84706 289 289 return hasAttribute(webkitallowfullscreenAttr); 290 290 } 291 292 void HTMLFrameElementBase::setContainsFullScreenElement(bool contains) 293 { 294 m_containsFullScreenElement = contains; 295 setNeedsStyleRecalc(SyntheticStyleChange); 296 } 291 297 #endif 292 298 -
trunk/Source/WebCore/html/HTMLFrameElementBase.h
r81038 r84706 46 46 #if ENABLE(FULLSCREEN_API) 47 47 virtual bool allowFullScreen() const; 48 virtual void setContainsFullScreenElement(bool); 49 virtual bool containsFullScreenElement() const { return m_containsFullScreenElement; }; 48 50 #endif 49 51 … … 62 64 63 65 virtual bool isURLAttribute(Attribute*) const; 66 virtual bool isFrameElementBase() const { return true; } 64 67 65 68 virtual void willRemove(); … … 94 97 bool m_viewSource; 95 98 bool m_remainsAliveOnRemovalFromTree; 99 100 #if ENABLE(FULLSCREEN_API) 101 bool m_containsFullScreenElement; 102 #endif 96 103 }; 97 104 -
trunk/Source/WebKit/mac/ChangeLog
r84646 r84706 1 2011-04-19 Jer Noble <jer.noble@apple.com> 2 3 Reviewed by Daniel Bates. 4 5 Full Screen from within an <iframe> does not cause <iframe> to resize. 6 https://bugs.webkit.org/show_bug.cgi?id=58638 7 8 Tests: fullscreen/full-screen-frameset-allowed.html 9 fullscreen/full-screen-frameset-not-allowed.html 10 11 Return the _element's document instead of the WKView's document, which 12 will be different in the case of elements within <iframe>s. 13 14 * WebView/WebFullScreenController.mm: 15 (-[WebFullScreenController _document]): 16 1 17 2011-04-22 Jer Noble <jer.noble@apple.com> 2 18 -
trunk/Source/WebKit/mac/WebView/WebFullScreenController.mm
r83458 r84706 770 770 - (Document*)_document 771 771 { 772 return core([[[self webView] mainFrame] DOMDocument]);772 return _element->document(); 773 773 } 774 774 -
trunk/Source/WebKit2/ChangeLog
r84702 r84706 1 2011-04-19 Jer Noble <jer.noble@apple.com> 2 3 Reviewed by Daniel Bates. 4 5 Full Screen from within an <iframe> does not cause <iframe> to resize. 6 https://bugs.webkit.org/show_bug.cgi?id=58638 7 8 Tests: fullscreen/full-screen-frameset-allowed.html 9 fullscreen/full-screen-frameset-not-allowed.html 10 11 * UIProcess/mac/WKFullScreenWindowController.mm: 12 (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Cancel the background animation 13 if the full screen animation finishes first. 14 * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm: 15 (WebKit::WebFullScreenManagerMac::WebFullScreenManagerMac): m_fullScreenRootLayer was uninitialized. 16 1 17 2011-04-22 Sam Weinig <sam@webkit.org> 2 18 -
trunk/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm
r81901 r84706 246 246 [animationView addSubview:_webView positioned:NSWindowBelow relativeTo:_layerHostingView.get()]; 247 247 [_webView setFrame:[animationView bounds]]; 248 249 [CATransaction begin]; 250 [CATransaction setDisableActions:YES]; 251 [[[self _fullScreenWindow] backgroundLayer] setHidden:YES]; 252 [CATransaction commit]; 248 253 249 254 // FIXME: In Barolo, orderIn will animate, which is not what we want. Find a way -
trunk/Source/WebKit2/WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm
r84698 r84706 118 118 WebFullScreenManagerMac::WebFullScreenManagerMac(WebPage* page) 119 119 : WebFullScreenManager(page) 120 , m_fullScreenRootLayer(0) 120 121 { 121 122 m_enterFullScreenListener.adoptNS([[WebFullScreenManagerAnimationListener alloc] initWithManager:this began:&WebFullScreenManagerMac::beganEnterFullScreenAnimation finished:&WebFullScreenManagerMac::finishedEnterFullScreenAnimation]);
Note: See TracChangeset
for help on using the changeset viewer.