Source/WebCore/ChangeLog

 12012-10-16 James Simonsen <simonjam@chromium.org>
 2
 3 [Page Visibility API] View-less documents should report as hidden
 4 https://bugs.webkit.org/show_bug.cgi?id=99410
 5
 6 Reviewed by Tony Gentilcore.
 7
 8 Test: fast/events/page-visibility-null-view.html
 9
 10 * dom/Document.cpp:
 11 (WebCore::Document::visibilityState):
 12
1132012-10-16 Simon Fraser <simon.fraser@apple.com>
214
315 Some #include hygiene

Source/WebCore/dom/Document.cpp

@@PageVisibilityState Document::visibilityState() const
16241624{
16251625 // The visibility of the document is inherited from the visibility of the
16261626 // page. If there is no page associated with the document, we will assume
1627  // that the page is visible i.e. invisibility has to be explicitly
1628  // specified by the embedder.
 1627 // that the page is hidden, as specified by the spec:
 1628 // http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PageVisibility/Overview.html#dom-document-hidden
16291629 if (!m_frame || !m_frame->page())
1630  return PageVisibilityStateVisible;
 1630 return PageVisibilityStateHidden;
16311631 return m_frame->page()->visibilityState();
16321632}
16331633

LayoutTests/ChangeLog

 12012-10-16 James Simonsen <simonjam@chromium.org>
 2
 3 [Page Visibility API] View-less documents should report as hidden
 4 https://bugs.webkit.org/show_bug.cgi?id=99410
 5
 6 Reviewed by Tony Gentilcore.
 7
 8 * fast/events/page-visibility-null-view-expected.txt: Added.
 9 * fast/events/page-visibility-null-view.html: Added.
 10
1112012-10-16 Filip Pizlo <fpizlo@apple.com>
212
313 GetScopedVar CSE matches dead GetScopedVar's leading to IR corruption

LayoutTests/fast/events/page-visibility-null-view-expected.txt

 1This test checks that Page Visibility state values are correct when a document has no defaultView.
 2
 3On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 4
 5
 6PASS subdocument.defaultView == null is true
 7PASS subdocument.webkitVisibilityState is "hidden"
 8PASS subdocument.webkitHidden is true
 9PASS successfullyParsed is true
 10
 11TEST COMPLETE
 12

LayoutTests/fast/events/page-visibility-null-view.html

 1<html>
 2<head>
 3<script src="../js/resources/js-test-pre.js"></script>
 4
 5<script>
 6
 7description("This test checks that Page Visibility state values are correct when a document has no defaultView.");
 8
 9var subdocument = document.implementation.createDocument('http://www.w3.org/1999/xhtml', 'html', null);
 10
 11shouldBeTrue("subdocument.defaultView == null");
 12shouldBeEqualToString("subdocument.webkitVisibilityState", "hidden");
 13shouldBeTrue("subdocument.webkitHidden");
 14
 15</script>
 16
 17<script src="../js/resources/js-test-post.js"></script>
 18
 19</head>
 20</html>

LayoutTests/platform/gtk/TestExpectations

@@webkit.org/b/98942 storage/storageinfo-request-quota.html [ Skip ]
268268webkit.org/b/97324 fast/events/page-visibility-iframe-delete-test.html [ Skip ]
269269webkit.org/b/97324 fast/events/page-visibility-iframe-move-test.html [ Skip ]
270270webkit.org/b/97324 fast/events/page-visibility-iframe-propagation-test.html [ Skip ]
 271webkit.org/b/97324 fast/events/page-visibility-null-view.html [ Skip ]
271272webkit.org/b/97324 fast/events/page-visibility-transition-test.html [ Skip ]
272273
273274# GTK doesn't support smart replace.

LayoutTests/platform/mac/TestExpectations

@@http/tests/navigation/response204.html
397397fast/events/page-visibility-iframe-delete-test.html
398398fast/events/page-visibility-iframe-move-test.html
399399fast/events/page-visibility-iframe-propagation-test.html
 400fast/events/page-visibility-null-view.html
400401fast/events/page-visibility-transition-test.html
401402
402403# console long eval test is timeout 60616

LayoutTests/platform/qt/TestExpectations

@@fast/images/exif-orientation-css.html
569569fast/events/page-visibility-iframe-delete-test.html
570570fast/events/page-visibility-iframe-move-test.html
571571fast/events/page-visibility-iframe-propagation-test.html
 572fast/events/page-visibility-null-view.html
572573fast/events/page-visibility-transition-test.html
573574
574575# No CORS support for media elements is implemented yet.

LayoutTests/platform/win/TestExpectations

@@http/tests/navigation/response204.html
14671467fast/events/page-visibility-iframe-delete-test.html
14681468fast/events/page-visibility-iframe-move-test.html
14691469fast/events/page-visibility-iframe-propagation-test.html
 1470fast/events/page-visibility-null-view.html
14701471fast/events/page-visibility-transition-test.html
14711472
14721473# Unskip after implementing LayoutTestController::setDefersLoading and ::goBack.