Changeset 87802 in webkit
- Timestamp:
- Jun 1, 2011 7:11:23 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r87800 r87802 1 2011-06-01 Shishir Agrawal <shishir@chromium.org> 2 3 Reviewed by Tony Gentilcore. 4 5 Renaming the Page Visibility attributes as per the modified spec draft. 6 https://bugs.webkit.org/show_bug.cgi?id=61825 7 8 Spec draft: 9 http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PageVisibility/Overview.html 10 11 - Event needs to be webkitVisibilityChange from webkitVisibilityStateChange 12 - The attribute webkitIsVisible needs to change to webkitHidden 13 14 * fast/events/page-visibility-iframe-delete-test.html: 15 * fast/events/page-visibility-iframe-move-test-expected.txt: 16 * fast/events/page-visibility-iframe-move-test.html: 17 * fast/events/page-visibility-iframe-propagation-test-expected.txt: 18 * fast/events/page-visibility-iframe-propagation-test.html: 19 * fast/events/page-visibility-transition-test-expected.txt: 20 * fast/events/page-visibility-transition-test.html: 21 1 22 2011-06-01 Gabor Loki <loki@webkit.org> 2 23 -
trunk/LayoutTests/fast/events/page-visibility-iframe-delete-test.html
r86047 r87802 36 36 37 37 document.addEventListener( 38 "webkitvisibility statechange", onMainPageVisibilityChange, false);38 "webkitvisibilitychange", onMainPageVisibilityChange, false); 39 39 frame2.contentDocument.addEventListener( 40 "webkitvisibility statechange", onFrame2VisibilityChange, false);40 "webkitvisibilitychange", onFrame2VisibilityChange, false); 41 41 // Change the visibility of the current page to invisible. 42 42 if (window.layoutTestController) { -
trunk/LayoutTests/fast/events/page-visibility-iframe-move-test-expected.txt
r86047 r87802 6 6 Window 1 Loaded 7 7 Window 2 Loaded 8 PASS window.document.webkit IsVisible is true9 PASS window2.document.webkit IsVisible is true10 PASS iframe.contentDocument.webkit IsVisible is true11 PASS window.document.webkit IsVisible is false12 PASS window2.document.webkit IsVisible is true13 PASS iframe.contentDocument.webkit IsVisible is true8 PASS window.document.webkitHidden is false 9 PASS window2.document.webkitHidden is false 10 PASS iframe.contentDocument.webkitHidden is false 11 PASS window.document.webkitHidden is true 12 PASS window2.document.webkitHidden is false 13 PASS iframe.contentDocument.webkitHidden is false 14 14 Adopted iframe to Window 1 15 PASS window.document.webkit IsVisible is false16 PASS window2.document.webkit IsVisible is true17 PASS iframe.contentDocument.webkit IsVisible is false15 PASS window.document.webkitHidden is true 16 PASS window2.document.webkitHidden is false 17 PASS iframe.contentDocument.webkitHidden is true 18 18 PASS successfullyParsed is true 19 19 -
trunk/LayoutTests/fast/events/page-visibility-iframe-move-test.html
r86047 r87802 21 21 iframe = window2.document.getElementById("iframe"); 22 22 23 shouldBe True("window.document.webkitIsVisible");24 shouldBe True("window2.document.webkitIsVisible");25 shouldBe True("iframe.contentDocument.webkitIsVisible");23 shouldBeFalse("window.document.webkitHidden"); 24 shouldBeFalse("window2.document.webkitHidden"); 25 shouldBeFalse("iframe.contentDocument.webkitHidden"); 26 26 27 27 // Change the visibility of the current page to invisible. … … 33 33 34 34 function onVisibilityChange() { 35 shouldBe False("window.document.webkitIsVisible");36 shouldBe True("window2.document.webkitIsVisible");37 shouldBe True("iframe.contentDocument.webkitIsVisible");35 shouldBeTrue("window.document.webkitHidden"); 36 shouldBeFalse("window2.document.webkitHidden"); 37 shouldBeFalse("iframe.contentDocument.webkitHidden"); 38 38 39 39 window.document.adoptNode(iframe); … … 41 41 debug("Adopted iframe to Window 1"); 42 42 43 shouldBe False("window.document.webkitIsVisible");44 shouldBe True("window2.document.webkitIsVisible");45 shouldBe False("iframe.contentDocument.webkitIsVisible");43 shouldBeTrue("window.document.webkitHidden"); 44 shouldBeFalse("window2.document.webkitHidden"); 45 shouldBeTrue("iframe.contentDocument.webkitHidden"); 46 46 47 47 window2.close(); … … 57 57 58 58 debug("Window 1 Loaded"); 59 document.addEventListener("webkitvisibility statechange",59 document.addEventListener("webkitvisibilitychange", 60 60 onVisibilityChange, false); 61 61 -
trunk/LayoutTests/fast/events/page-visibility-iframe-propagation-test-expected.txt
r86047 r87802 6 6 Main Page: 7 7 PASS document.webkitVisibilityState is "visible" 8 PASS document.webkit IsVisible is true8 PASS document.webkitHidden is false 9 9 Child Frame: 10 10 PASS childFrame.contentDocument.webkitVisibilityState is "visible" 11 PASS childFrame.contentDocument.webkit IsVisible is true11 PASS childFrame.contentDocument.webkitHidden is false 12 12 Main Page: 13 13 PASS document.webkitVisibilityState is "hidden" 14 PASS document.webkit IsVisible is false14 PASS document.webkitHidden is true 15 15 Child Frame: 16 16 PASS childFrame.contentDocument.webkitVisibilityState is "hidden" 17 PASS childFrame.contentDocument.webkit IsVisible is false17 PASS childFrame.contentDocument.webkitHidden is true 18 18 Main Page: 19 19 PASS document.webkitVisibilityState is "visible" 20 PASS document.webkit IsVisible is true20 PASS document.webkitHidden is false 21 21 Child Frame: 22 22 PASS childFrame.contentDocument.webkitVisibilityState is "visible" 23 PASS childFrame.contentDocument.webkit IsVisible is true23 PASS childFrame.contentDocument.webkitHidden is false 24 24 PASS successfullyParsed is true 25 25 -
trunk/LayoutTests/fast/events/page-visibility-iframe-propagation-test.html
r86047 r87802 26 26 debug("Main Page:"); 27 27 shouldBeEqualToString("document.webkitVisibilityState", "visible"); 28 shouldBe True("document.webkitIsVisible");28 shouldBeFalse("document.webkitHidden"); 29 29 } 30 30 … … 32 32 debug("Main Page:"); 33 33 shouldBeEqualToString("document.webkitVisibilityState", "hidden"); 34 shouldBe False("document.webkitIsVisible");34 shouldBeTrue("document.webkitHidden"); 35 35 } 36 36 … … 39 39 shouldBeEqualToString("childFrame.contentDocument.webkitVisibilityState", 40 40 "visible"); 41 shouldBe True("childFrame.contentDocument.webkitIsVisible");41 shouldBeFalse("childFrame.contentDocument.webkitHidden"); 42 42 } 43 43 … … 46 46 shouldBeEqualToString("childFrame.contentDocument.webkitVisibilityState", 47 47 "hidden"); 48 shouldBe False("childFrame.contentDocument.webkitIsVisible");48 shouldBeTrue("childFrame.contentDocument.webkitHidden"); 49 49 } 50 50 … … 60 60 childFrame = document.getElementById("childFrame"); 61 61 childFrame.contentDocument.addEventListener( 62 "webkitvisibility statechange", onChildFrameVisibilityChange, false);63 document.addEventListener("webkitvisibility statechange",62 "webkitvisibilitychange", onChildFrameVisibilityChange, false); 63 document.addEventListener("webkitvisibilitychange", 64 64 onVisibilityChange, false); 65 65 -
trunk/LayoutTests/fast/events/page-visibility-transition-test-expected.txt
r86047 r87802 5 5 6 6 PASS document.webkitVisibilityState is "visible" 7 PASS document.webkit IsVisible is true7 PASS document.webkitHidden is false 8 8 PASS document.webkitVisibilityState is "hidden" 9 PASS document.webkit IsVisible is false9 PASS document.webkitHidden is true 10 10 PASS document.webkitVisibilityState is "hidden" 11 PASS document.webkit IsVisible is false11 PASS document.webkitHidden is true 12 12 PASS document.webkitVisibilityState is "visible" 13 PASS document.webkit IsVisible is true13 PASS document.webkitHidden is false 14 14 PASS successfullyParsed is true 15 15 -
trunk/LayoutTests/fast/events/page-visibility-transition-test.html
r86047 r87802 25 25 function checkIsPageVisible() { 26 26 shouldBeEqualToString("document.webkitVisibilityState", "visible"); 27 shouldBe True("document.webkitIsVisible");27 shouldBeFalse("document.webkitHidden"); 28 28 } 29 29 30 30 function checkIsPageHidden() { 31 31 shouldBeEqualToString("document.webkitVisibilityState", "hidden"); 32 shouldBe False("document.webkitIsVisible");32 shouldBeTrue("document.webkitHidden"); 33 33 } 34 34 … … 42 42 function startTest() { 43 43 document.addEventListener( 44 "webkitvisibility statechange", onVisibilityChange, false);44 "webkitvisibilitychange", onVisibilityChange, false); 45 45 checkIsPageVisible(); 46 46 numVisibilityChanges++; -
trunk/Source/WebCore/ChangeLog
r87801 r87802 1 2011-06-01 Shishir Agrawal <shishir@chromium.org> 2 3 Reviewed by Tony Gentilcore. 4 5 Renaming the Page Visibility attributes as per the modified spec draft. 6 https://bugs.webkit.org/show_bug.cgi?id=61825 7 8 Spec draft: 9 http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PageVisibility/Overview.html 10 11 - Event needs to be webkitVisibilityChange from webkitVisibilityStateChange 12 - The attribute webkitIsVisible needs to change to webkitHidden 13 14 * dom/Document.cpp: 15 (WebCore::Document::webkitHidden): 16 (WebCore::Document::dispatchVisibilityStateChangeEvent): 17 * dom/Document.h: 18 * dom/Document.idl: 19 * dom/EventNames.h: 20 1 21 2011-06-01 Nikolas Zimmermann <nzimmermann@rim.com> 2 22 -
trunk/Source/WebCore/dom/Document.cpp
r87756 r87802 1376 1376 } 1377 1377 1378 bool Document::webkit IsVisible() const1379 { 1380 return visibilityState() == PageVisibilityStateVisible;1378 bool Document::webkitHidden() const 1379 { 1380 return visibilityState() != PageVisibilityStateVisible; 1381 1381 } 1382 1382 1383 1383 void Document::dispatchVisibilityStateChangeEvent() 1384 1384 { 1385 dispatchEvent(Event::create(eventNames().webkitvisibility statechangeEvent, false, false));1385 dispatchEvent(Event::create(eventNames().webkitvisibilitychangeEvent, false, false)); 1386 1386 } 1387 1387 #endif -
trunk/Source/WebCore/dom/Document.h
r87756 r87802 310 310 #endif 311 311 #if ENABLE(PAGE_VISIBILITY_API) 312 DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitvisibility statechange);312 DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitvisibilitychange); 313 313 #endif 314 314 … … 389 389 #if ENABLE(PAGE_VISIBILITY_API) 390 390 String webkitVisibilityState() const; 391 bool webkit IsVisible() const;391 bool webkitHidden() const; 392 392 void dispatchVisibilityStateChangeEvent(); 393 393 #endif -
trunk/Source/WebCore/dom/Document.idl
r86700 r87802 340 340 // Page visibility API. 341 341 readonly attribute [Conditional=PAGE_VISIBILITY_API] DOMString webkitVisibilityState; 342 readonly attribute [Conditional=PAGE_VISIBILITY_API] boolean webkit IsVisible;342 readonly attribute [Conditional=PAGE_VISIBILITY_API] boolean webkitHidden; 343 343 344 344 }; -
trunk/Source/WebCore/dom/EventNames.h
r86047 r87802 107 107 macro(updateready) \ 108 108 macro(versionchange) \ 109 macro(webkitvisibility statechange) \109 macro(webkitvisibilitychange) \ 110 110 macro(write) \ 111 111 macro(writeend) \
Note: See TracChangeset
for help on using the changeset viewer.